| import { SimpleEffect } from './effects/simple.js';
|
| import { NeonEffect } from './effects/neon.js';
|
| import { GoldEffect } from './effects/gold.js';
|
| import { MultilineNeonEffect } from './effects/multiline-neon.js';
|
| import { GradientEffect } from './effects/gradient.js';
|
| import { MetallicEffect } from './effects/metallic.js';
|
|
|
|
|
| const effects = {
|
| simple: new SimpleEffect(),
|
| neon: new NeonEffect(),
|
| gold: new GoldEffect(),
|
| multilineNeon: new MultilineNeonEffect(),
|
| gradient: new GradientEffect(),
|
| metallic: new MetallicEffect(),
|
| };
|
|
|
| |
| |
| |
|
|
| export function getAvailableEffects() {
|
| return [
|
| {
|
| name: 'simple',
|
| description: 'シンプルなテキストレンダリング'
|
| },
|
| {
|
| name: 'neon',
|
| description: 'ネオングローエフェクト'
|
| },
|
| {
|
| name: 'gold',
|
| description: 'ゴールドエフェクト'
|
| },
|
| {
|
| name: 'multilineNeon',
|
| description: 'マルチラインネオンエフェクト'
|
| },
|
| {
|
| name: 'gradient',
|
| description: 'グラデーションエフェクト'
|
| },
|
| {
|
| name: 'metallic',
|
| description: 'メタリック調エフェクト'
|
| }
|
| ];
|
| }
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| export async function applyEffect(effectType, text, options) {
|
| const effect = effects[effectType];
|
| if (!effect) {
|
| throw new Error(`Unknown effect type: ${effectType}`);
|
| }
|
|
|
| return effect.apply(text, options);
|
| }
|
|
|