@kya-os/cli 0.1.0-beta.6 → 0.1.0-beta.8
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/README.md +210 -34
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +28 -6
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/cli-experience-demo-simple.d.ts +14 -0
- package/dist/commands/cli-experience-demo-simple.d.ts.map +1 -0
- package/dist/commands/cli-experience-demo-simple.js +119 -0
- package/dist/commands/cli-experience-demo-simple.js.map +1 -0
- package/dist/commands/cli-experience-demo.d.ts +14 -0
- package/dist/commands/cli-experience-demo.d.ts.map +1 -0
- package/dist/commands/cli-experience-demo.js +172 -0
- package/dist/commands/cli-experience-demo.js.map +1 -0
- package/dist/commands/effects-demo.d.ts +10 -0
- package/dist/commands/effects-demo.d.ts.map +1 -0
- package/dist/commands/effects-demo.js +292 -0
- package/dist/commands/effects-demo.js.map +1 -0
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +12 -2
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +295 -136
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/rotate.d.ts.map +1 -1
- package/dist/commands/rotate.js +19 -3
- package/dist/commands/rotate.js.map +1 -1
- package/dist/dev.d.ts +7 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +9 -0
- package/dist/dev.js.map +1 -0
- package/dist/effects/__tests__/effects.test.d.ts +5 -0
- package/dist/effects/__tests__/effects.test.d.ts.map +1 -0
- package/dist/effects/__tests__/effects.test.js +206 -0
- package/dist/effects/__tests__/effects.test.js.map +1 -0
- package/dist/effects/animation-engine.d.ts +173 -0
- package/dist/effects/animation-engine.d.ts.map +1 -0
- package/dist/effects/animation-engine.js +254 -0
- package/dist/effects/animation-engine.js.map +1 -0
- package/dist/effects/cli-integration.d.ts +86 -0
- package/dist/effects/cli-integration.d.ts.map +1 -0
- package/dist/effects/cli-integration.js +309 -0
- package/dist/effects/cli-integration.js.map +1 -0
- package/dist/effects/config.d.ts +95 -0
- package/dist/effects/config.d.ts.map +1 -0
- package/dist/effects/config.js +216 -0
- package/dist/effects/config.js.map +1 -0
- package/dist/effects/effect-runner.d.ts +69 -0
- package/dist/effects/effect-runner.d.ts.map +1 -0
- package/dist/effects/effect-runner.js +255 -0
- package/dist/effects/effect-runner.js.map +1 -0
- package/dist/effects/gradient.d.ts +131 -0
- package/dist/effects/gradient.d.ts.map +1 -0
- package/dist/effects/gradient.js +236 -0
- package/dist/effects/gradient.js.map +1 -0
- package/dist/effects/implementations/beams.d.ts +80 -0
- package/dist/effects/implementations/beams.d.ts.map +1 -0
- package/dist/effects/implementations/beams.js +221 -0
- package/dist/effects/implementations/beams.js.map +1 -0
- package/dist/effects/implementations/binary-path.d.ts +88 -0
- package/dist/effects/implementations/binary-path.d.ts.map +1 -0
- package/dist/effects/implementations/binary-path.js +296 -0
- package/dist/effects/implementations/binary-path.js.map +1 -0
- package/dist/effects/implementations/blackhole.d.ts +98 -0
- package/dist/effects/implementations/blackhole.d.ts.map +1 -0
- package/dist/effects/implementations/blackhole.js +394 -0
- package/dist/effects/implementations/blackhole.js.map +1 -0
- package/dist/effects/implementations/burn.d.ts +74 -0
- package/dist/effects/implementations/burn.d.ts.map +1 -0
- package/dist/effects/implementations/burn.js +234 -0
- package/dist/effects/implementations/burn.js.map +1 -0
- package/dist/effects/implementations/decrypt.d.ts +115 -0
- package/dist/effects/implementations/decrypt.d.ts.map +1 -0
- package/dist/effects/implementations/decrypt.js +394 -0
- package/dist/effects/implementations/decrypt.js.map +1 -0
- package/dist/effects/implementations/test.d.ts +113 -0
- package/dist/effects/implementations/test.d.ts.map +1 -0
- package/dist/effects/implementations/test.js +552 -0
- package/dist/effects/implementations/test.js.map +1 -0
- package/dist/effects/implementations/waves.d.ts +78 -0
- package/dist/effects/implementations/waves.d.ts.map +1 -0
- package/dist/effects/implementations/waves.js +278 -0
- package/dist/effects/implementations/waves.js.map +1 -0
- package/dist/effects/index.d.ts +37 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +79 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/effects/motion-engine.d.ts +168 -0
- package/dist/effects/motion-engine.d.ts.map +1 -0
- package/dist/effects/motion-engine.js +353 -0
- package/dist/effects/motion-engine.js.map +1 -0
- package/dist/effects/safe-executor.d.ts +55 -0
- package/dist/effects/safe-executor.d.ts.map +1 -0
- package/dist/effects/safe-executor.js +210 -0
- package/dist/effects/safe-executor.js.map +1 -0
- package/dist/effects/template/effect-template.d.ts +97 -0
- package/dist/effects/template/effect-template.d.ts.map +1 -0
- package/dist/effects/template/effect-template.js +208 -0
- package/dist/effects/template/effect-template.js.map +1 -0
- package/dist/effects/types.d.ts +199 -0
- package/dist/effects/types.d.ts.map +1 -0
- package/dist/effects/types.js +80 -0
- package/dist/effects/types.js.map +1 -0
- package/dist/effects/utils.d.ts +104 -0
- package/dist/effects/utils.d.ts.map +1 -0
- package/dist/effects/utils.js +280 -0
- package/dist/effects/utils.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -42
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Beams Effect
|
|
3
|
+
* Creates beams which travel over the canvas illuminating the characters
|
|
4
|
+
*/
|
|
5
|
+
import { BaseEffect } from "../types.js";
|
|
6
|
+
import { ANSI, easeInOutSine } from "../utils.js";
|
|
7
|
+
/**
|
|
8
|
+
* Beams effect implementation
|
|
9
|
+
*/
|
|
10
|
+
export class BeamsEffect extends BaseEffect {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
super();
|
|
13
|
+
this.name = "Beams";
|
|
14
|
+
this.description = "Creates beams which travel over the canvas illuminating the characters";
|
|
15
|
+
this.beams = [];
|
|
16
|
+
this.animationFrameCount = 0;
|
|
17
|
+
this.totalFrames = 0;
|
|
18
|
+
this.nextBeamId = 0;
|
|
19
|
+
this.lastBeamSpawn = 0;
|
|
20
|
+
this._isEffectComplete = false;
|
|
21
|
+
this.options = {
|
|
22
|
+
duration: 5000,
|
|
23
|
+
beamCount: 8,
|
|
24
|
+
beamWidth: 5,
|
|
25
|
+
beamSpeedRange: [1.0, 3.0],
|
|
26
|
+
beamColors: ["ffffff", "00D1FF", "8A008A"],
|
|
27
|
+
illuminationBrightness: 2.0,
|
|
28
|
+
baseColor: "202020",
|
|
29
|
+
...options,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Initialize the effect
|
|
34
|
+
*/
|
|
35
|
+
onInitialize() {
|
|
36
|
+
this.totalFrames = Math.floor((this.options.duration / 1000) * this.config.frameRate);
|
|
37
|
+
this.beams = [];
|
|
38
|
+
this.animationFrameCount = 0;
|
|
39
|
+
this.nextBeamId = 0;
|
|
40
|
+
this.lastBeamSpawn = 0;
|
|
41
|
+
this._isEffectComplete = false;
|
|
42
|
+
// Set base color for all characters
|
|
43
|
+
for (const char of this.characters) {
|
|
44
|
+
char.visual.colors.fg = this.options.baseColor;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Render the next frame
|
|
49
|
+
*/
|
|
50
|
+
async render() {
|
|
51
|
+
if (!this.isInitialized) {
|
|
52
|
+
throw new Error("Effect not initialized");
|
|
53
|
+
}
|
|
54
|
+
// Update beams
|
|
55
|
+
this.updateBeams();
|
|
56
|
+
// Render text with beam effects line by line
|
|
57
|
+
const lines = this.text.split("\n");
|
|
58
|
+
const renderedLines = [];
|
|
59
|
+
for (let y = 0; y < lines.length; y++) {
|
|
60
|
+
let line = "";
|
|
61
|
+
const chars = [...lines[y]];
|
|
62
|
+
for (let x = 0; x < chars.length; x++) {
|
|
63
|
+
const char = chars[x];
|
|
64
|
+
let color = this.options.baseColor;
|
|
65
|
+
// Check if character is illuminated by any beam
|
|
66
|
+
for (const beam of this.beams) {
|
|
67
|
+
if (!beam.active)
|
|
68
|
+
continue;
|
|
69
|
+
const distance = beam.direction === "horizontal"
|
|
70
|
+
? Math.abs(y - beam.position.y)
|
|
71
|
+
: Math.abs(x - beam.position.x);
|
|
72
|
+
if (distance <= beam.width) {
|
|
73
|
+
const intensity = 1 - distance / beam.width;
|
|
74
|
+
const easedIntensity = easeInOutSine(intensity);
|
|
75
|
+
const beamColor = this.getBeamColor(beam);
|
|
76
|
+
color = this.applyIllumination(color, beamColor, easedIntensity);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const colorCode = this.getColorCode(color);
|
|
80
|
+
const resetCode = ANSI.reset;
|
|
81
|
+
line += colorCode + char + resetCode;
|
|
82
|
+
}
|
|
83
|
+
renderedLines.push(line);
|
|
84
|
+
}
|
|
85
|
+
this.animationFrameCount++;
|
|
86
|
+
return renderedLines;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Update beam positions and states
|
|
90
|
+
*/
|
|
91
|
+
updateBeams() {
|
|
92
|
+
const dimensions = this.getCanvasDimensions();
|
|
93
|
+
const spawnInterval = Math.floor(this.totalFrames / (this.options.beamCount * 3));
|
|
94
|
+
// Spawn new beams more frequently
|
|
95
|
+
if (this.beams.filter(b => b.active).length < this.options.beamCount &&
|
|
96
|
+
this.animationFrameCount - this.lastBeamSpawn > spawnInterval &&
|
|
97
|
+
this.animationFrameCount < this.totalFrames * 0.8) {
|
|
98
|
+
this.spawnBeam();
|
|
99
|
+
this.lastBeamSpawn = this.animationFrameCount;
|
|
100
|
+
}
|
|
101
|
+
// Update existing beams
|
|
102
|
+
for (const beam of this.beams) {
|
|
103
|
+
if (!beam.active)
|
|
104
|
+
continue;
|
|
105
|
+
// Update position based on direction
|
|
106
|
+
if (beam.direction === "horizontal") {
|
|
107
|
+
beam.position.x += beam.speed;
|
|
108
|
+
// Deactivate if off screen
|
|
109
|
+
if (beam.position.x > dimensions.width + beam.width) {
|
|
110
|
+
beam.active = false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
beam.position.y += beam.speed;
|
|
115
|
+
// Deactivate if off screen
|
|
116
|
+
if (beam.position.y > dimensions.height + beam.width) {
|
|
117
|
+
beam.active = false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// Check if effect is complete
|
|
122
|
+
const activeBeams = this.beams.filter((b) => b.active).length;
|
|
123
|
+
this._isEffectComplete =
|
|
124
|
+
activeBeams === 0 && this.animationFrameCount >= this.totalFrames * 0.8;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Spawn a new beam
|
|
128
|
+
*/
|
|
129
|
+
spawnBeam() {
|
|
130
|
+
const dimensions = this.getCanvasDimensions();
|
|
131
|
+
const isHorizontal = Math.random() > 0.5;
|
|
132
|
+
const beam = {
|
|
133
|
+
id: this.nextBeamId++,
|
|
134
|
+
position: {
|
|
135
|
+
x: isHorizontal
|
|
136
|
+
? -this.options.beamWidth
|
|
137
|
+
: Math.random() * dimensions.width,
|
|
138
|
+
y: isHorizontal
|
|
139
|
+
? Math.random() * dimensions.height
|
|
140
|
+
: -this.options.beamWidth,
|
|
141
|
+
},
|
|
142
|
+
direction: isHorizontal ? "horizontal" : "vertical",
|
|
143
|
+
speed: this.options.beamSpeedRange[0] +
|
|
144
|
+
Math.random() *
|
|
145
|
+
(this.options.beamSpeedRange[1] - this.options.beamSpeedRange[0]),
|
|
146
|
+
width: this.options.beamWidth,
|
|
147
|
+
progress: 0,
|
|
148
|
+
active: true,
|
|
149
|
+
};
|
|
150
|
+
this.beams.push(beam);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get beam color based on its properties
|
|
154
|
+
*/
|
|
155
|
+
getBeamColor(beam) {
|
|
156
|
+
// Cycle through colors based on beam ID
|
|
157
|
+
const colorIndex = beam.id % this.options.beamColors.length;
|
|
158
|
+
return this.options.beamColors[colorIndex];
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Apply illumination to a base color
|
|
162
|
+
*/
|
|
163
|
+
applyIllumination(baseColor, beamColor, intensity) {
|
|
164
|
+
// Parse colors
|
|
165
|
+
const baseR = parseInt(baseColor.substring(0, 2), 16);
|
|
166
|
+
const baseG = parseInt(baseColor.substring(2, 4), 16);
|
|
167
|
+
const baseB = parseInt(baseColor.substring(4, 6), 16);
|
|
168
|
+
const beamR = parseInt(beamColor.substring(0, 2), 16);
|
|
169
|
+
const beamG = parseInt(beamColor.substring(2, 4), 16);
|
|
170
|
+
const beamB = parseInt(beamColor.substring(4, 6), 16);
|
|
171
|
+
// Apply illumination with brightness multiplier
|
|
172
|
+
const brightness = 1 + (this.options.illuminationBrightness - 1) * intensity;
|
|
173
|
+
const r = Math.min(255, Math.round(baseR + (beamR - baseR) * intensity * brightness));
|
|
174
|
+
const g = Math.min(255, Math.round(baseG + (beamG - baseG) * intensity * brightness));
|
|
175
|
+
const b = Math.min(255, Math.round(baseB + (beamB - baseB) * intensity * brightness));
|
|
176
|
+
return [r, g, b]
|
|
177
|
+
.map((c) => Math.max(0, Math.min(255, c)).toString(16).padStart(2, "0"))
|
|
178
|
+
.join("");
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Get ANSI color code for a color
|
|
182
|
+
*/
|
|
183
|
+
getColorCode(color) {
|
|
184
|
+
if (!color || this.config.noColor) {
|
|
185
|
+
return "";
|
|
186
|
+
}
|
|
187
|
+
// For RGB colors, convert to ANSI 24-bit color
|
|
188
|
+
if (typeof color === "string") {
|
|
189
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
190
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
191
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
192
|
+
return `\x1b[38;2;${r};${g};${b}m`;
|
|
193
|
+
}
|
|
194
|
+
// For XTerm colors
|
|
195
|
+
return `\x1b[38;5;${color}m`;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Render fallback for when effects are disabled
|
|
199
|
+
*/
|
|
200
|
+
renderFallback() {
|
|
201
|
+
return this.text.split("\n");
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Check if effect is complete
|
|
205
|
+
*/
|
|
206
|
+
isComplete() {
|
|
207
|
+
return this._isEffectComplete;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Reset the effect
|
|
211
|
+
*/
|
|
212
|
+
onReset() {
|
|
213
|
+
this.beams = [];
|
|
214
|
+
this.animationFrameCount = 0;
|
|
215
|
+
this.nextBeamId = 0;
|
|
216
|
+
this.lastBeamSpawn = 0;
|
|
217
|
+
this._isEffectComplete = false;
|
|
218
|
+
this.onInitialize();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=beams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beams.js","sourceRoot":"","sources":["../../../src/effects/implementations/beams.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAmClD;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU;IAazC,YAAY,UAA8B,EAAE;QAC1C,KAAK,EAAE,CAAC;QAbD,SAAI,GAAG,OAAO,CAAC;QACf,gBAAW,GAClB,wEAAwE,CAAC;QAGnE,UAAK,GAAW,EAAE,CAAC;QACnB,wBAAmB,GAAW,CAAC,CAAC;QAChC,gBAAW,GAAW,CAAC,CAAC;QACxB,eAAU,GAAW,CAAC,CAAC;QACvB,kBAAa,GAAW,CAAC,CAAC;QAC1B,sBAAiB,GAAY,KAAK,CAAC;QAIzC,IAAI,CAAC,OAAO,GAAG;YACb,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,CAAC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AK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QACrC,CAAC;QAED,mBAAmB;QACnB,OAAO,aAAa,KAAK,GAAG,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED;;OAEG;IACO,OAAO;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binary Path Effect
|
|
3
|
+
* Creates a binary rain effect that reveals characters
|
|
4
|
+
*/
|
|
5
|
+
import { BaseEffect } from "../types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for the Binary Path effect
|
|
8
|
+
*/
|
|
9
|
+
export interface BinaryPathEffectOptions {
|
|
10
|
+
/** Duration in milliseconds */
|
|
11
|
+
duration?: number;
|
|
12
|
+
/** Number of binary streams */
|
|
13
|
+
streamCount?: number;
|
|
14
|
+
/** Speed of binary fall */
|
|
15
|
+
fallSpeed?: number;
|
|
16
|
+
/** Binary colors (for 0 and 1) */
|
|
17
|
+
binaryColors?: [string, string];
|
|
18
|
+
/** Revealed character color */
|
|
19
|
+
revealColor?: string;
|
|
20
|
+
/** Fade duration for revealed characters */
|
|
21
|
+
fadeDuration?: number;
|
|
22
|
+
/** Probability of spawning new stream per frame */
|
|
23
|
+
spawnProbability?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Binary Path effect implementation
|
|
27
|
+
*/
|
|
28
|
+
export declare class BinaryPathEffect extends BaseEffect {
|
|
29
|
+
readonly name = "BinaryPath";
|
|
30
|
+
readonly description = "Creates a binary rain effect that reveals characters";
|
|
31
|
+
private options;
|
|
32
|
+
private streams;
|
|
33
|
+
private characterStates;
|
|
34
|
+
private animationFrameCount;
|
|
35
|
+
private totalFrames;
|
|
36
|
+
private nextStreamId;
|
|
37
|
+
private _isEffectComplete;
|
|
38
|
+
constructor(options?: BinaryPathEffectOptions);
|
|
39
|
+
/**
|
|
40
|
+
* Initialize the effect
|
|
41
|
+
*/
|
|
42
|
+
protected onInitialize(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Render the next frame
|
|
45
|
+
*/
|
|
46
|
+
render(): Promise<string[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Update stream positions and states
|
|
49
|
+
*/
|
|
50
|
+
private updateStreams;
|
|
51
|
+
/**
|
|
52
|
+
* Spawn a new binary stream
|
|
53
|
+
*/
|
|
54
|
+
private spawnStream;
|
|
55
|
+
/**
|
|
56
|
+
* Check if a stream collides with any characters
|
|
57
|
+
*/
|
|
58
|
+
private checkCharacterCollision;
|
|
59
|
+
/**
|
|
60
|
+
* Get color for a revealed character based on fade progress
|
|
61
|
+
*/
|
|
62
|
+
private getRevealedCharacterColor;
|
|
63
|
+
/**
|
|
64
|
+
* Apply fade to a color
|
|
65
|
+
*/
|
|
66
|
+
private applyFade;
|
|
67
|
+
/**
|
|
68
|
+
* Interpolate between two colors
|
|
69
|
+
*/
|
|
70
|
+
private interpolateColor;
|
|
71
|
+
/**
|
|
72
|
+
* Get ANSI color code for a color
|
|
73
|
+
*/
|
|
74
|
+
private getColorCode;
|
|
75
|
+
/**
|
|
76
|
+
* Render fallback for when effects are disabled
|
|
77
|
+
*/
|
|
78
|
+
renderFallback(): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Check if effect is complete
|
|
81
|
+
*/
|
|
82
|
+
isComplete(): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Reset the effect
|
|
85
|
+
*/
|
|
86
|
+
protected onReset(): void;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=binary-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-path.d.ts","sourceRoot":"","sources":["../../../src/effects/implementations/binary-path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAS,MAAM,aAAa,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAwBD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,0DAA0D;IAE9E,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,eAAe,CAAgD;IACvE,OAAO,CAAC,mBAAmB,CAAa;IACxC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,iBAAiB,CAAkB;gBAE/B,OAAO,GAAE,uBAA4B;IAcjD;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;IA0B9B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA+DjC;;OAEG;IACH,OAAO,CAAC,aAAa;IA0ErB;;OAEG;IACH,OAAO,CAAC,WAAW;IAgBnB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAuB/B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,SAAS;IAcjB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAsBxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAiBpB;;OAEG;IACH,cAAc,IAAI,MAAM,EAAE;IAI1B;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;CAQ1B"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binary Path Effect
|
|
3
|
+
* Creates a binary rain effect that reveals characters
|
|
4
|
+
*/
|
|
5
|
+
import { BaseEffect } from "../types.js";
|
|
6
|
+
import { ANSI } from "../utils.js";
|
|
7
|
+
/**
|
|
8
|
+
* Binary Path effect implementation
|
|
9
|
+
*/
|
|
10
|
+
export class BinaryPathEffect extends BaseEffect {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
super();
|
|
13
|
+
this.name = "BinaryPath";
|
|
14
|
+
this.description = "Creates a binary rain effect that reveals characters";
|
|
15
|
+
this.streams = [];
|
|
16
|
+
this.characterStates = new Map();
|
|
17
|
+
this.animationFrameCount = 0;
|
|
18
|
+
this.totalFrames = 0;
|
|
19
|
+
this.nextStreamId = 0;
|
|
20
|
+
this._isEffectComplete = false;
|
|
21
|
+
this.options = {
|
|
22
|
+
duration: 4000,
|
|
23
|
+
streamCount: 20,
|
|
24
|
+
fallSpeed: 0.5,
|
|
25
|
+
binaryColors: ["00FF00", "008800"],
|
|
26
|
+
revealColor: "FFFFFF",
|
|
27
|
+
fadeDuration: 500,
|
|
28
|
+
spawnProbability: 0.1,
|
|
29
|
+
...options,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Initialize the effect
|
|
34
|
+
*/
|
|
35
|
+
onInitialize() {
|
|
36
|
+
this.totalFrames = Math.floor((this.options.duration / 1000) * this.config.frameRate);
|
|
37
|
+
this.streams = [];
|
|
38
|
+
this.characterStates.clear();
|
|
39
|
+
this.animationFrameCount = 0;
|
|
40
|
+
this.nextStreamId = 0;
|
|
41
|
+
this._isEffectComplete = false;
|
|
42
|
+
// Initialize character states
|
|
43
|
+
for (const char of this.characters) {
|
|
44
|
+
const key = `${char.originalPosition.x},${char.originalPosition.y}`;
|
|
45
|
+
this.characterStates.set(key, {
|
|
46
|
+
revealed: false,
|
|
47
|
+
revealTime: -1,
|
|
48
|
+
fadeProgress: 0,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
// Hide all characters initially
|
|
52
|
+
for (const char of this.characters) {
|
|
53
|
+
char.visual.symbol = " ";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Render the next frame
|
|
58
|
+
*/
|
|
59
|
+
async render() {
|
|
60
|
+
if (!this.isInitialized) {
|
|
61
|
+
throw new Error("Effect not initialized");
|
|
62
|
+
}
|
|
63
|
+
// Update streams
|
|
64
|
+
this.updateStreams();
|
|
65
|
+
// Render text line by line
|
|
66
|
+
const lines = this.text.split("\n");
|
|
67
|
+
const renderedLines = [];
|
|
68
|
+
for (let y = 0; y < lines.length; y++) {
|
|
69
|
+
let line = "";
|
|
70
|
+
const chars = [...lines[y]];
|
|
71
|
+
for (let x = 0; x < chars.length; x++) {
|
|
72
|
+
const char = chars[x];
|
|
73
|
+
const key = `${x},${y}`;
|
|
74
|
+
const state = this.characterStates.get(key);
|
|
75
|
+
let renderedChar = " ";
|
|
76
|
+
let color = null;
|
|
77
|
+
// Check if character is revealed
|
|
78
|
+
if (state && state.revealed) {
|
|
79
|
+
renderedChar = char;
|
|
80
|
+
color = this.getRevealedCharacterColor(state);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// Check if there's a binary stream at this position
|
|
84
|
+
for (const stream of this.streams) {
|
|
85
|
+
if (!stream.active || stream.x !== x)
|
|
86
|
+
continue;
|
|
87
|
+
for (const segment of stream.trail) {
|
|
88
|
+
const segY = Math.floor(segment.y);
|
|
89
|
+
if (segY === y) {
|
|
90
|
+
renderedChar = segment.char;
|
|
91
|
+
const colorIndex = segment.char === "1" ? 0 : 1;
|
|
92
|
+
const baseColor = this.options.binaryColors[colorIndex];
|
|
93
|
+
color = this.applyFade(baseColor, segment.fade);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (color) {
|
|
100
|
+
const colorCode = this.getColorCode(color);
|
|
101
|
+
const resetCode = ANSI.reset;
|
|
102
|
+
line += colorCode + renderedChar + resetCode;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
line += renderedChar;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
renderedLines.push(line);
|
|
109
|
+
}
|
|
110
|
+
this.animationFrameCount++;
|
|
111
|
+
return renderedLines;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Update stream positions and states
|
|
115
|
+
*/
|
|
116
|
+
updateStreams() {
|
|
117
|
+
const dimensions = this.getCanvasDimensions();
|
|
118
|
+
// Spawn new streams
|
|
119
|
+
if (this.streams.filter((s) => s.active).length < this.options.streamCount &&
|
|
120
|
+
Math.random() < this.options.spawnProbability &&
|
|
121
|
+
this.animationFrameCount < this.totalFrames * 0.8) {
|
|
122
|
+
this.spawnStream();
|
|
123
|
+
}
|
|
124
|
+
// Update existing streams
|
|
125
|
+
for (const stream of this.streams) {
|
|
126
|
+
if (!stream.active)
|
|
127
|
+
continue;
|
|
128
|
+
// Move stream down
|
|
129
|
+
stream.y += stream.speed;
|
|
130
|
+
// Update trail
|
|
131
|
+
stream.trail = stream.trail
|
|
132
|
+
.map((segment) => ({
|
|
133
|
+
...segment,
|
|
134
|
+
fade: Math.max(0, segment.fade - 0.05),
|
|
135
|
+
}))
|
|
136
|
+
.filter((segment) => segment.fade > 0);
|
|
137
|
+
// Add new segment at the head
|
|
138
|
+
if (stream.y < dimensions.height) {
|
|
139
|
+
stream.trail.unshift({
|
|
140
|
+
y: stream.y,
|
|
141
|
+
char: Math.random() > 0.5 ? "1" : "0",
|
|
142
|
+
fade: 1,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Trim trail to max length
|
|
146
|
+
if (stream.trail.length > stream.maxLength) {
|
|
147
|
+
stream.trail = stream.trail.slice(0, stream.maxLength);
|
|
148
|
+
}
|
|
149
|
+
// Check for character collision
|
|
150
|
+
this.checkCharacterCollision(stream);
|
|
151
|
+
// Deactivate if completely off screen
|
|
152
|
+
if (stream.y > dimensions.height + stream.maxLength) {
|
|
153
|
+
stream.active = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Update revealed characters
|
|
157
|
+
let allRevealed = true;
|
|
158
|
+
for (const [, state] of this.characterStates.entries()) {
|
|
159
|
+
if (state.revealed && state.fadeProgress < 1) {
|
|
160
|
+
const timeSinceReveal = this.animationFrameCount - state.revealTime;
|
|
161
|
+
state.fadeProgress = Math.min(1, timeSinceReveal /
|
|
162
|
+
(this.options.fadeDuration / (1000 / this.config.frameRate)));
|
|
163
|
+
}
|
|
164
|
+
if (!state.revealed) {
|
|
165
|
+
allRevealed = false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// Check if effect is complete
|
|
169
|
+
const activeStreams = this.streams.filter((s) => s.active).length;
|
|
170
|
+
this._isEffectComplete =
|
|
171
|
+
allRevealed &&
|
|
172
|
+
activeStreams === 0 &&
|
|
173
|
+
this.animationFrameCount >= this.totalFrames * 0.8;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Spawn a new binary stream
|
|
177
|
+
*/
|
|
178
|
+
spawnStream() {
|
|
179
|
+
const dimensions = this.getCanvasDimensions();
|
|
180
|
+
const stream = {
|
|
181
|
+
id: this.nextStreamId++,
|
|
182
|
+
x: Math.floor(Math.random() * dimensions.width),
|
|
183
|
+
y: -1,
|
|
184
|
+
speed: 0.3 + Math.random() * this.options.fallSpeed,
|
|
185
|
+
trail: [],
|
|
186
|
+
active: true,
|
|
187
|
+
maxLength: 5 + Math.floor(Math.random() * 10),
|
|
188
|
+
};
|
|
189
|
+
this.streams.push(stream);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Check if a stream collides with any characters
|
|
193
|
+
*/
|
|
194
|
+
checkCharacterCollision(stream) {
|
|
195
|
+
for (const segment of stream.trail) {
|
|
196
|
+
const y = Math.floor(segment.y);
|
|
197
|
+
// Check all characters at this position
|
|
198
|
+
for (const char of this.characters) {
|
|
199
|
+
if (char.originalPosition.x === stream.x &&
|
|
200
|
+
char.originalPosition.y === y) {
|
|
201
|
+
const key = `${char.originalPosition.x},${char.originalPosition.y}`;
|
|
202
|
+
const state = this.characterStates.get(key);
|
|
203
|
+
if (state && !state.revealed) {
|
|
204
|
+
state.revealed = true;
|
|
205
|
+
state.revealTime = this.animationFrameCount;
|
|
206
|
+
state.fadeProgress = 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Get color for a revealed character based on fade progress
|
|
214
|
+
*/
|
|
215
|
+
getRevealedCharacterColor(state) {
|
|
216
|
+
if (state.fadeProgress >= 1) {
|
|
217
|
+
return this.options.revealColor;
|
|
218
|
+
}
|
|
219
|
+
// Fade from bright green to final color
|
|
220
|
+
const startColor = this.options.binaryColors[0];
|
|
221
|
+
const endColor = this.options.revealColor;
|
|
222
|
+
return this.interpolateColor(startColor, endColor, state.fadeProgress);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Apply fade to a color
|
|
226
|
+
*/
|
|
227
|
+
applyFade(color, fade) {
|
|
228
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
229
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
230
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
231
|
+
const fadedR = Math.round(r * fade);
|
|
232
|
+
const fadedG = Math.round(g * fade);
|
|
233
|
+
const fadedB = Math.round(b * fade);
|
|
234
|
+
return [fadedR, fadedG, fadedB]
|
|
235
|
+
.map((c) => Math.max(0, Math.min(255, c)).toString(16).padStart(2, "0"))
|
|
236
|
+
.join("");
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Interpolate between two colors
|
|
240
|
+
*/
|
|
241
|
+
interpolateColor(color1, color2, factor) {
|
|
242
|
+
const r1 = parseInt(color1.substring(0, 2), 16);
|
|
243
|
+
const g1 = parseInt(color1.substring(2, 4), 16);
|
|
244
|
+
const b1 = parseInt(color1.substring(4, 6), 16);
|
|
245
|
+
const r2 = parseInt(color2.substring(0, 2), 16);
|
|
246
|
+
const g2 = parseInt(color2.substring(2, 4), 16);
|
|
247
|
+
const b2 = parseInt(color2.substring(4, 6), 16);
|
|
248
|
+
const r = Math.round(r1 + (r2 - r1) * factor);
|
|
249
|
+
const g = Math.round(g1 + (g2 - g1) * factor);
|
|
250
|
+
const b = Math.round(b1 + (b2 - b1) * factor);
|
|
251
|
+
return [r, g, b]
|
|
252
|
+
.map((c) => Math.max(0, Math.min(255, c)).toString(16).padStart(2, "0"))
|
|
253
|
+
.join("");
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Get ANSI color code for a color
|
|
257
|
+
*/
|
|
258
|
+
getColorCode(color) {
|
|
259
|
+
if (!color || this.config.noColor) {
|
|
260
|
+
return "";
|
|
261
|
+
}
|
|
262
|
+
// For RGB colors, convert to ANSI 24-bit color
|
|
263
|
+
if (typeof color === "string") {
|
|
264
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
265
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
266
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
267
|
+
return `\x1b[38;2;${r};${g};${b}m`;
|
|
268
|
+
}
|
|
269
|
+
// For XTerm colors
|
|
270
|
+
return `\x1b[38;5;${color}m`;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Render fallback for when effects are disabled
|
|
274
|
+
*/
|
|
275
|
+
renderFallback() {
|
|
276
|
+
return this.text.split("\n");
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Check if effect is complete
|
|
280
|
+
*/
|
|
281
|
+
isComplete() {
|
|
282
|
+
return this._isEffectComplete;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Reset the effect
|
|
286
|
+
*/
|
|
287
|
+
onReset() {
|
|
288
|
+
this.streams = [];
|
|
289
|
+
this.characterStates.clear();
|
|
290
|
+
this.animationFrameCount = 0;
|
|
291
|
+
this.nextStreamId = 0;
|
|
292
|
+
this._isEffectComplete = false;
|
|
293
|
+
this.onInitialize();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=binary-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-path.js","sourceRoot":"","sources":["../../../src/effects/implementations/binary-path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAS,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AA4CnC;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAY9C,YAAY,UAAmC,EAAE;QAC/C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