Dumping a bunch of tips on what to prompt when vibe coding threejs apps to make sure you don't slop too much and get decent performance.
- profile draw calls, they are the first beginner mistake. Lower = better
- reduce the number of lights, instead use image-based techniques like environment maps
- make sure to use gpu-compressed texture formats like Basis/KTX2
- make sure to try draco compression, might improve loading times. There's now a byte-identical js version of it.
- use gltf-transform to simplify meshes and apply draco compression
- try meshoptimizer to further reduce the size of meshes
- use an LOD system for big geometry that might be small on screen
- stream assets instead of loading everything upfront, especially sound
- use batching and instancing
- merge static geometry whenever possible
- render on demand when you can
- beware of resolution and pixel ratio ( modern laptops are big and dense ), cap them
- beware of antialiasing
- if stuff is washed out, set texture color space (srbg vs linear)
- make abundantly sure you DISPOSE stuff that isn't needed anymore
- use pools for stuff you need to spawn continously - particles, bullets, what have you
This is not a comprehensive list, do your own research next.