zx-kit 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/renderer.d.ts +2 -2
- package/dist/renderer.js +2 -2
- package/package.json +1 -1
package/dist/renderer.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare function drawText(ctx: CanvasRenderingContext2D, text: string, x:
|
|
|
84
84
|
*
|
|
85
85
|
* @example
|
|
86
86
|
* // Bind cols once to avoid passing it every time:
|
|
87
|
-
* const centered = (ctx: CanvasRenderingContext2D, text: string, y: number, ink:
|
|
87
|
+
* const centered = (ctx: CanvasRenderingContext2D, text: string, y: number, ink: SpectrumColor) =>
|
|
88
88
|
* drawTextCentered(ctx, text, y, COLS, ink)
|
|
89
89
|
* centered(ctx, 'GAME OVER', y, C.B_RED)
|
|
90
90
|
*/
|
|
@@ -95,7 +95,7 @@ export declare function drawTextCentered(ctx: CanvasRenderingContext2D, text: st
|
|
|
95
95
|
* One "flash" = one `color → resetColor` cycle; total steps = `times * 2`.
|
|
96
96
|
* Always resets to `resetColor` on completion.
|
|
97
97
|
*
|
|
98
|
-
* @param color - Flash color (`C.*` palette value
|
|
98
|
+
* @param color - Flash color (`C.*` palette value)
|
|
99
99
|
* @param times - Number of flashes
|
|
100
100
|
* @param intervalMs - Duration of each half-cycle in milliseconds
|
|
101
101
|
* @param resetColor - Final color after flashing (default `C.BLACK`)
|
package/dist/renderer.js
CHANGED
|
@@ -130,7 +130,7 @@ export function drawText(ctx, text, x, y, ink, paper) {
|
|
|
130
130
|
*
|
|
131
131
|
* @example
|
|
132
132
|
* // Bind cols once to avoid passing it every time:
|
|
133
|
-
* const centered = (ctx: CanvasRenderingContext2D, text: string, y: number, ink:
|
|
133
|
+
* const centered = (ctx: CanvasRenderingContext2D, text: string, y: number, ink: SpectrumColor) =>
|
|
134
134
|
* drawTextCentered(ctx, text, y, COLS, ink)
|
|
135
135
|
* centered(ctx, 'GAME OVER', y, C.B_RED)
|
|
136
136
|
*/
|
|
@@ -144,7 +144,7 @@ export function drawTextCentered(ctx, text, y, cols, ink, paper) {
|
|
|
144
144
|
* One "flash" = one `color → resetColor` cycle; total steps = `times * 2`.
|
|
145
145
|
* Always resets to `resetColor` on completion.
|
|
146
146
|
*
|
|
147
|
-
* @param color - Flash color (`C.*` palette value
|
|
147
|
+
* @param color - Flash color (`C.*` palette value)
|
|
148
148
|
* @param times - Number of flashes
|
|
149
149
|
* @param intervalMs - Duration of each half-cycle in milliseconds
|
|
150
150
|
* @param resetColor - Final color after flashing (default `C.BLACK`)
|