textmode.js 0.7.1-beta.5 → 0.7.1

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.
@@ -36,7 +36,7 @@ export interface ILayerManager {
36
36
  /**
37
37
  * Remove all user-created layers from the manager.
38
38
  * The base layer is not affected by this operation.
39
- * This is useful for live-coding environments where code is re-evaluated
39
+ * This is useful for integration into live-coding environments where code is re-evaluated
40
40
  * and layers need to be recreated from scratch.
41
41
  */
42
42
  clear(): void;
@@ -279,26 +279,32 @@ export interface ITextmodeLayer {
279
279
  * @param z The rotation angle in degrees. Positive values rotate clockwise.
280
280
  * @returns The current rotation in degrees if no parameter is provided.
281
281
  *
282
- * @example
283
- * ```typescript
284
- * const t = textmode.create();
285
- *
286
- * const rotatingLayer = t.layers.add({ blendMode: 'normal', opacity: 1.0 });
287
- *
288
- * rotatingLayer.draw(() => {
289
- * t.clear();
290
- * t.charColor(255, 200, 100);
291
- * t.char('#');
292
- * t.rect(10, 5);
293
- * });
294
- *
295
- * t.draw(() => {
296
- * t.background(20, 20, 40);
297
- *
298
- * // Rotate the layer over time
299
- * rotatingLayer.rotate(t.frameCount * 2);
300
- * });
301
- * ```
282
+ * @example
283
+ * ```typescript
284
+ * import { textmode } from 'textmode.js';
285
+ *
286
+ * const t = textmode.create();
287
+ *
288
+ * const rotatingLayer = t.layers.add({ blendMode: 'difference', opacity: 1.0 });
289
+ *
290
+ * rotatingLayer.draw(() => {
291
+ * t.clear();
292
+ * t.charColor(255, 200, 100);
293
+ * t.char('#');
294
+ * t.rect(10, 5);
295
+ * });
296
+ *
297
+ * t.draw(() => {
298
+ * t.background(20, 20, 40);
299
+ *
300
+ * // Rotate the layer over time
301
+ * rotatingLayer.rotateZ(t.frameCount * 2);
302
+ *
303
+ * t.charColor(100, 200, 255);
304
+ * t.char('-');
305
+ * t.rect(t.grid.cols, t.grid.rows);
306
+ * });
307
+ * ```
302
308
  */
303
309
  rotateZ(z?: number): number | void;
304
310
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "textmode.js",
3
- "version": "0.7.1-beta.5",
3
+ "version": "0.7.1",
4
4
  "description": "textmode.js is a lightweight creative coding library for creating real-time ASCII art on the web.",
5
5
  "type": "module",
6
6
  "types": "./dist/types/index.d.ts",