From 9fa8b196404afae6311d70c2846f81eeb2b0af33 Mon Sep 17 00:00:00 2001 From: elijah <146715005+schizoposter@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:39:24 +0200 Subject: [PATCH] initial commit (me too soon) --- assets/font.woff2 | Bin 0 -> 5372 bytes assets/style.css | 62 ++++ bulb/bulb.js | 117 ++++++ bulb/index.html | 889 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 38 ++ 5 files changed, 1106 insertions(+) create mode 100644 assets/font.woff2 create mode 100644 assets/style.css create mode 100644 bulb/bulb.js create mode 100644 bulb/index.html create mode 100644 index.html diff --git a/assets/font.woff2 b/assets/font.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..df73aeb4409767943f1aaf672ca3339cd0a0abc4 GIT binary patch literal 5372 zcmVfrw;*g=R3xN&z+kBm;wB3xiw$ z1Ry_cWprUM1(Fg6g=Y*08*F<8+!(rHKYe`=$UCJRy|in2J0+5fi$PGnfRJNF#?VUKm>Yho9O7v6@A z^T_B~`JGL&52j;HEp41b%#I+qc@Sj~aKs5< zkQlV&=`C7A<>Q7}#nH&92m>U^sm~t-E*Ah$zzXO-VTA=DNq7X;3R7QIAuC&(#Q9&i-7V+8yE*z1pr{nQ%0;0VUJuDYk%+nmp{d-L|{KJGdY&ic8=!xCX9|TjH7c!bnaD9^wE> zhEt_)#8TAc?ykK!KQ0{AalHv~8DIwh=#Gc~2mYu3Kl$QD0KT}s$k{$>I+XYV|LnkL zyFma<1#EQLYoJT%raE6W{37E{drdmyt^@X2uxP?XeP;BU(r>_ZS6wq=KN2|w6%8J| z`0x`UN(@e%Bn3*8sZgaxn+{!i46K;8>b80JS#aRUnJX{eeE13$B2<`gkrE|Kkt$t= zTzT>pD7NH;Ww&%2cFH-Yop;h9_Z(JY$4y5(anubRIz4d5L1Uh3N3~0<7Hvk+;|W9( zQZh<9$T)EkCP0u7c1DsVMVcHLmr-a@r$LiGMQLnUvSP=YEqhKpxpC(qh`#`VOm0k} zh~>W?+O9`i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~mW`cZ{molpJuYx)6% zTB20+R!%KYKlj|%==(?g@S3NqU+1@2x6VtcK%8GE2KCldVH1E{by!vGdlK2Y|~T29&O^g z>|JfQZQF*`FKn-_ZkIPRzwOkFvF?2P>5m_uD(95>=-G!4&u+^MB9nzmuJb{WZDnvR z0uPn{F`0>k{JUQF_FEFycmF!v|GK{l^XO0hR4(~*S1L@SeK%U&R*HVa=&wNjp%lI1 zJ;C5_O#*Tz7rq(%t?)P8p|mO-(f*~gUhiOAZAIM#{+Et!;d^DPx8mPlP5OsbNrEm zcL11IeINiq1V98LjFbwF0eIm_n1(<( zY#tRkZ=+_g%V?nId-TBX8`{vTL@x~L1d}(>X)q+@Bk)Qj0MX847?pm7V}4=qj4XWw z238;vMpiab`d3fUh=QrLf>I;xJ}Txm8kR z~?HAqt`p-U{JY)Ct9$DY(}~jLc)@qHC4YOalhftJ<=e`M%WTqdV%cBJ;gx z@+OHNrBh6NMQLuc_Df@`D5k|6zyIgKuk zK#=`1>*My`1Sf0WTWaW?)Yx{G5plDTU0Co@~nuq3KFJoEdcl3pu!W5;J_UKqC7m*1moZ~zl@>>5=3R8I;dY%OIgF&4N8Lg=^<9y&G)9;GFs0+j<(QrOV3nTt8f_ z>-6X|VCW5_kmMDVsHIeq)#4;b6faql5mv0Fu<@F$LhDQ#JN9_5H)P6|Ba0JfE?l|E z@q9Pr9$F)^09FRjP!ag6gy1+AYYSAzZliWw|=*zld;{l&et53%>G= z@2XU*5m}t#f{dLZM9rh&J`%5I@5XLP0FmNRcjc&T~~1JikY$DMubKH8T0ABht*1j46x!#1-U5%-ksydpptISj}i=D}f$eR;2?j~Q{!;qMssjjBw5g7KZ aG^9rAq(PdbMcSmZMt4U<< { + + const renderer = new THREE.WebGLRenderer({ antialias:true }); + document.body.appendChild(renderer.domElement); + + const scene = new THREE.Scene(); + + const orthographiCamera = new THREE.OrthographicCamera(window.innerWidth / -2.0, window.innerWidth / +2.0, window.innerHeight / +2.0, window.innerHeight / -2.0, 0.0, 1.0); + const perspectiveCamera = new THREE.PerspectiveCamera(45.0, window.innerWidth / window.innerHeight, 0.1, 1000.0); + const controls = new THREE.OrbitControls(perspectiveCamera, renderer.domElement); + const clock = new THREE.Clock(); + + perspectiveCamera.position.set(0.0, 0.0, 5.0); + perspectiveCamera.lookAt(new THREE.Vector3(0.0, 0.0, 0.0)); + + const geometry = new THREE.PlaneBufferGeometry(window.innerWidth, window.innerHeight); + + const uniforms = { + uApp: { + value: { + time: clock.getElapsedTime(), + resolution: new THREE.Vector2(window.innerWidth, window.innerHeight) + } + }, + uCamera: { + value: { + position: perspectiveCamera.position, + viewMatrix: perspectiveCamera.matrixWorldInverse, + projectionMatrix: perspectiveCamera.projectionMatrix + } + }, + uParams: { + value: { + numIterations: 30, + convergenceCriteria: 0.0001, + finiteDifferenceEpsilon: 0.0001 + } + }, + uScene: { + value: { + backgroundColor: new THREE.Vector3(0.0, 0.0, 0.0), + lights: [ + { + direction: new THREE.Vector3(1.0, 1.0, 1.0), + ambientColor: new THREE.Vector3(1.0, 1.0, 1.0), + diffuseColor: new THREE.Vector3(1.0, 1.0, 0.0), + specularColor: new THREE.Vector3(1.0, 1.0, 0.0) + }, + { + direction: new THREE.Vector3(-1.0, -1.0, -1.0), + ambientColor: new THREE.Vector3(1.0, 1.0, 1.0), + diffuseColor: new THREE.Vector3(1.0, 0.0, 1.0), + specularColor: new THREE.Vector3(1.0, 0.0, 1.0) + } + ], + material: { + ambientColor: new THREE.Vector3(0.05, 0.05, 0.05), + diffuseColor: new THREE.Vector3(0.5, 0.5, 0.5), + specularColor: new THREE.Vector3(1.0, 1.0, 1.0), + emissionColor: new THREE.Vector3(0.0, 0.0, 0.0), + shininess: 64.0 + }, + bound: { + position: new THREE.Vector3(0.0, 0.0, 0.0), + radius: 2.0 + }, + fractal: { + power: 10, + numIterations: 4, + escapeCriteria: 2.0 + } + } + } + } + + const material = new THREE.ShaderMaterial({ + vertexShader: document.getElementById('vertexShader').textContent, + fragmentShader: document.getElementById('fragmentShader').textContent, + uniforms: uniforms + }); + + scene.add(new THREE.Mesh(geometry, material)); + + const onWindowResize = (event) => { + uniforms.uApp.value.resolution.x = window.innerWidth * window.devicePixelRatio; + uniforms.uApp.value.resolution.y = window.innerHeight * window.devicePixelRatio; + // NOTE: https://ics.media/tutorial-three/renderer_resize/ + renderer.setPixelRatio(window.devicePixelRatio); + renderer.setSize(window.innerWidth, window.innerHeight); + perspectiveCamera.aspect = window.innerWidth / window.innerHeight; + perspectiveCamera.updateProjectionMatrix(); + } + onWindowResize(); + window.addEventListener('resize', onWindowResize, false); + + const animate = () => { + + requestAnimationFrame(animate); + + const update = () => { + controls.update(); + perspectiveCamera.lookAt(new THREE.Vector3(0.0, 0.0, 0.0)); + uniforms.uApp.value.time = clock.getElapsedTime(); + uniforms.uCamera.value.position = perspectiveCamera.position; + uniforms.uCamera.value.viewMatrix = perspectiveCamera.matrixWorldInverse; + uniforms.uCamera.value.projectionMatrix = perspectiveCamera.projectionMatrix; + } + + update(); + + renderer.render(scene, orthographiCamera); + }; + + animate(); +} + +window.addEventListener("load", init); diff --git a/bulb/index.html b/bulb/index.html new file mode 100644 index 0000000..2bf9b99 --- /dev/null +++ b/bulb/index.html @@ -0,0 +1,889 @@ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..8641468 --- /dev/null +++ b/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + elia.network + + + + + \ No newline at end of file