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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Loop in Illustrate ignored in Studio?

feil
12-Amethyst

Loop in Illustrate ignored in Studio?

Is the loop-function of steps ignored in Vuforia studio?
In my experience the step does not loop, in Illustrate it does?

ACCEPTED SOLUTION

Accepted Solutions

Hi @feil,

I do not think that the loop funciton of animation is already supported in vuforia Studio but I will aks in the PTC internal development group and will let you know.

Thanks

View solution in original post

3 REPLIES 3
dupatel
19-Tanzanite
(To:feil)

@feil  Could you please provide more info about how you are using the loop inside Studio application.

Hi @feil,

I do not think that the loop funciton of animation is already supported in vuforia Studio but I will aks in the PTC internal development group and will let you know.

Thanks

As I already mentioned I requested info by PTC dev team.  The development confirmed that this functionality is not used in Vuforia Studio

DEV STATEMENT:

=================

"

looping is only used for preview - it is not saved as part of the sequence definition so the only way to acheve what you are trying to achieve is through (java)scripting. Note it makes virtually no sense to record/define an step-by-step animation with 'loops' - why would the user want to see the same thing replayed ad-infinitum.  Yes, there are cases where a user might say 'show me again' but that applies for any step. 

 

so, if you want to repeat a step, use the scripting capabilities in Studio

"

==========

So means we can achieve this functionality if use a script which will implement the loop. 

For example we can  stepcompleted event as desribed in  the tech tip "List of Vuforia Studio events which we could be used as listener by javaScript/angular.js"  Item 2

E.g. from the callback function  we can execute the play service to have a loop.

scope.$on('stepcompleted', function(evt, arg1, arg2, arg3) { 
 var parsedArg3 = JSON.parse(arg3);
console.log("stepcompleted stepNumber="+parsedArg3.stepNumber + "  nextStep="+parsedArg3.nextStep);
  
$scope.app.stepNumber=parseInt(parsedArg3.stepNumber);
$scope.app.nextStep=parseInt(parsedArg3.nextStep);
$scope.app.duration=parseFloat(parsedArg3.duration);
//here the $scope.current_modelName and $scope.current_figure and $scope.loop_continue
//are a global variables where we defined the current modelname, used figure and if loop should continue
$scope.app.playModelStep($scope.current_figure,$scope.current_modelName,$scope.app.stepNumber,true)
});

////////////// //definition of the play function $scope.app.playModelStep = function (sequence,modelName,step_number,play) { //sequnece -sequnece name e.g. TestFigure1 - as shown in UI //modelName - model name e.g. model-1 //step_number - set this number to current step //play true/false execute play for the model $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'sequence', '');}); $timeout(function () { $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'sequence', 'app/resources/Uploaded/l-Creo 3D - '+sequence +'.pvi');}); },50); $timeout(function () { $scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'currentStep', parseInt(step_number));}); if(play) //check if play should be applyed $timeout(function () {angular.element(document.getElementById(modelName)).scope().play(); }, 100); }, 500); }; //////////////////////////////////

 

Announcements

Top Tags