|
@@ -17,7 +17,7 @@ __THIS_PLUGIN_HAS_BEEN_TESTED_WITH__({
|
17
|
17
|
* @property {Frame} frame current Frame
|
18
|
18
|
* @property {ReferenceImage | null} referenceImage corresponds to the target being tracked (if any)
|
19
|
19
|
* @property {THREE.Scene} scene three.js Scene
|
20
|
|
- * @property {THREE.Group} root a 3D object that is automatically aligned with the physical target
|
|
20
|
+ * @property {THREE.Group} root a 3D object that is automatically aligned to the physical target
|
21
|
21
|
* @property {THREE.Camera} camera a camera adjusted for AR
|
22
|
22
|
* @property {THREE.WebGLRenderer} renderer three.js renderer
|
23
|
23
|
*/
|
|
@@ -25,7 +25,7 @@ __THIS_PLUGIN_HAS_BEEN_TESTED_WITH__({
|
25
|
25
|
/**
|
26
|
26
|
* Do magic to connect encantar.js to three.js
|
27
|
27
|
* @param {() => Promise<Session> | SpeedyPromise<Session>} startARSession
|
28
|
|
- * @param {(ar: ARSystem) => void} [animateVirtualScene] animation callback
|
|
28
|
+ * @param {(ar: ARSystem, deltaSeconds?: number) => void} [animateVirtualScene] animation callback
|
29
|
29
|
* @param {(ar: ARSystem) => void | Promise<void> | SpeedyPromise<Session>} [initializeVirtualScene] initialization callback
|
30
|
30
|
* @returns {Promise<ARSystem> | SpeedyPromise<ARSystem>}
|
31
|
31
|
*/
|
|
@@ -78,7 +78,7 @@ function encantar(startARSession, animateVirtualScene, initializeVirtualScene)
|
78
|
78
|
ar.frame = frame;
|
79
|
79
|
mix(ar.frame);
|
80
|
80
|
|
81
|
|
- animateVirtualScene.call(undefined, ar);
|
|
81
|
+ animateVirtualScene.call(undefined, ar, ar.session.time.delta);
|
82
|
82
|
|
83
|
83
|
ar.renderer.render(ar.scene, ar.camera);
|
84
|
84
|
ar.session.requestAnimationFrame(animate);
|