@@ -3507,15 +3507,15 @@ index 096326f3..d1b6ae2e 100644
3507
3507
3508
3508
export const Fn = (jsFunc, nodeType) => {
3509
3509
diff --git a/src-testing/src/renderers/common/Animation.ts b/src-testing/src/renderers/common/Animation.ts
3510
- index 5f4e7775..0c490ad9 100644
3510
+ index fe3f7743..92f9822a 100644
3511
3511
--- a/src-testing/src/renderers/common/Animation.ts
3512
3512
+++ b/src-testing/src/renderers/common/Animation.ts
3513
3513
@@ -1,16 +1,31 @@
3514
3514
+ import Nodes from './nodes/Nodes.js';
3515
3515
+ import Info from './Info.js';
3516
3516
+
3517
3517
+ export interface AnimationContext {
3518
- + requestAnimationFrame(callback: FrameRequestCallback, frame ?: XRFrame): number;
3518
+ + requestAnimationFrame(callback: FrameRequestCallback, xrFrame ?: XRFrame): number;
3519
3519
+ cancelAnimationFrame(handle: number): void;
3520
3520
+ }
3521
3521
+
@@ -3529,7 +3529,7 @@ index 5f4e7775..0c490ad9 100644
3529
3529
+ info: Info;
3530
3530
+
3531
3531
+ _context: AnimationContext;
3532
- + _animationLoop: ((time: DOMHighResTimeStamp, frame ?: XRFrame) => void) | null;
3532
+ + _animationLoop: ((time: DOMHighResTimeStamp, xrFrame ?: XRFrame) => void) | null;
3533
3533
+ _requestId: number | null;
3534
3534
+
3535
3535
/**
@@ -3547,17 +3547,17 @@ index 5f4e7775..0c490ad9 100644
3547
3547
* Starts the internal animation loop.
3548
3548
*/
3549
3549
start() {
3550
- - const update = (time, frame ) => {
3551
- + const update = (time?: DOMHighResTimeStamp, frame ?: XRFrame) => {
3550
+ - const update = (time, xrFrame ) => {
3551
+ + const update = (time?: DOMHighResTimeStamp, xrFrame ?: XRFrame) => {
3552
3552
this._requestId = this._context.requestAnimationFrame(update);
3553
3553
3554
3554
if (this.info.autoReset === true) this.info.reset();
3555
3555
@@ -64,7 +79,7 @@ class Animation {
3556
3556
3557
3557
this.info.frame = this.nodes.nodeFrame.frameId;
3558
3558
3559
- - if (this._animationLoop !== null) this._animationLoop(time, frame );
3560
- + if (this._animationLoop !== null) this._animationLoop(time!, frame );
3559
+ - if (this._animationLoop !== null) this._animationLoop(time, xrFrame );
3560
+ + if (this._animationLoop !== null) this._animationLoop(time!, xrFrame );
3561
3561
};
3562
3562
3563
3563
update();
@@ -3575,7 +3575,7 @@ index 5f4e7775..0c490ad9 100644
3575
3575
* @param {Function} callback - The animation loop.
3576
3576
*/
3577
3577
- setAnimationLoop(callback) {
3578
- + setAnimationLoop(callback: ((time: DOMHighResTimeStamp, frame ?: XRFrame) => void) | null) {
3578
+ + setAnimationLoop(callback: ((time: DOMHighResTimeStamp, xrFrame ?: XRFrame) => void) | null) {
3579
3579
this._animationLoop = callback;
3580
3580
}
3581
3581
@@ -6159,7 +6159,7 @@ index 7527627e..c0fcddf9 100644
6159
6159
6160
6160
/**
6161
6161
diff --git a/src-testing/src/renderers/common/Renderer.ts b/src-testing/src/renderers/common/Renderer.ts
6162
- index c0931ffb..c905c419 100644
6162
+ index 52535a1c..dd128cfd 100644
6163
6163
--- a/src-testing/src/renderers/common/Renderer.ts
6164
6164
+++ b/src-testing/src/renderers/common/Renderer.ts
6165
6165
@@ -37,7 +37,35 @@ import {
0 commit comments