Skip to content

Add bevel and typed-text masks to layers - #25

Merged
IsraelWebDev merged 1 commit into
mainfrom
card/bevel-text
Nov 10, 2026
Merged

IsraelWebDev merged 1 commit into
mainfrom
card/bevel-text

Conversation

@IsraelWebDev

@IsraelWebDev IsraelWebDev commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Two more forms of mask, and a bevel that makes a masked shape read as raised.

  • Text mask. A layer's mask can be typed text: {"text": "FUNK BOX", "size": 0.22, "font": "Funkbox Block:800", "align": "center"}. It is drawn by the poster text pipeline, and the text audit applies: text that is not drawn exactly raises an error, never a different mask. size is the poster range, 0.01 to 0.5 of the frame height.
  • Bevel. A masked layer can carry bevel: {"width", "strength", "angle"}. The mask's edges are lit (a shader pass, bevel.glsl), so the shape reads as raised. Colour only: coverage and the interior are unchanged. A bevel needs a mask.
  • Example. examples/layer_mask/funkbox-text-chrome.json: the FUNK BOX chrome example with a text mask and a bevel.
  • Catalog and docs. docs/catalog.json regenerated; the mask schema is now anyOf (image path, or text object with required: ["text"]); bevel added. docs/loops.md and both funk-studio skill copies (kept byte-identical) describe the new forms.

Stacking

This PR is stacked on #24 (card/layer-mask). Its base is card/layer-mask, so the diff shows only the bevel and text work. Once #24 merges, retarget this PR to main.

Testing

  • tests/test_mask_bevel_text.py (19 tests, written first, red, then passing): round trip, bevel validation, text-mask validation, bevel GL tests (edge band lit, interior unchanged, coverage unchanged), text mask via the poster pipeline, refusal of inexact text, catalog shape, example resolves.
  • Targeted run: tests/test_mask_bevel_text.py, test_layer_mask.py, test_engine.py, test_recipe.py, test_tool_options.py, test_catalog.py, test_p6_install.py, test_doc_links.py, tests/loops/test_liquid_metal.py: all passing.
  • ruff check and ruff format --check clean on changed files.
  • Visual: xvfb-run -a python -m funkbox loop still --recipe examples/layer_mask/funkbox-text-chrome.json renders the letters in chrome with the bevel on the edges.
  • Full local suite on the PR Add layer masks: a layer's alpha can come from an image #24 head is still running; the full run on this head is pending, and CI runs pytest -q -rfE on the PR head.

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34


Generated by Claude Code

A layer's mask can now be typed text, {"text", "font", "size", "align"}, drawn by the
poster text pipeline. The text audit applies: text that is not drawn exactly raises,
never a different mask. size is the poster range, 0.01 to 0.5 of the frame height.

A masked layer can carry a bevel ({"width", "strength", "angle"}): the mask's edges are
lit so the shape reads as raised. The bevel changes colour only; coverage and the
interior are unchanged. A bevel needs a mask.

Adds examples/layer_mask/funkbox-text-chrome.json, the FUNK BOX chrome example with a
text mask and a bevel. Catalog, docs/loops.md and both funk-studio skill copies updated.

Stacked on card/layer-mask (PR #24).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
@IsraelWebDev
IsraelWebDev changed the base branch from card/layer-mask to main November 10, 2026 20:33
@IsraelWebDev
IsraelWebDev merged commit d82e2e6 into main Nov 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant