documentation for Material.needsUpdate
See original GitHub issueThe current docs for Material.needsUpdate
say
.needsUpdate : Boolean
Specifies that the material needs to be updated at the WebGL level. Set it to true if you made changes that need to be reflected in WebGL.
But AFAIK most material parameters don’t need needsUpdate
set? Is it documented anywhere which material parameters might need needsUpdate
set?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Material#needsUpdate – three.js docs
Abstract base class for materials. Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have...
Read more >Three.js Materials
Which materials you use really depends on what you're trying to accomplish. ... needsUpdate = true to tell three.js to apply your material...
Read more >Materials - Three.js Tutorials - sbcode.net
An introduction to the Three.js Material base class. ... All these classes below inherit methods and properties from the Material base class. LineBasicMaterial ......
Read more >three.js webgl - The Five Planets
Mesh( geometry ); generateVertexColors( geometry ); mesh.material = chooseMaterial ( gui, mesh, ... needsUpdate = true; prevFog = scene.fog; } if ( mesh....
Read more >How to update material of cube on runtime using WebGL?
Try keeping all of your materials of the same type. Also, you may need to set material.needsUpdate flag to true .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So l just thought I’d add the majority of properties for which you need to set
needsUpdate
are properties that are unlikely to change at runtime.skinning
,useVertexColors
,morphTargets
, are all things that rarely change at runtime.flatShading
seems unlikely to change at runtime. The other big one is any texture inputmap
,bumpMap
,normalMap
,envMap
etc if they change fromnull
toTexture
orTexture
tonull
. But that’s also a rare case.Maybe the docs could say that rather than listing all the cases? It would be nice to know that it’s only exceptional cases where
needsUpdate
is needed.@pailhead please keep discussion on topic. If you want to discuss something else then open a new issue and discuss it there.