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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Sequence does only play after double tap on HoloLens

Roman_G
4-Participant

Sequence does only play after double tap on HoloLens

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?

 

ACCEPTED SOLUTION

Accepted Solutions
sebben
12-Amethyst
(To:Roman_G)

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();
});

View solution in original post

1 REPLY 1
sebben
12-Amethyst
(To:Roman_G)

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();
});
Announcements

Top Tags