- npx gltfjsx chair.glb -i -T -S -R 256
- npx gltfjsx edit.glb -T -R 256 -S --error .0001
- used with the canyon, without the error flag it will have holes in it
- ctrl + alt + \ = hide controls
- MeshReflectorMaterial (medium)
- MeshRefractionMaterial (hard)
- could be used for water
- MeshDistortMaterail (medium)
- Trail (hard)
- Positional Audio (Simple)
- vanilla = webaudio_orientation
- spotlight
- shadows
- sparkles
- decals (hard)
- instanced grass
- light hemisphere
- rectarealight
- lines
- points / sprites
- shaders / ocean
- playground
- points (fire)
- postprocessing effects (should switch to FXAA or SMAA since MSAA doesn't do great with PP)
- toon material
how does shadowmap work?
- renderer.shadowMap.enabled = true
- shadowmap example
what is shadowMaterial? how do lightmaps work? is baking shadows worth it? Can I use render order for creating a seamless flow?
- poly.pizza
- three examples
- viewer 1
- viewer 2
- viewer 3
- ship, link and indicate changes made
- water, must include license
- sword, must include license
- how to create a theater sheet
- window.devicePixelRatio
- if above 1 consider disabling AA
- set Far prop lower on mobile
- try setting max pixel ratio
- basic is fastest but no shadowing
- lambert is next, then phong
- standard for quality
- textures should be power of 2 in size
- disable alpha buffer
- light.visible = false || light.intensiy = 0 instead of removing lights
- object.visible = false || material.opacity = 0 instead of removing object
- use CameraHelper to view frustum, the smaller this can be the better
- make shadow texture as low as possible
- object.matrixAutoUpdate = false for static object or rarely moved
- alphatest is faster than transparent obj
- bake lighting and shadows
- use LOD object and only do cheap position/animation changes
- can use layers if changing visibility of several objects
console.log("Scene polycount:", renderer.info.render.triangles)
console.log("Active Drawcalls:", renderer.info.render.calls)
console.log("Textures in Memory", renderer.info.memory.textures)
console.log("Geometries in Memory", renderer.info.memory.geometries)