Back to Demos

This demo shows how you can move nodes on given plane.

Clara.io demo resources:

Visit Base Scene


var sceneId = '6aa34336-5915-43f9-a153-6cd78dc3c986';
var api = claraplayer('player');
api.player.showTool('nodeMove');
api.player.removeTool('select');
api.commands.activateCommand('nodeMove');
api.selection.setHighlighting(true);

api.sceneIO.fetchAndUse(sceneId).then(function(){
  var opts = {
    displayGizmo: false,
    mode:'plane',
    plane:{normal: {x:0, y:1, z:0}, constant: 0 } 
  };

  var objectId = api.scene.find({type:'PolyMesh',name:'Sphere'});
  api.selection.selectNode(objectId); 
  api.commands.setCommandOptions('nodeMove',opts); 
  document.getElementById('baseScene').setAttribute('href','https://clara.io/view/'+sceneId);
});