-
-
Notifications
You must be signed in to change notification settings - Fork 162
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): Improve NodeElements + tangential changes #734
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search the whole three.js project by `addNodeElement(` - Nodes I added: - `CubeTextureNode.d.ts`: `cubeTexture` - `TextureNode.d.ts`: `texture` - `FunctionCallNode.d.ts`: `call` - `AssignNode.d.ts`: `assign` - `BypassNode.d.ts`: `bypass` - `CacheNode.d.ts`: `cache`, `globalCache` - `ContextNode.d.ts`: `context`, `label` - `VaryingNode.d.ts`: `varying` - `ColorSpaceNode.d.ts`: `linearTosRGB`, `sRGBToLinear`, `linearToColorSpace`, `colorSpaceToLinear` - `NormalMapNode.d.ts`: `normalMap` - `ViewportSharedTextureNode.d.ts`: `viewportSharedTexture` - `ViewportTextureNode.d.ts`: `viewportTexture`, `viewportMipTexture` - `FogExp2Node.d.ts`: `densityFog` - `FogNode.d.ts`: `fog` - `FogRangeNode.d.ts`: `rangeFog` - `ComputeNode.d.ts`: `compute` - `LightingContextNode.d.ts`: `lightingContext` - `CheckerNode.d.ts`: `checker` - `ShaderNode.d.ts`: `color`, `float`, `int`, ..., `bmat4`, `string`, `arrayBuffer`, `element`, `convert` - `RotateUVNode.d.ts`: `rotateUV` - `TriplanarTexturesNode.d.ts`: `triplanarTexture` - Nodes I skipped: `toAttribute`, `textureSize`, `scriptable`, `scriptableValue`, `bumpMap`, `gaussianBlur`, `viewportDepthTexture`, `hash`, `discard`, `loop`, `directionToColor`, `colorToDirection` - defined `globalCache`, a variant of CacheNode without cache scope - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/core/CacheNode.js#L44 - defined `label`, a variant of ContextNode that sets a label - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/core/ContextNode.js#L56 - `label` on `VarNode.d.ts` is removed instead - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/core/VarNode.js - `colorSpace` has been removed, added `linearTosRGB`, `sRGBToLinear`, `linearToColorSpace`, `colorSpaceToLinear` instead - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/display/ColorSpaceNode.js#L97-L101 - `assign` has been moved from `OperatorNode` to `AssignNode` (new) - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/math/OperatorNode.js - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/core/AssignNode.js - Add `string` and `arrayBuffer` to `ShaderNode.d.ts` - See: https://github.com/mrdoob/three.js/blob/r160/examples/jsm/nodes/shadernode/ShaderNode.js#L587-L588
Methuselah96
requested changes
Jan 10, 2024
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.
Thanks for working on this!
Co-authored-by: Nathan Bierema <[email protected]>
since it's through `nodeProxy` Co-authored-by: Nathan Bierema <[email protected]>
…r` from `encoding` to `colorSpace` Co-authored-by: Nathan Bierema <[email protected]>
@Methuselah96 Thank you for the review! Resolved all the conversations. Feel free to add more if there's something still wrong. |
Methuselah96
approved these changes
Jan 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@Methuselah96 I'm sorry if these changes overlap with what you are currently working on. 😓
What
Improve NodeElements interface.
Search the whole three.js project by
addNodeElement(
to validate these changes.NodeElements
:CubeTextureNode.d.ts
:cubeTexture
TextureNode.d.ts
:texture
FunctionCallNode.d.ts
:call
AssignNode.d.ts
:assign
BypassNode.d.ts
:bypass
CacheNode.d.ts
:cache
,globalCache
ContextNode.d.ts
:context
,label
VaryingNode.d.ts
:varying
ColorSpaceNode.d.ts
:linearTosRGB
,sRGBToLinear
,linearToColorSpace
,colorSpaceToLinear
NormalMapNode.d.ts
:normalMap
ViewportSharedTextureNode.d.ts
:viewportSharedTexture
ViewportTextureNode.d.ts
:viewportTexture
,viewportMipTexture
FogExp2Node.d.ts
:densityFog
FogNode.d.ts
:fog
FogRangeNode.d.ts
:rangeFog
ComputeNode.d.ts
:compute
LightingContextNode.d.ts
:lightingContext
CheckerNode.d.ts
:checker
ShaderNode.d.ts
:color
,float
,int
, ...,bmat4
,string
,arrayBuffer
,element
,convert
RotateUVNode.d.ts
:rotateUV
TriplanarTexturesNode.d.ts
:triplanarTexture
toAttribute
,textureSize
,scriptable
,scriptableValue
,bumpMap
,gaussianBlur
,viewportDepthTexture
,hash
,discard
,loop
,directionToColor
,colorToDirection
globalCache
, a variant of CacheNode without cache scopelabel
, a variant of ContextNode that sets a labellabel
onVarNode.d.ts
is removed insteadcolorSpace
has been removed, addedlinearTosRGB
,sRGBToLinear
,linearToColorSpace
,colorSpaceToLinear
insteadassign
has been moved fromOperatorNode
toAssignNode
(new in this repo)string
andarrayBuffer
toShaderNode.d.ts