asciify-engine 1.0.26 → 1.0.27
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/index.cjs +43 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +119 -1
- package/dist/index.d.ts +119 -1
- package/dist/index.js +42 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -592,6 +592,124 @@ declare function asciiText(source: HTMLImageElement | HTMLVideoElement | HTMLCan
|
|
|
592
592
|
*/
|
|
593
593
|
declare function asciiTextAnsi(source: HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, options?: Partial<AsciiOptions>, targetWidth?: number, targetHeight?: number): string;
|
|
594
594
|
|
|
595
|
+
/**
|
|
596
|
+
* text-frame.ts — Build and render ASCII frames from tiling text patterns.
|
|
597
|
+
*
|
|
598
|
+
* Enables interactive text backgrounds with the full hover-effect system
|
|
599
|
+
* (spotlight, magnify, repel, glow, colorShift, …) without needing an image
|
|
600
|
+
* source.
|
|
601
|
+
*
|
|
602
|
+
* @example — basic usage
|
|
603
|
+
* ```ts
|
|
604
|
+
* import { renderTextBackground } from 'asciify-engine';
|
|
605
|
+
*
|
|
606
|
+
* function tick(ctx, w, h, mousePos) {
|
|
607
|
+
* renderTextBackground(ctx, w, h, 'asciify·engine·v1·', {
|
|
608
|
+
* hoverEffect: 'spotlight',
|
|
609
|
+
* hoverColor: '#d4ff00',
|
|
610
|
+
* }, mousePos);
|
|
611
|
+
* requestAnimationFrame(() => tick(ctx, w, h, mousePos));
|
|
612
|
+
* }
|
|
613
|
+
* ```
|
|
614
|
+
*
|
|
615
|
+
* @example — build the frame yourself and pass it to renderFrameToCanvas
|
|
616
|
+
* ```ts
|
|
617
|
+
* import { buildTextFrame, renderFrameToCanvas, DEFAULT_OPTIONS } from 'asciify-engine';
|
|
618
|
+
*
|
|
619
|
+
* const frame = buildTextFrame('hello world · ', 80, 24);
|
|
620
|
+
* renderFrameToCanvas(ctx, frame, {
|
|
621
|
+
* ...DEFAULT_OPTIONS,
|
|
622
|
+
* hoverEffect: 'repel',
|
|
623
|
+
* hoverStrength: 0.9,
|
|
624
|
+
* hoverColor: '#a0e8ff',
|
|
625
|
+
* }, width, height, 0, mousePos);
|
|
626
|
+
* ```
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
interface TextBackgroundOptions {
|
|
630
|
+
/**
|
|
631
|
+
* Character size in pixels.
|
|
632
|
+
* Controls the grid density: smaller → more cells, finer text.
|
|
633
|
+
* @default 10
|
|
634
|
+
*/
|
|
635
|
+
fontSize?: number;
|
|
636
|
+
/**
|
|
637
|
+
* Line-height multiplier applied on top of `fontSize` to derive row height.
|
|
638
|
+
* Matches the default monospace aspect ratio used by the renderer.
|
|
639
|
+
* @default 1.6
|
|
640
|
+
*/
|
|
641
|
+
lineHeight?: number;
|
|
642
|
+
/**
|
|
643
|
+
* Base colour for the text cells (inactive state).
|
|
644
|
+
* Accepts any CSS hex or rgb string.
|
|
645
|
+
* @default '#505050'
|
|
646
|
+
*/
|
|
647
|
+
color?: string;
|
|
648
|
+
/**
|
|
649
|
+
* Base alpha for the text cells, 0–255.
|
|
650
|
+
* @default 100
|
|
651
|
+
*/
|
|
652
|
+
opacity?: number;
|
|
653
|
+
/**
|
|
654
|
+
* Which hover effect to activate when `hoverPos` is supplied.
|
|
655
|
+
* @default 'spotlight'
|
|
656
|
+
*/
|
|
657
|
+
hoverEffect?: HoverEffect;
|
|
658
|
+
/**
|
|
659
|
+
* Intensity of the hover distortion / glow, 0–1.
|
|
660
|
+
* @default 0.85
|
|
661
|
+
*/
|
|
662
|
+
hoverStrength?: number;
|
|
663
|
+
/**
|
|
664
|
+
* Normalised radius of the hover influence zone, 0–1.
|
|
665
|
+
* @default 0.18
|
|
666
|
+
*/
|
|
667
|
+
hoverRadius?: number;
|
|
668
|
+
/**
|
|
669
|
+
* Accent colour applied by the hover effect.
|
|
670
|
+
* @default '#d4ff00'
|
|
671
|
+
*/
|
|
672
|
+
hoverColor?: string;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Build an `AsciiFrame` filled with a tiling text pattern.
|
|
676
|
+
*
|
|
677
|
+
* The `text` string is repeated (wrapping at column boundaries) across every
|
|
678
|
+
* cell of the `cols × rows` grid. Each cell carries the supplied base colour
|
|
679
|
+
* and opacity as `{r, g, b, a}` values.
|
|
680
|
+
*
|
|
681
|
+
* The returned frame can be passed directly to `renderFrameToCanvas` with any
|
|
682
|
+
* `AsciiOptions` including hover effects.
|
|
683
|
+
*
|
|
684
|
+
* @param text - Pattern string to tile across the grid (e.g. `'hello · '`)
|
|
685
|
+
* @param cols - Number of character columns
|
|
686
|
+
* @param rows - Number of character rows
|
|
687
|
+
* @param color - Base RGB colour string for the cells (default: `'#505050'`)
|
|
688
|
+
* @param opacity - Base alpha 0–255 (default: `100`)
|
|
689
|
+
*/
|
|
690
|
+
declare function buildTextFrame(text: string, cols: number, rows: number, color?: string, opacity?: number): AsciiFrame;
|
|
691
|
+
/**
|
|
692
|
+
* All-in-one: build a tiling text grid and render it to a canvas with the
|
|
693
|
+
* full hover-effect system (spotlight, magnify, repel, glow, colorShift, …).
|
|
694
|
+
*
|
|
695
|
+
* Call this inside a `requestAnimationFrame` loop, passing updated `hoverPos`
|
|
696
|
+
* each frame to get smooth interactive effects.
|
|
697
|
+
*
|
|
698
|
+
* @param ctx - 2D rendering context of the target canvas
|
|
699
|
+
* @param width - Canvas logical width in pixels
|
|
700
|
+
* @param height - Canvas logical height in pixels
|
|
701
|
+
* @param text - Pattern string to tile (e.g. `'asciify·engine·v1·'`)
|
|
702
|
+
* @param options - {@link TextBackgroundOptions}
|
|
703
|
+
* @param hoverPos - Normalised mouse position `{x, y}` in 0–1 range,
|
|
704
|
+
* optionally with an `intensity` multiplier (0–1).
|
|
705
|
+
* Pass `null` or omit to render without hover.
|
|
706
|
+
*/
|
|
707
|
+
declare function renderTextBackground(ctx: CanvasRenderingContext2D, width: number, height: number, text: string, options?: TextBackgroundOptions, hoverPos?: {
|
|
708
|
+
x: number;
|
|
709
|
+
y: number;
|
|
710
|
+
intensity?: number;
|
|
711
|
+
} | null): void;
|
|
712
|
+
|
|
595
713
|
/**
|
|
596
714
|
* record() — capture a rolling frame buffer from a running ASCII canvas
|
|
597
715
|
* and export it as a downloadable animated GIF or WebP data URL.
|
|
@@ -671,4 +789,4 @@ interface WebGLRenderer {
|
|
|
671
789
|
*/
|
|
672
790
|
declare function tryCreateWebGLRenderer(canvas: HTMLCanvasElement): WebGLRenderer | null;
|
|
673
791
|
|
|
674
|
-
export { ART_STYLE_PRESETS, type AnimationStyle, type ArtStyle, type AsciiBackgroundOptions, type AsciiCell, type AsciiFrame, type AsciiOptions, type AsciiResult, type AsciifySimpleOptions, type AuroraBackgroundOptions, CHARSETS, type CharsetKey, type CircuitBackgroundOptions, type ColorMode, DEFAULT_OPTIONS, type DnaBackgroundOptions, type FireBackgroundOptions, type GridBackgroundOptions, HOVER_PRESETS, type HoverEffect, type HoverPreset, type MorphBackgroundOptions, type MountWaveOptions, type NoiseBackgroundOptions, PALETTE_THEMES, type PaletteTheme, type PulseBackgroundOptions, type RainBackgroundOptions, type Recorder, type RecorderOptions, type RenderMode, type SilkBackgroundOptions, type SourceType, type StarsBackgroundOptions, type TerrainBackgroundOptions, type VoidBackgroundOptions, type WaveBackgroundOptions, type WebGLRenderer, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
|
792
|
+
export { ART_STYLE_PRESETS, type AnimationStyle, type ArtStyle, type AsciiBackgroundOptions, type AsciiCell, type AsciiFrame, type AsciiOptions, type AsciiResult, type AsciifySimpleOptions, type AuroraBackgroundOptions, CHARSETS, type CharsetKey, type CircuitBackgroundOptions, type ColorMode, DEFAULT_OPTIONS, type DnaBackgroundOptions, type FireBackgroundOptions, type GridBackgroundOptions, HOVER_PRESETS, type HoverEffect, type HoverPreset, type MorphBackgroundOptions, type MountWaveOptions, type NoiseBackgroundOptions, PALETTE_THEMES, type PaletteTheme, type PulseBackgroundOptions, type RainBackgroundOptions, type Recorder, type RecorderOptions, type RenderMode, type SilkBackgroundOptions, type SourceType, type StarsBackgroundOptions, type TerrainBackgroundOptions, type TextBackgroundOptions, type VoidBackgroundOptions, type WaveBackgroundOptions, type WebGLRenderer, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, buildTextFrame, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderTextBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
package/dist/index.d.ts
CHANGED
|
@@ -592,6 +592,124 @@ declare function asciiText(source: HTMLImageElement | HTMLVideoElement | HTMLCan
|
|
|
592
592
|
*/
|
|
593
593
|
declare function asciiTextAnsi(source: HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, options?: Partial<AsciiOptions>, targetWidth?: number, targetHeight?: number): string;
|
|
594
594
|
|
|
595
|
+
/**
|
|
596
|
+
* text-frame.ts — Build and render ASCII frames from tiling text patterns.
|
|
597
|
+
*
|
|
598
|
+
* Enables interactive text backgrounds with the full hover-effect system
|
|
599
|
+
* (spotlight, magnify, repel, glow, colorShift, …) without needing an image
|
|
600
|
+
* source.
|
|
601
|
+
*
|
|
602
|
+
* @example — basic usage
|
|
603
|
+
* ```ts
|
|
604
|
+
* import { renderTextBackground } from 'asciify-engine';
|
|
605
|
+
*
|
|
606
|
+
* function tick(ctx, w, h, mousePos) {
|
|
607
|
+
* renderTextBackground(ctx, w, h, 'asciify·engine·v1·', {
|
|
608
|
+
* hoverEffect: 'spotlight',
|
|
609
|
+
* hoverColor: '#d4ff00',
|
|
610
|
+
* }, mousePos);
|
|
611
|
+
* requestAnimationFrame(() => tick(ctx, w, h, mousePos));
|
|
612
|
+
* }
|
|
613
|
+
* ```
|
|
614
|
+
*
|
|
615
|
+
* @example — build the frame yourself and pass it to renderFrameToCanvas
|
|
616
|
+
* ```ts
|
|
617
|
+
* import { buildTextFrame, renderFrameToCanvas, DEFAULT_OPTIONS } from 'asciify-engine';
|
|
618
|
+
*
|
|
619
|
+
* const frame = buildTextFrame('hello world · ', 80, 24);
|
|
620
|
+
* renderFrameToCanvas(ctx, frame, {
|
|
621
|
+
* ...DEFAULT_OPTIONS,
|
|
622
|
+
* hoverEffect: 'repel',
|
|
623
|
+
* hoverStrength: 0.9,
|
|
624
|
+
* hoverColor: '#a0e8ff',
|
|
625
|
+
* }, width, height, 0, mousePos);
|
|
626
|
+
* ```
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
interface TextBackgroundOptions {
|
|
630
|
+
/**
|
|
631
|
+
* Character size in pixels.
|
|
632
|
+
* Controls the grid density: smaller → more cells, finer text.
|
|
633
|
+
* @default 10
|
|
634
|
+
*/
|
|
635
|
+
fontSize?: number;
|
|
636
|
+
/**
|
|
637
|
+
* Line-height multiplier applied on top of `fontSize` to derive row height.
|
|
638
|
+
* Matches the default monospace aspect ratio used by the renderer.
|
|
639
|
+
* @default 1.6
|
|
640
|
+
*/
|
|
641
|
+
lineHeight?: number;
|
|
642
|
+
/**
|
|
643
|
+
* Base colour for the text cells (inactive state).
|
|
644
|
+
* Accepts any CSS hex or rgb string.
|
|
645
|
+
* @default '#505050'
|
|
646
|
+
*/
|
|
647
|
+
color?: string;
|
|
648
|
+
/**
|
|
649
|
+
* Base alpha for the text cells, 0–255.
|
|
650
|
+
* @default 100
|
|
651
|
+
*/
|
|
652
|
+
opacity?: number;
|
|
653
|
+
/**
|
|
654
|
+
* Which hover effect to activate when `hoverPos` is supplied.
|
|
655
|
+
* @default 'spotlight'
|
|
656
|
+
*/
|
|
657
|
+
hoverEffect?: HoverEffect;
|
|
658
|
+
/**
|
|
659
|
+
* Intensity of the hover distortion / glow, 0–1.
|
|
660
|
+
* @default 0.85
|
|
661
|
+
*/
|
|
662
|
+
hoverStrength?: number;
|
|
663
|
+
/**
|
|
664
|
+
* Normalised radius of the hover influence zone, 0–1.
|
|
665
|
+
* @default 0.18
|
|
666
|
+
*/
|
|
667
|
+
hoverRadius?: number;
|
|
668
|
+
/**
|
|
669
|
+
* Accent colour applied by the hover effect.
|
|
670
|
+
* @default '#d4ff00'
|
|
671
|
+
*/
|
|
672
|
+
hoverColor?: string;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Build an `AsciiFrame` filled with a tiling text pattern.
|
|
676
|
+
*
|
|
677
|
+
* The `text` string is repeated (wrapping at column boundaries) across every
|
|
678
|
+
* cell of the `cols × rows` grid. Each cell carries the supplied base colour
|
|
679
|
+
* and opacity as `{r, g, b, a}` values.
|
|
680
|
+
*
|
|
681
|
+
* The returned frame can be passed directly to `renderFrameToCanvas` with any
|
|
682
|
+
* `AsciiOptions` including hover effects.
|
|
683
|
+
*
|
|
684
|
+
* @param text - Pattern string to tile across the grid (e.g. `'hello · '`)
|
|
685
|
+
* @param cols - Number of character columns
|
|
686
|
+
* @param rows - Number of character rows
|
|
687
|
+
* @param color - Base RGB colour string for the cells (default: `'#505050'`)
|
|
688
|
+
* @param opacity - Base alpha 0–255 (default: `100`)
|
|
689
|
+
*/
|
|
690
|
+
declare function buildTextFrame(text: string, cols: number, rows: number, color?: string, opacity?: number): AsciiFrame;
|
|
691
|
+
/**
|
|
692
|
+
* All-in-one: build a tiling text grid and render it to a canvas with the
|
|
693
|
+
* full hover-effect system (spotlight, magnify, repel, glow, colorShift, …).
|
|
694
|
+
*
|
|
695
|
+
* Call this inside a `requestAnimationFrame` loop, passing updated `hoverPos`
|
|
696
|
+
* each frame to get smooth interactive effects.
|
|
697
|
+
*
|
|
698
|
+
* @param ctx - 2D rendering context of the target canvas
|
|
699
|
+
* @param width - Canvas logical width in pixels
|
|
700
|
+
* @param height - Canvas logical height in pixels
|
|
701
|
+
* @param text - Pattern string to tile (e.g. `'asciify·engine·v1·'`)
|
|
702
|
+
* @param options - {@link TextBackgroundOptions}
|
|
703
|
+
* @param hoverPos - Normalised mouse position `{x, y}` in 0–1 range,
|
|
704
|
+
* optionally with an `intensity` multiplier (0–1).
|
|
705
|
+
* Pass `null` or omit to render without hover.
|
|
706
|
+
*/
|
|
707
|
+
declare function renderTextBackground(ctx: CanvasRenderingContext2D, width: number, height: number, text: string, options?: TextBackgroundOptions, hoverPos?: {
|
|
708
|
+
x: number;
|
|
709
|
+
y: number;
|
|
710
|
+
intensity?: number;
|
|
711
|
+
} | null): void;
|
|
712
|
+
|
|
595
713
|
/**
|
|
596
714
|
* record() — capture a rolling frame buffer from a running ASCII canvas
|
|
597
715
|
* and export it as a downloadable animated GIF or WebP data URL.
|
|
@@ -671,4 +789,4 @@ interface WebGLRenderer {
|
|
|
671
789
|
*/
|
|
672
790
|
declare function tryCreateWebGLRenderer(canvas: HTMLCanvasElement): WebGLRenderer | null;
|
|
673
791
|
|
|
674
|
-
export { ART_STYLE_PRESETS, type AnimationStyle, type ArtStyle, type AsciiBackgroundOptions, type AsciiCell, type AsciiFrame, type AsciiOptions, type AsciiResult, type AsciifySimpleOptions, type AuroraBackgroundOptions, CHARSETS, type CharsetKey, type CircuitBackgroundOptions, type ColorMode, DEFAULT_OPTIONS, type DnaBackgroundOptions, type FireBackgroundOptions, type GridBackgroundOptions, HOVER_PRESETS, type HoverEffect, type HoverPreset, type MorphBackgroundOptions, type MountWaveOptions, type NoiseBackgroundOptions, PALETTE_THEMES, type PaletteTheme, type PulseBackgroundOptions, type RainBackgroundOptions, type Recorder, type RecorderOptions, type RenderMode, type SilkBackgroundOptions, type SourceType, type StarsBackgroundOptions, type TerrainBackgroundOptions, type VoidBackgroundOptions, type WaveBackgroundOptions, type WebGLRenderer, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
|
792
|
+
export { ART_STYLE_PRESETS, type AnimationStyle, type ArtStyle, type AsciiBackgroundOptions, type AsciiCell, type AsciiFrame, type AsciiOptions, type AsciiResult, type AsciifySimpleOptions, type AuroraBackgroundOptions, CHARSETS, type CharsetKey, type CircuitBackgroundOptions, type ColorMode, DEFAULT_OPTIONS, type DnaBackgroundOptions, type FireBackgroundOptions, type GridBackgroundOptions, HOVER_PRESETS, type HoverEffect, type HoverPreset, type MorphBackgroundOptions, type MountWaveOptions, type NoiseBackgroundOptions, PALETTE_THEMES, type PaletteTheme, type PulseBackgroundOptions, type RainBackgroundOptions, type Recorder, type RecorderOptions, type RenderMode, type SilkBackgroundOptions, type SourceType, type StarsBackgroundOptions, type TerrainBackgroundOptions, type TextBackgroundOptions, type VoidBackgroundOptions, type WaveBackgroundOptions, type WebGLRenderer, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, buildTextFrame, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderTextBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
package/dist/index.js
CHANGED
|
@@ -2234,6 +2234,47 @@ function asciiTextAnsi(source, options = {}, targetWidth, targetHeight) {
|
|
|
2234
2234
|
return lines.join("\n");
|
|
2235
2235
|
}
|
|
2236
2236
|
|
|
2237
|
+
// src/core/text-frame.ts
|
|
2238
|
+
function buildTextFrame(text, cols, rows, color = "#505050", opacity = 100) {
|
|
2239
|
+
if (!text || cols <= 0 || rows <= 0) return [];
|
|
2240
|
+
const parsed = parseColor(color) ?? { r: 80, g: 80, b: 80 };
|
|
2241
|
+
const pattern = text;
|
|
2242
|
+
const len = pattern.length;
|
|
2243
|
+
return Array.from(
|
|
2244
|
+
{ length: rows },
|
|
2245
|
+
(_, row) => Array.from({ length: cols }, (_2, col) => ({
|
|
2246
|
+
char: pattern[(row * cols + col) % len],
|
|
2247
|
+
r: parsed.r,
|
|
2248
|
+
g: parsed.g,
|
|
2249
|
+
b: parsed.b,
|
|
2250
|
+
a: opacity
|
|
2251
|
+
}))
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
function renderTextBackground(ctx, width, height, text, options = {}, hoverPos) {
|
|
2255
|
+
const {
|
|
2256
|
+
fontSize = 10,
|
|
2257
|
+
lineHeight = 1.6,
|
|
2258
|
+
color = "#505050",
|
|
2259
|
+
opacity = 100,
|
|
2260
|
+
hoverEffect = "spotlight",
|
|
2261
|
+
hoverStrength = 0.85,
|
|
2262
|
+
hoverRadius = 0.18,
|
|
2263
|
+
hoverColor = "#d4ff00"
|
|
2264
|
+
} = options;
|
|
2265
|
+
const cols = Math.max(1, Math.floor(width / fontSize));
|
|
2266
|
+
const rows = Math.max(1, Math.floor(height / (fontSize * lineHeight)));
|
|
2267
|
+
const frame = buildTextFrame(text, cols, rows, color, opacity);
|
|
2268
|
+
const renderOpts = {
|
|
2269
|
+
...DEFAULT_OPTIONS,
|
|
2270
|
+
hoverEffect,
|
|
2271
|
+
hoverStrength,
|
|
2272
|
+
hoverRadius,
|
|
2273
|
+
hoverColor
|
|
2274
|
+
};
|
|
2275
|
+
renderFrameToCanvas(ctx, frame, renderOpts, width, height, 0, hoverPos ?? null);
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2237
2278
|
// src/core/record.ts
|
|
2238
2279
|
function createRecorder(canvas, options = {}) {
|
|
2239
2280
|
const {
|
|
@@ -2823,6 +2864,6 @@ function tryCreateWebGLRenderer(canvas) {
|
|
|
2823
2864
|
}
|
|
2824
2865
|
}
|
|
2825
2866
|
|
|
2826
|
-
export { ART_STYLE_PRESETS, CHARSETS, DEFAULT_OPTIONS, HOVER_PRESETS, PALETTE_THEMES, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
|
2867
|
+
export { ART_STYLE_PRESETS, CHARSETS, DEFAULT_OPTIONS, HOVER_PRESETS, PALETTE_THEMES, asciiBackground, asciiText, asciiTextAnsi, asciify, asciifyGif, asciifyVideo, buildTextFrame, createRecorder, gifToAsciiFrames, imageToAsciiFrame, mountWaveBackground, recordAndDownload, renderAuroraBackground, renderCircuitBackground, renderDnaBackground, renderFireBackground, renderFrameToCanvas, renderGridBackground, renderMorphBackground, renderNoiseBackground, renderPulseBackground, renderRainBackground, renderSilkBackground, renderStarsBackground, renderTerrainBackground, renderTextBackground, renderVoidBackground, renderWaveBackground, tryCreateWebGLRenderer, videoToAsciiFrames };
|
|
2827
2868
|
//# sourceMappingURL=index.js.map
|
|
2828
2869
|
//# sourceMappingURL=index.js.map
|