I'm integrating a modified SDK 3.0 sample into a big app in which I'm working.
When I detect whatever Trackable2DObject and show an ImageDrawable (for example, the surf table), this ImageDrawable appears from the z-index very slowly.
Is there any way to disable this animation?
Thanks in advance!
M
Markus Eder
said
over 10 years ago
Hi There!
Please have a look into the js-file of the example. The class you want to disable is the AR.PropertyAnimation. This class defines the animation of a certain property (e.g. ImageDrawable or 3D model). What you can do now is remove the PropertyAnimation from the corresponding AR.Trackable2DObject.
Hope that helps,
Markus
N
Nacho Alvarez
said
over 10 years ago
Thanks for your response, Markus.
My JS code only contains this:
var World = {
loaded: false,
init: function initFn() {
this.createOverlays();
},
createOverlays: function createOverlaysFn() {
// Initialize Tracker
this.tracker = new AR.Tracker("assets/wul4bus.wtc", {
onLoaded: this.worldLoaded
});
// Create overlay for page one
var imgOne = new AR.ImageResource("assets/redsys_marker_orange.png");
var overlayOne = new AR.ImageDrawable(imgOne, 0.5, {
zorder: 0,
offsetX: -0.15,
offsetY: 0,
onClick: this.createClickTrigger
});
var titleLabel = new AR.Label("Bus", 0.07, {
zOrder: 1,
offsetX: -0.15,
offsetY: 0.04,
style: {
textColor: '#FFFFFF',
fontStyle: AR.CONST.FONT_STYLE.BOLD
}
});
var pageOne = new AR.Trackable2DObject(this.tracker, "002", {
drawables: {
cam:
}
});
},
createClickTrigger: function createClickTriggerFn() {
As you see, there is no AR.PropertyAnimation class along this code. Anyway, a small animation succedeed *sometimes* when the target is discovered, and trackable object appears a bit slowly, slower than SDK 2 IMHO. It happens with some Trackable2DObject more than others.
Nacho Alvarez