Skip to content

Commit

Permalink
Examples: Fix webgpu_materials example using NodeMaterials lib (mrd…
Browse files Browse the repository at this point in the history
…oob#29291)

* add nodematerials to lib

* added count limit
  • Loading branch information
sunag authored Sep 2, 2024
1 parent 1e91229 commit 677f388
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/webgpu_instance_mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
//

const gui = new GUI();
gui.add( mesh, 'count', 0, count );
gui.add( mesh, 'count', 1, count );

} );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgpu_materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 677f388

Please sign in to comment.