Log inGet started
World

Quiet Reach: Knock-Out and Lethal Takedowns from Any Angle Kit

Branchmain
Branchesmain
Commit9961d58b50

README.md

Impact slash (styleBlock, Medium)

Anime slash frame: a bright cut tears across the frame through the hit, and the picture on each side of it is knocked apart along the cut and pushed to hard ink and paper, the frame of a sword stroke landing.

The cut runs through the hit point at angle (radians on screen; ImpactFrames takes it from play's angle option). Each half slides a little along the cut, away from the other, and is reduced to two tones (darks to ink, lights to paper, polarity 1 the reverse); the cut itself is a tapering paper blade with thin accent echoes beside it. Counts as a full-screen flash.

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("slash", { at = hitPoint, angle = 0.5 }) 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.