3D Elephant which is added to ZapWorks. The elephant has the ability to move in space (up/down and left/right). The elephant can be tucked away by scanning zapcode.
Zappar connects the digital world with the things round about you. All you have to do is get the app and Zap!
It's like opening a window to another dimension, where everyday things can transform to unlock a video, a game or even 3D characters to play with right there in front of you.
Just download the app and point the camera at an image or product with a zapcode on it to make them come to life.
//variable declarations
const Elephant = symbol.nodes.Elephant;
var count = 0;
//Click-button function
//The animation of the motion is started
parent.on("pointerdown", (e) => {
symbol.controllers.Animation.elements.Walk.play();
});
parent.on("pointermove", (e) => {
var Position = Elephant.position();
var x = Position[0];
var y = Position[1];
count = count + 0.0001;
var thisX = x - count;
Elephant.rotation([90, -90, 0]);
Elephant.position([thisX ,y ,0]);
});
//The movement is stopped
parent.on("pointerleave", (e) => {
symbol.controllers.Animation.elements.Walk.stop();
});