textmode.filters.js 1.2.0 → 1.2.2

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.
@@ -30,7 +30,7 @@
30
30
  *
31
31
  * @module textmode.filters.js
32
32
  */
33
- import type { TextmodePlugin } from 'textmode.js/plugins';
33
+ import type { TextmodePlugin } from 'textmode.js';
34
34
  export type { BrightnessOptions, ContrastOptions, SaturationOptions, HueRotateOptions, PosterizeOptions, ChromaticAberrationOptions, PixelateOptions, GridDistortionOptions, GlitchOptions, CrtMattiasOptions, ScanlinesOptions, VignetteOptions, BloomOptions, FilmGrainOptions, } from './types';
35
35
  /**
36
36
  * GPU-accelerated image filters plugin for textmode.js.
@@ -39,36 +39,9 @@ export type { BrightnessOptions, ContrastOptions, SaturationOptions, HueRotateOp
39
39
  * visual effects that run entirely on the GPU via WebGL2 fragment shaders.
40
40
  *
41
41
  * @example
42
- * ```javascript
43
- * import { textmode } from 'textmode.js';
44
- * import { FiltersPlugin } from 'textmode.filters.js';
45
- *
46
- * const t = textmode.create({
47
- * plugins: [FiltersPlugin]
48
- * });
49
- *
50
- * let frame = 0;
51
- * t.draw(() => {
52
- * // Simple filter with shorthand value
53
- * t.layers.base.filter('brightness', 1.2);
42
+ * {@includeCode ../examples/ColorAdjustment/brightness/sketch.js}
54
43
  *
55
- * // Filter with options object
56
- * t.layers.base.filter('bloom', {
57
- * threshold: 0.5,
58
- * intensity: 1.5,
59
- * radius: 8
60
- * });
61
- *
62
- * // Animated filter
63
- * t.layers.base.filter('filmGrain', {
64
- * intensity: 0.2,
65
- * time: frame * 0.016
66
- * });
67
- *
68
- * t.background(0);
69
- * frame++;
70
- * });
71
- * ```
44
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/variables/FiltersPlugin | FiltersPlugin API reference}
72
45
  */
73
46
  export declare const FiltersPlugin: TextmodePlugin;
74
47
  /**
@@ -89,6 +62,8 @@ export declare const FiltersPlugin: TextmodePlugin;
89
62
  * ```
90
63
  *
91
64
  * @returns A textmode.js plugin instance.
65
+ *
66
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/functions/createFiltersPlugin | createFiltersPlugin API reference}
92
67
  */
93
68
  export declare const createFiltersPlugin: () => TextmodePlugin;
94
69
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,GAChB,MAAM,SAAS,CAAC;AAoBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,aAAa,EAAE,cAmF3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,QAAO,cAA+B,CAAC;AAEvE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,aAAa,CAAC,EAAE,cAAc,CAAC;QAC/B,mBAAmB,CAAC,EAAE,OAAO,mBAAmB,CAAC;KACjD;CACD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,GAChB,MAAM,SAAS,CAAC;AAoBjB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,cAmF3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,mBAAmB,QAAO,cAA+B,CAAC;AAEvE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,aAAa,CAAC,EAAE,cAAc,CAAC;QAC/B,mBAAmB,CAAC,EAAE,OAAO,mBAAmB,CAAC;KACjD;CACD"}
@@ -6,40 +6,7 @@
6
6
  * - An options object with named parameters
7
7
  *
8
8
  * @example
9
- * ```javascript
10
- * const t = textmode.create({
11
- * width: window.innerWidth,
12
- * height: window.innerHeight,
13
- * plugins: [FiltersPlugin],
14
- * });
15
- *
16
- * let video;
17
- *
18
- * t.setup(async () => {
19
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
20
- * video.play();
21
- * video.loop();
22
- * video.characters(' .:-=+*#%@');
23
- * });
24
- *
25
- * t.draw(() => {
26
- * t.background(0);
27
- * if (video) {
28
- * t.image(video, t.grid.cols, t.grid.rows);
29
- * }
30
- *
31
- * const wobble = Math.sin(t.secs * 2);
32
- * t.layers.base.filter('bloom', {
33
- * threshold: 0.5,
34
- * intensity: 1 + wobble * 0.35,
35
- * radius: 6 + wobble * 2,
36
- * });
37
- * });
38
- *
39
- * t.windowResized(() => {
40
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
41
- * });
42
- * ```
9
+ * {@includeCode ../examples/Stylization/bloom/sketch.js}
43
10
  *
44
11
  * @module
45
12
  */
@@ -49,40 +16,11 @@
49
16
  * Adjusts image brightness by multiplying pixel values.
50
17
  *
51
18
  * @example
52
- * ```javascript
53
- * const t = textmode.create({
54
- * width: window.innerWidth,
55
- * height: window.innerHeight,
56
- * plugins: [FiltersPlugin],
57
- * });
58
- *
59
- * let video;
60
- *
61
- * t.setup(async () => {
62
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
63
- * video.play();
64
- * video.loop();
65
- * video.characters(' .:-=+*#%@');
66
- * });
67
- *
68
- * t.draw(() => {
69
- * t.background(0);
70
- * if (video) {
71
- * t.image(video, t.grid.cols, t.grid.rows);
72
- * }
73
- *
74
- * const wobble = Math.sin(t.secs * 2);
75
- * t.layers.base.filter('brightness', {
76
- * amount: 1 + wobble * 0.25,
77
- * });
78
- * });
79
- *
80
- * t.windowResized(() => {
81
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
82
- * });
83
- * ```
19
+ * {@includeCode ../examples/ColorAdjustment/brightness/sketch.js}
84
20
  *
