@@ -501,20 +501,16 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
501501
502502// Fills the current path
503503// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill
504- fill(color: number, path?: Path2D ): void
504+ fill(color: number): void
505505
506506// Outlines the current path
507507// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke
508- stroke(color: number, path?: Path2D ): void
508+ stroke(color: number): void
509509
510- // Create a clipping region based in a Path2D instance
510+ // Create a clipping region based in a path (in the callback)
511511// see: https://github.com/litecanvas/game-engine/blob/main/samples/clip/clip.js
512512// note: before call `clip()` you must save the context using `push()` and `pop()`
513- clip(path: Path2D)
514-
515- // Create (or clone) a Path2D instance
516- // see: https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D
517- path(arg?: Path2D | string): Path2D</ code > </ pre >
513+ clip(callback: (ctx: CanvasRenderingContext2D) => void)</ code > </ pre >
518514
519515 < h2 > < a id ="sound "> Functions for Sound</ a > </ h2 >
520516
@@ -696,6 +692,15 @@ <h2><a id="engine-api">Engine API</a></h2>
696692// example: pal() resets the default color palette
697693pal(colors: string[]): void
698694
695+ // pauses the engine loop (update & draw)
696+ pause(): void
697+
698+ // resumes the engine loop
699+ resume(): void
700+
701+ // returns `true` if the engine loop is paused
702+ paused(): boolean
703+
699704// shutdown the engine
700705// also emits the "quit" event
701706quit(): void
0 commit comments