Repository navigation
Add bevel and typed-text masks to layers - #25
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two more forms of mask, and a bevel that makes a masked shape read as raised.
maskcan 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.sizeis the poster range, 0.01 to 0.5 of the frame height.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.examples/layer_mask/funkbox-text-chrome.json: the FUNK BOX chrome example with a text mask and a bevel.docs/catalog.jsonregenerated; themaskschema is nowanyOf(image path, or text object withrequired: ["text"]);beveladded.docs/loops.mdand both funk-studio skill copies (kept byte-identical) describe the new forms.Stacking
This PR is stacked on #24 (
card/layer-mask). Its base iscard/layer-mask, so the diff shows only the bevel and text work. Once #24 merges, retarget this PR tomain.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.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 checkandruff format --checkclean on changed files.xvfb-run -a python -m funkbox loop still --recipe examples/layer_mask/funkbox-text-chrome.jsonrenders the letters in chrome with the bevel on the edges.pytest -q -rfEon 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