85
21
  * @category Color adjustment filters
22
+ *
23
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BrightnessOptions | BrightnessOptions API reference}
86
24
  */
87
25
  export interface BrightnessOptions {
88
26
  /**
@@ -94,6 +32,8 @@ export interface BrightnessOptions {
94
32
  * - `0.0` = completely black
95
33
  *
96
34
  * @default 1.0
35
+ *
36
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BrightnessOptions#amount | BrightnessOptions.amount API reference}
97
37
  */
98
38
  amount: number;
99
39
  }
@@ -103,40 +43,11 @@ export interface BrightnessOptions {
103
43
  * Adjusts image contrast by scaling pixel values around mid-gray.
104
44
  *
105
45
  * @example
106
- * ```javascript
107
- * const t = textmode.create({
108
- * width: window.innerWidth,
109
- * height: window.innerHeight,
110
- * plugins: [FiltersPlugin],
111
- * });
112
- *
113
- * let video;
114
- *
115
- * t.setup(async () => {
116
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
117
- * video.play();
118
- * video.loop();
119
- * video.characters(' .:-=+*#%@');
120
- * });
121
- *
122
- * t.draw(() => {
123
- * t.background(0);
124
- * if (video) {
125
- * t.image(video, t.grid.cols, t.grid.rows);
126
- * }
127
- *
128
- * const wobble = Math.sin(t.secs * 2);
129
- * t.layers.base.filter('contrast', {
130
- * amount: 1 + wobble * 0.35,
131
- * });
132
- * });
133
- *
134
- * t.windowResized(() => {
135
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
136
- * });
137
- * ```
46
+ * {@includeCode ../examples/ColorAdjustment/contrast/sketch.js}
138
47
  *
139
48
  * @category Color adjustment filters
49
+ *
50
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ContrastOptions | ContrastOptions API reference}
140
51
  */
141
52
  export interface ContrastOptions {
142
53
  /**
@@ -148,6 +59,8 @@ export interface ContrastOptions {
148
59
  * - `0.0` = solid gray
149
60
  *
150
61
  * @default 1.0
62
+ *
63
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ContrastOptions#amount | ContrastOptions.amount API reference}
151
64
  */
152
65
  amount: number;
153
66
  }
@@ -158,40 +71,11 @@ export interface ContrastOptions {
158
71
  * Perfect for creating vivid, oversaturated looks or desaturating to grayscale.
159
72
  *
160
73
  * @example
161
- * ```javascript
162
- * const t = textmode.create({
163
- * width: window.innerWidth,
164
- * height: window.innerHeight,
165
- * plugins: [FiltersPlugin],
166
- * });
167
- *
168
- * let video;
169
- *
170
- * t.setup(async () => {
171
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
172
- * video.play();
173
- * video.loop();
174
- * video.characters(' .:-=+*#%@');
175
- * });
176
- *
177
- * t.draw(() => {
178
- * t.background(0);
179
- * if (video) {
180
- * t.image(video, t.grid.cols, t.grid.rows);
181
- * }
182
- *
183
- * const wobble = Math.sin(t.secs * 2);
184
- * t.layers.base.filter('saturation', {
185
- * amount: 1 + wobble * 0.45,
186
- * });
187
- * });
188
- *
189
- * t.windowResized(() => {
190
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
191
- * });
192
- * ```
74
+ * {@includeCode ../examples/ColorAdjustment/saturation/sketch.js}
193
75
  *
194
76
  * @category Color adjustment filters
77
+ *
78
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/SaturationOptions | SaturationOptions API reference}
195
79
  */
196
80
  export interface SaturationOptions {
197
81
  /**
@@ -202,6 +86,8 @@ export interface SaturationOptions {
202
86
  * - `> 1.0` = vivid/oversaturated colors
203
87
  *
204
88
  * @default 1.0
89
+ *
90
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/SaturationOptions#amount | SaturationOptions.amount API reference}
205
91
  */
206
92
  amount: number;
207
93
  }
@@ -212,41 +98,11 @@ export interface SaturationOptions {
212
98
  * Useful for color grading or creating surreal color effects.
213
99
  *
214
100
  * @example
215
- * ```javascript
216
- * const t = textmode.create({
217
- * width: window.innerWidth,
218
- * height: window.innerHeight,
219
- * plugins: [FiltersPlugin],
220
- * });
221
- *
222
- * let video;
223
- *
224
- * t.setup(async () => {
225
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
226
- * video.play();
227
- * video.loop();
228
- * video.characters(' .:-=+*#%@');
229
- * });
230
- *
231
- * t.draw(() => {
232
- * t.background(0);
233
- * if (video) {
234
- * t.image(video, t.grid.cols, t.grid.rows);
235
- * }
236
- *
237
- * const wobble = Math.sin(t.secs * 2);
238
- * const hue = (t.frameCount * 2 + wobble * 45) % 360;
239
- * t.layers.base.filter('hueRotate', {
240
- * angle: hue,
241
- * });
242
- * });
243
- *
244
- * t.windowResized(() => {
245
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
246
- * });
247
- * ```
101
+ * {@includeCode ../examples/ColorAdjustment/hueRotate/sketch.js}
248
102
  *
249
103
  * @category Color adjustment filters
104
+ *
105
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/HueRotateOptions | HueRotateOptions API reference}
250
106
  */
