瀏覽代碼

rename getNodeBindings to getBindings

sunag 4 年之前
父節點
當前提交
c5660267a2

+ 2 - 4
examples/jsm/renderers/webgpu/WebGPUBindings.js

@@ -55,11 +55,9 @@ class WebGPUBindings {
 
 			}
 
-			// append node material bindings
+			// append node bindings
 
-			const nodeBindings = this.pipelines.getNodeBindings( object );
-
-			bindings = bindings.concat( nodeBindings );
+			bindings = bindings.concat( this.pipelines.getBindings( object ) );
 
 			// setup (static) binding layout and (dynamic) binding group
 

+ 4 - 4
examples/jsm/renderers/webgpu/WebGPURenderPipelines.js

@@ -23,7 +23,7 @@ class WebGPURenderPipelines {
 		this.glslang = glslang;
 		this.sampleCount = sampleCount;
 
-		this.nodeBindings = new WeakMap();
+		this.bindings = new WeakMap();
 
 		this.pipelines = new WeakMap();
 		this.shaderAttributes = new WeakMap();
@@ -85,7 +85,7 @@ class WebGPURenderPipelines {
 
 			shader = nodeBuilder.parse( shader.vertexShader, shader.fragmentShader );
 
-			this.nodeBindings.set( object, nodeBuilder.getBindings() );
+			this.bindings.set( object, nodeBuilder.getBindings() );
 
 			// shader modules
 
@@ -228,9 +228,9 @@ class WebGPURenderPipelines {
 
 	}
 
-	getNodeBindings( object ) {
+	getBindings( object ) {
 
-		return this.nodeBindings.get( object );
+		return this.bindings.get( object );
 
 	}