Log inGet started
Package

impactFrames.package

README.md

Impact radial burst (styleBlock, Medium)

Anime impact frame: bold radial lines burst from the hit point over a darkened negative ground, a shock ring at the centre; without the flip it is rays only.

With flip 0 the ground keeps the picture and only the rays are drawn: that variant is not a full-screen flash and is what the limiter downgrades flashes to.

Settings (shared by every impactFrames block): mode, amount (1), centre, phase, ink, paper, accent, lines, lineWidth, clear, polarity, split, depthRange, threshold, flip, gentle, angle, startAt, hitLength, holdShare. This block's defaults: see defaults in its block.yaml. Play it with require("~impactFrames.ImpactFrames").play("radialBurst", { at = hitPoint }) rather than adding it to the shared stack: ImpactFrames lays it on each machine for the length of the hit, centres it, steps its held drawings and keeps it under the flash limit. Added to a stack by hand it draws its first drawing still, which is only useful for tuning.

What it gives up in motion

It is a screen effect by design, so it is fixed to the screen for the few frames it shows. Its rays and lines are re-drawn on each held drawing (about every other frame at 60 Hz, ImpactFrames' step rate), never per frame, so they step like drawn animation and never crawl. The hit centre is projected again on each drawing, so a moving camera keeps the burst on the hit point. Nothing is carried from frame to frame.

How it treats content

  • Opaque things: drawn over like the rest of the picture; the silhouette and white flash find them by depth (nearer than the hit plus depthRange) or by brightness.
  • Transparent things (glass, water): not in the depth, so the depth split treats them as what is behind them; the brightness split sees them as drawn.
  • Particles and smoke: the same as transparent things: brightness only.
  • Sky: ground, never subject, in the depth split; inverted or flipped like any colour.
  • Fog: fogged colours are drawn over by tone; fog does not change the depth split.
  • Skinned characters: subjects like any opaque thing, shapes taken from the frame of the hit.
  • Foliage: subjects by depth; thin leaves keep their shapes at the frame's resolution.
  • World text: covered for the length of the hit like everything else; exclude a label with StyleKit.options({ exclude = { ... } }) to keep it as rendered. Screen UI is drawn after the stack and is never touched.
  • Black stays black: not kept, on purpose. An impact frame is a light event and may light an unlit pixel for a few frames (a flash over a night scene), which is why every flashing style goes through the ImpactFrames limiter (at most 3 full-screen flashes a second by default).
  • Dim rooms: not a Tone block and declares no keepDim: a flash brightens a dim room for its two to six frames and the picture returns exactly as rendered after.