customAnimationFrameRequester.d.ts 847 B

1234567891011121314151617181920212223
  1. /**
  2. * Interface for any object that can request an animation frame
  3. */
  4. export interface ICustomAnimationFrameRequester {
  5. /**
  6. * This function will be called when the render loop is ready. If this is not populated, the engine's renderloop function will be called
  7. */
  8. renderFunction?: Function;
  9. /**
  10. * Called to request the next frame to render to
  11. * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
  12. */
  13. requestAnimationFrame: Function;
  14. /**
  15. * You can pass this value to cancelAnimationFrame() to cancel the refresh callback request
  16. * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame#Return_value
  17. */
  18. requestID?: number;
  19. /**
  20. * Called to cancel the next frame request
  21. */
  22. cancelAnimationFrame?: Function;
  23. }