251
107
  export interface HueRotateOptions {
252
108
  /**
@@ -259,6 +115,8 @@ export interface HueRotateOptions {
259
115
  * Values wrap around, so `370` is equivalent to `10`.
260
116
  *
261
117
  * @default 0.0
118
+ *
119
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/HueRotateOptions#angle | HueRotateOptions.angle API reference}
262
120
  */
263
121
  angle: number;
264
122
  }
@@ -269,40 +127,11 @@ export interface HueRotateOptions {
269
127
  * creating a retro quantized/poster-like look.
270
128
  *
271
129
  * @example
272
- * ```javascript
273
- * const t = textmode.create({
274
- * width: window.innerWidth,
275
- * height: window.innerHeight,
276
- * plugins: [FiltersPlugin],
277
- * });
278
- *
279
- * let video;
280
- *
281
- * t.setup(async () => {
282
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
283
- * video.play();
284
- * video.loop();
285
- * video.characters(' .:-=+*#%@');
286
- * });
287
- *
288
- * t.draw(() => {
289
- * t.background(0);
290
- * if (video) {
291
- * t.image(video, t.grid.cols, t.grid.rows);
292
- * }
293
- *
294
- * const wobble = Math.sin(t.secs * 2);
295
- * t.layers.base.filter('posterize', {
296
- * levels: Math.max(2, Math.round(5 + wobble * 3)),
297
- * });
298
- * });
299
- *
300
- * t.windowResized(() => {
301
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
302
- * });
303
- * ```
130
+ * {@includeCode ../examples/ColorAdjustment/posterize/sketch.js}
304
131
  *
305
132
  * @category Color adjustment filters
133
+ *
134
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/PosterizeOptions | PosterizeOptions API reference}
306
135
  */
307
136
  export interface PosterizeOptions {
308
137
  /**
@@ -316,6 +145,8 @@ export interface PosterizeOptions {
316
145
  * - `8+` = subtle posterization
317
146
  *
318
147
  * @default 4.0
148
+ *
149
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/PosterizeOptions#levels | PosterizeOptions.levels API reference}
319
150
  */
320
151
  levels: number;
321
152
  }
@@ -326,41 +157,11 @@ export interface PosterizeOptions {
326
157
  * found in cheap cameras or creates stylized glitch aesthetics.
327
158
  *
328
159
  * @example
329
- * ```javascript
330
- * const t = textmode.create({
331
- * width: window.innerWidth,
332
- * height: window.innerHeight,
333
- * plugins: [FiltersPlugin],
334
- * });
335
- *
336
- * let video;
337
- *
338
- * t.setup(async () => {
339
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
340
- * video.play();
341
- * video.loop();
342
- * video.characters(' .:-=+*#%@');
343
- * });
344
- *
345
- * t.draw(() => {
346
- * t.background(0);
347
- * if (video) {
348
- * t.image(video, t.grid.cols, t.grid.rows);
349
- * }
350
- *
351
- * const wobble = Math.sin(t.secs * 2);
352
- * t.layers.base.filter('chromaticAberration', {
353
- * amount: 6 + wobble * 4,
354
- * direction: [Math.sin(t.secs), Math.cos(t.secs)],
355
- * });
356
- * });
357
- *
358
- * t.windowResized(() => {
359
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
360
- * });
361
- * ```
160
+ * {@includeCode ../examples/Distortion/chromaticAberration/sketch.js}
362
161
  *
363
162
  * @category Distortion filters
163
+ *
164
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ChromaticAberrationOptions | ChromaticAberrationOptions API reference}
364
165
  */
365
166
  export interface ChromaticAberrationOptions {
366
167
  /**
@@ -369,6 +170,8 @@ export interface ChromaticAberrationOptions {
369
170
  * Controls how far the red and blue channels are separated from green.
370
171
  *
371
172
  * @default 5.0
173
+ *
174
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ChromaticAberrationOptions#amount | ChromaticAberrationOptions.amount API reference}
372
175
  */
373
176
  amount: number;
374
177
  /**
@@ -381,6 +184,8 @@ export interface ChromaticAberrationOptions {
381
184
  * The vector is normalized internally, so `[2, 0]` is the same as `[1, 0]`.
382
185
  *
383
186
  * @default [1.0, 0.0]
187
+ *
188
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ChromaticAberrationOptions#direction | ChromaticAberrationOptions.direction API reference}
384
189
  */
385
190
  direction: [number, number];
386
191
  }
@@ -391,40 +196,11 @@ export interface ChromaticAberrationOptions {
391
196
  * reminiscent of retro video games or censored content.
392
197
  *
393
198
  * @example
394
- * ```javascript
395
- * const t = textmode.create({
396
- * width: window.innerWidth,
397
- * height: window.innerHeight,
398
- * plugins: [FiltersPlugin],
399
- * });
400
- *
401
- * let video;
402
- *
403
- * t.setup(async () => {
404
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
405
- * video.play();
406
- * video.loop();
407
- * video.characters(' .:-=+*#%@');
408
- * });
409
- *
410
- * t.draw(() => {
411
- * t.background(0);
412
- * if (video) {
413
- * t.image(video, t.grid.cols, t.grid.rows);
414
- * }
415
- *
416
- * const wobble = Math.sin(t.secs * 2);
417
- * t.layers.base.filter('pixelate', {
418
- * pixelSize: 6 + wobble * 3,
419
- * });
420
- * });
421
- *
422
- * t.windowResized(() => {
423
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
424
- * });
425
- * ```
199
+ * {@includeCode ../examples/Distortion/pixelate/sketch.js}
426
200
  *
427
201
  * @category Distortion filters
202
+ *
203
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/PixelateOptions | PixelateOptions API reference}
428
204
  */
429
205
  export interface PixelateOptions {
430
206
  /**
@@ -435,6 +211,8 @@ export interface PixelateOptions {
435
211
  * Minimum value: `1.0`
436
212
  *
437
213
  * @default 4.0
214
+ *
215
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/PixelateOptions#pixelsize | PixelateOptions.pixelSize API reference}
438
216
  */
439
217
  pixelSize: number;
440
218
  }
@@ -449,48 +227,11 @@ export interface PixelateOptions {
449
227
  * you to create dynamic text distortion effects.
450
228
  *
451
229
  * @example
452
- * ```javascript
453
- * const t = textmode.create({
454
- * width: window.innerWidth,
455
- * height: window.innerHeight,
456
- * plugins: [FiltersPlugin],
457
- * });
458
- *
459
- * let video;
460
- *
461
- * t.setup(async () => {
462
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
463
- * video.play();
464
- * video.loop();
465
- * video.characters(' .:-=+*#%@');
466
- * });
467
- *
468
- * t.draw(() => {
469
- * t.background(0);
470
- * if (video) {
471
- * t.image(video, t.grid.cols, t.grid.rows);
472
- * }
473
- *
474
- * const wobble = Math.sin(t.secs * 2);
475
- * const widthFactors = Array.from({ length: t.grid.cols }, (_, i) => (Math.sin(i * 0.18 + t.frameCount * 0.04) + 1) * 0.5);
476
- * const heightFactors = Array.from({ length: t.grid.rows }, (_, i) => (Math.sin(i * 0.24 + t.secs * 1.5) + 1) * 0.5);
477
- * t.layers.base.filter('gridDistortion', {
478
- * gridCellDimensions: [t.grid.cols, t.grid.rows],
479
- * gridPixelDimensions: [t.grid.width, t.grid.height],
480
- * gridOffsetDimensions: [t.grid.offsetX, t.grid.offsetY],
481
- * widthFactors,
482
- * heightFactors,
483
- * widthVariationScale: 0.35 + wobble * 0.15,
484
- * heightVariationScale: 0.35 + wobble * 0.15,
485
- * });
486
- * });
487
- *
488
- * t.windowResized(() => {
489
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
490
- * });
491
- * ```
230
+ * {@includeCode ../examples/Distortion/gridDistortion/sketch.js}
492
231
  *
493
232
  * @category Distortion filters
233
+ *
234
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions | GridDistortionOptions API reference}
494
235
  */
495
236
  export interface GridDistortionOptions {
496
237
  /**
@@ -501,6 +242,8 @@ export interface GridDistortionOptions {
501
242
  * Maximum value: `[128, 128]`
502
243
  *
503
244
  * @default [80.0, 40.0]
245
+ *
246
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#gridcelldimensions | GridDistortionOptions.gridCellDimensions API reference}
504
247
  */
505
248
  gridCellDimensions: [number, number];
506
249
  /**
@@ -510,6 +253,8 @@ export interface GridDistortionOptions {
510
253
  * `[t.grid.cols * t.grid.cellWidth, t.grid.rows * t.grid.cellHeight]`
511
254
  *
512
255
  * @default [640.0, 320.0]
256
+ *
257
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#gridpixeldimensions | GridDistortionOptions.gridPixelDimensions API reference}
513
258
  */
514
259
  gridPixelDimensions: [number, number];
515
260
  /**
@@ -518,6 +263,8 @@ export interface GridDistortionOptions {
518
263
  * Use `[t.grid.offsetX, t.grid.offsetY]` to match your grid position.
519
264
  *
520
265
  * @default [0.0, 0.0]
266
+ *
267
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#gridoffsetdimensions | GridDistortionOptions.gridOffsetDimensions API reference}
521
268
  */
522
269
  gridOffsetDimensions: [number, number];
523
270
  /**
@@ -530,6 +277,8 @@ export interface GridDistortionOptions {
530
277
  * - `1.0` = maximum width
531
278
  *
532
279
  * @default Array(128).fill(0.5)
280
+ *
281
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#widthfactors | GridDistortionOptions.widthFactors API reference}
533
282
  */
534
283
  widthFactors: number[];
535
284
  /**
@@ -542,6 +291,8 @@ export interface GridDistortionOptions {
542
291
  * - `1.0` = maximum height
543
292
  *
544
293
  * @default Array(128).fill(0.5)
294
+ *
295
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#heightfactors | GridDistortionOptions.heightFactors API reference}
545
296
  */
546
297
  heightFactors: number[];
547
298
  /**
@@ -550,6 +301,8 @@ export interface GridDistortionOptions {
550
301
  * Higher values create more dramatic width variations.
551
302
  *
552
303
  * @default 0.5
304
+ *
305
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#widthvariationscale | GridDistortionOptions.widthVariationScale API reference}
553
306
  */
554
307
  widthVariationScale: number;
555
308
  /**
@@ -558,6 +311,8 @@ export interface GridDistortionOptions {
558
311
  * Higher values create more dramatic height variations.
559
312
  *
560
313
  * @default 0.5
314
+ *
315
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GridDistortionOptions#heightvariationscale | GridDistortionOptions.heightVariationScale API reference}
561
316
  */
562
317
  heightVariationScale: number;
563
318
  }
@@ -568,40 +323,11 @@ export interface GridDistortionOptions {
568
323
  * Creates a corrupted/broken digital signal aesthetic.
569
324
  *
570
325
  * @example
571
- * ```javascript
572
- * const t = textmode.create({
573
- * width: window.innerWidth,
574
- * height: window.innerHeight,
575
- * plugins: [FiltersPlugin],
576
- * });
577
- *
578
- * let video;
579
- *
580
- * t.setup(async () => {
581
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
582
- * video.play();
583
- * video.loop();
584
- * video.characters(' .:-=+*#%@');
585
- * });
586
- *
587
- * t.draw(() => {
588
- * t.background(0);
589
- * if (video) {
590
- * t.image(video, t.grid.cols, t.grid.rows);
591
- * }
592
- *
593
- * const wobble = Math.sin(t.secs * 2);
594
- * t.layers.base.filter('glitch', {
595
- * amount: Math.max(0, 0.2 + wobble * 0.8),
596
- * });
597
- * });
598
- *
599
- * t.windowResized(() => {
600
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
601
- * });
602
- * ```
326
+ * {@includeCode ../examples/Stylization/glitch/sketch.js}
603
327
  *
604
328
  * @category Stylization filters
329
+ *
330
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GlitchOptions | GlitchOptions API reference}
605
331
  */
606
332
  export interface GlitchOptions {
607
333
  /**
@@ -612,6 +338,8 @@ export interface GlitchOptions {
612
338
  * - `1.0+` = intense, chaotic glitching
613
339
  *
614
340
  * @default 0.0
341
+ *
342
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/GlitchOptions#amount | GlitchOptions.amount API reference}
615
343
  */
616
344
  amount: number;
617
345
  }
