Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created October 4, 2017 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/a3a68921618cbe67b9c0b365613446ad to your computer and use it in GitHub Desktop.
Save matthieu-D/a3a68921618cbe67b9c0b365613446ad to your computer and use it in GitHub Desktop.
addModel = (x, y) => {
this.tracker.state = AR.InstantTrackerState.TRACKING;
var model = new AR.Model("assets/wt3/transformers.wt3", {
scale: {
x: 0.003,
y: 0.003,
z: 0.003
},
rotate: {
x: 180,
y: 180
},
translate: {
x: x,
y: y
}
});
var modelAnim = new AR.ModelAnimation(model, "Animation_00");
modelAnim.start();
this.instantTrackable.drawables.addCamDrawable(model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment