File size: 657 Bytes
3ed48fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { BaseEffect } from './base.js';

export class NeonEffect extends BaseEffect {
    constructor() {
        super();
        // グローエフェクトの設定
        this.glowOptions = {
            color: '#ff69b4',
            blur: 20,
            iterations: 20
        };
        // 縁取りの設定
        this.strokeOptions = {
            color: '#ffffff',
            width: 0.5
        };
    }

    async setupContext(ctx, options) {
        ctx.font = `${options.fontSize}px "${options.font}"`;
        ctx.textBaseline = 'top';
        ctx.fillStyle = '#ff69b4'; // メインのテキストカラー
    }
}