Repository navigation
feat(kit): add drawing styles for html films - #38
Merged
Merged
Conversation
…ed pencil, blueprint, collage and whiteboard
…er and hatched SVG shapes
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
An HTML film could only be drawn in the flat dark look the page set itself. This adds drawing styles to the kit, so Claude can draw a film in the look that fits the theme. Part of #16.
<body data-style="…">picks one of five styles:paper(pencil on paper),crayon(coloured pencil),blueprint,collage(paper collage) andwhiteboard. Withoutdata-stylea film looks as before.--ground,--ink,--accent,--mark,--tint-1to--tint-4, …), the ground texture and the line width..drawn: a box outlined (and coloured in with--fill) by a wobbling hand-drawn line.sketch: wobbling lines for an SVG drawing.hatch: diagonal shading.marker: a highlighter stroke behind a word, drawn left to right as GSAP tweens--mark-xfrom 0 to 1.cutoutand.taped(collage): a piece of paper with torn edges and a strip of tape.tooth(crayon): a coloured-pencil fillkit/player.jsadds the SVG filters these use (#mr-pencil,#mr-crayon,#mr-marker,#mr-torn,#mr-tooth). It also adds the hatch patterns for SVG shapes (fill="url(#mr-hatch)"andurl(#mr-hatch-accent)). The lines boil: the filter seed changes 8 times a second, set by film time, so frames stay deterministic.@fontsource/klee-one), a handwriting-like font for the hand-drawn styles.references/html-film.mdexplains which style fits which theme, and when to use each part. Claude picks the style from the request, so there is no new option for users.How it was checked
make check: 11 test files, 113 tests passed, coverage 96.84%.tests/html-film.test.ts, on a pencil-on-paper page:kitputs the stylesheet and Klee One in the film.drawncard stays where the page puts it, and its text is measured for contrast against the card--mark-xmotion-render checkreportedlayout: ok.Test plan
make check