@@ -343,9 +343,6 @@ <h2><a id="settings">Game Configuration</a></h2>
343343// scale to fill the canvas
344344settings.autoscale = true
345345
346- // target FPS
347- settings.fps = 60
348-
349346// enable smooth drawing
350347settings.antialias = false
351348
@@ -541,19 +538,7 @@ <h2><a id="keyboard">Functions for Keyboard</a></h2>
541538
542539 < h2 > < a id ="math "> Math</ a > </ h2 >
543540
544- < pre > < code class ="language-typescript ">
545- // Generates a pseudo-random float between min (inclusive)
546- // and max (exclusive)
547- rand(min = 0, max = 1.0): number;
548-
549- // Generates a pseudo-random integer between min (inclusive)
550- // and max (inclusive)
551- randi(min = 0, max = 1): number;
552-
553- // If a value is passed, initializes the random number generator (RNG)
554- // with an explicit seed value (a number > = 0). Otherwise, returns the current seed state.
555- // By default, the initial seed is the current timestamp (from `Date.now()`).
556- seed(value: number | null): number;
541+ < pre > < code class ="language-typescript "> /** General Math */
557542
558543// Calculates a linear (interpolation) value over `t`.
559544// example: lerp(0, 50, 0.5) returns 25
@@ -644,7 +629,22 @@ <h2><a id="math">Math</a></h2>
644629// If the number is 0, it will returns 0.
645630sign(n: number): number
646631
647- /** UTILS */
632+ /** Random Number Generator (RNG) */
633+
634+ // Generates a pseudo-random float between min (inclusive)
635+ // and max (exclusive)
636+ rand(min = 0, max = 1.0): number;
637+
638+ // Generates a pseudo-random integer between min (inclusive)
639+ // and max (inclusive)
640+ randi(min = 0, max = 1): number;
641+
642+ // If a value is passed, initializes the random number generator (RNG)
643+ // with an explicit seed value (a number > = 0). Otherwise, returns the current seed state.
644+ // By default, the initial seed is the current timestamp (from `Date.now()`).
645+ seed(value: number | null): number;
646+
647+ /** Collision Check (AABB) */
648648
649649// Check a collision between two rectangles.
650650// All arguments are required and must be numbers.
@@ -671,18 +671,14 @@ <h2><a id="engine-api">Engine API</a></h2>
671671// Also, emits the "resized" (use `listen` to observe this event).
672672resize(width: number, height: number): void
673673
674- // shutdown the engine
675- // also emits the "quit" event
676- quit(): void
677-
678674// Sets the scale of the game's delta time (dt).
679675// By default is equal to 1.
680676// Values higher than 1 increase the speed of time,
681677// while values smaller than 1 decrease it.
682678// A value of 0 freezes time (equivalent to pausing).
683679timescale(value: number): void
684680
685- // Sets the target FPS at runtime
681+ // Sets the target FPS (frames per second or frame rate)
686682setfps(value: number): void
687683
688684// the following functions are most used by plugins...
@@ -694,7 +690,9 @@ <h2><a id="engine-api">Engine API</a></h2>
694690// example: getcolor(0) returns "#111"
695691getcolor(index: number): string
696692
697- </ code > </ pre >
693+ // shutdown the engine
694+ // also emits the "quit" event
695+ quit(): void</ code > </ pre >
698696
699697 < h2 > < a id ="advanced "> Playground Features</ a > </ h2 >
700698
0 commit comments