b32b8a6a3df1ae1c3cc1ad14b606ac5800171e56
Audited masking against the four-scope spec (groups, main timeline, clips, SVG-internal). Rule 2 was already correct; rules 1, 3, 4 needed fixes: - drawMaskedGroup now walks children bottom-up and applies each mask to the offscreen buffer immediately, so a mask only affects layers below it in the stack — layers above the mask render unmasked on top. - drawTrackGroup rewritten with an Item discriminated union collected bottom-up, then a single z-order loop renders/applies, replacing the old "collect all masks → apply at end" pattern. - Both clip-rendering sites (drawSceneFrame top-level clip path and drawTrackGroup's clip-child path) switched from drawLayers to drawMaskedGroup — previously a mask layer inside a clip was rendered as a regular shape instead of masking. - 5 new tests under "mask layers — rendering" cover the four-rule spec (group below-only, group negative below-only, clip-scoped mask, SVG-asset mask scoped to interior, clip-internal layers above mask unmasked). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
TypeScript
60%
Vue
35.4%
JavaScript
3.4%
HTML
0.9%
CSS
0.2%
Other
0.1%