mwg API
    Preparing search index...

    Class NeonGlow

    A soft neon glow from a shape or mask: a radial sprite drawn additively, the overlay Halo already provides, with colour, radius, intensity and flicker (roadmap 426). A global bloom stays out on purpose: one sprite per sign is cheaper, composes with z-order like any other sprite, and never washes the whole scene. Mask a glow by parenting it under the shape it lights, or leave it bare for a free halo around a sign. Needs a DOM canvas; paintGlowPixels is the same falloff without one.

    import { NeonGlow } from '@datamoc/mwg/two-d/render';

    const sign = new NeonGlow({ color: 0x37e0ff, radius: 48, flicker: { amount: 0.15, frequency: 2 } });
    sign.position.set(200, 120);
    sign.update(1 / 60); // the tube breathes; under reduced motion it holds steady instead

    Hierarchy

    • Sprite
      • NeonGlow
    Index
    • the texture is generated for this glow alone, so it goes with it

      Returns void

    • swap the peak strength; applies on the next update without a repaint

      Parameters

      • intensity: number

      Returns void

    • advance the flicker; under reduced motion a decorative glow holds its peak instead

      Parameters

      • dt: number

      Returns void