Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
I am currently working on a project where you can interact with a machine by using buttons to play animations.
I got the animation to play on the HoloLens using following code:
$scope.playSequence=function(name){
$scope.app.loadsequence(name);
$scope.$applyAsync();
console.warn("$scope.app.loadsequence() executed");
$timeout( function() {
$scope.app.loadsequence(name);
console.warn("app.loadsequence() executed");
$scope.$applyAsync();
}, 1000);
};
$scope.app.loadsequence = function(name)
{ $scope.setWidgetProp('schwader', 'sequence', "app/resources/Uploaded/"+name);
twx.app.fn.triggerWidgetService("schwader", 'playAll');
};
But I have now the problem that Animation plays in Preview just fine, but on the HoloLens it is needed to tap the button twice in order to play animation.
Is it possible that because the machine is quite large that is taking its time to load in the animation?
Solved! Go to Solution.
Hi,
you can do it like this:
$scope.playSequence = function(pvzName, SequenceName){
$scope.view.wdg["schwader"].sequence = "app/resources/Uploaded/" + pvzName + "/l-Creo%203D%20-%20" + SequenceName + ".pvi";
}
$scope.$on('sequenceloaded', function(evt, arg1) {
angular.element(document.getElementById('schwader')).scope().playAll();
});
Hi,
you can do it like this:
$scope.playSequence = function(pvzName, SequenceName){
$scope.view.wdg["schwader"].sequence = "app/resources/Uploaded/" + pvzName + "/l-Creo%203D%20-%20" + SequenceName + ".pvi";
}
$scope.$on('sequenceloaded', function(evt, arg1) {
angular.element(document.getElementById('schwader')).scope().playAll();
});
