From 2ccc5bc90fbddbd50ed840a834977c58c44b944e Mon Sep 17 00:00:00 2001 From: sunag Date: Mon, 25 Sep 2023 23:54:10 -0300 Subject: [PATCH] Nodes: Rename `construct()` to `setup()` (#26840) * Nodes: Rename `construct()` to `setup()` * deprecated alert --- .../nodes/accessors/BufferAttributeNode.js | 2 +- .../jsm/nodes/accessors/CubeTextureNode.js | 2 +- .../nodes/accessors/ExtendedMaterialNode.js | 4 +- examples/jsm/nodes/accessors/InstanceNode.js | 2 +- .../jsm/nodes/accessors/LineMaterialNode.js | 2 +- examples/jsm/nodes/accessors/MaterialNode.js | 2 +- .../nodes/accessors/MaterialReferenceNode.js | 4 +- .../accessors/ModelViewProjectionNode.js | 2 +- examples/jsm/nodes/accessors/MorphNode.js | 6 +-- examples/jsm/nodes/accessors/ReferenceNode.js | 2 +- .../jsm/nodes/accessors/ReflectVectorNode.js | 2 +- examples/jsm/nodes/accessors/SceneNode.js | 2 +- examples/jsm/nodes/accessors/SkinningNode.js | 2 +- .../jsm/nodes/accessors/TextureBicubicNode.js | 2 +- examples/jsm/nodes/accessors/TextureNode.js | 4 +- examples/jsm/nodes/code/ScriptableNode.js | 2 +- .../jsm/nodes/code/ScriptableValueNode.js | 2 +- examples/jsm/nodes/core/ContextNode.js | 2 +- examples/jsm/nodes/core/Node.js | 20 +++++++--- examples/jsm/nodes/core/NodeBuilder.js | 2 +- examples/jsm/nodes/core/OutputStructNode.js | 4 +- examples/jsm/nodes/core/constants.js | 2 +- examples/jsm/nodes/display/BlendModeNode.js | 2 +- examples/jsm/nodes/display/BumpMapNode.js | 2 +- .../jsm/nodes/display/ColorAdjustmentNode.js | 2 +- examples/jsm/nodes/display/ColorSpaceNode.js | 2 +- examples/jsm/nodes/display/NormalMapNode.js | 2 +- examples/jsm/nodes/display/PosterizeNode.js | 2 +- examples/jsm/nodes/display/ToneMappingNode.js | 2 +- .../jsm/nodes/display/ViewportDepthNode.js | 2 +- examples/jsm/nodes/display/ViewportNode.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/lighting/AONode.js | 2 +- .../jsm/nodes/lighting/AmbientLightNode.js | 2 +- .../jsm/nodes/lighting/AnalyticLightNode.js | 6 +-- .../nodes/lighting/DirectionalLightNode.js | 4 +- .../jsm/nodes/lighting/EnvironmentNode.js | 2 +- .../jsm/nodes/lighting/HemisphereLightNode.js | 2 +- examples/jsm/nodes/lighting/LightNode.js | 2 +- .../jsm/nodes/lighting/LightingContextNode.js | 4 +- examples/jsm/nodes/lighting/LightsNode.js | 2 +- examples/jsm/nodes/lighting/PointLightNode.js | 2 +- examples/jsm/nodes/lighting/SpotLightNode.js | 4 +- .../jsm/nodes/materials/Line2NodeMaterial.js | 10 ++--- .../nodes/materials/LineDashedNodeMaterial.js | 2 +- .../materials/MeshLambertNodeMaterial.js | 2 +- .../nodes/materials/MeshNormalNodeMaterial.js | 2 +- .../nodes/materials/MeshPhongNodeMaterial.js | 4 +- .../materials/MeshPhysicalNodeMaterial.js | 10 ++--- .../materials/MeshStandardNodeMaterial.js | 4 +- examples/jsm/nodes/materials/NodeMaterial.js | 38 +++++++++---------- .../jsm/nodes/materials/SpriteNodeMaterial.js | 2 +- examples/jsm/nodes/math/HashNode.js | 2 +- examples/jsm/nodes/procedural/CheckerNode.js | 2 +- examples/jsm/nodes/shadernode/ShaderNode.js | 8 ++-- examples/jsm/nodes/utils/EquirectUVNode.js | 2 +- examples/jsm/nodes/utils/LoopNode.js | 4 +- examples/jsm/nodes/utils/MatcapUVNode.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 +- .../jsm/nodes/utils/SpecularMIPLevelNode.js | 2 +- examples/jsm/nodes/utils/SpriteSheetUVNode.js | 2 +- .../jsm/nodes/utils/TriplanarTexturesNode.js | 2 +- examples/webgpu_instance_uniform.html | 2 +- examples/webgpu_occlusion.html | 2 +- 70 files changed, 126 insertions(+), 118 deletions(-) diff --git a/examples/jsm/nodes/accessors/BufferAttributeNode.js b/examples/jsm/nodes/accessors/BufferAttributeNode.js index e363b7170521b8..fe643b0eb85771 100644 --- a/examples/jsm/nodes/accessors/BufferAttributeNode.js +++ b/examples/jsm/nodes/accessors/BufferAttributeNode.js @@ -43,7 +43,7 @@ class BufferAttributeNode extends InputNode { } - construct( builder ) { + setup( builder ) { if ( this.attribute !== null ) return; diff --git a/examples/jsm/nodes/accessors/CubeTextureNode.js b/examples/jsm/nodes/accessors/CubeTextureNode.js index 5677c601df3534..02489521447aab 100644 --- a/examples/jsm/nodes/accessors/CubeTextureNode.js +++ b/examples/jsm/nodes/accessors/CubeTextureNode.js @@ -97,7 +97,7 @@ class CubeTextureNode extends TextureNode { if ( builder.needsColorSpaceToLinear( this.value ) ) { - snippet = colorSpaceToLinear( expression( snippet, nodeType ), this.value.colorSpace ).construct( builder ).build( builder, nodeType ); + snippet = colorSpaceToLinear( expression( snippet, nodeType ), this.value.colorSpace ).setup( builder ).build( builder, nodeType ); } diff --git a/examples/jsm/nodes/accessors/ExtendedMaterialNode.js b/examples/jsm/nodes/accessors/ExtendedMaterialNode.js index fade58e98dc8f0..990826b51d33ec 100644 --- a/examples/jsm/nodes/accessors/ExtendedMaterialNode.js +++ b/examples/jsm/nodes/accessors/ExtendedMaterialNode.js @@ -29,7 +29,7 @@ class ExtendedMaterialNode extends MaterialNode { } - construct( builder ) { + setup( builder ) { const material = builder.material; const scope = this.scope; @@ -59,7 +59,7 @@ class ExtendedMaterialNode extends MaterialNode { } - return node || super.construct( builder ); + return node || super.setup( builder ); } diff --git a/examples/jsm/nodes/accessors/InstanceNode.js b/examples/jsm/nodes/accessors/InstanceNode.js index dc4d7b06f64930..803a2ef6623d82 100644 --- a/examples/jsm/nodes/accessors/InstanceNode.js +++ b/examples/jsm/nodes/accessors/InstanceNode.js @@ -17,7 +17,7 @@ class InstanceNode extends Node { } - construct( builder ) { + setup( builder ) { let instanceMatrixNode = this.instanceMatrixNode; diff --git a/examples/jsm/nodes/accessors/LineMaterialNode.js b/examples/jsm/nodes/accessors/LineMaterialNode.js index d8c3f1abecdfc8..6b2b7068d37b21 100644 --- a/examples/jsm/nodes/accessors/LineMaterialNode.js +++ b/examples/jsm/nodes/accessors/LineMaterialNode.js @@ -4,7 +4,7 @@ import { nodeImmutable } from '../shadernode/ShaderNode.js'; class LineMaterialNode extends MaterialNode { - construct( /*builder*/ ) { + setup( /*builder*/ ) { return this.getFloat( this.scope ); diff --git a/examples/jsm/nodes/accessors/MaterialNode.js b/examples/jsm/nodes/accessors/MaterialNode.js index 95a8b4e568f851..cb24fbe7266180 100644 --- a/examples/jsm/nodes/accessors/MaterialNode.js +++ b/examples/jsm/nodes/accessors/MaterialNode.js @@ -49,7 +49,7 @@ class MaterialNode extends Node { } - construct( builder ) { + setup( builder ) { const material = builder.context.material; const scope = this.scope; diff --git a/examples/jsm/nodes/accessors/MaterialReferenceNode.js b/examples/jsm/nodes/accessors/MaterialReferenceNode.js index 83fcb0517ee745..cfa9deba1ba89f 100644 --- a/examples/jsm/nodes/accessors/MaterialReferenceNode.js +++ b/examples/jsm/nodes/accessors/MaterialReferenceNode.js @@ -23,13 +23,13 @@ class MaterialReferenceNode extends ReferenceNode { } - construct( builder ) { + setup( builder ) { const material = this.material !== null ? this.material : builder.material; this.node.value = material[ this.property ]; - return super.construct( builder ); + return super.setup( builder ); } diff --git a/examples/jsm/nodes/accessors/ModelViewProjectionNode.js b/examples/jsm/nodes/accessors/ModelViewProjectionNode.js index 23d597fd2d7ec9..b5a00f11639aa3 100644 --- a/examples/jsm/nodes/accessors/ModelViewProjectionNode.js +++ b/examples/jsm/nodes/accessors/ModelViewProjectionNode.js @@ -15,7 +15,7 @@ class ModelViewProjectionNode extends TempNode { } - construct() { + setup() { return cameraProjectionMatrix.mul( modelViewMatrix ).mul( this.positionNode ); diff --git a/examples/jsm/nodes/accessors/MorphNode.js b/examples/jsm/nodes/accessors/MorphNode.js index 016829ff4a6eb5..70d5922e0ed0aa 100644 --- a/examples/jsm/nodes/accessors/MorphNode.js +++ b/examples/jsm/nodes/accessors/MorphNode.js @@ -19,7 +19,7 @@ class MorphNode extends Node { } - constructAttribute( builder, name, assignNode = positionLocal ) { + setupAttribute( builder, name, assignNode = positionLocal ) { const mesh = this.mesh; const attributes = mesh.geometry.morphAttributes[ name ]; @@ -39,9 +39,9 @@ class MorphNode extends Node { } - construct( builder ) { + setup( builder ) { - this.constructAttribute( builder, 'position' ); + this.setupAttribute( builder, 'position' ); } diff --git a/examples/jsm/nodes/accessors/ReferenceNode.js b/examples/jsm/nodes/accessors/ReferenceNode.js index fc9587ebf6c4f2..e2a17cf92e7edb 100644 --- a/examples/jsm/nodes/accessors/ReferenceNode.js +++ b/examples/jsm/nodes/accessors/ReferenceNode.js @@ -63,7 +63,7 @@ class ReferenceNode extends Node { } - construct( /*builder*/ ) { + setup( /*builder*/ ) { return this.node; diff --git a/examples/jsm/nodes/accessors/ReflectVectorNode.js b/examples/jsm/nodes/accessors/ReflectVectorNode.js index 508d907df72eda..bf7b448f2d73a1 100644 --- a/examples/jsm/nodes/accessors/ReflectVectorNode.js +++ b/examples/jsm/nodes/accessors/ReflectVectorNode.js @@ -18,7 +18,7 @@ class ReflectVectorNode extends Node { } - construct() { + setup() { const reflectView = positionViewDirection.negate().reflect( transformedNormalView ); diff --git a/examples/jsm/nodes/accessors/SceneNode.js b/examples/jsm/nodes/accessors/SceneNode.js index 64db7fcbaaa162..6f95feb5252196 100644 --- a/examples/jsm/nodes/accessors/SceneNode.js +++ b/examples/jsm/nodes/accessors/SceneNode.js @@ -14,7 +14,7 @@ class SceneNode extends Node { } - construct( builder ) { + setup( builder ) { const scope = this.scope; const scene = this.scene !== null ? this.scene : builder.scene; diff --git a/examples/jsm/nodes/accessors/SkinningNode.js b/examples/jsm/nodes/accessors/SkinningNode.js index 81c361a249cce6..267fa3fbc1bb80 100644 --- a/examples/jsm/nodes/accessors/SkinningNode.js +++ b/examples/jsm/nodes/accessors/SkinningNode.js @@ -30,7 +30,7 @@ class SkinningNode extends Node { } - construct( builder ) { + setup( builder ) { const { skinIndexNode, skinWeightNode, bindMatrixNode, bindMatrixInverseNode, boneMatricesNode } = this; diff --git a/examples/jsm/nodes/accessors/TextureBicubicNode.js b/examples/jsm/nodes/accessors/TextureBicubicNode.js index 846450d8f12aca..6cdad6f7be92f2 100644 --- a/examples/jsm/nodes/accessors/TextureBicubicNode.js +++ b/examples/jsm/nodes/accessors/TextureBicubicNode.js @@ -77,7 +77,7 @@ class TextureBicubicNode extends TempNode { } - construct() { + setup() { return textureBicubicMethod( this.textureNode, this.blurNode ); diff --git a/examples/jsm/nodes/accessors/TextureNode.js b/examples/jsm/nodes/accessors/TextureNode.js index 291a2eaf7acac9..5f3f722e23c280 100644 --- a/examples/jsm/nodes/accessors/TextureNode.js +++ b/examples/jsm/nodes/accessors/TextureNode.js @@ -76,7 +76,7 @@ class TextureNode extends UniformNode { } - construct( builder ) { + setup( builder ) { const properties = builder.getNodeProperties( this ); @@ -187,7 +187,7 @@ class TextureNode extends UniformNode { if ( builder.needsColorSpaceToLinear( this.value ) ) { - snippet = colorSpaceToLinear( expression( snippet, nodeType ), this.value.colorSpace ).construct( builder ).build( builder, nodeType ); + snippet = colorSpaceToLinear( expression( snippet, nodeType ), this.value.colorSpace ).setup( builder ).build( builder, nodeType ); } diff --git a/examples/jsm/nodes/code/ScriptableNode.js b/examples/jsm/nodes/code/ScriptableNode.js index 8268b2a0c73807..c1a7e111b598cf 100644 --- a/examples/jsm/nodes/code/ScriptableNode.js +++ b/examples/jsm/nodes/code/ScriptableNode.js @@ -431,7 +431,7 @@ class ScriptableNode extends Node { } - construct() { + setup() { return this.getDefaultOutputNode(); diff --git a/examples/jsm/nodes/code/ScriptableValueNode.js b/examples/jsm/nodes/code/ScriptableValueNode.js index 8ace150c680fb6..13bf03f04495cc 100644 --- a/examples/jsm/nodes/code/ScriptableValueNode.js +++ b/examples/jsm/nodes/code/ScriptableValueNode.js @@ -92,7 +92,7 @@ class ScriptableValueNode extends Node { } - construct() { + setup() { return this.value && this.value.isNode ? this.value : float(); diff --git a/examples/jsm/nodes/core/ContextNode.js b/examples/jsm/nodes/core/ContextNode.js index a69a11e3ca02e4..82fef3cb8739b5 100644 --- a/examples/jsm/nodes/core/ContextNode.js +++ b/examples/jsm/nodes/core/ContextNode.js @@ -20,7 +20,7 @@ class ContextNode extends Node { } - construct( builder ) { + setup( builder ) { const previousContext = builder.getContext(); diff --git a/examples/jsm/nodes/core/Node.js b/examples/jsm/nodes/core/Node.js index 8a4ef5abb949fa..708f1d3bf2460f 100644 --- a/examples/jsm/nodes/core/Node.js +++ b/examples/jsm/nodes/core/Node.js @@ -134,7 +134,7 @@ class Node extends EventDispatcher { } - construct( builder ) { + setup( builder ) { const nodeProperties = builder.getNodeProperties( this ); @@ -149,6 +149,14 @@ class Node extends EventDispatcher { } + construct( builder ) { // @deprecated, r157 + + console.warn( 'THREE.Node: construct() is deprecated. Use setup() instead.' ); + + return this.setup( builder ); + + } + analyze( builder ) { const nodeData = builder.getDataFromNode( this ); @@ -212,7 +220,7 @@ class Node extends EventDispatcher { builder.addChain( this ); /* Build stages expected results: - - "construct" -> Node + - "setup" -> Node - "analyze" -> null - "generate" -> String */ @@ -220,18 +228,18 @@ class Node extends EventDispatcher { const buildStage = builder.getBuildStage(); - if ( buildStage === 'construct' ) { + if ( buildStage === 'setup' ) { const properties = builder.getNodeProperties( this ); if ( properties.initialized !== true || builder.context.tempRead === false ) { - const stackNodesBeforeConstruct = builder.stack.nodes.length; + const stackNodesBeforeSetup = builder.stack.nodes.length; properties.initialized = true; - properties.outputNode = this.construct( builder ); + properties.outputNode = this.setup( builder ); - if ( properties.outputNode !== null && builder.stack.nodes.length !== stackNodesBeforeConstruct ) { + if ( properties.outputNode !== null && builder.stack.nodes.length !== stackNodesBeforeSetup ) { properties.outputNode = builder.stack; diff --git a/examples/jsm/nodes/core/NodeBuilder.js b/examples/jsm/nodes/core/NodeBuilder.js index 7e8e125d99532a..df23915a0a74bb 100644 --- a/examples/jsm/nodes/core/NodeBuilder.js +++ b/examples/jsm/nodes/core/NodeBuilder.js @@ -945,7 +945,7 @@ class NodeBuilder { build() { - // construct() -> stage 1: create possible new nodes and returns an output reference node + // setup() -> stage 1: create possible new nodes and returns an output reference node // analyze() -> stage 2: analyze nodes to possible optimization and validation // generate() -> stage 3: generate shader diff --git a/examples/jsm/nodes/core/OutputStructNode.js b/examples/jsm/nodes/core/OutputStructNode.js index 68dff8dee7c958..6c00a9490553e5 100644 --- a/examples/jsm/nodes/core/OutputStructNode.js +++ b/examples/jsm/nodes/core/OutputStructNode.js @@ -13,9 +13,9 @@ class OutputStructNode extends Node { } - construct( builder ) { + setup( builder ) { - super.construct( builder ); + super.setup( builder ); const members = this.members; const types = []; diff --git a/examples/jsm/nodes/core/constants.js b/examples/jsm/nodes/core/constants.js index a4f7acf41a17ec..db85dd24520db2 100644 --- a/examples/jsm/nodes/core/constants.js +++ b/examples/jsm/nodes/core/constants.js @@ -22,6 +22,6 @@ export const NodeType = { }; export const defaultShaderStages = [ 'fragment', 'vertex' ]; -export const defaultBuildStages = [ 'construct', 'analyze', 'generate' ]; +export const defaultBuildStages = [ 'setup', 'analyze', 'generate' ]; export const shaderStages = [ ...defaultShaderStages, 'compute' ]; export const vectorComponents = [ 'x', 'y', 'z', 'w' ]; diff --git a/examples/jsm/nodes/display/BlendModeNode.js b/examples/jsm/nodes/display/BlendModeNode.js index bdc1445e791e3e..57cba365ffa97d 100644 --- a/examples/jsm/nodes/display/BlendModeNode.js +++ b/examples/jsm/nodes/display/BlendModeNode.js @@ -48,7 +48,7 @@ class BlendModeNode extends TempNode { } - construct() { + setup() { const { blendMode, baseNode, blendNode } = this; const params = { base: baseNode, blend: blendNode }; diff --git a/examples/jsm/nodes/display/BumpMapNode.js b/examples/jsm/nodes/display/BumpMapNode.js index 9bdf8afe3b72b4..470239cdef663e 100644 --- a/examples/jsm/nodes/display/BumpMapNode.js +++ b/examples/jsm/nodes/display/BumpMapNode.js @@ -55,7 +55,7 @@ class BumpMapNode extends TempNode { } - construct() { + setup() { const bumpScale = this.scaleNode !== null ? this.scaleNode : 1; const dHdxy = dHdxy_fwd( { bumpTexture: this.texture, bumpScale } ); diff --git a/examples/jsm/nodes/display/ColorAdjustmentNode.js b/examples/jsm/nodes/display/ColorAdjustmentNode.js index 265a1f7848c30d..306acc7d2217b3 100644 --- a/examples/jsm/nodes/display/ColorAdjustmentNode.js +++ b/examples/jsm/nodes/display/ColorAdjustmentNode.js @@ -48,7 +48,7 @@ class ColorAdjustmentNode extends TempNode { } - construct() { + setup() { const { method, colorNode, adjustmentNode } = this; diff --git a/examples/jsm/nodes/display/ColorSpaceNode.js b/examples/jsm/nodes/display/ColorSpaceNode.js index 7fb77643bfc8d4..b0e9465cb105f5 100644 --- a/examples/jsm/nodes/display/ColorSpaceNode.js +++ b/examples/jsm/nodes/display/ColorSpaceNode.js @@ -70,7 +70,7 @@ class ColorSpaceNode extends TempNode { } - construct() { + setup() { const { method, node } = this; diff --git a/examples/jsm/nodes/display/NormalMapNode.js b/examples/jsm/nodes/display/NormalMapNode.js index de12729609d5e0..58dc2cc11c91d7 100644 --- a/examples/jsm/nodes/display/NormalMapNode.js +++ b/examples/jsm/nodes/display/NormalMapNode.js @@ -52,7 +52,7 @@ class NormalMapNode extends TempNode { } - construct( builder ) { + setup( builder ) { const { normalMapType, scaleNode } = this; diff --git a/examples/jsm/nodes/display/PosterizeNode.js b/examples/jsm/nodes/display/PosterizeNode.js index 9b719c7bea2302..cb6f7480f2723b 100644 --- a/examples/jsm/nodes/display/PosterizeNode.js +++ b/examples/jsm/nodes/display/PosterizeNode.js @@ -13,7 +13,7 @@ class PosterizeNode extends TempNode { } - construct() { + setup() { const { sourceNode, stepsNode } = this; diff --git a/examples/jsm/nodes/display/ToneMappingNode.js b/examples/jsm/nodes/display/ToneMappingNode.js index 71e4f1619d3d42..eae305b9f6ea50 100644 --- a/examples/jsm/nodes/display/ToneMappingNode.js +++ b/examples/jsm/nodes/display/ToneMappingNode.js @@ -104,7 +104,7 @@ class ToneMappingNode extends TempNode { } - construct( builder ) { + setup( builder ) { const colorNode = this.colorNode || builder.context.color; const toneMapping = this.toneMapping; diff --git a/examples/jsm/nodes/display/ViewportDepthNode.js b/examples/jsm/nodes/display/ViewportDepthNode.js index 7c31c7f4d6349e..e7db19d553c716 100644 --- a/examples/jsm/nodes/display/ViewportDepthNode.js +++ b/examples/jsm/nodes/display/ViewportDepthNode.js @@ -17,7 +17,7 @@ class ViewportDepthNode extends Node { } - construct( /*builder*/ ) { + setup( /*builder*/ ) { const { scope } = this; diff --git a/examples/jsm/nodes/display/ViewportNode.js b/examples/jsm/nodes/display/ViewportNode.js index 8e502f61d9e02d..829853daea0bfd 100644 --- a/examples/jsm/nodes/display/ViewportNode.js +++ b/examples/jsm/nodes/display/ViewportNode.js @@ -55,7 +55,7 @@ class ViewportNode extends Node { } - construct( builder ) { + setup( builder ) { const scope = this.scope; diff --git a/examples/jsm/nodes/fog/FogExp2Node.js b/examples/jsm/nodes/fog/FogExp2Node.js index 554054ec85cd63..8f06ceb7430789 100644 --- a/examples/jsm/nodes/fog/FogExp2Node.js +++ b/examples/jsm/nodes/fog/FogExp2Node.js @@ -15,7 +15,7 @@ class FogExp2Node extends FogNode { } - construct() { + setup() { const depthNode = positionView.z.negate(); const densityNode = this.densityNode; diff --git a/examples/jsm/nodes/fog/FogNode.js b/examples/jsm/nodes/fog/FogNode.js index d787115973f8f4..5d469b4f67a77e 100644 --- a/examples/jsm/nodes/fog/FogNode.js +++ b/examples/jsm/nodes/fog/FogNode.js @@ -20,7 +20,7 @@ class FogNode extends Node { } - construct() { + setup() { return this.factorNode; diff --git a/examples/jsm/nodes/fog/FogRangeNode.js b/examples/jsm/nodes/fog/FogRangeNode.js index 35d8464d197f21..120c8a185da10c 100644 --- a/examples/jsm/nodes/fog/FogRangeNode.js +++ b/examples/jsm/nodes/fog/FogRangeNode.js @@ -17,7 +17,7 @@ class FogRangeNode extends FogNode { } - construct() { + setup() { return smoothstep( this.nearNode, this.farNode, positionView.z.negate() ); diff --git a/examples/jsm/nodes/geometry/RangeNode.js b/examples/jsm/nodes/geometry/RangeNode.js index 196f5a137706a2..79aa8d779f75e1 100644 --- a/examples/jsm/nodes/geometry/RangeNode.js +++ b/examples/jsm/nodes/geometry/RangeNode.js @@ -36,7 +36,7 @@ class RangeNode extends Node { } - construct( builder ) { + setup( builder ) { const object = builder.object; diff --git a/examples/jsm/nodes/lighting/AONode.js b/examples/jsm/nodes/lighting/AONode.js index 035b2028a3661a..ba5f8f1d3f1de8 100644 --- a/examples/jsm/nodes/lighting/AONode.js +++ b/examples/jsm/nodes/lighting/AONode.js @@ -11,7 +11,7 @@ class AONode extends LightingNode { } - construct( builder ) { + setup( builder ) { const aoIntensity = 1; const aoNode = this.aoNode.x.sub( 1.0 ).mul( aoIntensity ).add( 1.0 ); diff --git a/examples/jsm/nodes/lighting/AmbientLightNode.js b/examples/jsm/nodes/lighting/AmbientLightNode.js index 08d1e95228797d..e84e0c18db8f55 100644 --- a/examples/jsm/nodes/lighting/AmbientLightNode.js +++ b/examples/jsm/nodes/lighting/AmbientLightNode.js @@ -12,7 +12,7 @@ class AmbientLightNode extends AnalyticLightNode { } - construct( { context } ) { + setup( { context } ) { context.irradiance.addAssign( this.colorNode ); diff --git a/examples/jsm/nodes/lighting/AnalyticLightNode.js b/examples/jsm/nodes/lighting/AnalyticLightNode.js index b3c75f7801cdc2..3887374516000f 100644 --- a/examples/jsm/nodes/lighting/AnalyticLightNode.js +++ b/examples/jsm/nodes/lighting/AnalyticLightNode.js @@ -37,7 +37,7 @@ class AnalyticLightNode extends LightingNode { } - constructShadow( builder ) { + setupShadow( builder ) { let shadowNode = this.shadowNode; @@ -136,9 +136,9 @@ class AnalyticLightNode extends LightingNode { } - construct( builder ) { + setup( builder ) { - if ( this.light.castShadow ) this.constructShadow( builder ); + if ( this.light.castShadow ) this.setupShadow( builder ); } diff --git a/examples/jsm/nodes/lighting/DirectionalLightNode.js b/examples/jsm/nodes/lighting/DirectionalLightNode.js index b4026c9bb62e71..98c0e58c933e1f 100644 --- a/examples/jsm/nodes/lighting/DirectionalLightNode.js +++ b/examples/jsm/nodes/lighting/DirectionalLightNode.js @@ -13,9 +13,9 @@ class DirectionalLightNode extends AnalyticLightNode { } - construct( builder ) { + setup( builder ) { - super.construct( builder ); + super.setup( builder ); const lightingModel = builder.context.lightingModel; diff --git a/examples/jsm/nodes/lighting/EnvironmentNode.js b/examples/jsm/nodes/lighting/EnvironmentNode.js index 1eac81fb8be6a5..2c58e3b7c161c8 100644 --- a/examples/jsm/nodes/lighting/EnvironmentNode.js +++ b/examples/jsm/nodes/lighting/EnvironmentNode.js @@ -24,7 +24,7 @@ class EnvironmentNode extends LightingNode { } - construct( builder ) { + setup( builder ) { let envNode = this.envNode; const properties = builder.getNodeProperties( this ); diff --git a/examples/jsm/nodes/lighting/HemisphereLightNode.js b/examples/jsm/nodes/lighting/HemisphereLightNode.js index 7d4ca91a6e693c..cde73b19310b12 100644 --- a/examples/jsm/nodes/lighting/HemisphereLightNode.js +++ b/examples/jsm/nodes/lighting/HemisphereLightNode.js @@ -33,7 +33,7 @@ class HemisphereLightNode extends AnalyticLightNode { } - construct( builder ) { + setup( builder ) { const { colorNode, groundColorNode, lightDirectionNode } = this; diff --git a/examples/jsm/nodes/lighting/LightNode.js b/examples/jsm/nodes/lighting/LightNode.js index 019615496318b6..8e5b426a250ac0 100644 --- a/examples/jsm/nodes/lighting/LightNode.js +++ b/examples/jsm/nodes/lighting/LightNode.js @@ -14,7 +14,7 @@ class LightNode extends Node { } - construct() { + setup() { const { scope, light } = this; diff --git a/examples/jsm/nodes/lighting/LightingContextNode.js b/examples/jsm/nodes/lighting/LightingContextNode.js index cd601d61f06698..9146afdb84cd9c 100644 --- a/examples/jsm/nodes/lighting/LightingContextNode.js +++ b/examples/jsm/nodes/lighting/LightingContextNode.js @@ -22,7 +22,7 @@ class LightingContextNode extends ContextNode { } - construct( builder ) { + setup( builder ) { const { lightingModel, backdropNode, backdropAlphaNode } = this; @@ -76,7 +76,7 @@ class LightingContextNode extends ContextNode { } - return super.construct( builder ); + return super.setup( builder ); } diff --git a/examples/jsm/nodes/lighting/LightsNode.js b/examples/jsm/nodes/lighting/LightsNode.js index 9104ceca245a03..8aa539590eac77 100644 --- a/examples/jsm/nodes/lighting/LightsNode.js +++ b/examples/jsm/nodes/lighting/LightsNode.js @@ -28,7 +28,7 @@ class LightsNode extends Node { } - construct( builder ) { + setup( builder ) { const lightNodes = this.lightNodes; diff --git a/examples/jsm/nodes/lighting/PointLightNode.js b/examples/jsm/nodes/lighting/PointLightNode.js index c64d7d665c4481..8212ce90c1d53b 100644 --- a/examples/jsm/nodes/lighting/PointLightNode.js +++ b/examples/jsm/nodes/lighting/PointLightNode.js @@ -30,7 +30,7 @@ class PointLightNode extends AnalyticLightNode { } - construct( builder ) { + setup( builder ) { const { colorNode, cutoffDistanceNode, decayExponentNode, light } = this; diff --git a/examples/jsm/nodes/lighting/SpotLightNode.js b/examples/jsm/nodes/lighting/SpotLightNode.js index cd61c6d97cdfd9..e25a08b6fbcc84 100644 --- a/examples/jsm/nodes/lighting/SpotLightNode.js +++ b/examples/jsm/nodes/lighting/SpotLightNode.js @@ -46,9 +46,9 @@ class SpotLightNode extends AnalyticLightNode { } - construct( builder ) { + setup( builder ) { - super.construct( builder ); + super.setup( builder ); const lightingModel = builder.context.lightingModel; diff --git a/examples/jsm/nodes/materials/Line2NodeMaterial.js b/examples/jsm/nodes/materials/Line2NodeMaterial.js index aa03eda9f0cb5a..1920311cbbd443 100644 --- a/examples/jsm/nodes/materials/Line2NodeMaterial.js +++ b/examples/jsm/nodes/materials/Line2NodeMaterial.js @@ -44,13 +44,13 @@ class Line2NodeMaterial extends NodeMaterial { this.dashSizeNode = null; this.gapSizeNode = null; - this.constructShaders(); + this.setupShaders(); this.setValues( params ); } - constructShaders() { + setupShaders() { const useAlphaToCoverage = this.alphaToCoverage; const useColor = this.useColor; @@ -400,7 +400,7 @@ class Line2NodeMaterial extends NodeMaterial { if ( this.useWorldUnits !== value ) { this.useWorldUnits = value; - this.constructShaders(); + this.setupShaders(); } @@ -418,7 +418,7 @@ class Line2NodeMaterial extends NodeMaterial { if ( this.useDash !== value ) { this.useDash = value; - this.constructShaders(); + this.setupShaders(); } @@ -436,7 +436,7 @@ class Line2NodeMaterial extends NodeMaterial { if ( this.useAlphaToCoverage !== value ) { this.useAlphaToCoverage = value; - this.constructShaders(); + this.setupShaders(); } diff --git a/examples/jsm/nodes/materials/LineDashedNodeMaterial.js b/examples/jsm/nodes/materials/LineDashedNodeMaterial.js index 550e96c7cfb283..b1fc97acad70a7 100644 --- a/examples/jsm/nodes/materials/LineDashedNodeMaterial.js +++ b/examples/jsm/nodes/materials/LineDashedNodeMaterial.js @@ -30,7 +30,7 @@ class LineDashedNodeMaterial extends NodeMaterial { } - constructVariants( { stack } ) { + setupVariants( { stack } ) { const offsetNode = this.offsetNode; const dashScaleNode = this.dashScaleNode ? float( this.dashScaleNode ) : materialLineScale; diff --git a/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js b/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js index 688ba4e9b4b2d0..520f909f3ce6de 100644 --- a/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js @@ -21,7 +21,7 @@ class MeshLambertNodeMaterial extends NodeMaterial { } - constructLightingModel( /*builder*/ ) { + setupLightingModel( /*builder*/ ) { return new PhongLightingModel( false ); // ( specular ) -> force lambert diff --git a/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js b/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js index f9fcf5bb987992..ae0cb6d1be6a45 100644 --- a/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js @@ -25,7 +25,7 @@ class MeshNormalNodeMaterial extends NodeMaterial { } - constructDiffuseColor( { stack } ) { + setupDiffuseColor( { stack } ) { const opacityNode = this.opacityNode ? float( this.opacityNode ) : materialOpacity; diff --git a/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js b/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js index f9dde4d2240655..02ea5b9c50187c 100644 --- a/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js @@ -27,13 +27,13 @@ class MeshPhongNodeMaterial extends NodeMaterial { } - constructLightingModel( /*builder*/ ) { + setupLightingModel( /*builder*/ ) { return new PhongLightingModel(); } - constructVariants( { stack } ) { + setupVariants( { stack } ) { // SHININESS diff --git a/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js b/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js index fd6a30ef75db58..23dbf11a4221f4 100644 --- a/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js @@ -44,15 +44,15 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { } - constructLightingModel( /*builder*/ ) { + setupLightingModel( /*builder*/ ) { return new PhysicalLightingModel(); // @TODO: Optimize shader using parameters. } - constructVariants( builder ) { + setupVariants( builder ) { - super.constructVariants( builder ); + super.setupVariants( builder ); const { stack } = builder; @@ -84,9 +84,9 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { } - constructNormal( builder ) { + setupNormal( builder ) { - super.constructNormal( builder ); + super.setupNormal( builder ); // CLEARCOAT NORMAL diff --git a/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js index 26e6bd1f66f191..1a389b19c70ce9 100644 --- a/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js +++ b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js @@ -29,13 +29,13 @@ class MeshStandardNodeMaterial extends NodeMaterial { } - constructLightingModel( /*builder*/ ) { + setupLightingModel( /*builder*/ ) { return new PhysicalLightingModel( false, false ); // ( clearcoat, sheen ) -> standard } - constructVariants( { stack } ) { + setupVariants( { stack } ) { // METALNESS diff --git a/examples/jsm/nodes/materials/NodeMaterial.js b/examples/jsm/nodes/materials/NodeMaterial.js index cbdbc630b68b35..fb1c924b815271 100644 --- a/examples/jsm/nodes/materials/NodeMaterial.js +++ b/examples/jsm/nodes/materials/NodeMaterial.js @@ -65,17 +65,17 @@ class NodeMaterial extends ShaderMaterial { build( builder ) { - this.construct( builder ); + this.setup( builder ); } - construct( builder ) { + setup( builder ) { // < VERTEX STAGE > builder.addStack(); - builder.stack.outputNode = this.constructPosition( builder ); + builder.stack.outputNode = this.setupPosition( builder ); builder.addFlow( 'vertex', builder.removeStack() ); @@ -87,14 +87,14 @@ class NodeMaterial extends ShaderMaterial { if ( this.unlit === false ) { - if ( this.normals === true ) this.constructNormal( builder ); + if ( this.normals === true ) this.setupNormal( builder ); - this.constructDiffuseColor( builder ); - this.constructVariants( builder ); + this.setupDiffuseColor( builder ); + this.setupVariants( builder ); - const outgoingLightNode = this.constructLighting( builder ); + const outgoingLightNode = this.setupLighting( builder ); - outputNode = this.constructOutput( builder, vec4( outgoingLightNode, diffuseColor.a ) ); + outputNode = this.setupOutput( builder, vec4( outgoingLightNode, diffuseColor.a ) ); // OUTPUT NODE @@ -106,7 +106,7 @@ class NodeMaterial extends ShaderMaterial { } else { - outputNode = this.constructOutput( builder, this.outputNode || vec4( 0, 0, 0, 1 ) ); + outputNode = this.setupOutput( builder, this.outputNode || vec4( 0, 0, 0, 1 ) ); } @@ -116,7 +116,7 @@ class NodeMaterial extends ShaderMaterial { } - constructPosition( builder ) { + setupPosition( builder ) { const object = builder.object; const geometry = object.geometry; @@ -153,7 +153,7 @@ class NodeMaterial extends ShaderMaterial { } - constructDiffuseColor( { stack, geometry } ) { + setupDiffuseColor( { stack, geometry } ) { let colorNode = this.colorNode ? vec4( this.colorNode ) : materialColor; @@ -186,13 +186,13 @@ class NodeMaterial extends ShaderMaterial { } - constructVariants( /*builder*/ ) { + setupVariants( /*builder*/ ) { // Interface function. } - constructNormal( { stack } ) { + setupNormal( { stack } ) { // NORMAL VIEW @@ -236,7 +236,7 @@ class NodeMaterial extends ShaderMaterial { } - constructLights( builder ) { + setupLights( builder ) { const envNode = this.getEnvNode( builder ); @@ -268,13 +268,13 @@ class NodeMaterial extends ShaderMaterial { } - constructLightingModel( /*builder*/ ) { + setupLightingModel( /*builder*/ ) { // Interface function. } - constructLighting( builder ) { + setupLighting( builder ) { const { material } = builder; const { backdropNode, backdropAlphaNode, emissiveNode } = this; @@ -283,13 +283,13 @@ class NodeMaterial extends ShaderMaterial { const lights = this.lights === true || this.lightsNode !== null; - const lightsNode = lights ? this.constructLights( builder ) : null; + const lightsNode = lights ? this.setupLights( builder ) : null; let outgoingLightNode = diffuseColor.rgb; if ( lightsNode && lightsNode.hasLight !== false ) { - const lightingModelNode = this.constructLightingModel( builder ); + const lightingModelNode = this.setupLightingModel( builder ); outgoingLightNode = lightingContext( lightsNode, lightingModelNode, backdropNode, backdropAlphaNode ); @@ -311,7 +311,7 @@ class NodeMaterial extends ShaderMaterial { } - constructOutput( builder, outputNode ) { + setupOutput( builder, outputNode ) { const renderer = builder.renderer; diff --git a/examples/jsm/nodes/materials/SpriteNodeMaterial.js b/examples/jsm/nodes/materials/SpriteNodeMaterial.js index e47ad56e3108b6..dfb569b7545af7 100644 --- a/examples/jsm/nodes/materials/SpriteNodeMaterial.js +++ b/examples/jsm/nodes/materials/SpriteNodeMaterial.js @@ -38,7 +38,7 @@ class SpriteNodeMaterial extends NodeMaterial { } - constructPosition( { object, context } ) { + setupPosition( { object, context } ) { // < VERTEX STAGE > diff --git a/examples/jsm/nodes/math/HashNode.js b/examples/jsm/nodes/math/HashNode.js index e27daf8470c83c..a5196aee721acb 100644 --- a/examples/jsm/nodes/math/HashNode.js +++ b/examples/jsm/nodes/math/HashNode.js @@ -11,7 +11,7 @@ class HashNode extends Node { } - construct( /*builder*/ ) { + setup( /*builder*/ ) { // Taken from https://www.shadertoy.com/view/XlGcRh, originally from pcg-random.org diff --git a/examples/jsm/nodes/procedural/CheckerNode.js b/examples/jsm/nodes/procedural/CheckerNode.js index 3b40567d2646ae..f4b30a4e72422e 100644 --- a/examples/jsm/nodes/procedural/CheckerNode.js +++ b/examples/jsm/nodes/procedural/CheckerNode.js @@ -25,7 +25,7 @@ class CheckerNode extends TempNode { } - construct() { + setup() { return checkerShaderNode( { uv: this.uvNode } ); diff --git a/examples/jsm/nodes/shadernode/ShaderNode.js b/examples/jsm/nodes/shadernode/ShaderNode.js index 14075b116ac6e9..de1d88c46fda5d 100644 --- a/examples/jsm/nodes/shadernode/ShaderNode.js +++ b/examples/jsm/nodes/shadernode/ShaderNode.js @@ -22,7 +22,7 @@ const parseSwizzle = ( props ) => props.replace( /r|s/g, 'x' ).replace( /g|t/g, const shaderNodeHandler = { - construct( NodeClosure, params ) { + setup( NodeClosure, params ) { const inputs = params.shift(); @@ -226,7 +226,7 @@ class ShaderCallNodeInternal extends Node { } - construct( builder ) { + setup( builder ) { builder.addStack(); @@ -242,7 +242,7 @@ class ShaderCallNodeInternal extends Node { if ( outputNode === null ) { - // TSL: It's recommended to use `tslFn` in construct() pass. + // TSL: It's recommended to use `tslFn` in setup() pass. return this.call( builder ).build( builder, output ); @@ -270,7 +270,7 @@ class ShaderNodeInternal extends Node { } - construct() { + setup() { return this.call(); diff --git a/examples/jsm/nodes/utils/EquirectUVNode.js b/examples/jsm/nodes/utils/EquirectUVNode.js index 9b3859f971ae41..d0f8461ca897d9 100644 --- a/examples/jsm/nodes/utils/EquirectUVNode.js +++ b/examples/jsm/nodes/utils/EquirectUVNode.js @@ -13,7 +13,7 @@ class EquirectUVNode extends TempNode { } - construct() { + setup() { const dir = this.dirNode; diff --git a/examples/jsm/nodes/utils/LoopNode.js b/examples/jsm/nodes/utils/LoopNode.js index 65b0d145cddde1..b2167d14fc0811 100644 --- a/examples/jsm/nodes/utils/LoopNode.js +++ b/examples/jsm/nodes/utils/LoopNode.js @@ -53,9 +53,9 @@ class LoopNode extends Node { } - construct( builder ) { + setup( builder ) { - // construct properties + // setup properties this.getProperties( builder ); diff --git a/examples/jsm/nodes/utils/MatcapUVNode.js b/examples/jsm/nodes/utils/MatcapUVNode.js index a2c9f39689fc64..bcb9997ddacb0a 100644 --- a/examples/jsm/nodes/utils/MatcapUVNode.js +++ b/examples/jsm/nodes/utils/MatcapUVNode.js @@ -12,7 +12,7 @@ class MatcapUVNode extends TempNode { } - construct() { + setup() { const x = vec3( positionViewDirection.z, 0, positionViewDirection.x.negate() ).normalize(); const y = positionViewDirection.cross( x ); diff --git a/examples/jsm/nodes/utils/OscNode.js b/examples/jsm/nodes/utils/OscNode.js index 6d8952b1bc1881..d7920463d006cc 100644 --- a/examples/jsm/nodes/utils/OscNode.js +++ b/examples/jsm/nodes/utils/OscNode.js @@ -19,7 +19,7 @@ class OscNode extends Node { } - construct() { + setup() { const method = this.method; const timeNode = nodeObject( this.timeNode ); diff --git a/examples/jsm/nodes/utils/PackingNode.js b/examples/jsm/nodes/utils/PackingNode.js index 784a1b2647babd..a03490355ea6da 100644 --- a/examples/jsm/nodes/utils/PackingNode.js +++ b/examples/jsm/nodes/utils/PackingNode.js @@ -19,7 +19,7 @@ class PackingNode extends TempNode { } - construct() { + setup() { const { scope, node } = this; diff --git a/examples/jsm/nodes/utils/RemapNode.js b/examples/jsm/nodes/utils/RemapNode.js index 0cfadad94e40dd..c79f7ece0677f3 100644 --- a/examples/jsm/nodes/utils/RemapNode.js +++ b/examples/jsm/nodes/utils/RemapNode.js @@ -17,7 +17,7 @@ class RemapNode extends Node { } - construct() { + setup() { const { node, inLowNode, inHighNode, outLowNode, outHighNode, doClamp } = this; diff --git a/examples/jsm/nodes/utils/RotateUVNode.js b/examples/jsm/nodes/utils/RotateUVNode.js index 0aad815bc3842b..fd03ecfa892a7a 100644 --- a/examples/jsm/nodes/utils/RotateUVNode.js +++ b/examples/jsm/nodes/utils/RotateUVNode.js @@ -14,7 +14,7 @@ class RotateUVNode extends TempNode { } - construct() { + setup() { const { uvNode, rotationNode, centerNode } = this; diff --git a/examples/jsm/nodes/utils/SpecularMIPLevelNode.js b/examples/jsm/nodes/utils/SpecularMIPLevelNode.js index b2bebbe4c73123..d32e73fc5b6f85 100644 --- a/examples/jsm/nodes/utils/SpecularMIPLevelNode.js +++ b/examples/jsm/nodes/utils/SpecularMIPLevelNode.js @@ -13,7 +13,7 @@ class SpecularMIPLevelNode extends Node { } - construct() { + setup() { const { textureNode, roughnessNode } = this; diff --git a/examples/jsm/nodes/utils/SpriteSheetUVNode.js b/examples/jsm/nodes/utils/SpriteSheetUVNode.js index 2ada59f907eb08..c7a544c96c361a 100644 --- a/examples/jsm/nodes/utils/SpriteSheetUVNode.js +++ b/examples/jsm/nodes/utils/SpriteSheetUVNode.js @@ -14,7 +14,7 @@ class SpriteSheetUVNode extends Node { } - construct() { + setup() { const { frameNode, uvNode, countNode } = this; diff --git a/examples/jsm/nodes/utils/TriplanarTexturesNode.js b/examples/jsm/nodes/utils/TriplanarTexturesNode.js index c6a06f0e80f633..bd34a94e8734f8 100644 --- a/examples/jsm/nodes/utils/TriplanarTexturesNode.js +++ b/examples/jsm/nodes/utils/TriplanarTexturesNode.js @@ -22,7 +22,7 @@ class TriplanarTexturesNode extends Node { } - construct() { + setup() { const { textureXNode, textureYNode, textureZNode, scaleNode, positionNode, normalNode } = this; diff --git a/examples/webgpu_instance_uniform.html b/examples/webgpu_instance_uniform.html index 22863618f752dc..a5773859a254aa 100644 --- a/examples/webgpu_instance_uniform.html +++ b/examples/webgpu_instance_uniform.html @@ -60,7 +60,7 @@ } - construct( /*builder*/ ) { + setup( /*builder*/ ) { return this.uniformNode; diff --git a/examples/webgpu_occlusion.html b/examples/webgpu_occlusion.html index 49750bacaa121e..d73a79cbd468c8 100644 --- a/examples/webgpu_occlusion.html +++ b/examples/webgpu_occlusion.html @@ -59,7 +59,7 @@ } - construct( /* builder */ ) { + setup( /* builder */ ) { return this.uniformNode;