-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat (Nodes): more tslFn
related typings
#744
Conversation
If the argument is an array, the array will be destructed. See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/materialx/lib/mx_noise.js
- Fix type of mx_hsv, mx_noise, MaterialXNodes - Add missing methods of mx_noise - Add mx_transform_color - Update test cases - the directory name was `materials` instead of `materialx`, fixed this `mx_noise.js` exports requires all arguments to exist, while `MaterialXNodes.js` exports don't
I forgot to put a thing in `assetSwizzable()`
The test says:
I have no idea what to do... |
That is super weird. Maybe just a bug in TypeScript <=5.0? Does the error go away if you just remove the lines it's producing an error on? |
I'm sorry for the late reply. Yes, the error disappears once I comment out the lines. However, the issue persists on the end developer's code side 😖 |
The |
Yeah, it's rather unfortunate. I'd be interested to know what kind of workarounds would make it work for 5.0 and below, and how it would impact the types for the user. |
How do you think if we go ask for a help in DefinitelyTyped issues...? low confidence. |
In my experience, those often don't get responded to. You might get a better response using the TypeScript Community Discord server (either the #definitely-typed channel or another channel). Or you could try asking about it on StackOverflow. My schedule frees up in the next couple weeks so I should have some time to look into this soon regardless. |
ok thanks for the info! I might try either tomorrow |
I believe I made a minimal repro. |
The error is since `ContextNode` already has a member `.context` and `ShaderNodeObject` also gives it a method `.context` See: three-types#744 (comment)
The error is since `ContextNode` already has a member `.context` and `ShaderNodeObject` also gives it a method `.context` See: three-types#744 (comment)
The error is since `ContextNode` already has a member `.context` and `ShaderNodeObject` also gives it a method `.context` See: three-types#744 (comment)
The error is since `ContextNode` already has a member `.context` and `ShaderNodeObject` also gives it a method `.context` See: three-types#744 (comment) I believe the behavior that the node class properties takes precedance than NodeElements is same as the actual implementation See: https://github.com/mrdoob/three.js/blob/r163/examples/jsm/nodes/shadernode/ShaderNode.js
I think I got a solution! Already pushed the commit to the branch |
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.
Nice work hunting that down!
tslFn
with array arguments.tslFn
arguments usingProxiedTuple
/ProxiedObject
.tslFn
functions.materials
instead ofmaterialx
, fixed thisI used The TSL editor to confirm whether the type matches the actual behavior.