Hi, Background: a REST-servise on Titanium side retrieves the 3D-model-URLs. The list of avalable models is shown in a tableview and depending on click the same tracker triggers and shows the related model in a new AR-window.
~~~
var ARModule = require('/apps/ar/ARchitect.window'); var architectWindow = new ARModule(''); if (architectWindow.isDeviceSupported()) { var url = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'apps', 'ar' , 'index.html').nativePath; architectWindow.loadArchitectWorldFromURL(url, , { camera_position : 'back' }); architectWindow.callJavaScript('World.init("https://www.??/dev/AR/Interzoll_Modul.wt3");'); architectWindow.open(); } else { console.log('Warning: this device cannot play with ar'); } return architectWindow;
~~~
The code above doesn't work. I cannot inject the JS-code. If I call in index.html the Word.init(URL); then is works. Any ideas how I can control the model URL from Titanium namespace?
Code strong!
Rainer
J
Joaquin Lom
said
over 7 years ago
Hello, Ithink you shoul open first the ARworld and then call Eval. best regards
Rainer Schleevoigt