I am trying to add some images overaly augmentations dynamically. It is working great but when I am integrating click function its rendering when the World is load, its not responding as a click function.
Here is the sample code
for (var i = 0; i < AugmentedData.length; i++ ){
Overlay = new AR.ImageDrawable(TargetImage, OverlayScaleFloat, {
onClick: urlClickLink(),
offsetX: OverlayImageOffsetXFloat,
offsetY: OverlayImageOffsetYFloat,
});
this.trackable = new AR.Trackable2DObject(this.tracker, AugmentedData.TargetTitle, {
drawables: {
cam: Overlay
}
});
}
urlClickLink: function urlClickLink () {
alert("click");
}
A
Andreas Schacherbauer
said
over 7 years ago
Hi salman, I'm not sure if I understood you correctly. Do you have problems with onClick trigger not firing or ImageDrawables not rendered?
With our latest SDK release earlier this week we fixed a rare case where ImageDrawables were not rendered after the application paused/resumed or the Architect World was loaded for a second or third time.
Please try out our latest release and send us some feedback if it resolved your problems or not.
Salman.khan