You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a node material you can create inputs with the uniform node and later change them from javascript etc.
However, there's no easy way to get the uniforms or inputs later in the system.
Consider a loader that returns a NodeMaterial you wont know what the inputs are let alone change them.
Solution
I think it would be possible to take the material input nodes and use them as start points to traverse and do tests for isUniformNode or isInputNode and then return an object or array of the nodes..
Consider:
constmesh=getSomeMeshFromGLTF('simplified.glb');constinputs=mesh.material.getInputs();// in a helper functionmakeUiControls(inputs);// directif(inputs.color1)inputs.color1.value=color('#fff');if(inputs.mix)inputs.mix=0.5;
Alternatives
Users will have to implement it themselves.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
When creating a node material you can create inputs with the
uniform
node and later change them from javascript etc.However, there's no easy way to get the uniforms or inputs later in the system.
Consider a loader that returns a
NodeMaterial
you wont know what the inputs are let alone change them.Solution
I think it would be possible to take the material input nodes and use them as start points to traverse and do tests for
isUniformNode
orisInputNode
and then return an object or array of the nodes..Consider:
Alternatives
Users will have to implement it themselves.
Additional context
No response
The text was updated successfully, but these errors were encountered: