MCPcopy Create free account
hub / github.com/melonjs/melonJS / _startRunLoop

Function _startRunLoop

packages/melonjs/src/state/state.ts:77–83  ·  view source on GitHub ↗

* @ignore

()

Source from the content-addressed store, hash-verified

75 * @ignore
76 */
77function _startRunLoop(): void {
78 // ensure nothing is running first and in valid state
79 if (_animFrameId === -1 && _state !== -1) {
80 // start the main loop
81 _animFrameId = globalThis.requestAnimationFrame(_renderFrame);
82 }
83}
84
85/**
86 * Resume the game loop after a pause.

Callers 2

_switchStateFunction · 0.85
restartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected