Skip to main content
1-Visitor
July 18, 2017
Question

Auto Replay- continius play

  • July 18, 2017
  • 1 reply
  • 1751 views

Hi..I have a demo product presentation with hololenses. I would like to make a VR animation where the animation would be played without stopping.. Continus play - auto replay.

How can i make this in thingworx studio?

BR Matej

1 reply

12-Amethyst
July 18, 2017

Here is a javascript function that will play the sequence and call itself again and again.  In the angular.element line, change EnterModelStudioIDHere to be the Studio ID of your model.  On the timeout line, change the 29000 to be the tie for the duration of your sequence.  When you build your sequence, you'll want to build it such that it does what you want then undoes those steps to put the model back to it's original state.

$scope.PlaySequence = function() {

//This will play the sequence that is set on the model

angular.element(document.getElementById('EnterModelStudioIDHere')).scope().playAll(); 

  //The time is in miliseconds

$timeout(function(){ $scope.PlaySequence(); }, 29000); 

 

}