'findmaterial' script doesn’t work.,,, ㅜ

Hi @heung_aile

In this case you can run onMaterialClicked(<MaterialName>, callback>
Then you won’t need to find material first

Your script could look like this:

  var viewer = WALK.getViewer();
  viewer.onMaterialClicked("Painting03", function() {
    alert(1)
  });

For reference, findMaterial function must be run after the scene is ready to display GitHub - shapespark/shapespark-viewer-api: JavaScript API for interacting with the Shapespark 3D scene.

1 Like