@kya-os/cli
Version:
CLI for MCP-I setup and management
98 lines • 2.6 kB
TypeScript
/**
* Blackhole Effect
* Characters are consumed by a black hole and explode outwards
*/
import { BaseEffect } from "../types.js";
/**
* Configuration options for the Blackhole effect
*/
export interface BlackholeEffectOptions {
/** Duration in milliseconds */
duration?: number;
/** Color for the blackhole border stars */
blackholeColor?: string;
/** Colors for stars during explosion */
starColors?: string[];
/** Final color for characters */
finalColor?: string;
/** Use gradient for final color */
useGradient?: boolean;
/** Gradient direction */
gradientDirection?: "vertical" | "horizontal" | "diagonal";
/** Size of the blackhole relative to canvas (0.1 - 0.5) */
blackholeSize?: number;
}
/**
* Blackhole effect implementation
*/
export declare class BlackholeEffect extends BaseEffect {
readonly name = "Blackhole";
readonly description = "Characters are consumed by a black hole and explode outwards";
private options;
private characterStates;
private animationFrameCount;
private totalFrames;
private _isEffectComplete;
private currentPhase;
private phaseProgress;
private blackholeCenter;
private blackholeRadius;
private blackholeChars;
private consumptionQueue;
private readonly starSymbols;
private readonly starfieldColors;
constructor(options?: BlackholeEffectOptions);
/**
* Initialize the effect
*/
protected onInitialize(): void;
/**
* Calculate gradient colors
*/
private calculateGradientColors;
/**
* Get gradient key based on direction
*/
private getGradientKey;
/**
* Render the next frame
*/
render(): Promise<string[]>;
/**
* Update animation state for all characters
*/
private updateAnimationState;
/**
* Update individual character position
*/
private updateCharacterPosition;
/**
* Create visual representation of a character
*/
private createCharacterVisual;
/**
* Calculate distance between two coordinates
*/
private calculateDistance;
/**
* Get ANSI color code for a color
*/
private getColorCode;
/**
* Interpolate between two colors
*/
private interpolateColor;
/**
* Render fallback for when effects are disabled
*/
renderFallback(): string[];
/**
* Check if effect is complete
*/
isComplete(): boolean;
/**
* Reset the effect
*/
protected onReset(): void;
}
//# sourceMappingURL=blackhole.d.ts.map