Description
Updating .value of a uniform that received a label will update the .value of the contextNode instead.
.value doesn't seem to be handled by the Proxy inside examples\jsm\nodes\shadernode\ShaderNode.js
Reproduction steps
- create a uniform using
uniform() with some value
- change said value further down the code using
.value =
- the new value doesn't reach the uniform node and is set on the context node instead
Code
const u_baseColor = uniform( color( '#707070' ) ).label( 'BaseColor' );
console.log( 'u_baseColor.node.value', u_baseColor.node.value ); // initial value
console.log( 'u_baseColor.value', u_baseColor.value ); // contextNode.value is undefined
u_baseColor.value = new THREE.Color( 0x00ff00 );
console.log( 'u_baseColor.node.value', u_baseColor.node.value ); // this value didn't change
console.log( 'u_baseColor.value', u_baseColor.value ); // the new value is set here instead
Live example
Screenshots
No response
Version
0.165.0
Device
No response
Browser
No response
OS
No response
Description
Updating .value of a uniform that received a label will update the .value of the contextNode instead.
.value doesn't seem to be handled by the Proxy inside
examples\jsm\nodes\shadernode\ShaderNode.jsReproduction steps
uniform()with some value.value =Code
Live example
Screenshots
No response
Version
0.165.0
Device
No response
Browser
No response
OS
No response