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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to ensure that all external files have been loaded before experience starts?

mziemniewicz
9-Granite

How to ensure that all external files have been loaded before experience starts?

Hello everyone!

I'm building a project with a lot images and models loaded from external URL's, for now it acts like:
When a step is played, images are loading, models are loading, and it takes some time, so animation of main element, that should contain all those external resources is in it's middle or done, and then finally images and models appears...
And what I need to do is first to ensure, that all external elements are loaded and assigned to their places and then start the animation for current step. How can I achieve this? 

 this partially deals with the matter:

 

$scope.setAdditionalInfoImage(startStep.info);
$scope.setStepInstructionPhoto(startStep.photo);
$scope.setStepComponent(startStep.component);
$scope.setComponentHighlight(startStep.highlight, true);
$scope.view.wdg["step-label"].text = `Control ${currentStep+1}/${allSteps.length}`;
$scope.setStepIcon(startStep.icon);   
$timeout(function () {    
    $scope.refreshOperatorPosition(startStep.targetPos);
    $scope.refreshFromTwx(startStep.targetPos);
}, 3000);


but for some cases 3 seconds is not enough time for elements to load so I would rather like to download all external resources before first step starts and then use them in the whole experience. Is it possible?

 

1 REPLY 1
dupatel
19-Tanzanite
(To:mziemniewicz)

@mziemniewicz The work around used looks an option however checking if there is any other way to achieve this in Studio.

 

-Durgesh

Top Tags