Skip to content

Instantly share code, notes, and snippets.

@joseph-montanez
Created October 11, 2015 15:02
Show Gist options
  • Save joseph-montanez/e4bd676beb0487c2bf36 to your computer and use it in GitHub Desktop.
Save joseph-montanez/e4bd676beb0487c2bf36 to your computer and use it in GitHub Desktop.
var zoomInOutComp = node.addComponent({
onUpdate: function (time) {
// console.trace();
if (_SceneTwo.paused) {
//-- The scene us paused
trans.pause();
} else {
//-- The scene is not pause
if (trans.isPaused()) {
//-- the scene was unpaused, so we should
trans.resume();
} else {
var params = trans.get();
node.setPosition(params[0], params[1], params[2]);
node.setScale(params[3], params[4], params[5]);
}
}
if (trans.isActive()) {
//-- As long as the Transitional is active, keep updating
node.requestUpdate(zoomInOutComp);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment