Hi xinfei I dont remember well what I did because was a long time ago, but here is part of my code. I hope you can understand and will it is Helpful for you.
You can find the file attach in this message.
x
xinfei Zheng
said
about 7 years ago
Hi Sergio,
I met the same problem as you.( "Uncagth TypeError: Cannot read property 'length' of undefined", source: architect://architect.js(1).)
could you share your solution or your code ?
thanks!
B
Bodoquezorrilla
said
about 9 years ago
Thanks now is running perfect.
B
Bodoquezorrilla
said
about 9 years ago
Hello Andreas, I follow your example and read the Documentation and my code is:
otroObjtI: function otherModel(){
this.modelCar2 = new AR.Model("assetsApp/prueba.wt3", {
Hi Sergio, Assigning a new object to your member: "this.modelCar = new AR.Model("model2.wt3", {" will not work because the Wikitude SDK never knows that there is a new 3D model. You're only loosing the reference to the orginal model and can't destroy it properly anymore.
What you should do is the following: Create a new AR.Model in your 'otroObjtl' function and use the following Trackable2DObject JS API to replace the 3d model:
drawables.removeCamDrawable(this.modelCar)
drawables.addCamDrawable(myNew3dModel)
You can find more information about the JS API in our JS API reference which is available on our website and in the SDK package that you've downloaded.
Best regards
Andreas
B
Bodoquezorrilla
said
about 9 years ago
Changing 3D model or file .wt3
I want to scan an image and that image show me a 3D model.
When I press the button of Snap for move the model, I put two buttons more for change the model for another 3D model. But I don't find the way to apply that.
Bodoquezorrilla
1 person has this problem