@@ -623,44 +351,13 @@ export interface GlitchOptions {
623
351
  * classic CRT shader.
624
352
  *
625
353
  * @example
626
- * ```javascript
627
- * const t = textmode.create({
628
- * width: window.innerWidth,
629
- * height: window.innerHeight,
630
- * plugins: [FiltersPlugin],
631
- * });
632
- *
633
- * let video;
634
- *
635
- * t.setup(async () => {
636
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
637
- * video.play();
638
- * video.loop();
639
- * video.characters(' .:-=+*#%@');
640
- * });
641
- *
642
- * t.draw(() => {
643
- * t.background(0);
644
- * if (video) {
645
- * t.image(video, t.grid.cols, t.grid.rows);
646
- * }
647
- *
648
- * const wobble = Math.sin(t.secs * 2);
649
- * t.layers.base.filter('crtMattias', {
650
- * curvature: 0.45 + wobble * 0.1,
651
- * scanSpeed: 1 + wobble * 0.25,
652
- * time: t.secs,
653
- * });
654
- * });
655
- *
656
- * t.windowResized(() => {
657
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
658
- * });
659
- * ```
354
+ * {@includeCode ../examples/Stylization/crtMattias/sketch.js}
660
355
  *
661
356
  * @see {@link https://github.com/libretro/glsl-shaders/blob/master/crt/shaders/crt-mattias.glsl | Original shader by Mattias Gustavsson}
662
357
  *
663
358
  * @category Stylization filters
359
+ *
360
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/CrtMattiasOptions | CrtMattiasOptions API reference}
664
361
  */
665
362
  export interface CrtMattiasOptions {
666
363
  /**
@@ -671,6 +368,8 @@ export interface CrtMattiasOptions {
671
368
  * - `1.0` = maximum curvature
672
369
  *
673
370
  * @default 0.5
371
+ *
372
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/CrtMattiasOptions#curvature | CrtMattiasOptions.curvature API reference}
674
373
  */
675
374
  curvature: number;
676
375
  /**
@@ -679,6 +378,8 @@ export interface CrtMattiasOptions {
679
378
  * Higher values make the scanline crawl faster.
680
379
  *
681
380
  * @default 1.0
381
+ *
382
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/CrtMattiasOptions#scanspeed | CrtMattiasOptions.scanSpeed API reference}
682
383
  */
683
384
  scanSpeed: number;
684
385
  /**
@@ -688,6 +389,8 @@ export interface CrtMattiasOptions {
688
389
  * Typically use elapsed time in seconds or frame count.
689
390
  *
690
391
  * @default 0.0
392
+ *
393
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/CrtMattiasOptions#time | CrtMattiasOptions.time API reference}
691
394
  */
692
395
  time: number;
693
396
  }
@@ -699,44 +402,11 @@ export interface CrtMattiasOptions {
699
402
  * the scanlines in crtMattias.
700
403
  *
701
404
  * @example
702
- * ```javascript
703
- * const t = textmode.create({
704
- * width: window.innerWidth,
705
- * height: window.innerHeight,
706
- * plugins: [FiltersPlugin],
707
- * });
708
- *
709
- * let video;
710
- *
711
- * t.setup(async () => {
712
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
713
- * video.play();
714
- * video.loop();
715
- * video.characters(' .:-=+*#%@');
716
- * });
717
- *
718
- * t.draw(() => {
719
- * t.background(0);
720
- * if (video) {
721
- * t.image(video, t.grid.cols, t.grid.rows);
722
- * }
723
- *
724
- * const wobble = Math.sin(t.secs * 2);
725
- * t.layers.base.filter('scanlines', {
726
- * count: 256,
727
- * lineWidth: 0.5,
728
- * intensity: 0.7 + wobble * 0.1,
729
- * speed: 1 + wobble * 0.15,
730
- * time: t.secs,
731
- * });
732
- * });
733
- *
734
- * t.windowResized(() => {
735
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
736
- * });
737
- * ```
405
+ * {@includeCode ../examples/Stylization/scanlines/sketch.js}
738
406
  *
739
407
  * @category Stylization filters
408
+ *
409
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions | ScanlinesOptions API reference}
740
410
  */
741
411
  export interface ScanlinesOptions {
742
412
  /**
@@ -747,6 +417,8 @@ export interface ScanlinesOptions {
747
417
  * Minimum value: `10.0`
748
418
  *
749
419
  * @default 300.0
420
+ *
421
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions#count | ScanlinesOptions.count API reference}
750
422
  */
751
423
  count: number;
752
424
  /**
@@ -757,6 +429,8 @@ export interface ScanlinesOptions {
757
429
  * - `1.0` = solid (no gaps)
758
430
  *
759
431
  * @default 0.5
432
+ *
433
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions#linewidth | ScanlinesOptions.lineWidth API reference}
760
434
  */
761
435
  lineWidth: number;
762
436
  /**
@@ -767,6 +441,8 @@ export interface ScanlinesOptions {
767
441
  * - `1.0` = maximum darkness (solid black lines)
768
442
  *
769
443
  * @default 0.75
444
+ *
445
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions#intensity | ScanlinesOptions.intensity API reference}
770
446
  */
771
447
  intensity: number;
772
448
  /**
@@ -777,6 +453,8 @@ export interface ScanlinesOptions {
777
453
  * - Higher values = faster scrolling
778
454
  *
779
455
  * @default 1.0
456
+ *
457
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions#speed | ScanlinesOptions.speed API reference}
780
458
  */
781
459
  speed: number;
782
460
  /**
@@ -785,6 +463,8 @@ export interface ScanlinesOptions {
785
463
  * Increment this value each frame to animate the scrolling effect.
786
464
  *
787
465
  * @default 0.0
466
+ *
467
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/ScanlinesOptions#time | ScanlinesOptions.time API reference}
788
468
  */
789
469
  time: number;
790
470
  }
@@ -795,42 +475,11 @@ export interface ScanlinesOptions {
795
475
  * Useful for creating a cinematic look or highlighting central content.
796
476
  *
797
477
  * @example
798
- * ```javascript
799
- * const t = textmode.create({
800
- * width: window.innerWidth,
801
- * height: window.innerHeight,
802
- * plugins: [FiltersPlugin],
803
- * });
804
- *
805
- * let video;
806
- *
807
- * t.setup(async () => {
808
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
809
- * video.play();
810
- * video.loop();
811
- * video.characters(' .:-=+*#%@');
812
- * });
813
- *
814
- * t.draw(() => {
815
- * t.background(0);
816
- * if (video) {
817
- * t.image(video, t.grid.cols, t.grid.rows);
818
- * }
819
- *
820
- * const wobble = Math.sin(t.secs * 2);
821
- * t.layers.base.filter('vignette', {
822
- * amount: 0.5 + wobble * 0.2,
823
- * softness: 0.5,
824
- * roundness: 0.5 + wobble * 0.15,
825
- * });
826
- * });
827
- *
828
- * t.windowResized(() => {
829
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
830
- * });
831
- * ```
478
+ * {@includeCode ../examples/Stylization/vignette/sketch.js}
832
479
  *
833
480
  * @category Stylization filters
481
+ *
482
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/VignetteOptions | VignetteOptions API reference}
834
483
  */
835
484
  export interface VignetteOptions {
836
485
  /**
@@ -841,6 +490,8 @@ export interface VignetteOptions {
841
490
  * - `1.0` = very dark edges
842
491
  *
843
492
  * @default 0.5
493
+ *
494
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/VignetteOptions#amount | VignetteOptions.amount API reference}
844
495
  */
845
496
  amount: number;
846
497
  /**
@@ -851,6 +502,8 @@ export interface VignetteOptions {
851
502
  * - `1.0` = very soft, gradual falloff
852
503
  *
853
504
  * @default 0.5
505
+ *
506
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/VignetteOptions#softness | VignetteOptions.softness API reference}
854
507
  */
855
508
  softness: number;
856
509
  /**
@@ -861,6 +514,8 @@ export interface VignetteOptions {
861
514
  * - `1.0` = circular/elliptical
862
515
  *
863
516
  * @default 0.5
517
+ *
518
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/VignetteOptions#roundness | VignetteOptions.roundness API reference}
864
519
  */
865
520
  roundness: number;
866
521
  }
@@ -872,42 +527,11 @@ export interface VignetteOptions {
872
527
  * Perfect for creating neon, glowing text, or dreamy effects.
873
528
  *
874
529
  * @example
875
- * ```javascript
876
- * const t = textmode.create({
877
- * width: window.innerWidth,
878
- * height: window.innerHeight,
879
- * plugins: [FiltersPlugin],
880
- * });
881
- *
882
- * let video;
883
- *
884
- * t.setup(async () => {
885
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
886
- * video.play();
887
- * video.loop();
888
- * video.characters(' .:-=+*#%@');
889
- * });
890
- *
891
- * t.draw(() => {
892
- * t.background(0);
893
- * if (video) {
894
- * t.image(video, t.grid.cols, t.grid.rows);
895
- * }
896
- *
897
- * const wobble = Math.sin(t.secs * 2);
898
- * t.layers.base.filter('bloom', {
899
- * threshold: 0.5,
900
- * intensity: 1.2 + wobble * 0.5,
901
- * radius: 6 + wobble * 2,
902
- * });
903
- * });
904
- *
905
- * t.windowResized(() => {
906
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
907
- * });
908
- * ```
530
+ * {@includeCode ../examples/Stylization/bloom/sketch.js}
909
531
  *
910
532
  * @category Stylization filters
533
+ *
534
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BloomOptions | BloomOptions API reference}
911
535
  */
912
536
  export interface BloomOptions {
913
537
  /**
@@ -918,6 +542,8 @@ export interface BloomOptions {
918
542
  * - `1.0` = only the brightest pixels glow
919
543
  *
920
544
  * @default 0.5
545
+ *
546
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BloomOptions#threshold | BloomOptions.threshold API reference}
921
547
  */
922
548
  threshold: number;
923
549
  /**
@@ -928,6 +554,8 @@ export interface BloomOptions {
928
554
  * - `2.0+` = very bright, intense glow
929
555
  *
930
556
  * @default 1.0
557
+ *
558
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BloomOptions#intensity | BloomOptions.intensity API reference}
931
559
  */
932
560
  intensity: number;
933
561
  /**
@@ -940,6 +568,8 @@ export interface BloomOptions {
940
568
  * - `10.0+` = wide, diffuse glow
941
569
  *
942
570
  * @default 4.0
571
+ *
572
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/BloomOptions#radius | BloomOptions.radius API reference}
943
573
  */
944
574
  radius: number;
945
575
  }
@@ -952,43 +582,11 @@ export interface BloomOptions {
952
582
  * real film characteristics.
953
583
  *
954
584
  * @example
955
- * ```javascript
956
- * const t = textmode.create({
957
- * width: window.innerWidth,
958
- * height: window.innerHeight,
959
- * plugins: [FiltersPlugin],
960
- * });
961
- *
962
- * let video;
963
- *
964
- * t.setup(async () => {
965
- * video = await t.loadVideo('https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4');
966
- * video.play();
967
- * video.loop();
968
- * video.characters(' .:-=+*#%@');
969
- * });
970
- *
971
- * t.draw(() => {
972
- * t.background(0);
973
- * if (video) {
974
- * t.image(video, t.grid.cols, t.grid.rows);
975
- * }
976
- *
977
- * const wobble = Math.sin(t.secs * 2);
978
- * t.layers.base.filter('filmGrain', {
979
- * intensity: 0.2 + wobble * 0.1,
980
- * size: 2 + wobble * 0.5,
981
- * speed: 1 + wobble * 0.2,
982
- * time: t.secs,
983
- * });
984
- * });
985
- *
986
- * t.windowResized(() => {
987
- * t.resizeCanvas(window.innerWidth, window.innerHeight);
988
- * });
989
- * ```
585
+ * {@includeCode ../examples/Stylization/filmGrain/sketch.js}
990
586
  *
991
587
  * @category Stylization filters
588
+ *
589
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/FilmGrainOptions | FilmGrainOptions API reference}
992
590
  */
993
591
  export interface FilmGrainOptions {
994
592
  /**
@@ -999,6 +597,8 @@ export interface FilmGrainOptions {
999
597
  * - `0.5+` = heavy, noticeable grain
1000
598
  *
1001
599
  * @default 0.2
600
+ *
601
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/FilmGrainOptions#intensity | FilmGrainOptions.intensity API reference}
1002
602
  */
1003
603
  intensity: number;
1004
604
  /**
@@ -1009,6 +609,8 @@ export interface FilmGrainOptions {
1009
609
  * - `5.0+` = coarse, chunky grain
1010
610
  *
1011
611
  * @default 2.0
612
+ *
613
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/FilmGrainOptions#size | FilmGrainOptions.size API reference}
1012
614
  */
1013
615
  size: number;
1014
616
  /**
@@ -1019,6 +621,8 @@ export interface FilmGrainOptions {
1019
621
  * - `2.0+` = fast, flickering grain
1020
622
  *
1021
623
  * @default 1.0
624
+ *
625
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/FilmGrainOptions#speed | FilmGrainOptions.speed API reference}
1022
626
  */
1023
627
  speed: number;
1024
628
  /**
@@ -1027,6 +631,8 @@ export interface FilmGrainOptions {
1027
631
  * Increment this value each frame to animate the grain effect.
1028
632
  *
1029
633
  * @default 0.0
634
+ *
635
+ * @see {@link https://code.textmode.art/api/textmode.filters.js/interfaces/FilmGrainOptions#time | FilmGrainOptions.time API reference}
1030
636
  */
1031
637
  time: number;
1032
638
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;;OASG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;;;;;OASG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;;;;;;OAUG;IACH,KAAK,EAAE,MAAM,CAAC;CACd;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;OAUG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;OAUG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;OAUG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,IAAI,EAAE,MAAM,CAAC;CACb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "textmode.filters.js",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Image filters plugin for textmode.js",
5
5
  "type": "module",
6
6
  "main": "./dist/textmode.filters.umd.js",
@@ -18,14 +18,19 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "dev": "vite --port 5179 --host",
21
- "build": "vite build && tsc -p tsconfig.json",
22
- "check": "npm run format:check && npm run lint && npm run lint:md && npm run typecheck && npm run build",
21
+ "build:bundle": "vite build",
22
+ "build:types": "tsc",
23
+ "build": "npm run build:bundle && npm run build:types",
24
+ "check": "npm run check:format && npm run lint && npm run lint:md && npm run check:types && npm run check:api-docs && npm run check:examples && npm run build",
25
+ "docs:links:add": "node ./scripts/add-api-doc-links.mjs",
26
+ "check:api-docs": "node ./scripts/check-public-api-docs.mjs",
27
+ "check:examples": "node ./scripts/check-examples.mjs",
23
28
  "dev:docs": "typedoc --watch",
24
29
  "build:docs": "typedoc",
25
30
  "preview": "vite preview",
26
- "format": "prettier --write \"src/**/*.{ts,js}\" \"vite-plugins/**/*.ts\" \"typedoc-plugins/**/*.js\" \"examples/**/*.{js,html,css}\" \"*.{js,ts,json}\" \".markdownlint*.jsonc\" \".prettierrc\" \".releaserc.json\"",
27
- "format:check": "prettier --check \"src/**/*.{ts,js}\" \"vite-plugins/**/*.ts\" \"typedoc-plugins/**/*.js\" \"examples/**/*.{js,html,css}\" \"*.{js,ts,json}\" \".markdownlint*.jsonc\" \".prettierrc\" \".releaserc.json\"",
28
- "typecheck": "tsc --noEmit",
31
+ "format": "prettier --write .",
32
+ "check:format": "prettier --check .",
33
+ "check:types": "tsc --noEmit",
29
34
  "lint:md": "markdownlint-cli2",
30
35
  "lint:md:fix": "markdownlint-cli2 --fix",
31
36
  "lint": "eslint src --config eslint.config.js",
@@ -35,41 +40,36 @@
35
40
  "textmode.js": ">=0.7.0"
36
41
  },
37
42
  "devDependencies": {
38
- "@commitlint/cli": "^20.3.1",
39
- "@commitlint/config-conventional": "^20.3.1",
43
+ "@commitlint/cli": "^20.5.0",
44
+ "@commitlint/config-conventional": "^20.5.0",
40
45
  "@eslint/js": "^9.39.4",
41
46
  "@mapwhit/glsl-minify": "^1.0.0",
42
47
  "@rollup/plugin-terser": "^0.4.4",
43
- "@semantic-release/commit-analyzer": "^13.0.1",
44
48
  "@semantic-release/exec": "^7.1.0",
45
- "@semantic-release/github": "^12.0.6",
46
- "@semantic-release/npm": "^13.1.5",
47
- "@semantic-release/release-notes-generator": "^14.1.0",
49
+ "@semantic-release/git": "^10.0.1",
48
50
  "@types/node": "^24.0.13",
49
51
  "eslint": "^9.39.2",
50
- "eslint-plugin-jsdoc": "^62.4.1",
51
- "globals": "^17.1.0",
52
+ "eslint-plugin-jsdoc": "^62.9.0",
53
+ "globals": "^17.5.0",
52
54
  "husky": "^9.1.7",
53
55
  "lint-staged": "^16.4.0",
54
- "markdownlint-cli2": "^0.20.0",
56
+ "markdownlint-cli2": "^0.22.1",
55
57
  "markdownlint-cli2-formatter-default": "^0.0.6",
56
- "prettier": "^3.7.4",
58
+ "prettier": "^3.8.3",
57
59
  "semantic-release": "^25.0.3",
58
- "textmode.js": "^0.12.0",
59
- "tslib": "^2.8.1",
60
- "typedoc": "^0.28.13",
60
+ "textmode.js": "^0.16.0",
61
+ "typedoc": "^0.28.19",
61
62
  "typedoc-plugin-frontmatter": "^1.3.1",
62
- "typedoc-plugin-markdown": "^4.9.0",
63
+ "typedoc-plugin-markdown": "^4.11.0",
63
64
  "typedoc-vitepress-theme": "^1.1.2",
64
65
  "typescript": "^5.9.2",
65
- "typescript-eslint": "^8.53.1",
66
+ "typescript-eslint": "^8.59.0",
66
67
  "vite": "^6.3.4"
67
68
  },
68
69
  "license": "MIT",
69
70
  "author": "humanbydefinition",
70
71
  "lint-staged": {
71
- "**/*.{ts,js,json,jsonc,html,css}": "prettier --write",
72
- ".*.{js,json,jsonc}": "prettier --write"
72
+ "*": "prettier --ignore-unknown --write"
73
73
  },
74
74
  "repository": {
75
75
  "type": "git",