From c226bac79069289b9d6f44112a42763ce521c6a8 Mon Sep 17 00:00:00 2001 From: Levi Pesin <35454228+LeviPesin@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:50:46 +1000 Subject: [PATCH] Fix `addNodeClass` and `addNodeMaterial` in case of renaming classes --- examples/jsm/nodes/accessors/BitangentNode.js | 2 +- examples/jsm/nodes/accessors/BufferAttributeNode.js | 2 +- examples/jsm/nodes/accessors/BufferNode.js | 2 +- examples/jsm/nodes/accessors/CameraNode.js | 2 +- examples/jsm/nodes/accessors/CubeTextureNode.js | 2 +- .../jsm/nodes/accessors/ExtendedMaterialNode.js | 2 +- examples/jsm/nodes/accessors/InstanceNode.js | 2 +- examples/jsm/nodes/accessors/LineMaterialNode.js | 2 +- examples/jsm/nodes/accessors/MaterialNode.js | 2 +- .../jsm/nodes/accessors/MaterialReferenceNode.js | 2 +- examples/jsm/nodes/accessors/ModelNode.js | 2 +- .../jsm/nodes/accessors/ModelViewProjectionNode.js | 2 +- examples/jsm/nodes/accessors/MorphNode.js | 2 +- examples/jsm/nodes/accessors/NormalNode.js | 2 +- examples/jsm/nodes/accessors/Object3DNode.js | 2 +- examples/jsm/nodes/accessors/PointUVNode.js | 2 +- examples/jsm/nodes/accessors/PositionNode.js | 2 +- examples/jsm/nodes/accessors/ReferenceNode.js | 2 +- examples/jsm/nodes/accessors/ReflectVectorNode.js | 2 +- examples/jsm/nodes/accessors/SceneNode.js | 2 +- examples/jsm/nodes/accessors/SkinningNode.js | 2 +- examples/jsm/nodes/accessors/StorageBufferNode.js | 2 +- examples/jsm/nodes/accessors/TangentNode.js | 2 +- examples/jsm/nodes/accessors/TextureBicubicNode.js | 2 +- examples/jsm/nodes/accessors/TextureNode.js | 2 +- examples/jsm/nodes/accessors/TextureSizeNode.js | 2 +- examples/jsm/nodes/accessors/TextureStoreNode.js | 2 +- examples/jsm/nodes/accessors/UVNode.js | 2 +- examples/jsm/nodes/accessors/UserDataNode.js | 2 +- examples/jsm/nodes/code/CodeNode.js | 2 +- examples/jsm/nodes/code/ExpressionNode.js | 2 +- examples/jsm/nodes/code/FunctionCallNode.js | 2 +- examples/jsm/nodes/code/FunctionNode.js | 2 +- examples/jsm/nodes/code/ScriptableNode.js | 2 +- examples/jsm/nodes/code/ScriptableValueNode.js | 2 +- examples/jsm/nodes/core/ArrayUniformNode.js | 2 +- examples/jsm/nodes/core/AttributeNode.js | 2 +- examples/jsm/nodes/core/BypassNode.js | 2 +- examples/jsm/nodes/core/CacheNode.js | 2 +- examples/jsm/nodes/core/ConstNode.js | 2 +- examples/jsm/nodes/core/ContextNode.js | 2 +- examples/jsm/nodes/core/IndexNode.js | 2 +- examples/jsm/nodes/core/InputNode.js | 2 +- examples/jsm/nodes/core/Node.js | 11 ++++++----- examples/jsm/nodes/core/OutputStructNode.js | 2 +- examples/jsm/nodes/core/PropertyNode.js | 2 +- examples/jsm/nodes/core/StackNode.js | 2 +- examples/jsm/nodes/core/StructTypeNode.js | 2 +- examples/jsm/nodes/core/TempNode.js | 2 +- examples/jsm/nodes/core/UniformNode.js | 2 +- examples/jsm/nodes/core/VarNode.js | 2 +- examples/jsm/nodes/core/VaryingNode.js | 2 +- examples/jsm/nodes/display/BlendModeNode.js | 2 +- examples/jsm/nodes/display/BumpMapNode.js | 2 +- examples/jsm/nodes/display/ColorAdjustmentNode.js | 2 +- examples/jsm/nodes/display/ColorSpaceNode.js | 2 +- examples/jsm/nodes/display/FrontFacingNode.js | 2 +- examples/jsm/nodes/display/NormalMapNode.js | 2 +- examples/jsm/nodes/display/PosterizeNode.js | 2 +- examples/jsm/nodes/display/ToneMappingNode.js | 2 +- examples/jsm/nodes/display/ViewportDepthNode.js | 2 +- .../jsm/nodes/display/ViewportDepthTextureNode.js | 2 +- examples/jsm/nodes/display/ViewportNode.js | 2 +- .../jsm/nodes/display/ViewportSharedTextureNode.js | 2 +- examples/jsm/nodes/display/ViewportTextureNode.js | 2 +- examples/jsm/nodes/fog/FogExp2Node.js | 2 +- examples/jsm/nodes/fog/FogNode.js | 2 +- examples/jsm/nodes/fog/FogRangeNode.js | 2 +- examples/jsm/nodes/geometry/RangeNode.js | 2 +- examples/jsm/nodes/gpgpu/ComputeNode.js | 2 +- examples/jsm/nodes/lighting/AONode.js | 2 +- examples/jsm/nodes/lighting/AmbientLightNode.js | 2 +- examples/jsm/nodes/lighting/AnalyticLightNode.js | 2 +- examples/jsm/nodes/lighting/DirectionalLightNode.js | 2 +- examples/jsm/nodes/lighting/EnvironmentNode.js | 2 +- examples/jsm/nodes/lighting/HemisphereLightNode.js | 2 +- examples/jsm/nodes/lighting/IESSpotLightNode.js | 2 +- examples/jsm/nodes/lighting/LightNode.js | 2 +- examples/jsm/nodes/lighting/LightingContextNode.js | 2 +- examples/jsm/nodes/lighting/LightingNode.js | 2 +- examples/jsm/nodes/lighting/PointLightNode.js | 2 +- examples/jsm/nodes/lighting/SpotLightNode.js | 2 +- examples/jsm/nodes/materials/Line2NodeMaterial.js | 2 +- .../jsm/nodes/materials/LineBasicNodeMaterial.js | 2 +- .../jsm/nodes/materials/LineDashedNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshBasicNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshLambertNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshNormalNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshPhongNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshPhysicalNodeMaterial.js | 2 +- .../jsm/nodes/materials/MeshStandardNodeMaterial.js | 2 +- examples/jsm/nodes/materials/NodeMaterial.js | 13 +++++++------ examples/jsm/nodes/materials/PointsNodeMaterial.js | 2 +- examples/jsm/nodes/materials/SpriteNodeMaterial.js | 2 +- examples/jsm/nodes/math/CondNode.js | 2 +- examples/jsm/nodes/math/HashNode.js | 2 +- examples/jsm/nodes/math/MathNode.js | 2 +- examples/jsm/nodes/math/OperatorNode.js | 2 +- examples/jsm/nodes/procedural/CheckerNode.js | 2 +- examples/jsm/nodes/shadernode/ShaderNode.js | 2 +- examples/jsm/nodes/utils/ArrayElementNode.js | 2 +- examples/jsm/nodes/utils/ConvertNode.js | 2 +- examples/jsm/nodes/utils/DiscardNode.js | 2 +- examples/jsm/nodes/utils/EquirectUVNode.js | 2 +- examples/jsm/nodes/utils/JoinNode.js | 2 +- examples/jsm/nodes/utils/LoopNode.js | 2 +- examples/jsm/nodes/utils/MatcapUVNode.js | 2 +- examples/jsm/nodes/utils/MaxMipLevelNode.js | 2 +- examples/jsm/nodes/utils/OscNode.js | 2 +- examples/jsm/nodes/utils/PackingNode.js | 2 +- examples/jsm/nodes/utils/RemapNode.js | 2 +- examples/jsm/nodes/utils/RotateUVNode.js | 2 +- examples/jsm/nodes/utils/SetNode.js | 2 +- examples/jsm/nodes/utils/SpecularMIPLevelNode.js | 2 +- examples/jsm/nodes/utils/SplitNode.js | 2 +- examples/jsm/nodes/utils/SpriteSheetUVNode.js | 2 +- examples/jsm/nodes/utils/TimerNode.js | 2 +- examples/jsm/nodes/utils/TriplanarTexturesNode.js | 2 +- 118 files changed, 129 insertions(+), 127 deletions(-) diff --git a/examples/jsm/nodes/accessors/BitangentNode.js b/examples/jsm/nodes/accessors/BitangentNode.js index 3951d83ccd932d..eae7f7dfe70510 100644 --- a/examples/jsm/nodes/accessors/BitangentNode.js +++ b/examples/jsm/nodes/accessors/BitangentNode.js @@ -86,4 +86,4 @@ export const bitangentWorld = nodeImmutable( BitangentNode, BitangentNode.WORLD export const transformedBitangentView = normalize( transformedNormalView.cross( transformedTangentView ).mul( tangentGeometry.w ) ); export const transformedBitangentWorld = normalize( transformedBitangentView.transformDirection( cameraViewMatrix ) ); -addNodeClass( BitangentNode ); +addNodeClass( 'BitangentNode', BitangentNode ); diff --git a/examples/jsm/nodes/accessors/BufferAttributeNode.js b/examples/jsm/nodes/accessors/BufferAttributeNode.js index fe643b0eb85771..ef657aeb00594f 100644 --- a/examples/jsm/nodes/accessors/BufferAttributeNode.js +++ b/examples/jsm/nodes/accessors/BufferAttributeNode.js @@ -122,4 +122,4 @@ export const instancedDynamicBufferAttribute = ( array, type, stride, offset ) = addNodeElement( 'toAttribute', ( bufferNode ) => bufferAttribute( bufferNode.value ) ); -addNodeClass( BufferAttributeNode ); +addNodeClass( 'BufferAttributeNode', BufferAttributeNode ); diff --git a/examples/jsm/nodes/accessors/BufferNode.js b/examples/jsm/nodes/accessors/BufferNode.js index 80416cb4e3ff1a..663d589658417a 100644 --- a/examples/jsm/nodes/accessors/BufferNode.js +++ b/examples/jsm/nodes/accessors/BufferNode.js @@ -27,4 +27,4 @@ export default BufferNode; export const buffer = ( value, type, count ) => nodeObject( new BufferNode( value, type, count ) ); -addNodeClass( BufferNode ); +addNodeClass( 'BufferNode', BufferNode ); diff --git a/examples/jsm/nodes/accessors/CameraNode.js b/examples/jsm/nodes/accessors/CameraNode.js index 2e81747c30debc..112eba8777a39b 100644 --- a/examples/jsm/nodes/accessors/CameraNode.js +++ b/examples/jsm/nodes/accessors/CameraNode.js @@ -95,4 +95,4 @@ export const cameraNormalMatrix = nodeImmutable( CameraNode, CameraNode.NORMAL_M export const cameraWorldMatrix = nodeImmutable( CameraNode, CameraNode.WORLD_MATRIX ); export const cameraPosition = nodeImmutable( CameraNode, CameraNode.POSITION ); -addNodeClass( CameraNode ); +addNodeClass( 'CameraNode', CameraNode ); diff --git a/examples/jsm/nodes/accessors/CubeTextureNode.js b/examples/jsm/nodes/accessors/CubeTextureNode.js index 02489521447aab..624602a69c8e91 100644 --- a/examples/jsm/nodes/accessors/CubeTextureNode.js +++ b/examples/jsm/nodes/accessors/CubeTextureNode.js @@ -115,4 +115,4 @@ export const cubeTexture = nodeProxy( CubeTextureNode ); addNodeElement( 'cubeTexture', cubeTexture ); -addNodeClass( CubeTextureNode ); +addNodeClass( 'CubeTextureNode', CubeTextureNode ); diff --git a/examples/jsm/nodes/accessors/ExtendedMaterialNode.js b/examples/jsm/nodes/accessors/ExtendedMaterialNode.js index 990826b51d33ec..31a64a1a861076 100644 --- a/examples/jsm/nodes/accessors/ExtendedMaterialNode.js +++ b/examples/jsm/nodes/accessors/ExtendedMaterialNode.js @@ -73,4 +73,4 @@ export default ExtendedMaterialNode; export const materialNormal = nodeImmutable( ExtendedMaterialNode, ExtendedMaterialNode.NORMAL ); export const materialClearcoatNormal = nodeImmutable( ExtendedMaterialNode, ExtendedMaterialNode.CLEARCOAT_NORMAL ); -addNodeClass( ExtendedMaterialNode ); +addNodeClass( 'ExtendedMaterialNode', ExtendedMaterialNode ); diff --git a/examples/jsm/nodes/accessors/InstanceNode.js b/examples/jsm/nodes/accessors/InstanceNode.js index 803a2ef6623d82..107b8e929d2dad 100644 --- a/examples/jsm/nodes/accessors/InstanceNode.js +++ b/examples/jsm/nodes/accessors/InstanceNode.js @@ -68,4 +68,4 @@ export default InstanceNode; export const instance = nodeProxy( InstanceNode ); -addNodeClass( InstanceNode ); +addNodeClass( 'InstanceNode', InstanceNode ); diff --git a/examples/jsm/nodes/accessors/LineMaterialNode.js b/examples/jsm/nodes/accessors/LineMaterialNode.js index 6b2b7068d37b21..8fd4622ab733f4 100644 --- a/examples/jsm/nodes/accessors/LineMaterialNode.js +++ b/examples/jsm/nodes/accessors/LineMaterialNode.js @@ -26,4 +26,4 @@ export const materialLineDashSize = nodeImmutable( LineMaterialNode, LineMateria export const materialLineGapSize = nodeImmutable( LineMaterialNode, LineMaterialNode.GAP_SIZE ); export const materialLineWidth = nodeImmutable( LineMaterialNode, LineMaterialNode.LINEWIDTH ); -addNodeClass( LineMaterialNode ); +addNodeClass( 'LineMaterialNode', LineMaterialNode ); diff --git a/examples/jsm/nodes/accessors/MaterialNode.js b/examples/jsm/nodes/accessors/MaterialNode.js index cb24fbe7266180..7d6beedd6c7e81 100644 --- a/examples/jsm/nodes/accessors/MaterialNode.js +++ b/examples/jsm/nodes/accessors/MaterialNode.js @@ -274,4 +274,4 @@ export const materialIridescence = nodeImmutable( MaterialNode, MaterialNode.IRI export const materialIridescenceIOR = nodeImmutable( MaterialNode, MaterialNode.IRIDESCENCE_IOR ); export const materialIridescenceThickness = nodeImmutable( MaterialNode, MaterialNode.IRIDESCENCE_THICKNESS ); -addNodeClass( MaterialNode ); +addNodeClass( 'MaterialNode', MaterialNode ); diff --git a/examples/jsm/nodes/accessors/MaterialReferenceNode.js b/examples/jsm/nodes/accessors/MaterialReferenceNode.js index cfa9deba1ba89f..e519638c9c8ca3 100644 --- a/examples/jsm/nodes/accessors/MaterialReferenceNode.js +++ b/examples/jsm/nodes/accessors/MaterialReferenceNode.js @@ -39,4 +39,4 @@ export default MaterialReferenceNode; export const materialReference = ( name, type, material ) => nodeObject( new MaterialReferenceNode( name, type, material ) ); -addNodeClass( MaterialReferenceNode ); +addNodeClass( 'MaterialReferenceNode', MaterialReferenceNode ); diff --git a/examples/jsm/nodes/accessors/ModelNode.js b/examples/jsm/nodes/accessors/ModelNode.js index 251b6bb96acc98..c3be59c06f9ef6 100644 --- a/examples/jsm/nodes/accessors/ModelNode.js +++ b/examples/jsm/nodes/accessors/ModelNode.js @@ -31,4 +31,4 @@ export const modelPosition = nodeImmutable( ModelNode, ModelNode.POSITION ); export const modelScale = nodeImmutable( ModelNode, ModelNode.SCALE ); export const modelViewPosition = nodeImmutable( ModelNode, ModelNode.VIEW_POSITION ); -addNodeClass( ModelNode ); +addNodeClass( 'ModelNode', ModelNode ); diff --git a/examples/jsm/nodes/accessors/ModelViewProjectionNode.js b/examples/jsm/nodes/accessors/ModelViewProjectionNode.js index b5a00f11639aa3..43800259a8f1de 100644 --- a/examples/jsm/nodes/accessors/ModelViewProjectionNode.js +++ b/examples/jsm/nodes/accessors/ModelViewProjectionNode.js @@ -27,4 +27,4 @@ export default ModelViewProjectionNode; export const modelViewProjection = nodeProxy( ModelViewProjectionNode ); -addNodeClass( ModelViewProjectionNode ); +addNodeClass( 'ModelViewProjectionNode', ModelViewProjectionNode ); diff --git a/examples/jsm/nodes/accessors/MorphNode.js b/examples/jsm/nodes/accessors/MorphNode.js index 70d5922e0ed0aa..f49f5d6d86c9d5 100644 --- a/examples/jsm/nodes/accessors/MorphNode.js +++ b/examples/jsm/nodes/accessors/MorphNode.js @@ -67,4 +67,4 @@ export default MorphNode; export const morph = nodeProxy( MorphNode ); -addNodeClass( MorphNode ); +addNodeClass( 'MorphNode', MorphNode ); diff --git a/examples/jsm/nodes/accessors/NormalNode.js b/examples/jsm/nodes/accessors/NormalNode.js index 3f3c88cd7225f5..cdb599925004b6 100644 --- a/examples/jsm/nodes/accessors/NormalNode.js +++ b/examples/jsm/nodes/accessors/NormalNode.js @@ -93,4 +93,4 @@ export const transformedNormalView = property( 'vec3', 'TransformedNormalView' ) export const transformedNormalWorld = transformedNormalView.transformDirection( cameraViewMatrix ).normalize(); export const transformedClearcoatNormalView = property( 'vec3', 'TransformedClearcoatNormalView' ); -addNodeClass( NormalNode ); +addNodeClass( 'NormalNode', NormalNode ); diff --git a/examples/jsm/nodes/accessors/Object3DNode.js b/examples/jsm/nodes/accessors/Object3DNode.js index c1cce3f9f20405..ce8fbd7ff430c1 100644 --- a/examples/jsm/nodes/accessors/Object3DNode.js +++ b/examples/jsm/nodes/accessors/Object3DNode.js @@ -147,4 +147,4 @@ export const objectPosition = nodeProxy( Object3DNode, Object3DNode.POSITION ); export const objectScale = nodeProxy( Object3DNode, Object3DNode.SCALE ); export const objectViewPosition = nodeProxy( Object3DNode, Object3DNode.VIEW_POSITION ); -addNodeClass( Object3DNode ); +addNodeClass( 'Object3DNode', Object3DNode ); diff --git a/examples/jsm/nodes/accessors/PointUVNode.js b/examples/jsm/nodes/accessors/PointUVNode.js index f270b6c4b7aeef..23bea4c80a6f58 100644 --- a/examples/jsm/nodes/accessors/PointUVNode.js +++ b/examples/jsm/nodes/accessors/PointUVNode.js @@ -23,4 +23,4 @@ export default PointUVNode; export const pointUV = nodeImmutable( PointUVNode ); -addNodeClass( PointUVNode ); +addNodeClass( 'PointUVNode', PointUVNode ); diff --git a/examples/jsm/nodes/accessors/PositionNode.js b/examples/jsm/nodes/accessors/PositionNode.js index 820c6e81552a74..043735380e077e 100644 --- a/examples/jsm/nodes/accessors/PositionNode.js +++ b/examples/jsm/nodes/accessors/PositionNode.js @@ -101,4 +101,4 @@ export const positionWorldDirection = nodeImmutable( PositionNode, PositionNode. export const positionView = nodeImmutable( PositionNode, PositionNode.VIEW ); export const positionViewDirection = nodeImmutable( PositionNode, PositionNode.VIEW_DIRECTION ); -addNodeClass( PositionNode ); +addNodeClass( 'PositionNode', PositionNode ); diff --git a/examples/jsm/nodes/accessors/ReferenceNode.js b/examples/jsm/nodes/accessors/ReferenceNode.js index e2a17cf92e7edb..9466e1f18f0cc6 100644 --- a/examples/jsm/nodes/accessors/ReferenceNode.js +++ b/examples/jsm/nodes/accessors/ReferenceNode.js @@ -75,4 +75,4 @@ export default ReferenceNode; export const reference = ( name, type, object ) => nodeObject( new ReferenceNode( name, type, object ) ); -addNodeClass( ReferenceNode ); +addNodeClass( 'ReferenceNode', ReferenceNode ); diff --git a/examples/jsm/nodes/accessors/ReflectVectorNode.js b/examples/jsm/nodes/accessors/ReflectVectorNode.js index bf7b448f2d73a1..b552b268e91704 100644 --- a/examples/jsm/nodes/accessors/ReflectVectorNode.js +++ b/examples/jsm/nodes/accessors/ReflectVectorNode.js @@ -32,4 +32,4 @@ export default ReflectVectorNode; export const reflectVector = nodeImmutable( ReflectVectorNode ); -addNodeClass( ReflectVectorNode ); +addNodeClass( 'ReflectVectorNode', ReflectVectorNode ); diff --git a/examples/jsm/nodes/accessors/SceneNode.js b/examples/jsm/nodes/accessors/SceneNode.js index 6f95feb5252196..41e4e342cfa4b3 100644 --- a/examples/jsm/nodes/accessors/SceneNode.js +++ b/examples/jsm/nodes/accessors/SceneNode.js @@ -49,4 +49,4 @@ export default SceneNode; export const backgroundBlurriness = nodeImmutable( SceneNode, SceneNode.BACKGROUND_BLURRINESS ); export const backgroundIntensity = nodeImmutable( SceneNode, SceneNode.BACKGROUND_INTENSITY ); -addNodeClass( SceneNode ); +addNodeClass( 'SceneNode', SceneNode ); diff --git a/examples/jsm/nodes/accessors/SkinningNode.js b/examples/jsm/nodes/accessors/SkinningNode.js index 267fa3fbc1bb80..a75cb0d3d82f3a 100644 --- a/examples/jsm/nodes/accessors/SkinningNode.js +++ b/examples/jsm/nodes/accessors/SkinningNode.js @@ -90,4 +90,4 @@ export default SkinningNode; export const skinning = nodeProxy( SkinningNode ); -addNodeClass( SkinningNode ); +addNodeClass( 'SkinningNode', SkinningNode ); diff --git a/examples/jsm/nodes/accessors/StorageBufferNode.js b/examples/jsm/nodes/accessors/StorageBufferNode.js index 7b5053493860ab..caf4e2093604c2 100644 --- a/examples/jsm/nodes/accessors/StorageBufferNode.js +++ b/examples/jsm/nodes/accessors/StorageBufferNode.js @@ -24,4 +24,4 @@ export default StorageBufferNode; export const storage = ( value, type, count ) => nodeObject( new StorageBufferNode( value, type, count ) ); -addNodeClass( StorageBufferNode ); +addNodeClass( 'StorageBufferNode', StorageBufferNode ); diff --git a/examples/jsm/nodes/accessors/TangentNode.js b/examples/jsm/nodes/accessors/TangentNode.js index e2e4d925410238..4c44ac6a12e44e 100644 --- a/examples/jsm/nodes/accessors/TangentNode.js +++ b/examples/jsm/nodes/accessors/TangentNode.js @@ -100,4 +100,4 @@ export const tangentWorld = nodeImmutable( TangentNode, TangentNode.WORLD ); export const transformedTangentView = temp( tangentView, 'TransformedTangentView' ); export const transformedTangentWorld = normalize( transformedTangentView.transformDirection( cameraViewMatrix ) ); -addNodeClass( TangentNode ); +addNodeClass( 'TangentNode', TangentNode ); diff --git a/examples/jsm/nodes/accessors/TextureBicubicNode.js b/examples/jsm/nodes/accessors/TextureBicubicNode.js index 6cdad6f7be92f2..9c49d8d36d45e5 100644 --- a/examples/jsm/nodes/accessors/TextureBicubicNode.js +++ b/examples/jsm/nodes/accessors/TextureBicubicNode.js @@ -91,4 +91,4 @@ export const textureBicubic = nodeProxy( TextureBicubicNode ); addNodeElement( 'bicubic', textureBicubic ); -addNodeClass( TextureBicubicNode ); +addNodeClass( 'TextureBicubicNode', TextureBicubicNode ); diff --git a/examples/jsm/nodes/accessors/TextureNode.js b/examples/jsm/nodes/accessors/TextureNode.js index 5f3f722e23c280..e34bddd7e2aa06 100644 --- a/examples/jsm/nodes/accessors/TextureNode.js +++ b/examples/jsm/nodes/accessors/TextureNode.js @@ -278,4 +278,4 @@ export const sampler = ( aTexture ) => ( aTexture.isNode === true ? aTexture : t addNodeElement( 'texture', texture ); //addNodeElement( 'textureLevel', textureLevel ); -addNodeClass( TextureNode ); +addNodeClass( 'TextureNode', TextureNode ); diff --git a/examples/jsm/nodes/accessors/TextureSizeNode.js b/examples/jsm/nodes/accessors/TextureSizeNode.js index cf8211c28f3dad..88b0cf67f57c45 100644 --- a/examples/jsm/nodes/accessors/TextureSizeNode.js +++ b/examples/jsm/nodes/accessors/TextureSizeNode.js @@ -32,4 +32,4 @@ export const textureSize = nodeProxy( TextureSizeNode ); addNodeElement( 'textureSize', textureSize ); -addNodeClass( TextureSizeNode ); +addNodeClass( 'TextureSizeNode', TextureSizeNode ); diff --git a/examples/jsm/nodes/accessors/TextureStoreNode.js b/examples/jsm/nodes/accessors/TextureStoreNode.js index 4e028ada1ad41b..5ee0e5e7634c6b 100644 --- a/examples/jsm/nodes/accessors/TextureStoreNode.js +++ b/examples/jsm/nodes/accessors/TextureStoreNode.js @@ -26,4 +26,4 @@ export default TextureStoreNode; export const textureStore = nodeProxy( TextureStoreNode ); -addNodeClass( TextureStoreNode ); +addNodeClass( 'TextureStoreNode', TextureStoreNode ); diff --git a/examples/jsm/nodes/accessors/UVNode.js b/examples/jsm/nodes/accessors/UVNode.js index 74b507e4a604de..473545eb081582 100644 --- a/examples/jsm/nodes/accessors/UVNode.js +++ b/examples/jsm/nodes/accessors/UVNode.js @@ -44,4 +44,4 @@ export default UVNode; export const uv = ( ...params ) => nodeObject( new UVNode( ...params ) ); -addNodeClass( UVNode ); +addNodeClass( 'UVNode', UVNode ); diff --git a/examples/jsm/nodes/accessors/UserDataNode.js b/examples/jsm/nodes/accessors/UserDataNode.js index 715b0b6a65afd5..b3ece1aeefe7d0 100644 --- a/examples/jsm/nodes/accessors/UserDataNode.js +++ b/examples/jsm/nodes/accessors/UserDataNode.js @@ -26,4 +26,4 @@ export default UserDataNode; export const userData = ( name, inputType, userData ) => nodeObject( new UserDataNode( name, inputType, userData ) ); -addNodeClass( UserDataNode ); +addNodeClass( 'UserDataNode', UserDataNode ); diff --git a/examples/jsm/nodes/code/CodeNode.js b/examples/jsm/nodes/code/CodeNode.js index c481c90a727404..acbf35729fce64 100644 --- a/examples/jsm/nodes/code/CodeNode.js +++ b/examples/jsm/nodes/code/CodeNode.js @@ -75,4 +75,4 @@ export const js = ( src, includes ) => code( src, includes, 'js' ); export const wgsl = ( src, includes ) => code( src, includes, 'wgsl' ); export const glsl = ( src, includes ) => code( src, includes, 'glsl' ); -addNodeClass( CodeNode ); +addNodeClass( 'CodeNode', CodeNode ); diff --git a/examples/jsm/nodes/code/ExpressionNode.js b/examples/jsm/nodes/code/ExpressionNode.js index 3a10ad33748c96..aa0b7042a5a790 100644 --- a/examples/jsm/nodes/code/ExpressionNode.js +++ b/examples/jsm/nodes/code/ExpressionNode.js @@ -34,4 +34,4 @@ export default ExpressionNode; export const expression = nodeProxy( ExpressionNode ); -addNodeClass( ExpressionNode ); +addNodeClass( 'ExpressionNode', ExpressionNode ); diff --git a/examples/jsm/nodes/code/FunctionCallNode.js b/examples/jsm/nodes/code/FunctionCallNode.js index b397c929f6e2c6..b5cfd8e267462b 100644 --- a/examples/jsm/nodes/code/FunctionCallNode.js +++ b/examples/jsm/nodes/code/FunctionCallNode.js @@ -93,4 +93,4 @@ export const call = ( func, ...params ) => { addNodeElement( 'call', call ); -addNodeClass( FunctionCallNode ); +addNodeClass( 'FunctionCallNode', FunctionCallNode ); diff --git a/examples/jsm/nodes/code/FunctionNode.js b/examples/jsm/nodes/code/FunctionNode.js index 6adf5bafdde859..57f54333ef6be1 100644 --- a/examples/jsm/nodes/code/FunctionNode.js +++ b/examples/jsm/nodes/code/FunctionNode.js @@ -124,4 +124,4 @@ export const func = ( code, includes ) => { // @deprecated, r154 }; -addNodeClass( FunctionNode ); +addNodeClass( 'FunctionNode', FunctionNode ); diff --git a/examples/jsm/nodes/code/ScriptableNode.js b/examples/jsm/nodes/code/ScriptableNode.js index c1a7e111b598cf..52435f22919e98 100644 --- a/examples/jsm/nodes/code/ScriptableNode.js +++ b/examples/jsm/nodes/code/ScriptableNode.js @@ -485,4 +485,4 @@ export const scriptable = nodeProxy( ScriptableNode ); addNodeElement( 'scriptable', scriptable ); -addNodeClass( ScriptableNode ); +addNodeClass( 'ScriptableNode', ScriptableNode ); diff --git a/examples/jsm/nodes/code/ScriptableValueNode.js b/examples/jsm/nodes/code/ScriptableValueNode.js index 13bf03f04495cc..4c54f59e1f7bed 100644 --- a/examples/jsm/nodes/code/ScriptableValueNode.js +++ b/examples/jsm/nodes/code/ScriptableValueNode.js @@ -164,4 +164,4 @@ export const scriptableValue = nodeProxy( ScriptableValueNode ); addNodeElement( 'scriptableValue', scriptableValue ); -addNodeClass( ScriptableValueNode ); +addNodeClass( 'ScriptableValueNode', ScriptableValueNode ); diff --git a/examples/jsm/nodes/core/ArrayUniformNode.js b/examples/jsm/nodes/core/ArrayUniformNode.js index eea3f9c46f37a2..e6d0d0643cb232 100644 --- a/examples/jsm/nodes/core/ArrayUniformNode.js +++ b/examples/jsm/nodes/core/ArrayUniformNode.js @@ -23,4 +23,4 @@ class ArrayUniformNode extends UniformNode { export default ArrayUniformNode; -addNodeClass( ArrayUniformNode ); +addNodeClass( 'ArrayUniformNode', ArrayUniformNode ); diff --git a/examples/jsm/nodes/core/AttributeNode.js b/examples/jsm/nodes/core/AttributeNode.js index 7f8b2c9e0e60cc..b06cdd9a84ee46 100644 --- a/examples/jsm/nodes/core/AttributeNode.js +++ b/examples/jsm/nodes/core/AttributeNode.js @@ -99,4 +99,4 @@ export default AttributeNode; export const attribute = ( name, nodeType ) => nodeObject( new AttributeNode( name, nodeType ) ); -addNodeClass( AttributeNode ); +addNodeClass( 'AttributeNode', AttributeNode ); diff --git a/examples/jsm/nodes/core/BypassNode.js b/examples/jsm/nodes/core/BypassNode.js index 887fd479a65df8..da173d6f202b45 100644 --- a/examples/jsm/nodes/core/BypassNode.js +++ b/examples/jsm/nodes/core/BypassNode.js @@ -42,4 +42,4 @@ export const bypass = nodeProxy( BypassNode ); addNodeElement( 'bypass', bypass ); -addNodeClass( BypassNode ); +addNodeClass( 'BypassNode', BypassNode ); diff --git a/examples/jsm/nodes/core/CacheNode.js b/examples/jsm/nodes/core/CacheNode.js index 7a084fc99d92bf..22230d4a283dae 100644 --- a/examples/jsm/nodes/core/CacheNode.js +++ b/examples/jsm/nodes/core/CacheNode.js @@ -43,4 +43,4 @@ export const cache = nodeProxy( CacheNode ); addNodeElement( 'cache', cache ); -addNodeClass( CacheNode ); +addNodeClass( 'CacheNode', CacheNode ); diff --git a/examples/jsm/nodes/core/ConstNode.js b/examples/jsm/nodes/core/ConstNode.js index 65c1d5df7b3b6d..4be4bac47ba076 100644 --- a/examples/jsm/nodes/core/ConstNode.js +++ b/examples/jsm/nodes/core/ConstNode.js @@ -29,4 +29,4 @@ class ConstNode extends InputNode { export default ConstNode; -addNodeClass( ConstNode ); +addNodeClass( 'ConstNode', ConstNode ); diff --git a/examples/jsm/nodes/core/ContextNode.js b/examples/jsm/nodes/core/ContextNode.js index 82fef3cb8739b5..b776b9644d2861 100644 --- a/examples/jsm/nodes/core/ContextNode.js +++ b/examples/jsm/nodes/core/ContextNode.js @@ -58,4 +58,4 @@ export const label = ( node, name ) => context( node, { label: name } ); addNodeElement( 'context', context ); addNodeElement( 'label', label ); -addNodeClass( ContextNode ); +addNodeClass( 'ContextNode', ContextNode ); diff --git a/examples/jsm/nodes/core/IndexNode.js b/examples/jsm/nodes/core/IndexNode.js index f88233dc7e0397..c1b724defac7db 100644 --- a/examples/jsm/nodes/core/IndexNode.js +++ b/examples/jsm/nodes/core/IndexNode.js @@ -63,4 +63,4 @@ export default IndexNode; export const vertexIndex = nodeImmutable( IndexNode, IndexNode.VERTEX ); export const instanceIndex = nodeImmutable( IndexNode, IndexNode.INSTANCE ); -addNodeClass( IndexNode ); +addNodeClass( 'IndexNode', IndexNode ); diff --git a/examples/jsm/nodes/core/InputNode.js b/examples/jsm/nodes/core/InputNode.js index 3bcf14fe9fc898..05aab76f9455a1 100644 --- a/examples/jsm/nodes/core/InputNode.js +++ b/examples/jsm/nodes/core/InputNode.js @@ -80,4 +80,4 @@ class InputNode extends Node { export default InputNode; -addNodeClass( InputNode ); +addNodeClass( 'InputNode', InputNode ); diff --git a/examples/jsm/nodes/core/Node.js b/examples/jsm/nodes/core/Node.js index 708f1d3bf2460f..97003b4be67672 100644 --- a/examples/jsm/nodes/core/Node.js +++ b/examples/jsm/nodes/core/Node.js @@ -28,7 +28,7 @@ class Node extends EventDispatcher { get type() { - return this.constructor.name; + return this.constructor.type; } @@ -462,12 +462,13 @@ class Node extends EventDispatcher { export default Node; -export function addNodeClass( nodeClass ) { +export function addNodeClass( type, nodeClass ) { - if ( typeof nodeClass !== 'function' || ! nodeClass.name ) throw new Error( `Node class ${ nodeClass.name } is not a class` ); - if ( NodeClasses.has( nodeClass.name ) ) throw new Error( `Redefinition of node class ${ nodeClass.name }` ); + if ( typeof nodeClass !== 'function' || ! type ) throw new Error( `Node class ${ type } is not a class` ); + if ( NodeClasses.has( type ) ) throw new Error( `Redefinition of node class ${ type }` ); - NodeClasses.set( nodeClass.name, nodeClass ); + NodeClasses.set( type, nodeClass ); + nodeClass.type = type; } diff --git a/examples/jsm/nodes/core/OutputStructNode.js b/examples/jsm/nodes/core/OutputStructNode.js index 6c00a9490553e5..779734b789c0e4 100644 --- a/examples/jsm/nodes/core/OutputStructNode.js +++ b/examples/jsm/nodes/core/OutputStructNode.js @@ -59,4 +59,4 @@ export default OutputStructNode; export const outputStruct = nodeProxy( OutputStructNode ); -addNodeClass( OutputStructNode ); +addNodeClass( 'OutputStructNode', OutputStructNode ); diff --git a/examples/jsm/nodes/core/PropertyNode.js b/examples/jsm/nodes/core/PropertyNode.js index e8aef5f975627b..0065f831d1608f 100644 --- a/examples/jsm/nodes/core/PropertyNode.js +++ b/examples/jsm/nodes/core/PropertyNode.js @@ -60,4 +60,4 @@ export const output = nodeImmutable( PropertyNode, 'vec4', 'Output' ); export const dashSize = nodeImmutable( PropertyNode, 'float', 'dashSize' ); export const gapSize = nodeImmutable( PropertyNode, 'float', 'gapSize' ); -addNodeClass( PropertyNode ); +addNodeClass( 'PropertyNode', PropertyNode ); diff --git a/examples/jsm/nodes/core/StackNode.js b/examples/jsm/nodes/core/StackNode.js index aa6ca3eab385f5..78088e673f1547 100644 --- a/examples/jsm/nodes/core/StackNode.js +++ b/examples/jsm/nodes/core/StackNode.js @@ -96,4 +96,4 @@ export default StackNode; export const stack = nodeProxy( StackNode ); -addNodeClass( StackNode ); +addNodeClass( 'StackNode', StackNode ); diff --git a/examples/jsm/nodes/core/StructTypeNode.js b/examples/jsm/nodes/core/StructTypeNode.js index 664e3e06bce079..b87abb3469bd5c 100644 --- a/examples/jsm/nodes/core/StructTypeNode.js +++ b/examples/jsm/nodes/core/StructTypeNode.js @@ -21,4 +21,4 @@ class StructTypeNode extends Node { export default StructTypeNode; -addNodeClass( StructTypeNode ); +addNodeClass( 'StructTypeNode', StructTypeNode ); diff --git a/examples/jsm/nodes/core/TempNode.js b/examples/jsm/nodes/core/TempNode.js index 107f1e65b9dd84..cbaafe22600489 100644 --- a/examples/jsm/nodes/core/TempNode.js +++ b/examples/jsm/nodes/core/TempNode.js @@ -55,4 +55,4 @@ class TempNode extends Node { export default TempNode; -addNodeClass( TempNode ); +addNodeClass( 'TempNode', TempNode ); diff --git a/examples/jsm/nodes/core/UniformNode.js b/examples/jsm/nodes/core/UniformNode.js index 6160abc0080515..76f01739531e9e 100644 --- a/examples/jsm/nodes/core/UniformNode.js +++ b/examples/jsm/nodes/core/UniformNode.js @@ -60,4 +60,4 @@ export const uniform = ( arg1, arg2 ) => { }; -addNodeClass( UniformNode ); +addNodeClass( 'UniformNode', UniformNode ); diff --git a/examples/jsm/nodes/core/VarNode.js b/examples/jsm/nodes/core/VarNode.js index 9f47fd4c45027b..281d8c1d6f1478 100644 --- a/examples/jsm/nodes/core/VarNode.js +++ b/examples/jsm/nodes/core/VarNode.js @@ -84,4 +84,4 @@ export const temp = nodeProxy( VarNode ); addNodeElement( 'temp', temp ); -addNodeClass( VarNode ); +addNodeClass( 'VarNode', VarNode ); diff --git a/examples/jsm/nodes/core/VaryingNode.js b/examples/jsm/nodes/core/VaryingNode.js index e936c8336620ac..4a57653db95f36 100644 --- a/examples/jsm/nodes/core/VaryingNode.js +++ b/examples/jsm/nodes/core/VaryingNode.js @@ -66,4 +66,4 @@ export const varying = nodeProxy( VaryingNode ); addNodeElement( 'varying', varying ); -addNodeClass( VaryingNode ); +addNodeClass( 'VaryingNode', VaryingNode ); diff --git a/examples/jsm/nodes/display/BlendModeNode.js b/examples/jsm/nodes/display/BlendModeNode.js index 57cba365ffa97d..0dfd21479be6bf 100644 --- a/examples/jsm/nodes/display/BlendModeNode.js +++ b/examples/jsm/nodes/display/BlendModeNode.js @@ -96,4 +96,4 @@ addNodeElement( 'dodge', dodge ); addNodeElement( 'overlay', overlay ); addNodeElement( 'screen', screen ); -addNodeClass( BlendModeNode ); +addNodeClass( 'BlendModeNode', BlendModeNode ); diff --git a/examples/jsm/nodes/display/BumpMapNode.js b/examples/jsm/nodes/display/BumpMapNode.js index 470239cdef663e..30651a3993fb82 100644 --- a/examples/jsm/nodes/display/BumpMapNode.js +++ b/examples/jsm/nodes/display/BumpMapNode.js @@ -74,4 +74,4 @@ export default BumpMapNode; export const bumpMap = nodeProxy( BumpMapNode ); -addNodeClass( BumpMapNode ); +addNodeClass( 'BumpMapNode', BumpMapNode ); diff --git a/examples/jsm/nodes/display/ColorAdjustmentNode.js b/examples/jsm/nodes/display/ColorAdjustmentNode.js index 306acc7d2217b3..463c5b4f6e026f 100644 --- a/examples/jsm/nodes/display/ColorAdjustmentNode.js +++ b/examples/jsm/nodes/display/ColorAdjustmentNode.js @@ -97,4 +97,4 @@ addNodeElement( 'saturation', saturation ); addNodeElement( 'vibrance', vibrance ); addNodeElement( 'hue', hue ); -addNodeClass( ColorAdjustmentNode ); +addNodeClass( 'ColorAdjustmentNode', ColorAdjustmentNode ); diff --git a/examples/jsm/nodes/display/ColorSpaceNode.js b/examples/jsm/nodes/display/ColorSpaceNode.js index b0e9465cb105f5..5ed43ead280aeb 100644 --- a/examples/jsm/nodes/display/ColorSpaceNode.js +++ b/examples/jsm/nodes/display/ColorSpaceNode.js @@ -105,4 +105,4 @@ addNodeElement( 'sRGBToLinear', sRGBToLinear ); addNodeElement( 'linearToColorSpace', linearToColorSpace ); addNodeElement( 'colorSpaceToLinear', colorSpaceToLinear ); -addNodeClass( ColorSpaceNode ); +addNodeClass( 'ColorSpaceNode', ColorSpaceNode ); diff --git a/examples/jsm/nodes/display/FrontFacingNode.js b/examples/jsm/nodes/display/FrontFacingNode.js index 762e2094dfe8ff..c83cc9f7816ba0 100644 --- a/examples/jsm/nodes/display/FrontFacingNode.js +++ b/examples/jsm/nodes/display/FrontFacingNode.js @@ -24,4 +24,4 @@ export default FrontFacingNode; export const frontFacing = nodeImmutable( FrontFacingNode ); export const faceDirection = float( frontFacing ).mul( 2.0 ).sub( 1.0 ); -addNodeClass( FrontFacingNode ); +addNodeClass( 'FrontFacingNode', FrontFacingNode ); diff --git a/examples/jsm/nodes/display/NormalMapNode.js b/examples/jsm/nodes/display/NormalMapNode.js index 58dc2cc11c91d7..7fa2c071d33259 100644 --- a/examples/jsm/nodes/display/NormalMapNode.js +++ b/examples/jsm/nodes/display/NormalMapNode.js @@ -103,4 +103,4 @@ export const normalMap = nodeProxy( NormalMapNode ); export const TBNViewMatrix = mat3( tangentView, bitangentView, normalView ); -addNodeClass( NormalMapNode ); +addNodeClass( 'NormalMapNode', NormalMapNode ); diff --git a/examples/jsm/nodes/display/PosterizeNode.js b/examples/jsm/nodes/display/PosterizeNode.js index cb6f7480f2723b..516477ec75c84c 100644 --- a/examples/jsm/nodes/display/PosterizeNode.js +++ b/examples/jsm/nodes/display/PosterizeNode.js @@ -29,4 +29,4 @@ export const posterize = nodeProxy( PosterizeNode ); addNodeElement( 'posterize', posterize ); -addNodeClass( PosterizeNode ); +addNodeClass( 'PosterizeNode', PosterizeNode ); diff --git a/examples/jsm/nodes/display/ToneMappingNode.js b/examples/jsm/nodes/display/ToneMappingNode.js index eae305b9f6ea50..7415ab008e1012 100644 --- a/examples/jsm/nodes/display/ToneMappingNode.js +++ b/examples/jsm/nodes/display/ToneMappingNode.js @@ -138,4 +138,4 @@ export default ToneMappingNode; export const toneMapping = ( mapping, exposure, color ) => nodeObject( new ToneMappingNode( mapping, nodeObject( exposure ), nodeObject( color ) ) ); -addNodeClass( ToneMappingNode ); +addNodeClass( 'ToneMappingNode', ToneMappingNode ); diff --git a/examples/jsm/nodes/display/ViewportDepthNode.js b/examples/jsm/nodes/display/ViewportDepthNode.js index e7db19d553c716..b44af4b790b33c 100644 --- a/examples/jsm/nodes/display/ViewportDepthNode.js +++ b/examples/jsm/nodes/display/ViewportDepthNode.js @@ -66,4 +66,4 @@ export default ViewportDepthNode; export const depth = nodeImmutable( ViewportDepthNode, ViewportDepthNode.DEPTH ); export const depthTexture = nodeProxy( ViewportDepthNode, ViewportDepthNode.DEPTH_TEXTURE ); -addNodeClass( ViewportDepthNode ); +addNodeClass( 'ViewportDepthNode', ViewportDepthNode ); diff --git a/examples/jsm/nodes/display/ViewportDepthTextureNode.js b/examples/jsm/nodes/display/ViewportDepthTextureNode.js index d090ad2b020b64..26aa4e0ced8201 100644 --- a/examples/jsm/nodes/display/ViewportDepthTextureNode.js +++ b/examples/jsm/nodes/display/ViewportDepthTextureNode.js @@ -31,4 +31,4 @@ export const viewportDepthTexture = nodeProxy( ViewportDepthTextureNode ); addNodeElement( 'viewportDepthTexture', viewportDepthTexture ); -addNodeClass( ViewportDepthTextureNode ); +addNodeClass( 'ViewportDepthTextureNode', ViewportDepthTextureNode ); diff --git a/examples/jsm/nodes/display/ViewportNode.js b/examples/jsm/nodes/display/ViewportNode.js index 829853daea0bfd..c3f31b8f4a0adf 100644 --- a/examples/jsm/nodes/display/ViewportNode.js +++ b/examples/jsm/nodes/display/ViewportNode.js @@ -126,4 +126,4 @@ export const viewportBottomLeft = nodeImmutable( ViewportNode, ViewportNode.BOTT export const viewportTopRight = nodeImmutable( ViewportNode, ViewportNode.TOP_RIGHT ); export const viewportBottomRight = nodeImmutable( ViewportNode, ViewportNode.BOTTOM_RIGHT ); -addNodeClass( ViewportNode ); +addNodeClass( 'ViewportNode', ViewportNode ); diff --git a/examples/jsm/nodes/display/ViewportSharedTextureNode.js b/examples/jsm/nodes/display/ViewportSharedTextureNode.js index 853f26feeda7e6..563342d5c844cb 100644 --- a/examples/jsm/nodes/display/ViewportSharedTextureNode.js +++ b/examples/jsm/nodes/display/ViewportSharedTextureNode.js @@ -28,4 +28,4 @@ export const viewportSharedTexture = nodeProxy( ViewportSharedTextureNode ); addNodeElement( 'viewportSharedTexture', viewportSharedTexture ); -addNodeClass( ViewportSharedTextureNode ); +addNodeClass( 'ViewportSharedTextureNode', ViewportSharedTextureNode ); diff --git a/examples/jsm/nodes/display/ViewportTextureNode.js b/examples/jsm/nodes/display/ViewportTextureNode.js index 356f5c28b4681d..a7f71d2a4f5fbd 100644 --- a/examples/jsm/nodes/display/ViewportTextureNode.js +++ b/examples/jsm/nodes/display/ViewportTextureNode.js @@ -72,4 +72,4 @@ export const viewportMipTexture = nodeProxy( ViewportTextureNode, null, null, { addNodeElement( 'viewportTexture', viewportTexture ); addNodeElement( 'viewportMipTexture', viewportMipTexture ); -addNodeClass( ViewportTextureNode ); +addNodeClass( 'ViewportTextureNode', ViewportTextureNode ); diff --git a/examples/jsm/nodes/fog/FogExp2Node.js b/examples/jsm/nodes/fog/FogExp2Node.js index 8f06ceb7430789..6d3d95edbde5fd 100644 --- a/examples/jsm/nodes/fog/FogExp2Node.js +++ b/examples/jsm/nodes/fog/FogExp2Node.js @@ -32,4 +32,4 @@ export const densityFog = nodeProxy( FogExp2Node ); addNodeElement( 'densityFog', densityFog ); -addNodeClass( FogExp2Node ); +addNodeClass( 'FogExp2Node', FogExp2Node ); diff --git a/examples/jsm/nodes/fog/FogNode.js b/examples/jsm/nodes/fog/FogNode.js index 5d469b4f67a77e..537dfa0ac69074 100644 --- a/examples/jsm/nodes/fog/FogNode.js +++ b/examples/jsm/nodes/fog/FogNode.js @@ -34,4 +34,4 @@ export const fog = nodeProxy( FogNode ); addNodeElement( 'fog', fog ); -addNodeClass( FogNode ); +addNodeClass( 'FogNode', FogNode ); diff --git a/examples/jsm/nodes/fog/FogRangeNode.js b/examples/jsm/nodes/fog/FogRangeNode.js index 120c8a185da10c..448c2e45e10c4a 100644 --- a/examples/jsm/nodes/fog/FogRangeNode.js +++ b/examples/jsm/nodes/fog/FogRangeNode.js @@ -31,4 +31,4 @@ export const rangeFog = nodeProxy( FogRangeNode ); addNodeElement( 'rangeFog', rangeFog ); -addNodeClass( FogRangeNode ); +addNodeClass( 'FogRangeNode', FogRangeNode ); diff --git a/examples/jsm/nodes/geometry/RangeNode.js b/examples/jsm/nodes/geometry/RangeNode.js index 79aa8d779f75e1..6b4df276268fc9 100644 --- a/examples/jsm/nodes/geometry/RangeNode.js +++ b/examples/jsm/nodes/geometry/RangeNode.js @@ -101,4 +101,4 @@ export default RangeNode; export const range = nodeProxy( RangeNode ); -addNodeClass( RangeNode ); +addNodeClass( 'RangeNode', RangeNode ); diff --git a/examples/jsm/nodes/gpgpu/ComputeNode.js b/examples/jsm/nodes/gpgpu/ComputeNode.js index 05e97e6bd2fbc8..15d8e3cf58639c 100644 --- a/examples/jsm/nodes/gpgpu/ComputeNode.js +++ b/examples/jsm/nodes/gpgpu/ComputeNode.js @@ -82,4 +82,4 @@ export const compute = ( node, count, workgroupSize ) => nodeObject( new Compute addNodeElement( 'compute', compute ); -addNodeClass( ComputeNode ); +addNodeClass( 'ComputeNode', ComputeNode ); diff --git a/examples/jsm/nodes/lighting/AONode.js b/examples/jsm/nodes/lighting/AONode.js index ba5f8f1d3f1de8..84c539ef325d8e 100644 --- a/examples/jsm/nodes/lighting/AONode.js +++ b/examples/jsm/nodes/lighting/AONode.js @@ -24,4 +24,4 @@ class AONode extends LightingNode { export default AONode; -addNodeClass( AONode ); +addNodeClass( 'AONode', AONode ); diff --git a/examples/jsm/nodes/lighting/AmbientLightNode.js b/examples/jsm/nodes/lighting/AmbientLightNode.js index e84e0c18db8f55..f9181b2d8459b4 100644 --- a/examples/jsm/nodes/lighting/AmbientLightNode.js +++ b/examples/jsm/nodes/lighting/AmbientLightNode.js @@ -24,4 +24,4 @@ export default AmbientLightNode; addLightNode( AmbientLight, AmbientLightNode ); -addNodeClass( AmbientLightNode ); +addNodeClass( 'AmbientLightNode', AmbientLightNode ); diff --git a/examples/jsm/nodes/lighting/AnalyticLightNode.js b/examples/jsm/nodes/lighting/AnalyticLightNode.js index 3887374516000f..a85cc17797e607 100644 --- a/examples/jsm/nodes/lighting/AnalyticLightNode.js +++ b/examples/jsm/nodes/lighting/AnalyticLightNode.js @@ -181,4 +181,4 @@ class AnalyticLightNode extends LightingNode { export default AnalyticLightNode; -addNodeClass( AnalyticLightNode ); +addNodeClass( 'AnalyticLightNode', AnalyticLightNode ); diff --git a/examples/jsm/nodes/lighting/DirectionalLightNode.js b/examples/jsm/nodes/lighting/DirectionalLightNode.js index 98c0e58c933e1f..6340d80bc240f1 100644 --- a/examples/jsm/nodes/lighting/DirectionalLightNode.js +++ b/examples/jsm/nodes/lighting/DirectionalLightNode.js @@ -37,4 +37,4 @@ export default DirectionalLightNode; addLightNode( DirectionalLight, DirectionalLightNode ); -addNodeClass( DirectionalLightNode ); +addNodeClass( 'DirectionalLightNode', DirectionalLightNode ); diff --git a/examples/jsm/nodes/lighting/EnvironmentNode.js b/examples/jsm/nodes/lighting/EnvironmentNode.js index 2c58e3b7c161c8..e5462e87e47b60 100644 --- a/examples/jsm/nodes/lighting/EnvironmentNode.js +++ b/examples/jsm/nodes/lighting/EnvironmentNode.js @@ -188,4 +188,4 @@ const createIrradianceContext = ( normalWorldNode ) => { export default EnvironmentNode; -addNodeClass( EnvironmentNode ); +addNodeClass( 'EnvironmentNode', EnvironmentNode ); diff --git a/examples/jsm/nodes/lighting/HemisphereLightNode.js b/examples/jsm/nodes/lighting/HemisphereLightNode.js index cde73b19310b12..c7081cf70983a3 100644 --- a/examples/jsm/nodes/lighting/HemisphereLightNode.js +++ b/examples/jsm/nodes/lighting/HemisphereLightNode.js @@ -52,4 +52,4 @@ export default HemisphereLightNode; addLightNode( HemisphereLight, HemisphereLightNode ); -addNodeClass( HemisphereLightNode ); +addNodeClass( 'HemisphereLightNode', HemisphereLightNode ); diff --git a/examples/jsm/nodes/lighting/IESSpotLightNode.js b/examples/jsm/nodes/lighting/IESSpotLightNode.js index 5a3db66c12c2f2..fd3e657d35b657 100644 --- a/examples/jsm/nodes/lighting/IESSpotLightNode.js +++ b/examples/jsm/nodes/lighting/IESSpotLightNode.js @@ -36,4 +36,4 @@ export default IESSpotLightNode; addLightNode( IESSpotLight, IESSpotLightNode ); -addNodeClass( IESSpotLightNode ); +addNodeClass( 'IESSpotLightNode', IESSpotLightNode ); diff --git a/examples/jsm/nodes/lighting/LightNode.js b/examples/jsm/nodes/lighting/LightNode.js index 8e5b426a250ac0..349993d109e122 100644 --- a/examples/jsm/nodes/lighting/LightNode.js +++ b/examples/jsm/nodes/lighting/LightNode.js @@ -54,4 +54,4 @@ export default LightNode; export const lightTargetDirection = nodeProxy( LightNode, LightNode.TARGET_DIRECTION ); -addNodeClass( LightNode ); +addNodeClass( 'LightNode', LightNode ); diff --git a/examples/jsm/nodes/lighting/LightingContextNode.js b/examples/jsm/nodes/lighting/LightingContextNode.js index 9146afdb84cd9c..8feaee2de61c5d 100644 --- a/examples/jsm/nodes/lighting/LightingContextNode.js +++ b/examples/jsm/nodes/lighting/LightingContextNode.js @@ -99,4 +99,4 @@ export const lightingContext = nodeProxy( LightingContextNode ); addNodeElement( 'lightingContext', lightingContext ); -addNodeClass( LightingContextNode ); +addNodeClass( 'LightingContextNode', LightingContextNode ); diff --git a/examples/jsm/nodes/lighting/LightingNode.js b/examples/jsm/nodes/lighting/LightingNode.js index 4c5bcfe46cd441..318c2a14914c0d 100644 --- a/examples/jsm/nodes/lighting/LightingNode.js +++ b/examples/jsm/nodes/lighting/LightingNode.js @@ -18,4 +18,4 @@ class LightingNode extends Node { export default LightingNode; -addNodeClass( LightingNode ); +addNodeClass( 'LightingNode', LightingNode ); diff --git a/examples/jsm/nodes/lighting/PointLightNode.js b/examples/jsm/nodes/lighting/PointLightNode.js index 8212ce90c1d53b..d413c2b8ee46ac 100644 --- a/examples/jsm/nodes/lighting/PointLightNode.js +++ b/examples/jsm/nodes/lighting/PointLightNode.js @@ -65,4 +65,4 @@ export default PointLightNode; addLightNode( PointLight, PointLightNode ); -addNodeClass( PointLightNode ); +addNodeClass( 'PointLightNode', PointLightNode ); diff --git a/examples/jsm/nodes/lighting/SpotLightNode.js b/examples/jsm/nodes/lighting/SpotLightNode.js index e25a08b6fbcc84..b5d1425c1314a2 100644 --- a/examples/jsm/nodes/lighting/SpotLightNode.js +++ b/examples/jsm/nodes/lighting/SpotLightNode.js @@ -86,4 +86,4 @@ export default SpotLightNode; addLightNode( SpotLight, SpotLightNode ); -addNodeClass( SpotLightNode ); +addNodeClass( 'SpotLightNode', SpotLightNode ); diff --git a/examples/jsm/nodes/materials/Line2NodeMaterial.js b/examples/jsm/nodes/materials/Line2NodeMaterial.js index 1920311cbbd443..5dccdcb081c813 100644 --- a/examples/jsm/nodes/materials/Line2NodeMaterial.js +++ b/examples/jsm/nodes/materials/Line2NodeMaterial.js @@ -446,4 +446,4 @@ class Line2NodeMaterial extends NodeMaterial { export default Line2NodeMaterial; -addNodeMaterial( Line2NodeMaterial ); +addNodeMaterial( 'Line2NodeMaterial', Line2NodeMaterial ); diff --git a/examples/jsm/nodes/materials/LineBasicNodeMaterial.js b/examples/jsm/nodes/materials/LineBasicNodeMaterial.js index 4ccb77c8acb6de..9a1ab32b0f7a02 100644 --- a/examples/jsm/nodes/materials/LineBasicNodeMaterial.js +++ b/examples/jsm/nodes/materials/LineBasicNodeMaterial.js @@ -25,4 +25,4 @@ class LineBasicNodeMaterial extends NodeMaterial { export default LineBasicNodeMaterial; -addNodeMaterial( LineBasicNodeMaterial ); +addNodeMaterial( 'LineBasicNodeMaterial', LineBasicNodeMaterial ); diff --git a/examples/jsm/nodes/materials/LineDashedNodeMaterial.js b/examples/jsm/nodes/materials/LineDashedNodeMaterial.js index b1fc97acad70a7..9d9ad9bbebb60a 100644 --- a/examples/jsm/nodes/materials/LineDashedNodeMaterial.js +++ b/examples/jsm/nodes/materials/LineDashedNodeMaterial.js @@ -51,4 +51,4 @@ class LineDashedNodeMaterial extends NodeMaterial { export default LineDashedNodeMaterial; -addNodeMaterial( LineDashedNodeMaterial ); +addNodeMaterial( 'LineDashedNodeMaterial', LineDashedNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js b/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js index c6c0d4133bbbb9..870a98bdb2b00d 100644 --- a/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js @@ -24,4 +24,4 @@ class MeshBasicNodeMaterial extends NodeMaterial { export default MeshBasicNodeMaterial; -addNodeMaterial( MeshBasicNodeMaterial ); +addNodeMaterial( 'MeshBasicNodeMaterial', MeshBasicNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js b/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js index 520f909f3ce6de..5587030422de39 100644 --- a/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js @@ -31,4 +31,4 @@ class MeshLambertNodeMaterial extends NodeMaterial { export default MeshLambertNodeMaterial; -addNodeMaterial( MeshLambertNodeMaterial ); +addNodeMaterial( 'MeshLambertNodeMaterial', MeshLambertNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js b/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js index ae0cb6d1be6a45..c01aba6c898e27 100644 --- a/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js @@ -37,4 +37,4 @@ class MeshNormalNodeMaterial extends NodeMaterial { export default MeshNormalNodeMaterial; -addNodeMaterial( MeshNormalNodeMaterial ); +addNodeMaterial( 'MeshNormalNodeMaterial', MeshNormalNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js b/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js index 02ea5b9c50187c..368bcb3646c318 100644 --- a/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js @@ -62,4 +62,4 @@ class MeshPhongNodeMaterial extends NodeMaterial { export default MeshPhongNodeMaterial; -addNodeMaterial( MeshPhongNodeMaterial ); +addNodeMaterial( 'MeshPhongNodeMaterial', MeshPhongNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js b/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js index 23dbf11a4221f4..310e126be0838c 100644 --- a/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js @@ -125,4 +125,4 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { export default MeshPhysicalNodeMaterial; -addNodeMaterial( MeshPhysicalNodeMaterial ); +addNodeMaterial( 'MeshPhysicalNodeMaterial', MeshPhysicalNodeMaterial ); diff --git a/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js index 1a389b19c70ce9..ed6ebf5feb24ea 100644 --- a/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js @@ -77,4 +77,4 @@ class MeshStandardNodeMaterial extends NodeMaterial { export default MeshStandardNodeMaterial; -addNodeMaterial( MeshStandardNodeMaterial ); +addNodeMaterial( 'MeshStandardNodeMaterial', MeshStandardNodeMaterial ); diff --git a/examples/jsm/nodes/materials/NodeMaterial.js b/examples/jsm/nodes/materials/NodeMaterial.js index fb1c924b815271..d917dc3f108e1f 100644 --- a/examples/jsm/nodes/materials/NodeMaterial.js +++ b/examples/jsm/nodes/materials/NodeMaterial.js @@ -29,7 +29,7 @@ class NodeMaterial extends ShaderMaterial { this.isNodeMaterial = true; - this.type = this.constructor.name; + this.type = this.constructor.type; this.forceSinglePass = false; @@ -521,12 +521,13 @@ class NodeMaterial extends ShaderMaterial { export default NodeMaterial; -export function addNodeMaterial( nodeMaterial ) { +export function addNodeMaterial( type, nodeMaterial ) { - if ( typeof nodeMaterial !== 'function' || ! nodeMaterial.name ) throw new Error( `Node material ${ nodeMaterial.name } is not a class` ); - if ( NodeMaterials.has( nodeMaterial.name ) ) throw new Error( `Redefinition of node material ${ nodeMaterial.name }` ); + if ( typeof nodeMaterial !== 'function' || ! type ) throw new Error( `Node material ${ type } is not a class` ); + if ( NodeMaterials.has( type ) ) throw new Error( `Redefinition of node material ${ type }` ); - NodeMaterials.set( nodeMaterial.name, nodeMaterial ); + NodeMaterials.set( type, nodeMaterial ); + nodeMaterial.type = type; } @@ -542,4 +543,4 @@ export function createNodeMaterialFromType( type ) { } -addNodeMaterial( NodeMaterial ); +addNodeMaterial( 'NodeMaterial', NodeMaterial ); diff --git a/examples/jsm/nodes/materials/PointsNodeMaterial.js b/examples/jsm/nodes/materials/PointsNodeMaterial.js index c4159c4fbea104..8e39887566208c 100644 --- a/examples/jsm/nodes/materials/PointsNodeMaterial.js +++ b/examples/jsm/nodes/materials/PointsNodeMaterial.js @@ -46,4 +46,4 @@ class PointsNodeMaterial extends NodeMaterial { export default PointsNodeMaterial; -addNodeMaterial( PointsNodeMaterial ); +addNodeMaterial( 'PointsNodeMaterial', PointsNodeMaterial ); diff --git a/examples/jsm/nodes/materials/SpriteNodeMaterial.js b/examples/jsm/nodes/materials/SpriteNodeMaterial.js index dfb569b7545af7..b11b32e64c171a 100644 --- a/examples/jsm/nodes/materials/SpriteNodeMaterial.js +++ b/examples/jsm/nodes/materials/SpriteNodeMaterial.js @@ -100,4 +100,4 @@ class SpriteNodeMaterial extends NodeMaterial { export default SpriteNodeMaterial; -addNodeMaterial( SpriteNodeMaterial ); +addNodeMaterial( 'SpriteNodeMaterial', SpriteNodeMaterial ); diff --git a/examples/jsm/nodes/math/CondNode.js b/examples/jsm/nodes/math/CondNode.js index 142d17e76f768d..9e49d3bc8fc51f 100644 --- a/examples/jsm/nodes/math/CondNode.js +++ b/examples/jsm/nodes/math/CondNode.js @@ -83,4 +83,4 @@ export const cond = nodeProxy( CondNode ); addNodeElement( 'cond', cond ); -addNodeClass( CondNode ); +addNodeClass( 'CondNode', CondNode ); diff --git a/examples/jsm/nodes/math/HashNode.js b/examples/jsm/nodes/math/HashNode.js index a5196aee721acb..a8697dd071c6ba 100644 --- a/examples/jsm/nodes/math/HashNode.js +++ b/examples/jsm/nodes/math/HashNode.js @@ -31,4 +31,4 @@ export const hash = nodeProxy( HashNode ); addNodeElement( 'hash', hash ); -addNodeClass( HashNode ); +addNodeClass( 'HashNode', HashNode ); diff --git a/examples/jsm/nodes/math/MathNode.js b/examples/jsm/nodes/math/MathNode.js index 919b761b69be62..acc10dc2ab552b 100644 --- a/examples/jsm/nodes/math/MathNode.js +++ b/examples/jsm/nodes/math/MathNode.js @@ -356,4 +356,4 @@ addNodeElement( 'faceForward', faceForward ); addNodeElement( 'difference', difference ); addNodeElement( 'saturate', saturate ); -addNodeClass( MathNode ); +addNodeClass( 'MathNode', MathNode ); diff --git a/examples/jsm/nodes/math/OperatorNode.js b/examples/jsm/nodes/math/OperatorNode.js index 84f77a485742e7..2a9b51ae0f76d1 100644 --- a/examples/jsm/nodes/math/OperatorNode.js +++ b/examples/jsm/nodes/math/OperatorNode.js @@ -266,4 +266,4 @@ addNodeElement( 'bitXor', bitXor ); addNodeElement( 'shiftLeft', shiftLeft ); addNodeElement( 'shiftRight', shiftRight ); -addNodeClass( OperatorNode ); +addNodeClass( 'OperatorNode', OperatorNode ); diff --git a/examples/jsm/nodes/procedural/CheckerNode.js b/examples/jsm/nodes/procedural/CheckerNode.js index f4b30a4e72422e..4840908b85b6e8 100644 --- a/examples/jsm/nodes/procedural/CheckerNode.js +++ b/examples/jsm/nodes/procedural/CheckerNode.js @@ -39,4 +39,4 @@ export const checker = nodeProxy( CheckerNode ); addNodeElement( 'checker', checker ); -addNodeClass( CheckerNode ); +addNodeClass( 'CheckerNode', CheckerNode ); diff --git a/examples/jsm/nodes/shadernode/ShaderNode.js b/examples/jsm/nodes/shadernode/ShaderNode.js index de1d88c46fda5d..689dd1992c99f5 100644 --- a/examples/jsm/nodes/shadernode/ShaderNode.js +++ b/examples/jsm/nodes/shadernode/ShaderNode.js @@ -399,7 +399,7 @@ export const tslFn = ( jsFunc ) => { }; -addNodeClass( ShaderNode ); +addNodeClass( 'ShaderNode', ShaderNode ); // types // @TODO: Maybe export from ConstNode.js? diff --git a/examples/jsm/nodes/utils/ArrayElementNode.js b/examples/jsm/nodes/utils/ArrayElementNode.js index 2f42b336964683..e36a30eee18b83 100644 --- a/examples/jsm/nodes/utils/ArrayElementNode.js +++ b/examples/jsm/nodes/utils/ArrayElementNode.js @@ -30,4 +30,4 @@ class ArrayElementNode extends Node { // @TODO: If extending from TempNode it br export default ArrayElementNode; -addNodeClass( ArrayElementNode ); +addNodeClass( 'ArrayElementNode', ArrayElementNode ); diff --git a/examples/jsm/nodes/utils/ConvertNode.js b/examples/jsm/nodes/utils/ConvertNode.js index 51f2a28893c73c..8dc08756268fdb 100644 --- a/examples/jsm/nodes/utils/ConvertNode.js +++ b/examples/jsm/nodes/utils/ConvertNode.js @@ -62,4 +62,4 @@ class ConvertNode extends Node { export default ConvertNode; -addNodeClass( ConvertNode ); +addNodeClass( 'ConvertNode', ConvertNode ); diff --git a/examples/jsm/nodes/utils/DiscardNode.js b/examples/jsm/nodes/utils/DiscardNode.js index c52fdafcb490a1..38b85a5571b8a4 100644 --- a/examples/jsm/nodes/utils/DiscardNode.js +++ b/examples/jsm/nodes/utils/DiscardNode.js @@ -23,4 +23,4 @@ export const discard = nodeProxy( DiscardNode ); addNodeElement( 'discard', discard ); -addNodeClass( DiscardNode ); +addNodeClass( 'DiscardNode', DiscardNode ); diff --git a/examples/jsm/nodes/utils/EquirectUVNode.js b/examples/jsm/nodes/utils/EquirectUVNode.js index d0f8461ca897d9..cc5f90d2fcd877 100644 --- a/examples/jsm/nodes/utils/EquirectUVNode.js +++ b/examples/jsm/nodes/utils/EquirectUVNode.js @@ -30,4 +30,4 @@ export default EquirectUVNode; export const equirectUV = nodeProxy( EquirectUVNode ); -addNodeClass( EquirectUVNode ); +addNodeClass( 'EquirectUVNode', EquirectUVNode ); diff --git a/examples/jsm/nodes/utils/JoinNode.js b/examples/jsm/nodes/utils/JoinNode.js index 3fe906cb650838..355c06e00fe6d5 100644 --- a/examples/jsm/nodes/utils/JoinNode.js +++ b/examples/jsm/nodes/utils/JoinNode.js @@ -48,4 +48,4 @@ class JoinNode extends TempNode { export default JoinNode; -addNodeClass( JoinNode ); +addNodeClass( 'JoinNode', JoinNode ); diff --git a/examples/jsm/nodes/utils/LoopNode.js b/examples/jsm/nodes/utils/LoopNode.js index b2167d14fc0811..261c904b4488c2 100644 --- a/examples/jsm/nodes/utils/LoopNode.js +++ b/examples/jsm/nodes/utils/LoopNode.js @@ -183,4 +183,4 @@ export const loop = ( ...params ) => nodeObject( new LoopNode( nodeArray( params addNodeElement( 'loop', ( returns, ...params ) => bypass( returns, loop( ...params ) ) ); -addNodeClass( LoopNode ); +addNodeClass( 'LoopNode', LoopNode ); diff --git a/examples/jsm/nodes/utils/MatcapUVNode.js b/examples/jsm/nodes/utils/MatcapUVNode.js index bcb9997ddacb0a..c5ea9d3683be3a 100644 --- a/examples/jsm/nodes/utils/MatcapUVNode.js +++ b/examples/jsm/nodes/utils/MatcapUVNode.js @@ -27,4 +27,4 @@ export default MatcapUVNode; export const matcapUV = nodeImmutable( MatcapUVNode ); -addNodeClass( MatcapUVNode ); +addNodeClass( 'MatcapUVNode', MatcapUVNode ); diff --git a/examples/jsm/nodes/utils/MaxMipLevelNode.js b/examples/jsm/nodes/utils/MaxMipLevelNode.js index f3d34d5a3fefdb..0dda7056391f85 100644 --- a/examples/jsm/nodes/utils/MaxMipLevelNode.js +++ b/examples/jsm/nodes/utils/MaxMipLevelNode.js @@ -43,4 +43,4 @@ export default MaxMipLevelNode; export const maxMipLevel = nodeProxy( MaxMipLevelNode ); -addNodeClass( MaxMipLevelNode ); +addNodeClass( 'MaxMipLevelNode', MaxMipLevelNode ); diff --git a/examples/jsm/nodes/utils/OscNode.js b/examples/jsm/nodes/utils/OscNode.js index d7920463d006cc..d19dda5dbfc210 100644 --- a/examples/jsm/nodes/utils/OscNode.js +++ b/examples/jsm/nodes/utils/OscNode.js @@ -78,4 +78,4 @@ export const oscSquare = nodeProxy( OscNode, OscNode.SQUARE ); export const oscTriangle = nodeProxy( OscNode, OscNode.TRIANGLE ); export const oscSawtooth = nodeProxy( OscNode, OscNode.SAWTOOTH ); -addNodeClass( OscNode ); +addNodeClass( 'OscNode', OscNode ); diff --git a/examples/jsm/nodes/utils/PackingNode.js b/examples/jsm/nodes/utils/PackingNode.js index a03490355ea6da..7b61b963e011d9 100644 --- a/examples/jsm/nodes/utils/PackingNode.js +++ b/examples/jsm/nodes/utils/PackingNode.js @@ -52,4 +52,4 @@ export const colorToDirection = nodeProxy( PackingNode, PackingNode.COLOR_TO_DIR addNodeElement( 'directionToColor', directionToColor ); addNodeElement( 'colorToDirection', colorToDirection ); -addNodeClass( PackingNode ); +addNodeClass( 'PackingNode', PackingNode ); diff --git a/examples/jsm/nodes/utils/RemapNode.js b/examples/jsm/nodes/utils/RemapNode.js index c79f7ece0677f3..e730967267ee50 100644 --- a/examples/jsm/nodes/utils/RemapNode.js +++ b/examples/jsm/nodes/utils/RemapNode.js @@ -39,4 +39,4 @@ export const remapClamp = nodeProxy( RemapNode ); addNodeElement( 'remap', remap ); addNodeElement( 'remapClamp', remapClamp ); -addNodeClass( RemapNode ); +addNodeClass( 'RemapNode', RemapNode ); diff --git a/examples/jsm/nodes/utils/RotateUVNode.js b/examples/jsm/nodes/utils/RotateUVNode.js index fd03ecfa892a7a..45bfe1cdb6804e 100644 --- a/examples/jsm/nodes/utils/RotateUVNode.js +++ b/examples/jsm/nodes/utils/RotateUVNode.js @@ -40,4 +40,4 @@ export const rotateUV = nodeProxy( RotateUVNode ); addNodeElement( 'rotateUV', rotateUV ); -addNodeClass( RotateUVNode ); +addNodeClass( 'RotateUVNode', RotateUVNode ); diff --git a/examples/jsm/nodes/utils/SetNode.js b/examples/jsm/nodes/utils/SetNode.js index 2481f1b05e74ff..c1a8f172c2b3e4 100644 --- a/examples/jsm/nodes/utils/SetNode.js +++ b/examples/jsm/nodes/utils/SetNode.js @@ -59,4 +59,4 @@ class SetNode extends TempNode { export default SetNode; -addNodeClass( SetNode ); +addNodeClass( 'SetNode', SetNode ); diff --git a/examples/jsm/nodes/utils/SpecularMIPLevelNode.js b/examples/jsm/nodes/utils/SpecularMIPLevelNode.js index d32e73fc5b6f85..65c152ae6c17a7 100644 --- a/examples/jsm/nodes/utils/SpecularMIPLevelNode.js +++ b/examples/jsm/nodes/utils/SpecularMIPLevelNode.js @@ -34,4 +34,4 @@ export default SpecularMIPLevelNode; export const specularMIPLevel = nodeProxy( SpecularMIPLevelNode ); -addNodeClass( SpecularMIPLevelNode ); +addNodeClass( 'SpecularMIPLevelNode', SpecularMIPLevelNode ); diff --git a/examples/jsm/nodes/utils/SplitNode.js b/examples/jsm/nodes/utils/SplitNode.js index afa0002ab00a5d..837014d2f8c3f7 100644 --- a/examples/jsm/nodes/utils/SplitNode.js +++ b/examples/jsm/nodes/utils/SplitNode.js @@ -101,4 +101,4 @@ class SplitNode extends Node { export default SplitNode; -addNodeClass( SplitNode ); +addNodeClass( 'SplitNode', SplitNode ); diff --git a/examples/jsm/nodes/utils/SpriteSheetUVNode.js b/examples/jsm/nodes/utils/SpriteSheetUVNode.js index c7a544c96c361a..6fe594f1b0f21d 100644 --- a/examples/jsm/nodes/utils/SpriteSheetUVNode.js +++ b/examples/jsm/nodes/utils/SpriteSheetUVNode.js @@ -38,4 +38,4 @@ export default SpriteSheetUVNode; export const spritesheetUV = nodeProxy( SpriteSheetUVNode ); -addNodeClass( SpriteSheetUVNode ); +addNodeClass( 'SpriteSheetUVNode', SpriteSheetUVNode ); diff --git a/examples/jsm/nodes/utils/TimerNode.js b/examples/jsm/nodes/utils/TimerNode.js index 7870f389f4afa6..6e989e0fcd92f8 100644 --- a/examples/jsm/nodes/utils/TimerNode.js +++ b/examples/jsm/nodes/utils/TimerNode.js @@ -91,4 +91,4 @@ export const timerGlobal = ( timeScale, value = 0 ) => nodeObject( new TimerNode export const timerDelta = ( timeScale, value = 0 ) => nodeObject( new TimerNode( TimerNode.DELTA, timeScale, value ) ); export const frameId = nodeImmutable( TimerNode, TimerNode.FRAME ); -addNodeClass( TimerNode ); +addNodeClass( 'TimerNode', TimerNode ); diff --git a/examples/jsm/nodes/utils/TriplanarTexturesNode.js b/examples/jsm/nodes/utils/TriplanarTexturesNode.js index bd34a94e8734f8..b8f048f9a51ce7 100644 --- a/examples/jsm/nodes/utils/TriplanarTexturesNode.js +++ b/examples/jsm/nodes/utils/TriplanarTexturesNode.js @@ -59,4 +59,4 @@ export const triplanarTexture = ( ...params ) => triplanarTextures( ...params ); addNodeElement( 'triplanarTexture', triplanarTexture ); -addNodeClass( TriplanarTexturesNode ); +addNodeClass( 'TriplanarTexturesNode', TriplanarTexturesNode );