Questions tagged [threejs]
Post a PromptPrompts that generate 3D scenes with three.js.
9 prompts
28votes
1answers
5.2kviews
GPU particle system in three.js: 100k points orbiting a strange attractor at 60fps
I wanted a big swirling particle cloud following a Lorenz/Thomas attractor. CPU-updating 100k positions per frame in JS was a slideshow. I knew I needed the integration to happen on the GPU but kept g
27votes
2answers
2.8kviews
One prompt for a convincing CRT / arcade shader overlay on a canvas game
I wanted my pixel games to look like they're running on an old arcade monitor, not a crisp modern LCD. Most AI attempts gave me faint horizontal lines and called it a CRT, which fools nobody. Asking f
24votes
2answers
3.4kviews
Low-poly procedural terrain in three.js that regenerates from a seed with a flat-shaded look
I was chasing that faceted low-poly island aesthetic. My first attempts used a smooth normal PlaneGeometry so it looked like melted plastic, not crisp facets. Also the terrain wasn't reproducible so I
22votes
2answers
3.2kviews
One-shot three.js hyperspace starfield that stays 60fps on a laptop trackpad
I wanted the classic warp-speed starfield but every naive attempt spawned 20k separate Mesh objects and my fans took off. The trick was forcing the model to reach for InstancedMesh (or a single Points
21votes
0answers
4.2kviews
Three.js solar system with orbit controls from a single prompt - sharing what finally worked
Getting a correct-feeling solar system out of one prompt is surprisingly hard: you either get planets orbiting at the same speed or a camera stuck inside the sun. This prompt gets the scale relationsh
20votes
1answers
1.9kviews
Getting GPT to write clean fbm noise in GLSL without the hash function collapsing to bands
Whenever I asked for a fragment shader with fractal brownian motion I got a hash based on sin(dot(p, vec2(12.9898,78.233))) 43758.5453. It looks fine at small scale then produces visible diagonal band
16votes
0answers
2.3kviews
Prompt for OrbitControls that auto-frames any loaded model and never lets you fly inside it
I load a lot of random glTF models and half of them arrived either microscopic or filling the whole viewport. I kept manually tweaking camera distance per model like an animal. So I wrote a prompt tha
11votes
1answers
2.0kviews
A reusable three.js ShaderMaterial boilerplate prompt: time, resolution, and mouse uniforms done right
I kept rewriting the same plumbing for every shader toy: pass uTime, uResolution, uMouse, handle DPR, update on resize. And I kept getting subtle bugs, like resolution not accounting for pixel ratio s
9votes
0answers
1.4kviews
Responsive camera framing in three.js so a scene fills phone portrait and desktop wide equally
My 3D product scene looked perfect on my 16:9 monitor and then the hero object was tiny and floating in the corner on a phone in portrait. Classic: I was only adjusting aspect on resize, not the actua