-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputNode readonly option #13250
InputNode readonly option #13250
Conversation
@mrdoob @WestLangley What do you think about rename the property |
Other thing... 'transform' is a |
my mistake. actually material.transform = new THREE.OperatorNode(
new THREE.PositionNode(),
displaceNode,
THREE.OperatorNode.ADD
); but mtl.normal = new THREE.TextureNode( getTexture( "grassNormal" ) ); but it could be like this: mtl.normal = new THREE.NormalMapNode( new THREE.TextureNode( getTexture( "grassNormal" ) ) ); and allow Are some thoughts... |
mtl.normalMap = new THREE.NormalMapNode( new THREE.TextureNode( getTexture( "grassNormal" ) ) ); |
This doubt about // following the logic. I think that it should work:
mtl.normal = new THREE.NormalNode(); |
however, |
|
||
var value = this.number; | ||
|
||
return builder.format( ~~value !== value ? value : value + ".0", type, output ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor thing: I don't think using these bitwise operations are worth it these days (speed vs readability).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead what do you recommend parseInt
or Math.floor
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that Math.floor
is "more" number-oriented.
Thanks! |
Not use
uniform
input ifreadonly
is true inInputNode
. ( for optimization )in
new THREE.Vector3Node( 1, 1, 1 )
instead use explicit declaration, for example:Of course.
readonly
not allow change the value after build the shader material.In
NodeFrame
I renameupdateFrame
toupdateNode
which is more suggestive but keepingupdateFrame
in nodes.