Is there a way with in Vuforia Studio to access the list of uploaded resources via scripting in Home.js? I'm struggling to find in depth documentation on the scripting capabilities within Vuforia Studio. I know the parameters can be accessed by $scope.app.params so I'd think the resources would also be able to be accessed similarly but the syntax isn't intuitive and without documentation it's difficult to figure out.
Solved! Go to Solution.
The Application page is for writing CSS - you can reference uploaded resources like images to be used within your class.
I think this community post may be helpful: https://community.ptc.com/t5/Studio/get-list-o-file-from-Uploaded/m-p/603367/highlight/false#M5396
It discusses using $http to read in a json file of all the resources.
Yes, you can use the resources within Home.js. What are you trying to do?
As an example, you can update sequences of a model by doing the following:
$scope.view.wdg['model-1']['sequence']='app/resources/Uploaded/Illustration/<PVI file name>';
In the Application page, you can reference uploaded resources using $resources.
Example: background-image: url(#{$resources}/Uploaded/image.png)
Great thank you this is helpful information. Could you explain your bottom example a little? What is considered the 'Application page'? Is url a specific url or is it literally url?
I am trying to use a script to assign each model uploaded as the resource for a model in my scene. Is there a way to iterate through each of the uploaded items?
The Application page is for writing CSS - you can reference uploaded resources like images to be used within your class.
I think this community post may be helpful: https://community.ptc.com/t5/Studio/get-list-o-file-from-Uploaded/m-p/603367/highlight/false#M5396
It discusses using $http to read in a json file of all the resources.