ia mreading my augmentations through a json file which contains the name of the augmentation its type ( image video 3dModel) and its properties like ortate offsetx offsety
etc....
how can i create these augmenttions dynamially without overridig them as i loop through the objects retrived from the json
var imgOne = new AR.ImageResource(object.url); // create the image
var overlayOne = new AR.ImageDrawable(imgOne, 1, {
offsetX: object.offsetX,
offsetY: object.offsetY
});
var pageOne = new AR.Trackable2DObject(this.tracker, object.name, {
drawables: {
cam: overlayOne
}
});
alert("end of createdrawable image");
}
so lets say i have like 4 objects of type images i will loop and call this createImageDrawable() function but as u can c the last object will be actually initialized and saved the rest are being overrriden
if u have any way so that i can achieve multiple image recognition using this strategy
best regards
sorry for the long thread
A
Andreas Fötschl
said
over 7 years ago
Note that a "Trackable2DObject" is basically the definition of the target's augmentations. In order to create a set of augmentations for a single target you have to create them first and then use the list of camDrawables (namely ImageDrawables, VideoDrawables etc.) as drawables.cam attribute of one trackable2DObject.
Caoueiti
1 person has this problem