@@ -501,20 +501,16 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
501
501
502
502
// Fills the current path
503
503
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill
504
- fill(color: number, path?: Path2D ): void
504
+ fill(color: number): void
505
505
506
506
// Outlines the current path
507
507
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke
508
- stroke(color: number, path?: Path2D ): void
508
+ stroke(color: number): void
509
509
510
- // Create a clipping region based in a Path2D instance
510
+ // Create a clipping region based in a path (in the callback)
511
511
// see: https://github.com/litecanvas/game-engine/blob/main/samples/clip/clip.js
512
512
// 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 >
518
514
519
515
< h2 > < a id ="sound "> Functions for Sound</ a > </ h2 >
520
516
@@ -696,6 +692,15 @@ <h2><a id="engine-api">Engine API</a></h2>
696
692
// example: pal() resets the default color palette
697
693
pal(colors: string[]): void
698
694
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
+
699
704
// shutdown the engine
700
705
// also emits the "quit" event
701
706
quit(): void
0 commit comments