File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1492,6 +1492,13 @@ class WebGLRenderer {
14921492
14931493 if ( typeof self !== 'undefined' ) animation . setContext ( self ) ;
14941494
1495+ /**
1496+ * Applications are advised to always define the animation loop
1497+ * with this method and not manually with `requestAnimationFrame()`
1498+ * for best compatibility.
1499+ *
1500+ * @param {?onAnimationCallback } callback - The application's animation loop.
1501+ */
14951502 this . setAnimationLoop = function ( callback ) {
14961503
14971504 onAnimationFrameCallback = callback ;
Original file line number Diff line number Diff line change @@ -1617,7 +1617,7 @@ class Renderer {
16171617 * for best compatibility.
16181618 *
16191619 * @async
1620- * @param {?Function } callback - The application's animation loop.
1620+ * @param {?onAnimationCallback } callback - The application's animation loop.
16211621 * @return {Promise } A Promise that resolves when the set has been executed.
16221622 */
16231623 async setAnimationLoop ( callback ) {
@@ -3114,4 +3114,12 @@ class Renderer {
31143114
31153115}
31163116
3117+ /**
3118+ * Animation loop parameter of `renderer.setAnimationLoop()`.
3119+ *
3120+ * @callback onAnimationCallback
3121+ * @param {DOMHighResTimeStamp } time - A timestamp indicating the end time of the previous frame's rendering.
3122+ * @param {XRFrame } [frame] - A reference to the current XR frame. Only relevant when using XR rendering.
3123+ */
3124+
31173125export default Renderer ;
You can’t perform that action at this time.
0 commit comments