# AnimeBlocks (module)
The animeBlocks API: `apply(lookId, { sky, timing, keep })` applies a whole anime look (TV anime, 80s OVA, soft modern anime, chibi, action anime) for every player, optionally with its painted sky and frame timing; `useLight`, `useShine`, `useLine`, `useFinish` change one part and keep the rest (`useLine` also switches other line entries off so outlines never double); `cleanFace(entity)` keeps a face clean and light; `markHair(entity)` and `addHairShine()` put the shiny hair band on hair only; `looks()`, `describe()` and `remove()`. Reach it with `require("~animeBlocks.AnimeBlocks")`.
AnimeFast: the one-effect fast setting of animeBlocks on every player's machine. `AnimeBlocks.fast(true)` puts it on a synced holder entity called `AnimeFast`; on every machine it registers the `animeFast` engine screen effect and writes its settings when they change. No per-frame script (the sun direction is read once a second). `AnimeBlocks.fast(false)` switches it off and gives the stack back.
# Anime highlight: blade shine (styleBlock, Light)
A blade-shaped anime highlight: one long, sharp sliver of light pointed at both ends and widest in the middle, laid where the sun mirrors toward the eye, as painted on swords, armour, hair and glossy plastic.
The sharp blade of light anime paints along a sword or a lacquered surface.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
The full-frame pass of the anime cel light blocks (animeBlocks): animeCelTV, animeCelSoft, animeCel80s, animeCelPastel, animeCelGolden, animeCelNight, animeCelChibi, animeCelAction.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: 80s hard highlight (styleBlock, Light)
1980s anime cel shading: hard two-tone with deep violet shadows, strongly saturated, and a hard extra highlight step painted on the most lit places.
Hand-painted 80s cels: a dark shadow, a flat body colour and a hard, lighter highlight shape.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: punchy action (styleBlock, Light)
Punchy action anime shading: three hard tones with deep cool shadows, a hard highlight step on the most lit places and strong colour, so fighters and their moves read at a glance in fast scenes.
The hard, high-contrast light of fight scenes: deep shadow shapes, hot highlights, no softness.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: soft round chibi (styleBlock, Light)
Soft round chibi shading: two warm tones with a very soft, wide edge, light peach shadows that never go dark, and faces kept fully lit, so small rounded figures read as soft toys.
The gentle, rounded light of chibi and mascot animation: everything stays light, warm and friendly.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: warm golden hour (styleBlock, Light)
Golden hour anime shading: warm gold light, magenta-violet shadows and a deep plum third tone, like a late afternoon anime scene.
The warm late-afternoon light anime uses for emotional scenes.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: cool night (styleBlock, Light)
Cool night anime shading: moonlit blue light, deep indigo shadows and a dark navy third tone, readable but clearly night.
Anime night: everything in blue, with the lit side still clean and readable.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: pastel chibi (styleBlock, Light)
Pastel chibi anime shading: soft two-tone with gentle pink shadows, light and airy, with faces kept fully clean.
Cute and soft: shadows are a light rose and faces stay clean.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: soft modern three-tone (styleBlock, Light)
Soft modern anime shading in three tones: a lit tone, a lavender shadow and a deeper shadow, with soft gradient edges between them and clean light faces.
The look of current anime films and series: soft edges, a three-step ramp and gently coloured shadows.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime cel: TV two-tone (styleBlock, Light)
Hard TV anime two-tone cel shading: one flat light tone and one cool lavender shadow tone with a crisp edge, shadows richer in colour, clean light faces.
The classic look of TV anime: every surface is either lit or in shadow, with a crisp edge between.
Every anime cel block runs the one `animeCel` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("light", "<block>")`, and `{ keepSettings = true }` carries your tuning across. Settings: `tones` (2 or 3), `shadowAt`, `deepAt`, `edge` (the soft edge between light and shadow), `litColour`, `shadowColour`, `deepColour`, `shadowSaturation`, `highStep`, `highAt`, `highColour`, `faceClean`, `faceShadow`, `warmth`, `shape`, `shadeLevel`, `castBelow`, `fullLight`, `keepLightColour`.
Clean faces: give a face (or a whole mascot) a StyleChannel value above 0, `require("~animeBlocks.AnimeBlocks").cleanFace(entity)`, and it takes the lit tone with at most one soft shadow tone (`faceShadow`), never blotches. The light is read the way toonBlocks' ramp reads it (the frame divided by the surface's base colour, redrawn cleanly from the sun by `shape`), so cast shadows stay shadows. The rim is its own part: add an anime rim block (`animeRimThinWarm`, `animeRimBackLight`, `animeRimColour`) or the Cookbook's `toonRim` after it, and a highlight shape block after that. The built-in rim (`rimStrength`, off by default) is a cheaper rim inside this pass for when no separate rim entry is wanted.
## What it gives up in motion
Tone edges follow the light, so a moving sun moves the edge between light and shadow across surfaces, as painted cels do between shots. The light is read from a smoothed 8 x 8 mean, so the edge never crawls with texture grain; it is stable under a still sun and a moving camera. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: shaded into flat tones from their own base colour.
- Transparent things (glass, water): not in the surface copy, so they keep the frame as drawn behind the toned surfaces.
- Particles and smoke: left as drawn; the tones are laid on the surface behind them.
- Sky: left exactly as rendered (pair it with paintedSkies for a painted sky).
- Fog: fog in the frame lowers the read light, so far things drift toward the shadow tone; use a depth mask to keep far things lit.
- Skinned characters: toned like everything else, every frame; give the face a StyleChannel value for a clean face.
- Foliage: toned from its base colour; alpha cut leaves take the tone of the leaf.
- World text: toned like a surface; exclude labels a player must read (`StyleKit.options({ exclude = { id } })`).
- Black stays black: returns through styleKit's `sk_finish`, and zero light stays zero (tone times light presence).
- Dim rooms: tones scale with the light that arrived, so a dim room stays dim; it is a Light block and adds no light sheet, so it does not ask for the dim guard.
# Anime highlight: crescent (styleBlock, Light)
A crescent of light along the edge of round things that faces the sun, the bright rim crescent of anime balls, cheeks, helmets and fruit.
The bright crescent painted on the lit edge of a round form.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
animeFast: the whole anime look in one engine screen effect, used by `AnimeBlocks.fast(true)`. It reads only the frame and its depth: a normal rebuilt from depth (across about a fortieth of the screen, so low-poly round things shade smoothly) and the scene's sun cut the form light into two flat tones (tinted, richer shadow), the look's highlight shape (streak, blade, round glint, crescent or hair band) sits on curved lit surfaces, a rim light runs inside lit silhouettes, an ink line follows every silhouette, and a light grade adds saturation and contrast. No styleKit stack, render feature or per-frame script.
## Known limits
- A post-process shader has no surface preview image.
- It reads no g-buffer, so it cannot tell a dark material from a shadow, and cast shadows keep the scene's own darkness instead of the flat shadow tone.
- No inner creases, no per-character controls, no kept-as-rendered objects, no held clock; the star glint draws as a round glint.
The full-frame pass of the anime finish blocks (animeBlocks): finishFilm80s, finishTV90s, finishSoftBloom, finishClean.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
The full-frame pass of the `finishClean` block (animeBlocks): the anime finish with the same settings as `animeFinish`, but reading no styleKit soft field. Where it needs a softened picture (sharpening, softness, bloom, halation) it blurs the frame itself with five taps, so a look whose only soft reader is this finish pays none of the soft field's two passes.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
# Anime highlight: hair band (styleBlock, Light)
The shiny band on anime hair: a bright zigzag ring across the top of round forms, toothed like a painted hair highlight, strongest on the lit side.
The angel ring painted on anime hair. Target it at hair with a StyleChannel variant.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
The full-frame pass of the anime ink line blocks (animeBlocks): animeLineTV, animeLineColour, animeLineAction, animeLine80s, animeLineSoft.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
# Anime line: heavy 80s contour (styleBlock, Line)
Heavy 1980s anime contour: a thick dark outer contour round every figure and object, thin inner lines, as hand-traced 80s cels.
The bold contour of hand-traced cels.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
# Anime line: brushy action (styleBlock, Line)
Brushy action anime line: heavy loaded-brush strokes that swell and taper, broken here and there, boiling gently on the held clock for fights and chases.
The energetic, uneven ink of action key animation.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
# Anime line: coloured (styleBlock, Line)
Coloured anime line: each line is a darker, richer shade of the colour under it (a red coat gets a deep red line), heavier on silhouettes than inside.
Colour-traced lines, the way modern anime and many 80s films trace hair, skin and highlights in a darker colour instead of black.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
# Anime line: soft modern grey (styleBlock, Line)
Soft modern anime line: a fine, soft warm grey line that lets colour do the work, lighter inside, fading early with distance.
The light linework of recent anime films.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
# Anime line: thin TV black (styleBlock, Line)
Thin, even black anime TV line: a firm line on silhouettes, a hairline on inner creases, thinning with distance.
The clean linework of a TV anime series.
Every anime line block runs the one `animeLine` shader with its own defaults, so any of them swaps for any other with `StyleKit.swap("line", "<block>")` (`{ keepSettings = true }` carries your tuning). Settings: `width` (silhouette, reference pixels), `innerWidth` (creases and folds), `creaseAngle`, `depthJump`, `innerJump`, `fadeStart`, `fadeEnd`, `farWidth` (share of the width left far away), `innerFadeEnd`, `colour`, `tint` (0 the ink colour, 1 a darker shade of the colour under the line), `tintDarken`, `tintSaturation`, `brush`, `brushAngle`, `breakup`, `softness`, `opacity`, `skipInk`, `speckle`.
The line is drawn on the near side of every silhouette (found where depth drops away behind a surface), so a character in front of a wall gets one line, never one on each side. Inner lines come from creases (the surface turning by more than `creaseAngle`) and folds (a small step in depth). Per object: a StyleChannel `line` weight scales both widths (2 twice as heavy, 0 none).
No double outlines: with `skipInk` at 1 the line steps aside wherever toon ink is already drawn (toonBlocks' hull lines on characters, toonMaterials' `ToonInk`), and it sits in the Line slot like every other line block, so a second line block in the stack is laid over it by strength instead of drawn twice. To change line styles use `AnimeBlocks.useLine(id)`, which swaps the stack's Line entry and switches other Line entries off.
## What it gives up in motion
The line follows silhouettes and creases exactly as they move, so it stays on characters. Width is kept in the picture (reference pixels) and thins with distance from `fadeStart` to `fadeEnd`. `brush` and `breakup` vary along surfaces and change only on the held clock (the stack's `holdRate`, drawings a second), so action lines boil gently; at 0 the line is still. Thin far lines fade rather than break into dashes.
## How it treats content
- Opaque things: silhouette and crease lines from depth and normals.
- Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
- Particles and smoke: no line (not in the depth).
- Sky: never lined; the silhouette against the sky is lined on the object's side.
- Fog: lines are drawn over fog at full strength until `fadeEnd`; raise `farWidth` to 0 for fog to swallow far lines.
- Skinned characters: lined every frame, inner lines on folds of the body and clothes.
- Foliage: alpha-cut leaves are lined at their outer edges; far foliage thins away with distance (`fadeEnd`).
- World text: lined like any opaque surface; exclude labels a player must read.
- Black stays black: returns through styleKit's `sk_finish`; ink is only ever darker than the frame it covers.
- Dim rooms: a line only darkens, so it never brightens a dim room.
The full-frame pass of the anime rim light blocks (animeBlocks): animeRimThinWarm, animeRimBackLight, animeRimColour. It is toonBlocks' rim light (the Style Cookbook's `toonRim`: the same edge search where depth drops away behind a surface, the same settings and light handling, built on toonBlocks' `toonLight` and `toonFrame` shader modules) with one more setting, `hardness`, that cuts the rim to a flat painted band. Settings: `width`, `strength`, `colour`, `side`, `fresnel`, `followLight`, `tintByColour`, `fullLight`, `keepLightColour`, `hardness`, `fadeStart`, `fadeEnd`.
# Anime rim: wide back light (styleBlock, Light)
A wide anime back light: a broad, bright band of pale light on the side of things turned away from the sun, as if lit from behind, the dramatic contre-jour of film anime and sunset scenes.
The broad back light of a figure against the sky in an anime film.
Every anime rim block runs the one `animeRim` shader, which is the Style Cookbook's toonBlocks rim light (`toonRim`: the same edge search, settings and light handling) with one more setting, `hardness`, that cuts the rim to a flat painted band. Any anime rim swaps for another, or for `toonRim`, with `StyleKit.swap("rim", "<block>")` (`{ keepSettings = true }` carries your tuning). It is a chain block at rank 50, so it lands after the cel light and before the highlight shapes whatever order they were added in. Settings: `width` (reference pixels), `strength`, `colour`, `side` (-1 back light, +1 lit side, 0 all round), `fresnel`, `followLight`, `tintByColour`, `fullLight`, `keepLightColour`, `hardness`, `fadeStart`, `fadeEnd` (the rim fades out with distance, so far foliage does not glitter).
Per object: a rim entry with a `variant` (`StyleKit.add("animeRimBackLight", { id = "heroRim", variant = "hero" })`) draws only on objects given that variant (`StyleKit.setChannel(hero, { variant = "hero" })`), so the hero can carry a back light the crowd does not.
## What it gives up in motion
The rim sits on silhouettes, found where depth drops away behind a surface, so it moves with them and keeps its width in the picture at any distance. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: a band along outer edges only; flat floors and walls seen face-on get none.
- Transparent things (glass, water): not in the depth, so they get no rim, and things behind them keep theirs.
- Particles and smoke: no rim (not in the depth).
- Sky: never touched; it is what makes the silhouette edge against it.
- Fog: the rim is light added on the surface and fogs with it only as much as the frame already is.
- Skinned characters: rimmed every frame along their outline.
- Foliage: alpha-cut leaves get rims at their outer edges; keep `width` small on dense foliage.
- World text: flat, so left alone unless it stands out as a silhouette.
- Black stays black: returns through styleKit's `sk_finish`; `followLight` above 0 keeps rims off unlit surfaces.
- Dim rooms: with `followLight` 0 a rim adds light in the dark (a back light); raise `followLight` to keep dim rooms dim.
# Anime rim: coloured (styleBlock, Light)
A coloured anime rim light: a hard band of saturated coloured light (magenta by default) along silhouettes, the neon and magic edge light of night scenes and transformation sequences.
The coloured edge light of neon nights and magic: set colour to any hue.
Every anime rim block runs the one `animeRim` shader, which is the Style Cookbook's toonBlocks rim light (`toonRim`: the same edge search, settings and light handling) with one more setting, `hardness`, that cuts the rim to a flat painted band. Any anime rim swaps for another, or for `toonRim`, with `StyleKit.swap("rim", "<block>")` (`{ keepSettings = true }` carries your tuning). It is a chain block at rank 50, so it lands after the cel light and before the highlight shapes whatever order they were added in. Settings: `width` (reference pixels), `strength`, `colour`, `side` (-1 back light, +1 lit side, 0 all round), `fresnel`, `followLight`, `tintByColour`, `fullLight`, `keepLightColour`, `hardness`, `fadeStart`, `fadeEnd` (the rim fades out with distance, so far foliage does not glitter).
Per object: a rim entry with a `variant` (`StyleKit.add("animeRimBackLight", { id = "heroRim", variant = "hero" })`) draws only on objects given that variant (`StyleKit.setChannel(hero, { variant = "hero" })`), so the hero can carry a back light the crowd does not.
## What it gives up in motion
The rim sits on silhouettes, found where depth drops away behind a surface, so it moves with them and keeps its width in the picture at any distance. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: a band along outer edges only; flat floors and walls seen face-on get none.
- Transparent things (glass, water): not in the depth, so they get no rim, and things behind them keep theirs.
- Particles and smoke: no rim (not in the depth).
- Sky: never touched; it is what makes the silhouette edge against it.
- Fog: the rim is light added on the surface and fogs with it only as much as the frame already is.
- Skinned characters: rimmed every frame along their outline.
- Foliage: alpha-cut leaves get rims at their outer edges; keep `width` small on dense foliage.
- World text: flat, so left alone unless it stands out as a silhouette.
- Black stays black: returns through styleKit's `sk_finish`; `followLight` above 0 keeps rims off unlit surfaces.
- Dim rooms: with `followLight` 0 a rim adds light in the dark (a back light); raise `followLight` to keep dim rooms dim.
# animeRimCore (shader module)
The anime rim light as functions: `ar_edge(uv, params)` finds how close a pixel is to a silhouette (four depth taps, faded with distance) and `ar_light(uv, pixel, normal, edge, sun, params)` gives the light the rim adds there, with `ArParams` holding a rim block's settings (the same as the Style Cookbook's `toonRim`, plus `hardness`). The `animeRim` pass draws it on its own; the anime cel light draws the same rim inside its own pass when a look folds its rim part into the light (`AnimeBlocks.fold`), which saves a full-screen pass. Include it after `~styleKit.shaders.skCommon`, `~toonBlocks.shaders.toonLight` and `~toonBlocks.shaders.toonFrame` with `#include "~animeBlocks.blocks.animeRimCore"`.
## Known limits
- Every pass runs every frame (#24548); a folded rim costs only its taps inside the light pass.
- The package README's Known limits lists the rest.
Used by: `animeRim.shader` and `animeCel.shader`.
# Anime rim: thin warm (styleBlock, Light)
A thin warm anime rim light: a fine, hard band of warm light along every silhouette, all round, so characters lift off the background without a visible light source.
The thin warm edge light of TV anime key frames.
Every anime rim block runs the one `animeRim` shader, which is the Style Cookbook's toonBlocks rim light (`toonRim`: the same edge search, settings and light handling) with one more setting, `hardness`, that cuts the rim to a flat painted band. Any anime rim swaps for another, or for `toonRim`, with `StyleKit.swap("rim", "<block>")` (`{ keepSettings = true }` carries your tuning). It is a chain block at rank 50, so it lands after the cel light and before the highlight shapes whatever order they were added in. Settings: `width` (reference pixels), `strength`, `colour`, `side` (-1 back light, +1 lit side, 0 all round), `fresnel`, `followLight`, `tintByColour`, `fullLight`, `keepLightColour`, `hardness`, `fadeStart`, `fadeEnd` (the rim fades out with distance, so far foliage does not glitter).
Per object: a rim entry with a `variant` (`StyleKit.add("animeRimBackLight", { id = "heroRim", variant = "hero" })`) draws only on objects given that variant (`StyleKit.setChannel(hero, { variant = "hero" })`), so the hero can carry a back light the crowd does not.
## What it gives up in motion
The rim sits on silhouettes, found where depth drops away behind a surface, so it moves with them and keeps its width in the picture at any distance. Nothing changes on its own over time, and nothing flashes.
## How it treats content
- Opaque things: a band along outer edges only; flat floors and walls seen face-on get none.
- Transparent things (glass, water): not in the depth, so they get no rim, and things behind them keep theirs.
- Particles and smoke: no rim (not in the depth).
- Sky: never touched; it is what makes the silhouette edge against it.
- Fog: the rim is light added on the surface and fogs with it only as much as the frame already is.
- Skinned characters: rimmed every frame along their outline.
- Foliage: alpha-cut leaves get rims at their outer edges; keep `width` small on dense foliage.
- World text: flat, so left alone unless it stands out as a silhouette.
- Black stays black: returns through styleKit's `sk_finish`; `followLight` above 0 keeps rims off unlit surfaces.
- Dim rooms: with `followLight` 0 a rim adds light in the dark (a back light); raise `followLight` to keep dim rooms dim.
# Anime highlight: round glint (styleBlock, Light)
A round anime glint: a clean, hard-edged disc of light with a small second dot beside it where the sun mirrors toward the eye, the catch-light of anime eyes, balls, bottles and polished things.
The round catch-light of anime eyes and glossy toys: two clean dots, no sparkle.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
The full-frame pass of the anime highlight shape blocks (animeBlocks): animeHairShine, animeStreak, animeCrescent, animeStarGlint, animeBladeShine, animeRoundGlint.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
# animeShineCore (shader module)
The anime highlight shapes (hair ring, streak, crescent, star, blade, round glint) as functions: `as_cover(uv, litShare, N, sun, params)` gives the highlight's coverage at a pixel and `as_glint(colour, params)` its colour, with `AsParams` holding a highlight block's settings. The `animeShine` pass draws them on their own; the anime cel light draws the same shapes inside its own pass when a look folds its highlight part into the light (`AnimeBlocks.fold`), which saves a full-screen pass. Include it after `~styleKit.shaders.skCommon`, `~toonBlocks.shaders.toonLight` and `~toonBlocks.shaders.toonFrame` with `#include "~animeBlocks.blocks.animeShineCore"`.
## Known limits
- Every pass runs every frame (#24548); a folded highlight costs only its maths inside the light pass.
- The package README's Known limits lists the rest.
Used by: `animeShine.shader` and `animeCel.shader`.
# Anime highlight: star glint (styleBlock, Light)
A four-point star glint on the brightest point of shiny round things, the sparkle anime paints on metal, gems and eyes; a fixed shape that never twinkles or flashes.
The cross-shaped sparkle on a shiny point.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
# Anime highlight: streak (styleBlock, Light)
A cut-out anime streak highlight: one long glint and a short one beside it where the sun mirrors toward the eye, as painted on glass, lacquer, metal and eyes.
The hard double streak 80s OVA cels paint on glass, metal, lacquer and eyes.
Every highlight shape block runs the one `animeShine` shader with its own defaults, so any one swaps for another with `StyleKit.swap("shine", "<block>")`. It is a chain block (rank 60): it lays its shape on top of what the Light blocks before it made, so it sits after an anime cel block and a rim (`animeRim…` or the Cookbook's `toonRim`). Settings: `shape` (0 hair band, 1 streak, 2 crescent, 3 star glint, 4 blade, 5 round glint), `size`, `colour`, `strength`, `tintByColour`, `litAbove`, `bandHeight`, `zigzag`, `zigzagCount`, `angle`, `starSize`, `curvedOnly`, `edgeSoftness`, `fullLight`.
Per object: the hair band belongs on hair. Give the hair a StyleChannel variant (`StyleKit.setChannel(hairEntity, { variant = "hair" })`, or `AnimeBlocks.markHair(hairEntity)`) and add the band as an entry that targets that variant (`StyleKit.add("animeHairShine", { id = "hairShine", variant = "hair" })`), so it draws only there, while a streak or glint entry draws on everything else.
## What it gives up in motion
Shapes are placed from the surface normal, the sun and the camera, so they slide over a round form as the camera or the sun moves, the way a painted highlight is redrawn from shot to shot. They hold still while nothing moves. Nothing flashes: the star glint is a fixed shape, not a twinkle.
## How it treats content
- Opaque things: shapes only on curved, lit surfaces (`curvedOnly` keeps them off flat walls and floors).
- Transparent things (glass, water): not in the surface copy, so no shape is drawn on them.
- Particles and smoke: left as drawn.
- Sky: never touched.
- Fog: shapes are laid at full strength under fog; they are small and on near things.
- Skinned characters: shaped every frame from the averaged normal, so they stay clean on a moving figure.
- Foliage: leaves are mostly flat cards and are left alone by `curvedOnly`.
- World text: flat, so left alone.
- Black stays black: returns through styleKit's `sk_finish`, and needs light (`litAbove`) and the sun.
- Dim rooms: drawn only where the light is above `litAbove`, so a dim room gets no highlight.
# Finish: clean digital (styleBlock, Medium)
Clean digital anime finish: crisp detail, clear saturated colour, a touch of contrast and sharpening, no grain and no glow, the clean look of digital anime. It is the cheapest finish: it runs its own copy of the finish shader (`animeFinishClean`), which reads no soft field and softens against a five-tap blur of the frame itself.
The crisp, clean finish of digital anime.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
# Finish: 1980s anime film (styleBlock, Medium)
1980s anime film print: visible film grain, warm red halation round bright edges, soft bloom, lifted milky blacks and a warm, slightly faded colour, like a theatrical anime film from the 80s.
Grain, halation and soft bloom: the print of an 80s anime film.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
# Finish: soft modern bloom (styleBlock, Medium)
Soft modern anime bloom: bright skies and lights glow and diffuse into the picture, light and airy, with gentle colour and no grain, like current anime films.
The glowing light diffusion of recent anime films.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
# Finish: 90s TV broadcast (styleBlock, Medium)
1990s anime TV broadcast: colour bleeding sideways out of sharp shapes, a gently softened picture, punchy saturated colour, a little lifted black and a soft vignette, like a taped TV broadcast.
The look of a 90s anime episode on a TV set, without fine scan lines or flicker.
Every finish block runs the one `animeFinish` shader with its own defaults, so any finish swaps for another with `StyleKit.swap("finish", "<block>")` and works under any look, anime or not. Settings: `bloom`, `bloomRadius`, `bloomThreshold`, `bloomColour`, `halation`, `halationColour`, `grain`, `grainSize`, `chromaBleed`, `softness`, `sharpen`, `lift`, `liftColour`, `tint`, `saturation`, `contrast`, `vignette`. The bloom and halation are read from styleKit's soft field (one half-resolution blur shared with every block that reads it), so they cost twelve taps of an already smooth image. `finishClean` runs its own copy of the shader, `animeFinishClean`, with the same settings: it reads no soft field and softens against a five-tap blur of the frame itself, which saves the field's two passes.
## What it gives up in motion
Bloom and halation follow bright things as they move. Grain is film grain: it lives on the screen, not on things, and is renewed on the stack's held clock (`holdRate` drawings a second, 8 by default), so it boils like projected film at a low, even contrast that never flashes; the whole frame's brightness does not change from one held step to the next. Colour bleed is a fixed sideways smear.
## How it treats content
- Opaque things: graded, bloomed and grained as a whole picture.
- Transparent things (glass, water): treated as the picture they are part of.
- Particles and smoke: bright particles bloom; nothing else changes.
- Sky: graded and bloomed like everything else, so a bright sky glows softly at the horizon.
- Fog: graded with the picture.
- Skinned characters: no difference from anything else.
- Foliage: no difference from anything else.
- World text: graded; exclude labels a player must read from the stack if the grade or grain gets in the way.
- Black stays black: grain is scaled by brightness and every change returns through styleKit's `sk_finish`, so unlit pixels stay black; `lift` raises only the frame's dark tones, never an unlit pixel.
- Dim rooms: bloom needs bright pixels and grain is scaled by brightness, so a dim room stays dim.
# Action anime (whole look)
Fast action anime: punchy three-tone light with deep cool shadows and a hot highlight step, a wide back light, blade-shaped highlights on weapons and armour, heavy brushy action lines that boil at 12 drawings a second, and a sharp, contrasty finish. Characters on twos that snap to ones when they move fast (mixed timing), and pair it with impactFrames for hits.
Blocks, one per part: `animeCelAction`, `animeRimBackLight`, `animeBladeShine`, `animeLineAction`, `finishClean` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `summerClouds`. Frame timing it suggests: `mixedAction`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("actionAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("actionAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# Chibi anime (whole look)
Cute chibi anime: a soft round light in two warm tones with pale peach shadows that never go dark, faces always fully lit, a thin pink rim, big round catch-light glints, round coloured lines that take their tint from what they outline, and a soft pastel glow. Made for small rounded figures and mascots.
Blocks, one per part: `animeCelChibi`, `animeRimThinWarm`, `animeRoundGlint`, `animeLineColour`, `finishSoftBloom` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `pastelDawn`. Frame timing it suggests: `twos`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("chibiAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("chibiAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# Golden hour anime (whole look)
The evening light of an emotional anime film scene: warm golden tones with plum shadows, a glowing warm back light along every silhouette, a crescent glint on the sunlit edge of round things, a line that takes its colour from the surface instead of black, and a soft warm bloom. Characters on twos.
Blocks, one per part: `animeCelGolden`, `animeRimBackLight` (warm), `animeCrescent`, `animeLineColour`, `finishSoftBloom` (warm) (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `goldenSunset`. Frame timing it suggests: `twos`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("goldenHourAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("goldenHourAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# Night city anime (whole look)
A neon night city in anime: cool blue night light with the lit side still clean and readable, magenta neon rims on every silhouette (set the rim's colour to the city's neon), cross-shaped glints, coloured lines tinted from the surfaces they outline, and a glowing bloom round every light, under the painted neon night sky.
Blocks, one per part: `animeCelNight`, `animeRimColour`, `animeStarGlint`, `animeLineColour`, `finishSoftBloom` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `neonNight80s`. Frame timing it suggests: `twos`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("nightCityAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("nightCityAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# 80s OVA (whole look)
The look of a 1980s anime OVA on film: hard hand-painted cels with deep violet shadows and a second, lighter highlight step on the most lit places, a warm back light, hard streak highlights, a heavy dark contour, and a film print with visible grain, warm halation glowing round bright lights and soft bloom. Characters drawn on threes, the cadence of limited 80s animation.
Blocks, one per part: `animeCel80s`, `animeRimBackLight`, `animeStreak`, `animeLine80s`, `finishFilm80s` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `toweringClouds`. Frame timing it suggests: `threes`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("ova80s", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("ova80s")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# Soft modern anime (whole look)
The look of a current anime film: three soft tones with gradient edges between them and gently coloured shadows, faces kept clean, a soft back light, small round catch-light glints, a fine soft grey line that fades with distance and glowing light diffusion over everything. Characters on ones for smooth, full animation.
Blocks, one per part: `animeCelSoft`, `animeRimBackLight`, `animeRoundGlint`, `animeLineSoft`, `finishSoftBloom` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `summerClouds`. Frame timing it suggests: `ones`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("softModernAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("softModernAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# TV anime (whole look)
The look of a TV anime episode: every surface either lit or in shadow with a crisp edge, cool lavender shadows richer in colour than the light, a thin warm rim that lifts characters off the background, a double streak on shiny round things and a thin even black line, heavier on the silhouette and thinner inside and in the distance, under a clean digital finish. Characters drawn on twos (12 drawings a second) like a series.
Blocks, one per part: `animeCelTV`, `animeRimThinWarm`, `animeStreak`, `animeLineTV`, `finishClean` (entries `light`, `rim`, `shine`, `line`, `finish`). Painted sky it suggests: `clearBlue`. Frame timing it suggests: `twos`.
Apply with `require("~animeBlocks.AnimeBlocks").apply("tvAnime", { sky = true, timing = true })` (the sky and timing only when paintedSkies and frameTiming are installed) or `StyleKit.applyLook("tvAnime")` for the stack alone; it is one synced change, so every player sees it. Change one part afterwards with `AnimeBlocks.useLight`, `useRim`, `useShine`, `useLine` or `useFinish` (or `StyleKit.swap("<entry>", "<block>")`); the other parts stay as they are. Take it off with `AnimeBlocks.remove()`.
# animeBlocks test suite
Checks that every animeBlocks block passes styleKit's block check and that each family (the eight cel lights, the three rims, the six highlight shapes, the five lines, the four finishes) shares one set of named settings, so any block swaps for another of its part; that every whole look (TV anime, 80s OVA, soft modern anime, chibi, action anime, night city) applies in one change with all five parts and that light, rim, shine, line and finish each swap after; that swapping one part leaves every other part, and its tuned settings, exactly as they were; that the looks stack with the Style Cookbook (paperBlocks' paper underneath, inkBlocks' brush line instead of the anime line, the paper swapped in one change); that `useLine` leaves exactly one live Line entry when other line blocks are in the stack, so outlines never double; the per-character controls (`setCharacter`: a clean face, a thinner line, highlights off on one character and kept off across a look change, then back on); that `cleanFace` and `markHair` set an object's StyleChannel and `addHairShine` adds an entry targeting the hair variant; and that `remove()` empties the stack.
The shared stack is saved first and put back after every test, and the one object it spawns is removed. It does not judge pictures; the showcase and the package README's measurements do that. Run: `asset.resolve("animeBlocks.tests.animeBlocks", "testSuite"):run()`.
# animeWorld (workflow)
Turns an existing scene, world or installed kit into an anime look without breaking it, step by step, and keeps a way back. It surveys and records the current style stack, sky, light, characters, faces, hair, objects with their own ink, world labels and UI; chooses one of animeBlocks' six looks (TV anime, 80s OVA, soft modern anime, chibi, action anime, night city) or a stack built from the anime blocks, with an optional painted sky (paintedSkies) and frame timing for characters (frameTiming); applies it; gives characters clean faces (setCharacter) and hair its shiny band, excludes labels and makes sure nothing is outlined twice; checks UI, labels, characters, black stays black, the low tier and the multiplayer state; and reports every call it made with the exact undo (the recorded stack reloaded, every channel cleared, the sky and timing put back).
Run it: `zero workflow start --name animeWorld --args '{"subject":"my level","look":"tvAnime","sky":true}'`. Needs animeBlocks installed (it brings styleKit, toonBlocks, paintedSkies and frameTiming).