cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Vuforia: How would have a continuous play of a sequence - maybe putting the sequence on a 'loop'?

TG_10622756
5-Regular Member

Vuforia: How would have a continuous play of a sequence - maybe putting the sequence on a 'loop'?

 
2 REPLIES 2
TG_10622756
5-Regular Member
(To:TG_10622756)

I'm building a machine sequence in Illustrate.  I have a sequence that i set up as a 'loop' so it goes through the sequence and starts playing again.  I move the model over to Vuforia - how do I make the sequence loop?  I make a play button, hit play and it goes through the sequence and stops?  How do make it play continuously until I hit a 'stop' button?

 

It may be nice to 'link' the various machine experiences and loop those too...play an experience, done, go the next experience, play that, done, grab the next experience, etc...

 

It's not very practical, but it would be to showcase the work and to display it in a tech center...?

You can do this by adding a listener to your JS, something like this:

$scope.$on('stepcompleted', ()=>{
  // if it's the last step, start over again
  if ($scope.getWidgetProp("model-1","currentStep")==$scope.getWidgetProp("model-1", "steps")) {
    $timeout(()=>{ $scope.app.fn.triggerWidgetService("model-1", "playAll"); }, 1);
  }
});

This will make VS start the sequence again when it finishes the last step.

You can make it stop by calling the "reset" service on the model, either in JS code or via a UI control binding.

You can use the same logic to "daisy-chain" different sequences to play continuously, by adding something in the code to modify the sequence property each time.

Top Tags