BPT

BptLightningEffect

The BptLightningEffect component creates realistic lightning bolts that strike a target element. Lightning paths are generated using fractal midpoint displacement, with physics-based sparks and full-page flash effects.

Lightning Parameters
Demo — Lightning strikes the target below

Lightning Target

Lightning bolts will strike this element

Click "Strike!" to trigger the effect
Current Configuration
📋 [+]
<BptLightningEffect Strikes="@strikeCount"
                    Speed="2"
                    BranchDensity="50"
                    SparkCount="20"
                    FlashIntensity="0.5"
                    GlowSpread="10"
                    Jaggedness="0.5"
                    OnComplete="HandleComplete">
    <!-- Your target content here -->
</BptLightningEffect>

@code {
    private int strikeCount = 0;

    private void Fire() => strikeCount = 3;

    private void HandleComplete()
    {
        strikeCount = 0; // Reset for next trigger
    }
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.