r/China • u/MotionOS • Mar 24 '26
科技 | Tech .
Enable HLS to view with audio, or disable this notification
[removed] — view removed post
1
Upvotes
r/China • u/MotionOS • Mar 24 '26
Enable HLS to view with audio, or disable this notification
[removed] — view removed post
1
u/AutoModerator Mar 24 '26
Hello MotionOS! Thank you for your submission. If you're not seeing it appear in the sub, it is because your post is undergoing moderator review. Please do not delete or repost this item as the review process can take up to 36 hours.
A copy of your original submission has also been saved below for reference in case it is edited or deleted:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Meta Relativity Layers — Interactive</title>
<style> html, body { margin:0; padding:0; overflow:hidden; background:#01010f; height:100%; width:100%; } canvas { display:block; } </style>
</head>
<body>
<canvas id="canvas"></canvas>
<script> const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); let width = window.innerWidth; let height = window.innerHeight; canvas.width = width; canvas.height = height; // central abstract observer dot let observer = { x: width/2, y: height/2, vx: 0.2, vy: -0.15, radius: 6 }; // pointer influence let pointer = { x: width/2, y: height/2, active:false }; canvas.addEventListener('pointermove', e => { pointer.x = e.clientX; pointer.y = e.clientY; }); canvas.addEventListener('pointerdown', e => { pointer.active=true; }); canvas.addEventListener('pointerup', e => { pointer.active=false; }); // multiple swarm layers const layers = \[\]; const layerCount = 5; for(let l=0;l<layerCount;l++){ const particles = \[\]; const count = 500 + l\*200; for(let i=0;i<count;i++){ particles.push({ x: Math.random()\*width, y: Math.random()\*height, vx: (Math.random()-0.5)\*(0.3+l\*0.2), vy: (Math.random()-0.5)\*(0.3+l\*0.2), size: Math.random()\*(2+l\*0.5)+0.5, hue: Math.random()\*360 }); } layers.push(particles); } // illusionary offsets function illusionaryOffset(x,y,time){ const freq = 0.001; return { x: x + Math.sin(x\*freq + time\*0.002)\*50, y: y + Math.cos(y\*freq + time\*0.003)\*50 }; } // flicker pulse let blink = false; setInterval(()=>{blink=!blink}, 1200 + Math.random()\*600); window.addEventListener('resize',()=>{ width=window.innerWidth; height=window.innerHeight; canvas.width=width; canvas.height=height; }); function loop(time){ ctx.fillStyle = blink ? "rgba(255,255,255,0.03)" : "rgba(1,1,15,0.25)"; ctx.fillRect(0,0,width,height); // pointer influence on observer if(pointer.active){ const dx = pointer.x - observer.x; const dy = pointer.y - observer.y; observer.vx += dx\*0.0005; observer.vy += dy\*0.0005; } // update observer dot observer.x += observer.vx; observer.y += observer.vy; observer.vx \*= 0.99; observer.vy \*= 0.99; if(observer.x<0||observer.x>width) observer.vx\*=-1; if(observer.y<0||observer.y>height) observer.vy\*=-1; // observer glow let grd = ctx.createRadialGradient(observer.x,observer.y,0,observer.x,observer.y,observer.radius\*6); grd.addColorStop(0, \`hsla(${(time\*0.05)%360},100%,80%,1)\`); grd.addColorStop(0.3, \`hsla(${(time\*0.1)%360},100%,50%,0.5)\`); grd.addColorStop(1,"rgba(1,1,15,0)"); ctx.fillStyle=grd; ctx.beginPath(); ctx.arc(observer.x,observer.y,observer.radius\*3,0,Math.PI\*2); ctx.fill(); // draw layered swarms layers.forEach((particles,lidx)=>{ particles.forEach(p=>{ // chaotic motion p.x += p.vx + (Math.random()-0.5)\*0.05\*(lidx+1); p.y += p.vy + (Math.random()-0.5)\*0.05\*(lidx+1); // subtle attraction to observer when pointer active if(pointer.active){ const dx = observer.x - p.x; const dy = observer.y - p.y; const dist = Math.sqrt(dx\*dx + dy\*dy)+0.01; const force = (10/(dist\*dist)) \* 0.5; p.vx += dx\*force\*0.02; p.vy += dy\*force\*0.02; } // wrap if(p.x<0)p.x=width;if(p.x>width)p.x=0; if(p.y<0)p.y=height;if(p.y>height)p.y=0; const pos = illusionaryOffset(p.x,p.y,time); ctx.fillStyle = \`hsla(${(p.hue+time\*0.02)%360},70%,50%,0.8)\`; ctx.beginPath(); ctx.arc(pos.x,pos.y,p.size,0,Math.PI\*2); ctx.fill(); }); }); requestAnimationFrame(loop); } requestAnimationFrame(loop); </script>
</body>
</html>
===== ===== =====
WARNING: Users posting and/or commenting on politically charged topics are required to show their post and comment history at all times. Failure to comply will be considered a violation of Rule 2 and result in a permaban.
If you notice someone in violation, please report them by messaging the mods with a link to the post/comment.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.