Back to the Shapespark home page

Stop Object Rotation

Hello @wojtek and @jan ,

Is there a way to stop an object from rotating by a click interaction, or through some API ?

This can open up new possibilities and can be an interesting UI response to indicate that an interaction has happened.


This is not a part of the public API, but if you mark a node type as editable before the scene starts to load:

var viewer = WALK.getViewer();

then, after the scene is ready to display you can turn rotation for all nodes of a given type on/off by:

var node = viewer.findNodesOfType('<NODE-TYPE>')[0];
node.config.rotate = true; // false
node.config.rotationSpeed = <SPEED>;
1 Like