Skip to content
Back to skills

Horizon

ASecurity

**Use for**: a skyline, mountains, a sky texture, a moon, any layer too far to show its own depth while the camera travels. **Status**: the method comes from two verified demos (a curved city panorama behind an endless boulevard, a felt sky card behind a ride); the scripts below pass their offline checks and have not yet been run in Play.

  • 21 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsgonode

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add josazar/skill-endless-scene --skill horizon --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Horizon?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Horizon
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/josazar-horizon/badge)](https://www.skillsdirectory.com/skills/josazar-horizon)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!-- sub-skill of endless-scene: read ../../SKILL.md first (shared rules, build order) -->
# Sub-skill: horizon (far layers as textured cards)

**Use for**: a skyline, mountains, a sky texture, a moon, any layer too far to show its own depth while the camera
travels. **Status**: the method comes from two verified demos (a curved city panorama behind an endless boulevard, a
felt sky card behind a ride); the scripts below pass their offline checks and have not yet been run in Play.

## The one idea: a picture on a card, moved like the sky

A far layer is an image on an arc strip around the camera (or a flat plane) that never travels with the pool. It
only turns with the heading and drifts a bounded amount sideways, so it stays legible while the near world streaks.
[references/layers.md](../../references/layers.md) says which layers qualify: under ~2 px of own depth over the shot.

## Build

1. **Make the image** (or take the user's): a transparent PNG strip (about 3:1) on a low straight baseline, full
   tops and sides, a low long-lens eye-level view, the scene's sun direction, aerial perspective baked in (cooler
   and flatter than the near world), lower masses where the road's vanishing point falls. No sky pixels, ground,
   road, haze, people, text or logos. Sky: evenly lit, no stars, moon or vignette baked in (separate sprites).
   [assets/skyline-example.png](assets/skyline-example.png) is a worked example (1.5:1, so it needs a tall card).
2. **Plan the cards** in `scene.json` (`horizon.maxYaw`, `horizon.cards`): `name`, `kind` (`silhouette` or `sky`),
   `distance`, `top` and `sink` (degrees above and below the eye line), `image` (the PNG on disk sets the aspect),
   `arc`, `margin`, `fade`, and for a camera that turns, `follow` (fraction of the heading) and `drift` / `maxDrift`.
   `node subskills/horizon/scripts/horizon.mjs scene.json` prints each card's size, tiles, how many times the image
   repeats across the frame and its stretch. The checks refuse a card that leaves the frame at the largest yaw, a flat
   card turned past ~70 deg (use an arc), an image repeated into a pattern (over 2.5 times across the frame), and a
   card inside the ride pool.
3. `node scripts/compose.mjs scene.json out/` writes `horizon-cards` (one `Horizon <name>` mesh per card centred on the
   eye, and a `Tex <name>` slot per card in `Texture Slots`) and the document part. Run the recipe, set the document.
4. **Get the image in**: ask the user to drop the PNG on its `Tex <name>` slot plane
   ([references/images.md](../../references/images.md)). Until then the card shows a procedural ridge line.
5. **Fog**: the cards ignore the fog (they sit beyond it) and fade their foot into the fog colour over `fade`; the
   fog colour must be the colour behind the card (the background, `useBackgroundColor`). A different fog colour turns
   the card into a cut-out. A sky card multiplies its image, divided by the image's own mean, over a gradient from
   the fog colour, so the horizon still meets the fog.

## Rules

1. **Split by contact, not by distance**: a silhouette with no visible support goes on the card; a tower whose foot
   meets a sidewalk, a bridge end, a greenhouse roof goes on a moving piece as geometry with the image cropped onto
   it by UVs (front face plus a side return), its foot sunk into a plinth and its roof joint covered by trim.
2. **Crop the card to the silhouettes**: no painted asphalt, no bridge ends, no near objects in the image.
3. **Tile a sky texture, don't stretch it**: use it as detail over a gradient (multiply, mean ~1) so the horizon
   still equals the fog colour.
4. **Check the colour of image textures in Play**: a texture can be decoded twice and come out darker and more
   saturated; measure the rendered colour against the image, then correct with the card's `gamma` (0.4545 undoes one
   decode).
5. **Re-check coverage every time the camera's range grows** (a side shot needs the half fov plus its yaw): raise
   `maxYaw` and re-plan.
6. **With the road sub-skill**, its document already turns the `Horizon Gardens` group with the track: compose with
   `--merge` onto its `ride.html`, keep `follow` at 0, and parent the card into that group by handle in a later call.

## Verify

`node scripts/check.mjs` here (coverage at the largest yaw against the built mesh, refusals). In Play, from the shot
camera: the card's edges out of view at the largest yaw, no hard line where it meets the fog, its colour against
the source image, and in a bend the card turning with the road without sliding over a moving tower.

Files in this skill

  • SUBSKILL.md4.5 KB
  • scripts/build.js1.6 KB
  • scripts/check.mjs3.4 KB
  • scripts/horizon.js2.6 KB
  • scripts/horizon.mjs5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.