Freigeben über


requestAnimationFrame method

The requestAnimationFrame method contains a callback function that will be called every time a frame of the VRDisplay presentation is rendered.

Syntax

var retval = VRDisplay.requestAnimationFrame(callback);

Parameters

  • callback
    Type: FrameRequestCallback

Return value

Type: Integer

The handle of the requestAnimationFrame. Passing this to cancelAnimationFrame will unregister the callback.

Remarks

If the VRDisplay isn't presenting, the requestAnimationFrame property is functionally equivalent to Window.requestAnimationFrame.

See also

VRDisplay