Explorar o código

WebGPURenderer: Clean up.

Mugen87 %!s(int64=4) %!d(string=hai) anos
pai
achega
3fd2561cc9
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      examples/jsm/renderers/webgpu/WebGPURenderPipelines.js

+ 2 - 1
examples/jsm/renderers/webgpu/WebGPURenderPipelines.js

@@ -10,12 +10,12 @@ class WebGPURenderPipelines {
 		this.bindings = bindings;
 
 		this.pipelines = new WeakMap();
+		this.shaderAttributes = new WeakMap();
 		this.shaderModules = {
 			vertex: new WeakMap(),
 			fragment: new WeakMap()
 		};
 
-		this.shaderAttributes = new WeakMap();
 
 	}
 
@@ -166,6 +166,7 @@ class WebGPURenderPipelines {
 	dispose() {
 
 		this.pipelines = new WeakMap();
+		this.shaderAttributes = new WeakMap();
 		this.shaderModules = {
 			vertex: new WeakMap(),
 			fragment: new WeakMap()