I worked the samples(image recognition) using Vuzix..
And I want to change the image and tracker(WTC file)..
But It is not easy to me. So guys, plz help me.. :)
var World = {
loaded: false,
init: function initFn() {
/* Disable all sensors in "IR-only" Worlds to save performance. If the property is set to true, any geo-related components (such as GeoObjects and ActionRanges) are active. If the property is set to false, any geo-related components will not be visible on the screen, and triggers will not fire.*/
AR.context.services.sensors = false;
this.createOverlays();
},
createOverlays: function createOverlaysFn() {
// Initialize Tracker
// Important: If you replace the tracker file with your own, make sure to change the target name accordingly.
// e.g. replace "pageOne" used for creating the AR.Trackeable2DOBject below, with the name of one of your new target images.
this.tracker = new AR.Tracker("assets/magazine.wtc", {
onLoaded: this.worldLoaded
});
// Create overlay for page one
var imgOne = new AR.ImageResource("assets/imageOne.png");
var overlayOne = new AR.ImageDrawable(imgOne, 1, {
offsetX: -0.15,
offsetY: 0
});
var pageOne = new AR.Trackable2DObject(this.tracker, "pageOne", {
setTimeout(function() {var e =document.getElementById('loadingMessage'); e.parentElement.removeChild(e);}, 10000);
}
};
World.init();
I just chaned the parts which marked by red.
But It did not work. I wonder that I have to change more or another code.
Help me help me
P.S : I add the image using Wikitude tool and then made wtc file.
A
Andreas Fötschl
said
almost 8 years ago
It all looks good,
Besides checking if the referred png-assets are in pace, also ensure that second param of "Trackable2DObject" equals a valid target-name of your created wtc file (hover the target to double check) see attached file. If you only have one trackable2D in your code also try setting targetname to "*", which will then be used for any defined target inside the wtc. Also ensure to use wtc file for version 4.0 since Vuzix SDK yet does not support 4.1 wtc-files.
kyuhyup lee