Răsfoiți Sursa

Examples: Fix `webgpu_materials` example using NodeMaterials lib (#29291)

* add nodematerials to lib

* added count limit
sunag 1 an în urmă
părinte
comite
677f3880eb
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      examples/webgpu_instance_mesh.html
  2. 1 1
      examples/webgpu_materials.html

+ 1 - 1
examples/webgpu_instance_mesh.html

@@ -69,7 +69,7 @@
 					//
 
 					const gui = new GUI();
-					gui.add( mesh, 'count', 0, count );
+					gui.add( mesh, 'count', 1, count );
 
 				} );
 

+ 1 - 1
examples/webgpu_materials.html

@@ -419,7 +419,7 @@
 			function testSerialization( mesh ) {
 
 				const json = mesh.toJSON();
-				const loader = new THREE.NodeObjectLoader().setNodes( moduleToLib( TSL ) );
+				const loader = new THREE.NodeObjectLoader().setNodes( moduleToLib( TSL ) ).setNodeMaterials( moduleToLib( THREE ) );
 				const serializedMesh = loader.parse( json );
 
 				serializedMesh.position.x = ( objects.length % 4 ) * 200 - 400;

粤ICP备19079148号