A toolbox of film styles made in code for Claude Code: 66 ready to use, and your own. Each style is a style prompt plus a demo film made entirely in code by Claude Opus 5.5, with no video model. By Lemomo. · 一套用代码做片的风格工具箱:66 种现成风格,也能做出你自己的
JavaScript agent-skillsai-agentsai-short-filmai-videoanimationcanvasclaudeclaude-codeclaude-code-pluginclaude-code-skillcreative-codingffmpegfilmmakingmotion-graphicsopus-5-5prompt-librarytext-to-speechthreejsvideo-productionwebgl
Chalkboard: chalk on a wiped classroom board, a claim written, wiped and rewritten until the answer stands, with narration and bilingual subtitles
lemomo-aiee446bf12a4f
diff --git a/styles/chalkboard/DEMO.md b/styles/chalkboard/DEMO.mdnew file mode 100644index 0000000..328b033--- /dev/null+++ b/styles/chalkboard/DEMO.md@@ -0,0 +1,69 @@+# Chalkboard — our demo++One example among many. Don't reuse its story, arc, shots, props or timings.++Demo: *The Story of Chinese Characters* 《汉字的故事》 (49.3 s) · `chalkboard.mp4` · `chalkboard.srt` · source in [`demo/`](demo/)++A child has left a question in the corner of a freshly wiped classroom board: are 射 (shoot) and 矮 (short) swapped? A teacher's voice in Chinese tells the story; a subtitle plate carries each line in Chinese and English. Every fact and its source is in [`demo/FACTS.md`](demo/FACTS.md).++## Story & structure++Online, people say the two characters got swapped: 射 is 身 + 寸, "one inch tall", so it should mean short; 矮 is 矢 (an arrow) + 委 (to let go), "let an arrow go", so it should mean shoot. The front panel slides away and the back board writes 射 through time: a bow with an arrow, then a hand pulling the string, then the bow bent into 身 and the hand into 寸. 矮 has an arrow because arrows were once used as rulers, and 短 (short) has one too: an orange arrow is laid along a line and ticks off lengths. One wipe removes the wrong readings; the right ones are written in the same place, and after a held beat the answer goes under the child's question: 没弄反, not swapped. The panel slides back for the end card.++Native moves spent: drying wet streak (opening), second hand (the child's question), write–wipe–rewrite in place (the verdict), tracked component in orange (the bow → 身, the 矢), sliding panel reveal (away and back), chalk as a measuring tool (the arrow-ruler), a line sewing two boards.++## Shots++| # | Time | Shot | Camera | Native move / note |+|---|---|---|---|---|+| 1 | 0–2.7 | title 汉字的故事 / The Story of Chinese Characters written at the top of the front panel | close | |+| 2 | 2.7–5.7 | the wet streak dries; 射 and 矮 go into their grids; the child's yellow question and the date | pull to the question frame | drying wet streak, second hand |+| 3 | 5.7–10.7 | 射 close: 身 · 寸 underlined and labelled, "一寸高? / An inch tall?" | close, then widen | |+| 4 | 10.7–17.5 | 矮: 矢 · 委, "放箭? / Let an arrow fly?", two white crossed arrows | locked medium | the claim |+| 5 | 17.5–18.5 | front panel slides right; whip to the back board; a timeline is drawn | locked, whip | sliding panel |+| 6 | 18.5–21.8 | oracle-bone form: an orange bow with a white arrow | close pan | tracked component |+| 7 | 21.8–24.4 | bronze form: bow and arrow, then a hand lands on the string as the voice names it | pan | |+| 8 | 24.4–28.7 | seal and regular script, the bow orange in both; 身←弓 · 寸←手 / body ← bow · inch ← hand | pan, push out | |+| 9 | 28.7–33.5 | 短 with an orange 矢; 以矢为正 / the arrow is the ruler; the arrow-ruler; an orange line leaves along the bottom | locked medium | chalk as a measuring tool |+| 10 | 33.5–39.7 | the line crosses the seam and circles the 矢 under 矮; one wipe; 弓 + 手 / bow + hand, 矢 + 委 / arrow → length · wei → sound; 1.5 s hold | same frame as shot 4 | write–wipe–rewrite |+| 11 | 39.7–43.0 | 没弄反 ✓ / Not swapped under the child's question | same frame | the verdict |+| 12 | 43.0–45.2 | the whole front wall: both boards, tray, clock at 7:58, window light | pull back, hold | summary |+| 13 | 45.2–49.3 | the front panel slides back; on the clean panel: title and sign-off | locked | end card |++## Voice++Edge TTS `zh-CN-XiaoxiaoNeural` at +15 % (`demo/lines.json`). Readings fixed in `say` only: 矢 → 史 (shǐ), 委 → 伟 (wěi), 量 → 良 (liáng). Lines start 0.35–0.5 s after the previous one ends; the only longer hold, 1.5 s, comes before the verdict.++| # | Chinese (spoken) | English (subtitle) |+|---|---|---|+| 1 | 网上有个说法:射和矮,这两个字弄反了。 | People online say the characters 射 and 矮 got swapped. |+| 2 | 射字左边是身,右边是寸。身高一寸,那不就是矮吗? | 射 is 身 (body) plus 寸 (inch). One inch tall: isn't that short? |+| 3 | 矮字左边是矢,矢就是箭;右边是委,有放下的意思。把箭放出去,那不就是射吗? | On the left of 矮 is 矢, an arrow; on the right is 委, to let go. Letting an arrow go: isn't that shooting? |+| 4 | 其实,射最早画的是一张弓,弓上搭着一支箭。 | In fact, the oldest 射 is a bow with an arrow on it. |+| 5 | 后来又加了一只手,在拉弓弦。 | Later a hand was added, pulling the string. |+| 6 | 弓慢慢写成了身,手写成了寸。 | The bow slowly became 身, and the hand became 寸. |+| 7 | 那矮里为什么有支箭?古人拿箭当尺子,用来量长短。所以短字里,也有这支箭。 | Why is there an arrow in 矮? People once used arrows as rulers to measure length. That is why 短 (short) has one too. |+| 8 | 射,是拉弓放箭;矮,就是个子短,委只管读音。 | 射 means drawing a bow and shooting; 矮 means short, and 委 only gives the sound. |+| 9 | 所以,没弄反。 | So they were never swapped. |++Subtitles split each line at sentence ends (one cue per sentence, Chinese line over English line), timed by each sentence's share of the spoken characters. An English-voice version uses the same picture: `en-US-AvaNeural` at +10 % (n1, n5, n6 at +14 %, n7 at +12 %; n6 drops "slowly" in the spoken text), the characters read in pinyin (Shè, Ǎi, Shēn, Shǐ, Wěi, Duǎn; 寸 as "Tsun"), each line starting with its Chinese line (`demo/lines_en.json`, `sh demo/build.sh en`).++## Score structure++Cold open on room tone and chalk. Two guqin notes mark 射 and 矮 finished. From the panel slide, a quiet pulse in D (marimba and pizzicato bass, two notes a second); the oracle-bone bow "sounds" an open A on the guqin and each later form adds a note. A rising marimba run follows the orange line and hangs on a suspended chord through the wipe; the check mark lands on D with a guqin harmonic; the motif plays in full over the wall with a distant bell. The score ducks about 17 dB under the voice and comes up in the pauses. Mix −16 LUFS, true peak −4.0 dBFS before mastering.++## Palette & props++Slate #0f1c15 with slow mottling; white chalk, orange chalk (the bow, 身, the 矢, the arrow-ruler and the line), pale yellow for the child. Front panels with two painted tian-zi grids, a back board with one small grid, wooden frame and stiles, a tray with two white sticks and an orange stub, a wall clock at 7:58, a warm white wall and green dado, a faint window patch on the lower left.++## End card++The front panel slides back over the rewritten board; on the clean right panel 汉字的故事 / The Story of Chinese Characters and "LemoLab × Claude Opus 5.5" are written in chalk and held about 3.5 s. The sign-off belongs to this library's demo only; a user's film carries no LemoLab credit and no copy of this card.++## Build notes++- `sh styles/chalkboard/demo/build.sh` (Chinese voice) or `… build.sh en` (English voice, `chalkboard-en.mp4`): fonts and chalk recordings are downloaded, the subtitle font subset is cut (`tools/subset.py`), recordings are sliced into grains (`tools/foley_lib.py`), the voice is made and checked, `events.json` is exported from the page, `audio.py` writes `mix.wav` (or `mix_en.wav`), then render, master, readcheck, `chalkboard.srt` (`tools/srt.py`), poster and gallery frame (picture only, `index.html?nosubs`).+- Code: `index.html` → `js/app.js` (compositor, subtitles, `TEXTS`) → `js/film.js` (every stroke, voice start, subtitle cue and camera key, as data). Engine files are listed in STYLE.md §10. `index.html?lab=hz&chars=…` shows stroke data over the reference font.+- Voice lengths are copied into `VO` in `js/film.js`; the picture is timed from them, so a new voice means new timings.+- The page bakes about 500 strokes on load (about 10 s), then 20–50 ms per 1080p frame.+- Demo pitfalls: arrows inside English lines on the board are drawn from `hz.js` (the font has none); the bronze form's name is written before its hand so the label can be read while the hand waits for the voice.diff --git a/styles/chalkboard/STYLE.md b/styles/chalkboard/STYLE.mdnew file mode 100644index 0000000..2eff287--- /dev/null+++ b/styles/chalkboard/STYLE.md@@ -0,0 +1,121 @@+# Chalkboard — Style Prompt++> A real classroom blackboard on which chalk writes itself, stroke by stroke in true stroke order, with no hand, no chalk stick and no eraser in sight. One idea is taught the way a teacher does it: write what people think, wipe it with one pass, write what is true in the same place.+> References (grammar only): a primary-school literacy lesson on a sliding double blackboard; the way a teacher underlines the parts of a character, circles one component and wipes a wrong line. Take the order of a lesson, not any teacher's handwriting.++Suits short lessons on one idea: where a word or a character comes from, a misconception set right, a worked problem. The length follows how many steps the lesson has.++## 1. Essence, and what it is not++- **A clean, freshly wiped board.** One even deep ink green with its own fine grain and very slow mottling. No history on the slate: no old swirls, no ghost lessons, no floating dust, no bokeh.+- **Writing that grows like a hand writes.** Strokes appear along their centre line in the correct stroke order, with pressure: pressed starts and corners, points that lift, 捺 feet that spread, hooks flicked off.+- **Three chalks at most.** White for structure, one accent chalk for the single part the lesson tracks, one pale chalk for a second hand (a pupil, a visitor).+- **A real object in a real room.** Wooden frame, a tray with sticks of chalk, painted tian-zi grids, sliding panels, a wall and a clock around it.+- **Few words, large letters.** The board holds keywords; the explanation is spoken.++Not Whiteboard Explainer: that style is a bright glossy board, coloured markers, floating marker props and magnets, ghost marks of old lessons, and a camera travelling across a knowledge map of many regions to explain how something works. Chalkboard is a dark matte slate with nothing floating in front of it, kept clean, one question per board, the camera facing it flat; it advances by writing a claim, wiping it and rewriting in place, and it lives in a classroom (panels that slide, grids painted on, a tray, a wall). Not a slide either: nothing is typeset, nothing fades in.++## 2. Materials & rendering++- Canvas 2D for everything visible; WebGL2 only for the post pass (camera motion blur, a light vignette, grade, dither).+- Each stroke is baked once into a board-space coverage sprite (coverage, arc length, lateral position). A partial stroke reveals pixels up to the current arc length with a round leading edge; the board's grain decides which grains take the chalk (deposit with a 2×2 supersample and a faint powder halo).+- Chalk edges are firm; loose powder only at the lift-off of a stroke (two to five grains). Never sugar the board.+- Writing strokes carry a width profile per stroke type (start bump, corner bumps, taper for 撇 / 提, foot for 捺, quick lift for hooks) and a pressure profile (heavier at both ends, lighter in the middle). Straight strokes bow slightly; horizontals rise 2–3° to the right; 横, 竖 and 折 enter with a short pressed tick from the upper left.+- Board, panels, frame, tray, clock and wall are baked once in world units; the slate grain is a periodic tile drawn in world space (soft-light) only when the camera is close.+- Erasing is a blurred destination-out band along one smooth path on a layer that holds only the strokes being wiped; it leaves a very thin, even haze. One wipe per film is plenty.+- A wet streak (a board just wiped with a damp cloth) is a soft mask with a wide blur at its drying edge, fading at top and bottom, that darkens the slate slightly; never a hard rim.+- Light: a gentle multiply falloff away from the windows and at most a faint warm window patch. Light never draws shapes across the writing in close shots.++## 3. Colour logic++- Ground: deep ink green slate, wood frame, warm white wall and a coloured dado if the room is seen.+- White chalk carries every structure: characters, lines, labels, arrows.+- The accent chalk (example: orange) is reserved for the one component the lesson tracks; it never decorates and never draws arrows or underlines that are not that component.+- A pale second chalk (example: yellow) marks another person's handwriting.+- No rainbow, no gradients in chalk, no glow. Painted grids are dull and thin so the chalk always wins.++## 4. Type & subtitles++- Chinese is hand-authored stroke data (centre lines + stroke type per stroke) drawn by the chalk engine, never a font's outline. Every character the topic needs is added to the data and checked against an OFL kai font behind it before shooting.+- English on the board is a single-line OFL handwriting font (EMS family) drawn by the same engine; symbols missing from the font (arrows, plus) are drawn as strokes.+- On the board: keywords only, one line of Chinese, the next line English, a size smaller.+- Sizes at 1080p: big characters 300–450 px; labels ≥ 55 px CJK and ≥ 30 px Latin cap height; small writing gets heavier chalk so no stroke is thinner than 3 px.+- Reading time: every block stays fully in frame ≥ CJK ÷ 4.5 + other ÷ 15 + 1.5 s, counted from the frame it is wholly visible (readcheck). A block is fully written before it is read.++### Voice and subtitles++- When the style tells a story it is narrated: one calm teacher's voice in short spoken sentences, said as the matching chalk appears; what the voice names is being written or shown at that moment.+- A quiet subtitle plate sits above the bottom safe area: the spoken line in Chinese and a free English translation, one line each, a plain kai face (an OFL subset) on a soft dark plate, in and out with the voice. Long lines are split at sentence ends into several cues.+- Nothing the viewer must read on the board sits behind the plate; frames held for the board's words are composed above it.+- Pauses between voice lines are short (0.25–0.4 s); one longer hold (about 1.5 s) is kept for the verdict. Board action (a panel sliding, a wipe) runs under the voice instead of waiting for it.++## 5. Motion quality++- 30 fps, continuous. Chalk speed: big characters ~0.1–0.3 s per stroke, labels ~0.04 s per stroke, with short air time between strokes; writing speeds up rather than making the voice wait.+- Camera eases in and out (cubic), never bounces except a whip landing.+- Things appear only by being written, wiped, revealed by a sliding panel or by drying. Nothing fades in.++## 6. Camera grammar++The camera always faces the board flat on (no perspective tilt).++| Move | What it expresses | Can serve |+|---|---|---|+| Close shot on the writing | attention on how a character or line is built | a component; a step of a proof; a spelling |+| Slow lateral pan along a line | time or sequence | a timeline; a derivation; a list of cases |+| Pull back to a fixed medium frame | the whole question at once | a comparison; a claim and its counter-claim |+| Same frame later | judgement | a correction; a before / after |+| Locked frame while a panel slides | a page turned in the room's own way | a new chapter; a hidden board |+| Whip with motion blur (≤ 0.5 s) | a jump to another part of the wall | a change of board |+| Cut on a line crossing a seam | a connection | cause and effect; the same part in two places |+| Wide shot of the whole wall | summary | the map of what was learnt |++Rules: the subject is never smaller than a third of the frame in close shots; text blocks are never cut by the frame edge while they are read; no empty board for more than half a second. Transitions are hard cuts, a sliding panel or a line across a seam; no dissolves or page flips.++## 7. Sound palette++- Voice first: it is the loudest element; music sits 15–18 dB under it and comes up only in the pauses.+- Foley: real chalk recordings cut into grains, one grain chain per stroke, level from stroke size; a light knock on landings; the accent chalk slightly softer and duller. A felt pass for the wipe, the low roll of a sliding panel ending on a stop, room tone very low; school sounds (a distant bell) only as punctuation.+- Music: sparse plucked strings (a guqin model or nylon guitar) with marimba and pizzicato bass; a plucked note can be "born" from something drawn. Silence while a question or a verdict is read.+- Mix: about −16 LUFS integrated before mastering, true peak ≤ −1.5 dBFS.++## 8. Native moves++- **Write, wipe, rewrite in place.** The wrong reading is written under its object, wiped with one pass, and the right one written in the same spot from the same camera position. *Fits content like:* a common misconception in physics; a misremembered date; a sum everybody gets wrong.+- **Tracked component in accent chalk.** One part keeps its colour and its height across several forms. *Fits content like:* a root through a word family; a variable through an equation's rearrangements; a gene through generations.+- **Sliding panel reveal.** The front panel slides away to show a clean back board, and can slide back to close the lesson. *Fits content like:* "but before that…"; the hidden proof; the answer kept back.+- **A line that sews two boards.** One accent line runs across the seam to join two places. *Fits content like:* the same constant in two formulas; a quote and its source; cause and effect.+- **Drying wet streak.** The freshly wiped board dries back and reveals what was left untouched. *Fits content like:* yesterday's question; a note left by a student; a reminder at the corner.+- **Second hand.** A different, childlike chalk colour and hand on the same board. *Fits content like:* a pupil's question; a visitor's comment; a wrong attempt.+- **Chalk as a measuring tool.** An accent object laid along a white line and ticked off, so a comparison is shown, not told. *Fits content like:* a unit's origin; a scale; how many of one thing fit another.++## 9. Pitfalls of the medium++- Dirty boards (old swirls, ghosts, floating dust) read as "messy", not "real". Keep the slate clean and let the grain carry the realism.+- Equal-width polylines look like a plotter and make characters misread. Use stroke-type width and pressure profiles.+- Character data that is structurally wrong is caught at once by native readers: check every character against a reference before shooting.+- Small writing at 1080p disappears with the same chalk width as large writing; give small text heavier chalk.+- Text written while the camera moves away fails reading time; hold the frame or keep the block in view.+- Accent colour spread over arrows and decorations stops meaning anything.+- A wet streak with a hard edge looks like a cut-out.+- Board-speak in the voice ("A plus B", component names with no meaning) is not understood: every component is said with what it means the first time it appears.++## 10. Engine++- `demo/js/chalk.js`: `Stroke`, `bake(stroke, R)`, `drawStroke(ctx, stroke, t)`: the chalk itself.+- `demo/js/hand.js`: `writeChar(ch, cx, cy, size, t, o)` (teacher or child hand), `writeLine(text, …)` (mixed Chinese and Latin), `writeLatin`, `loadSvgFont`.+- `demo/js/hz.js`: stroke data, `"type x,y x,y …"` in a 100-unit box; add every character a new topic needs here.+- `demo/js/r2d.js`: grain tile and deposit; `demo/js/stage.js`: slates, frame, tray, clock, painted grids.+- `demo/js/app.js`: frame compositor (layers, wipe, wet streak, light), subtitle plate and `TEXTS`.+- Minimal example: `writeChar('水', 800, 600, 400, 0)` after adding 水 to `hz.js`, then `bake` each stroke and draw with `drawStroke(ctx, s, t)`; open `index.html?lab=hz&chars=水` to check the proportions against the reference font.++## 11. Variation space++The agent decides the topic, the board layout, the number of panels, the tracked component, the hands, the camera path and the pacing.+- **Structures:** a proof built on one board line by line; three wrong answers wiped one after another before the right one; two boards in dialogue, question on one, answer on the other.+- **Openings:** a duster's last pass revealing a formula; a close-up of the tray as one chalk starts writing; the bell ringing over an empty, freshly wiped board.+- **Endings:** the whole wall with the lesson complete; a final underline under one word; the board half-wiped for the next class with one line kept.++---++How our demo was made (story, shots, score, end card, build): [DEMO.md](DEMO.md). Read it after your treatment exists.diff --git a/styles/chalkboard/chalkboard.srt b/styles/chalkboard/chalkboard.srtnew file mode 100644index 0000000..c85686f--- /dev/null+++ b/styles/chalkboard/chalkboard.srt@@ -0,0 +1,74 @@+1+00:00:02,020 --> 00:00:05,546+网上有个说法:射和矮,这两个字弄反了。+People online say the characters 射 and 矮 got swapped.++2+00:00:05,667 --> 00:00:08,023+射字左边是身,右边是寸。+射 is 身 (body) plus 寸 (inch).++3+00:00:08,023 --> 00:00:10,570+身高一寸,那不就是矮吗?+One inch tall: isn’t that short?++4+00:00:10,570 --> 00:00:12,825+矮字左边是矢,矢就是箭;+On the left of 矮 is 矢, an arrow;++5+00:00:12,825 --> 00:00:15,001+右边是委,有放下的意思。+on the right is 委, to let go.++6+00:00:15,001 --> 00:00:17,675+把箭放出去,那不就是射吗?+Letting an arrow go: isn’t that shooting?++7+00:00:17,735 --> 00:00:21,702+其实,射最早画的是一张弓,弓上搭着一支箭。+In fact, the oldest 射 is a bow with an arrow on it.++8+00:00:21,702 --> 00:00:24,332+后来又加了一只手,在拉弓弦。+Later a hand was added, pulling the string.++9+00:00:24,332 --> 00:00:27,092+弓慢慢写成了身,手写成了寸。+The bow slowly became 身, and the hand became 寸.++10+00:00:27,092 --> 00:00:29,050+那矮里为什么有支箭?+Why is there an arrow in 矮?++11+00:00:29,050 --> 00:00:31,620+古人拿箭当尺子,用来量长短。+People once used arrows as rulers to measure length.++12+00:00:31,620 --> 00:00:34,095+所以短字里,也有这支箭。+That is why 短 (short) has one too.++13+00:00:34,096 --> 00:00:35,649+射,是拉弓放箭;+射 means drawing a bow and shooting;++14+00:00:35,649 --> 00:00:38,578+矮,就是个子短,委只管读音。+矮 means short, and 委 only gives the sound.++15+00:00:39,698 --> 00:00:41,385+所以,没弄反。+So they were never swapped.diff --git a/styles/chalkboard/demo/CREDITS b/styles/chalkboard/demo/CREDITSnew file mode 100644index 0000000..8a928c3--- /dev/null+++ b/styles/chalkboard/demo/CREDITS@@ -0,0 +1,39 @@+The Story of Chinese Characters (汉字的故事) — Chalkboard (Lemo-Opuscar) · LemoLab × Claude Opus 5.5++IMAGES, FOOTAGE, MODELS+- None. The classroom wall, boards, frame, tray, clock, chalk and wet streak are drawn in code (js/stage.js, js/chalk.js,+ js/app.js). No photographs, no scans, no AI-generated images, no 3D models.++CHALK WRITING+- Every Chinese character written on the board is our own stroke data (js/hz.js): a centre line and a stroke type per+ stroke, in GF 0023-2020 stroke order, drawn by the chalk engine. While writing the data, proportions were checked by eye+ against LXGW WenKai set behind it (check page: index.html?lab=hz); no outline was copied or traced.+- The oracle-bone, bronze and seal forms of 射 are redrawn by hand as chalk lines (js/ancient.js); no ancient-script font.+ What they were drawn after is in FACTS.md.++FONTS (SIL Open Font License 1.1; licence texts in fonts/; not in git, build.sh downloads them)+- EMS Delight (teacher's English on the board) and EMS Casual Hand (the child's English), single-stroke SVG fonts:+ derivatives of Delius (Natalia Raices) and Covered By Your Grace (Kimberly Geswein); SVG conversion by Sheldon B.+ Michaels and Windell H. Oskay, gitlab.com/oskay/svg-fonts. fonts/OFL-EMS.txt+- LXGW WenKai v1.530 (© LXGW, github.com/lxgw/LxgwWenKai): the subtitle face, subset by tools/subset.py to the characters+ the subtitles use (fonts/wenkai-sub.woff2); the full font is used only on the check page. fonts/OFL-LXGWWenKai.txt++VOICE+- Chinese: Edge TTS (Microsoft), zh-CN-XiaoxiaoNeural, +15 %. English version: en-US-AvaNeural, +10 %.+ Through the library's core/tts/tts_zh.py; checked with core/tts/asr_check.py (faster-whisper, MIT; Whisper models, MIT).++SOUND+- Chalk recordings from Wikimedia Commons, cut into grains by tools/foley_lib.py (foley/lib):+ - "chalk-on-chalkboard" by fattirewhitey (freesound.org/people/fattirewhitey/sounds/264944; Commons file+ "264944 chalk-on-chalkboard.wav") — CC0 1.0.+ - "Chalkboard-writing.ogg" by Tomproberts (Commons) — CC0 1.0.+ - "WWS Chalk.ogg" by Work With Sounds / La Fonderie, provided by Work With Sounds in cooperation with Wikimedia+ Sverige (Commons) — CC BY 4.0 (creativecommons.org/licenses/by/4.0). Cut into grains, filtered and layered.+- Music samples (CC0): VS Chamber Orchestra: Community Edition (Versilian Studios), Versilian Community Sample Library+ (Versilian Studios) — marimba, pizzicato contrabass, vibraphone. Downloaded with sh tools/fetch.sh instruments+ vsco2ce | vcsl.+- Guqin: physical model (core/audio/pluck.py). Panel roll, felt wipe, corridor bell, room tone: synthesised in audio.py.++FACTS+- See FACTS.md: Shuowen Jiezi and Shuowen Xinfu as quoted on Dong Chinese; historical forms after the Academia Sinica+ character database as shown there.diff --git a/styles/chalkboard/demo/FACTS.md b/styles/chalkboard/demo/FACTS.mdnew file mode 100644index 0000000..995f3e1--- /dev/null+++ b/styles/chalkboard/demo/FACTS.md@@ -0,0 +1,21 @@+# Facts on the board and in the voice++Checked on Dong Chinese (dong-chinese.com), which quotes the Shuowen and shows historical forms from the Academia Sinica character database (小學堂).++1. **射 is a bow and a hand; later written 身 + 寸.**+ Shuowen, 射: 「弓弩發於身而中於遠也。从矢,从身。射,篆文从寸。寸,法度也,亦手也。」+ Etymology on the page: "Depicts a hand (又) pulling back a bowstring (弓) with an arrow (矢) to shoot. Later written as 身 and 寸."+ https://www.dong-chinese.com/wiki/射+ → board: 「身←弓 · 寸←手」, 「弓 + 手」; voice lines 4–6 and 8.+2. **矮 = 矢 (meaning) + 委 (sound).**+ Shuowen Xinfu: 「矮,短人也。从矢,委聲。」 "Phonosemantic compound. 矢 represents the meaning and 委 represents the sound."+ https://www.dong-chinese.com/wiki/矮+ → board: 「矢 + 委 / arrow → length · wei → sound」; voice line 8 (委只管读音).+3. **短: the arrow as the measure of length.**+ Shuowen: 「短,有所長短,以矢為正。从矢,豆聲。」+ https://www.dong-chinese.com/wiki/短+ → board: 「以矢为正 / the arrow is the ruler」, the arrow laid as a ruler; voice line 7.+4. **The popular claim** (射 = "one inch tall" should mean short; 矮 = "let an arrow go" should mean shoot) is a saying that circulates online. In the film it is the child's question and the first three voice lines, credited to no one. "委 has a sense of letting go" belongs to that claim only.+5. **The four forms of 射** on the timeline are simplified chalk redrawings after the forms shown on the 射 page above: oracle script (c. 1250–1000 BC, a bow with an arrow), bronze script (early Western Zhou, a hand added at the string), seal script as given in the Shuowen (身 + 寸), and regular script. They are teaching sketches, not tracings of a specific inscription.+6. **Stroke order** follows GF 0023-2020 (通用规范汉字笔顺规范).+7. **The date on the board**, 28 October 2026, is a Wednesday.diff --git a/styles/chalkboard/demo/audio.py b/styles/chalkboard/demo/audio.pynew file mode 100644index 0000000..7e59f0b--- /dev/null+++ b/styles/chalkboard/demo/audio.py@@ -0,0 +1,156 @@+"""Sound for 《没弄反》 -> mix.wav (48 kHz stereo, exactly DUR seconds).+Run from the library root (build.sh does it):+ node core/render/events.mjs styles/chalkboard/demo (events.json from the picture)+ .venv/bin/python styles/chalkboard/demo/audio.py [en]+Voice: edge-tts zh-CN-XiaoxiaoNeural (vo/*.wav), the loudest thing in the mix. Chalk: real recordings cut into+grains (foley/lib, CC0 / CC BY 4.0), one grain per stroke, length and level from the stroke. Score: a plucked+guqin (physical model) whose open-string twang is born from the oracle-bone bow, soft marimba and pizzicato bass+from the moment the panel slides; silence while the question and the verdict are read."""+import sys, os, json+HERE = os.path.dirname(os.path.abspath(__file__)); LIB = os.path.abspath(os.path.join(HERE, '../../..'))+sys.path.insert(0, LIB)+import numpy as np, soundfile as sf, soxr+from core.audio import sampler as S, pluck as P+from core.audio.sfx import SR, add, limit, whoosh, noise, bp, hp, lp, t_, brown, thump, compress++S.seed(11)+rng = np.random.default_rng(7)+EV = json.load(open(os.path.join(HERE, 'events.json')))+DUR = EV['dur']; ev = EV['ev']; N = int(round(DUR * SR))+first = lambda k: next(e for e in ev if e['type'] == k)+vo = {e['id']: e['t'] for e in ev if e['type'] == 'vo'}+EN = len(sys.argv) > 1 and sys.argv[1] == 'en' # `audio.py en`: same score and foley, English voice (vo_en) -> mix_en.wav+VODIR, OUT = ('vo_en', 'mix_en.wav') if EN else ('vo', 'mix.wav')+voice, fx, mus = (np.zeros((N, 2), np.float32) for _ in range(3))++def fade(x, a=.004, b=.03):+ n = len(x); a, b = min(int(a * SR), n // 2), min(int(b * SR), n // 2)+ x = x.copy(); x[:a] *= np.linspace(0, 1, a); x[n - b:] *= np.linspace(1, 0, b); return x++# ---------------------------------------------------------------- voice+for vid, t in vo.items():+ x, sr = sf.read(os.path.join(HERE, VODIR, vid + '.wav'), dtype='float32')+ if x.ndim > 1: x = x.mean(1)+ x = soxr.resample(x, sr, SR); x = hp(x, 90).astype(np.float32)+ x = x / (np.sqrt(np.mean(x ** 2)) + 1e-9) * .085 # every line at the same speaking level+ add(voice, x, t, 1.0, 0)+vpres = np.abs(voice[:, 0]); k = int(.25 * SR) # voice presence, smoothed: the score ducks under it+vpres = np.convolve(vpres, np.ones(k) / k, 'same'); vpres = np.clip(vpres / (vpres.max() + 1e-9) * 3, 0, 1)++# ---------------------------------------------------------------- chalk+IDX = json.load(open(os.path.join(HERE, 'foley/lib/index.json')))+strokes = [g for g in IDX if g['kind'] == 'stroke' and g['src'] in ('fat', 'wws', 'tom')]+taps = [g for g in IDX if g['kind'] == 'tap']+cache = {}+def grain(g):+ if g['file'] not in cache:+ x, sr = sf.read(os.path.join(HERE, 'foley/lib', g['file']), dtype='float32')+ if x.ndim > 1: x = x.mean(1)+ if sr != SR: x = soxr.resample(x, sr, SR)+ cache[g['file']] = x / (np.abs(x).max() + 1e-9)+ return cache[g['file']]+def chalk(d, v, orange=False):+ """a stroke of duration d: grains chained and cross-faded to length, softer and duller for orange chalk"""+ out = np.zeros(int((d + .06) * SR), np.float32); pos = 0+ while pos < len(out) - int(.03 * SR):+ g = grain(strokes[rng.integers(len(strokes))]); n = min(len(g), len(out) - pos)+ out[pos:pos + n] += fade(g[:n], .006, .02); pos += max(int(.6 * n), int(.04 * SR))+ env = np.ones(len(out)); a = int(.012 * SR); env[:a] = np.linspace(.3, 1, a); env[-int(.05 * SR):] *= np.linspace(1, 0, int(.05 * SR))+ out = out * env+ out = lp(out, 3800) if orange else hp(out, 500)+ return (out * v).astype(np.float32)+for e in ev:+ if e['type'] != 'chalk' or e['t'] < 0: continue+ d = max(.04, e['d']); size = min(1.0, e['len'] / 700)+ v = (.12 + .32 * size) * (1.25 if e['big'] else .8)+ add(fx, chalk(d, v, e['color'] == 'orange'), e['t'], 1.0, e['pan'])+ if d > .12 and rng.random() < .55: # the landing knock+ add(fx, fade(grain(taps[rng.integers(len(taps))]), .002, .03) * .35 * v, e['t'] - .005, 1.0, e['pan'])++# ---------------------------------------------------------------- room, panel, wipe, thread, bell+room = lp(brown(DUR), 900) * .006; fx[:, 0] += room[:N]; fx[:, 1] += np.roll(room, 997)[:N]+for e in [x for x in ev if x['type'] == 'slide']:+ d = e['d']+ r = lp(brown(d + .3), 260) * .5; r *= np.sin(np.pi * np.clip(t_(d + .3) / (d + .3), 0, 1)) ** .7+ tick = np.zeros_like(r); per = int(.045 * SR)+ for i in range(0, len(tick) - 400, per): tick[i:i + 300] += np.exp(-np.arange(300) / 40) * .25 * (.5 + .5 * np.sin(np.pi * i / len(tick)))+ add(fx, ((r + lp(tick, 1200)) * .7).astype(np.float32), e['t'], 1.0, .2)+ add(fx, thump(.8, 62) * .7, e['t'] + d, 1.0, .35) # it meets its stop+for e in [x for x in ev if x['type'] == 'tick']: # ticks on the arrow-ruler+ add(fx, fade(grain(taps[rng.integers(len(taps))]), .002, .03) * .3, e['t'], 1.0, 0)+add(fx, whoosh(.32, .7) * .5, first('whip')['t'] - .05, 1.0, -.3)+e = first('wipe'); d = e['d'] # one soft felt pass, following the arc's speed+w = bp(noise(d + .1), 280, 2200) * .22; w *= np.sin(np.pi * np.clip(t_(d + .1) / (d + .1), 0, 1)) ** 1.2 * (1 + .35 * np.sin(2 * np.pi * 2.2 * t_(d + .1)))+add(fx, w.astype(np.float32), e['t'], 1.0, 0)+e = first('thread'); d = e['d']+add(fx, chalk(d, .34, True), e['t'], 1.0, 0)+e = first('bell'); d = 2.2 # the bell, far down the corridor+b = (np.sign(np.sin(2 * np.pi * 980 * t_(d))) * .3 + np.sin(2 * np.pi * 1960 * t_(d)) * .2) * (.6 + .4 * np.sin(2 * np.pi * 24 * t_(d)))+b = lp(bp(b, 600, 3000), 2000) * np.minimum(1, t_(d) / .05) * np.exp(-np.maximum(0, t_(d) - 1.7) / .15) * .05+add(fx, S.room(np.stack([b, b], 1).astype(np.float32), size=.7, mix=.6)[:, 0], e['t'], 1.0, .5)++# ---------------------------------------------------------------- score+def gq(t, p, dur=3.0, v=.7, pan=0, g=1.0, **kw):+ if 0 <= t < DUR: add(mus, P.pluck('guqin', p, dur, v, **kw), t, g, pan)+def nt(t, inst, p, dur, v, pan=0, g=1.0):+ if 0 <= t < DUR: add(mus, S.note(inst, p, dur, v), t, g, pan)+T = lambda k: first(k)['t']+chalk_t = sorted(e['t'] + e['d'] for e in ev if e['type'] == 'chalk' and e['t'] > 0)+# the two notes of the opening: when 射 is finished, when 矮 is finished+gq(vo['n2'] - .05, 'D3', 3, .55, -.2, .8); gq(vo['n3'] - .05, 'A2', 3, .55, .2, .8)+# from the slide: a quiet pulse in D (marimba and pizzicato bass, 2 notes a second) until the thread lands+beat, t0, t1 = .5, T('slide') + 1.2, T('thread') + 1.7+seq = ['D4', 'A4', 'F4', 'A4', 'E4', 'A4', 'F4', 'A4']; bass = ['D2', 'D2', 'A1', 'A1', 'Bb1', 'Bb1', 'A1', 'A1']+i = 0; t = t0+while t < t1:+ nt(t, 'marimba', seq[i % 8], .4, .34 if i % 2 else .42, -.25 + .5 * (i % 2), .55)+ if i % 2 == 0: nt(t, 'contrabass_pizz', bass[(i // 2) % 8], .5, .5, 0, .7)+ t += beat; i += 1+# the bowstring: the oracle-bone bow sounds, then each form adds a note on the same string+gq(T('twang'), 'A2', 4, .85, 0, 1.1, harmonic=False); gq(T('twang') + .02, 'A4', 3, .5, .15, .6, harmonic=True)+gq(T('twang2'), 'D3', 3, .7, -.1, .9)+gq(vo['n6'] + .2, 'E3', 3, .65, .1, .85); gq(vo['n6'] + 1.2, 'A3', 3, .65, -.1, .85)+# the thread: a rising run that ends hanging (on the 4th), held through the wipe+tt = T('thread')+for k, p in enumerate(['D4', 'E4', 'G4', 'A4', 'C5']): nt(tt + k * .3, 'marimba', p, .5, .4 + .05 * k, -.3 + .15 * k, .55)+nt(tt + 1.6, 'vibraphone', 'G4', 2.4, .35, -.2, .5); nt(tt + 1.6, 'vibraphone', 'C5', 2.4, .32, .2, .5); nt(tt + 1.6, 'contrabass_pizz', 'G1', 1.2, .5, 0, .6)+# the answer: the check lands on the home chord, then the motif in full over the wide shot+ta = T('tap')+gq(ta, 'D3', 5, .8, 0, 1.0); gq(ta + .01, 'D5', 4, .5, .2, .55, harmonic=True)+nt(ta, 'vibraphone', 'D4', 3.5, .4, -.2, .55); nt(ta, 'vibraphone', 'A4', 3.5, .36, .2, .5); nt(ta, 'contrabass_pizz', 'D2', 1.5, .6, 0, .7)+tb = T('bell') + .4+for k, (p, dt) in enumerate([('A2', 0), ('D3', .5), ('E3', 1.0), ('A3', 1.5), ('D4', 2.25)]): gq(tb + dt, p, 3.5, .7 - .04 * k, -.2 + .1 * k, .9)+nt(tb + 2.25, 'vibraphone', 'F#4', 3, .3, .2, .4); nt(tb + 2.25, 'vibraphone', 'A4', 3, .3, -.2, .4)++mus = S.room(mus, size=.45, mix=.2)+duck = (1 - .86 * vpres)[:, None] # about -17 dB under the voice, full level in the pauses+mix = voice * 1.0 + fx * .9 + mus * .8 * duck+# master: gentle glue, then level to about -16 LUFS, true peak under -3 dBFS+# (no bus compressor: the voice is already levelled and the score ducks under it)+def lufs(x): # BS.1770 K-weighted integrated loudness (gated)+ from scipy.signal import lfilter+ b1, a1 = [1.53512485958697, -2.69169618940638, 1.19839281085285], [1, -1.69065929318241, .73248077421585]+ b2, a2 = [1, -2, 1], [1, -1.99004745483398, .99007225036621]+ y = lfilter(b2, a2, lfilter(b1, a1, x, axis=0), axis=0); blk = int(.4 * SR); hop = int(.1 * SR)+ ms = np.array([np.mean(np.sum(y[i:i + blk] ** 2, 1)) for i in range(0, len(y) - blk, hop)])+ l = -.691 + 10 * np.log10(ms + 1e-12); ms = ms[l > -70]; l0 = -.691 + 10 * np.log10(ms.mean()) - 10+ ms = ms[-.691 + 10 * np.log10(ms + 1e-12) > l0]; return -.691 + 10 * np.log10(ms.mean())+def limit2(x, ceil, look=.004): # linked stereo look-ahead limiter+ from scipy.ndimage import maximum_filter1d, uniform_filter1d+ n = int(look * SR); m = maximum_filter1d(np.abs(x).max(1), size=2 * n + 1)+ g = uniform_filter1d(np.minimum(1, ceil / np.maximum(m, 1e-9)), size=n); return x * g[:, None]+stems = {'voice': voice, 'chalk+fx': fx * .9, 'score': mus * .8 * duck}+raw = {k: lufs(v.astype(np.float64)) for k, v in stems.items()}+for _ in range(4): # level, catch the chalk knocks, level again+ mix *= 10 ** ((-16 - lufs(mix)) / 20); mix = limit2(mix, .6)+over = soxr.resample(mix, SR, SR * 4)+tp = 20 * np.log10(np.abs(over).max() + 1e-12)+if tp > -2.0: mix *= 10 ** ((-2.0 - tp) / 20)+mix = mix[:N].astype(np.float32)+if len(mix) < N: mix = np.pad(mix, ((0, N - len(mix)), (0, 0)))+sf.write(os.path.join(HERE, OUT), mix, SR, subtype='PCM_24')+over = soxr.resample(mix, SR, SR * 4)+print(f'{OUT} {DUR:.2f} s {lufs(mix):.1f} LUFS true peak {20 * np.log10(np.abs(over).max()):.1f} dBFS')+g0 = lufs(mix) - lufs((voice + fx * .9 + mus * .8 * duck).astype(np.float64))+print('stems (relative, LUFS):', {k: round(v + g0, 1) for k, v in raw.items()})+print(S.credits(['marimba', 'contrabass_pizz', 'vibraphone']))diff --git a/styles/chalkboard/demo/build.sh b/styles/chalkboard/demo/build.shnew file mode 100644index 0000000..a5694fd--- /dev/null+++ b/styles/chalkboard/demo/build.sh@@ -0,0 +1,66 @@+#!/bin/sh+# One command: 《汉字的故事》 The Story of Chinese Characters (Chalkboard demo)+# sh styles/chalkboard/demo/build.sh Chinese voice (the library demo)+# sh styles/chalkboard/demo/build.sh en English voice: same picture and subtitles, mix_en.wav, chalkboard-en.mp4+# Steps: fonts, chalk recordings, voice + speech check, events, score + mix, picture, master, reading-time check,+# subtitles, poster and gallery frame. Fonts and recordings are not in git: they are downloaded here (OFL / CC0 / CC BY,+# see CREDITS). The voice is edge-tts (online).+set -e+LANG_VO=${1:-zh}+HERE=$(cd "$(dirname "$0")" && pwd) # .../chalkboard/demo+FILM=$(cd "$HERE/.." && pwd) # .../chalkboard+LIB=${LIB:-$(cd "$HERE/../../.." && pwd)} # styles/<slug>/demo -> library root+export LIB+[ -f "$LIB/core/render/video.mjs" ] || { echo "set LIB to the library folder"; exit 1; }+PY="$LIB/.venv/bin/python"+NAME=chalkboard+FPS=30+FRAME=42.5 # the verdict on the board, between voice lines: poster and gallery frame+cd "$LIB"++# fonts (gitignored): single-line EMS fonts for the English chalk; LXGW WenKai as the source of the subtitle subset+EMS=https://gitlab.com/oskay/svg-fonts/-/raw/master/fonts/EMS+for f in EMSDelight EMSCasualHand; do [ -f "$HERE/fonts/$f.svg" ] || curl -sfL -o "$HERE/fonts/$f.svg" "$EMS/$f.svg"; done+[ -f "$HERE/fonts/LXGWWenKai-Regular.ttf" ] || curl -sfL -o "$HERE/fonts/LXGWWenKai-Regular.ttf" \+ https://github.com/lxgw/LxgwWenKai/releases/download/v1.530/LXGWWenKai-Regular.ttf+"$PY" "$HERE/tools/subset.py" # fonts/wenkai-sub.woff2++# chalk recordings from Wikimedia Commons, cut into grains (foley/lib)+C=https://upload.wikimedia.org/wikipedia/commons+mkdir -p "$HERE/foley/raw"+[ -f "$HERE/foley/raw/chalk-on-chalkboard.wav" ] || curl -sfL -o "$HERE/foley/raw/chalk-on-chalkboard.wav" "$C/8/81/264944_chalk-on-chalkboard.wav"+[ -f "$HERE/foley/raw/Chalkboard-writing.ogg" ] || curl -sfL -o "$HERE/foley/raw/Chalkboard-writing.ogg" "$C/3/36/Chalkboard-writing.ogg"+[ -f "$HERE/foley/raw/WWS_Chalk.ogg" ] || curl -sfL -o "$HERE/foley/raw/WWS_Chalk.ogg" "$C/2/20/WWS_Chalk.ogg"+[ -f "$HERE/foley/lib/index.json" ] || "$PY" -I "$HERE/tools/foley_lib.py" "$HERE/foley/lib" \+ fat="$HERE/foley/raw/chalk-on-chalkboard.wav" tom="$HERE/foley/raw/Chalkboard-writing.ogg" wws="$HERE/foley/raw/WWS_Chalk.ogg"+# sampled instruments (library packs, CC0)+for l in vcsl vsco2ce; do [ -d "core/audio/instruments/$l" ] || sh tools/fetch.sh instruments $l; done++# voice: nine lines; `say` carries the readings (矢→史, 委→伟, 量→良 in Chinese; pinyin in English). Lengths go into VO in js/film.js+if [ "$LANG_VO" = en ]; then+ "$PY" core/tts/tts_zh.py "$HERE/lines_en.json" "$HERE/vo_en" --voice en-US-AvaNeural --rate +10%+ "$PY" core/tts/asr_check.py "$HERE/lines_en.json" "$HERE/vo_en" --lang en+else+ "$PY" core/tts/tts_zh.py "$HERE/lines.json" "$HERE/vo" --voice zh-CN-XiaoxiaoNeural --rate +15%+ # 射/涉/社 and 和/合 are homophones to Whisper: a Chinese difference is a cue to listen, not a failure+ "$PY" core/tts/asr_check.py "$HERE/lines.json" "$HERE/vo" --lang zh --model medium || echo "(Chinese check: differences are homophones; listen to any new line)"+fi++# events from the picture (strokes, voice starts, subtitle cues), then the score and chalk placed on them+node core/render/events.mjs "$HERE"+if [ "$LANG_VO" = en ]; then "$PY" "$HERE/audio.py" en; MIX="$HERE/mix_en.wav"; OUT="$FILM/$NAME-en.mp4"+else "$PY" "$HERE/audio.py"; MIX="$HERE/mix.wav"; OUT="$FILM/$NAME.mp4"; fi++# picture and master (mux.sh brings the mix to -14 LUFS and adds a light grain); subtitles are drawn by the page+node core/render/video.mjs "$HERE" --fps $FPS --workers 3 --out "$HERE/out/video.mp4"+sh core/render/mux.sh "$HERE/out/video.mp4" "$MIX" "$OUT" $FPS 1++# reading time of every word on the board (window.TEXTS)+node core/render/readcheck.mjs "$HERE" > "$HERE/out/readcheck.txt" && echo "readcheck ok" || { tail -20 "$HERE/out/readcheck.txt"; exit 1; }++# bilingual subtitles, poster and the gallery frame (picture only, no subtitle plate)+"$PY" "$HERE/tools/srt.py" "$FILM/$NAME.srt"+node core/render/still.mjs "$HERE" $FRAME --q nosubs --out "$HERE/out" --prefix poster_+cp "$HERE/out/poster_$FRAME.jpg" "$FILM/poster.jpg"+mkdir -p "$HERE/stills" && cp "$HERE/out/poster_$FRAME.jpg" "$HERE/stills/styleframe.jpg"+echo "done: $OUT"diff --git a/styles/chalkboard/demo/events.json b/styles/chalkboard/demo/events.jsonnew file mode 100644index 0000000..4bf8236--- /dev/null+++ b/styles/chalkboard/demo/events.json@@ -0,0 +1 @@+{"dur":49.28,"ev":[{"t":0.05,"type":"title"},{"t":0.05,"type":"chalk","d":0.024,"len":42,"color":"white","pan":-0.3,"big":0},{"t":0.086,"type":"chalk","d":0.024,"len":42,"color":"white","pan":-0.31,"big":0},{"t":0.125,"type":"chalk","d":0.039,"len":76,"color":"white","pan":-0.3,"big":0},{"t":0.176,"type":"chalk","d":0.083,"len":259,"color":"white","pan":-0.25,"big":0},{"t":0.278,"type":"chalk","d":0.055,"len":143,"color":"white","pan":-0.25,"big":0},{"t":0.352,"type":"chalk","d":0.024,"len":30,"color":"white","pan":-0.16,"big":0},{"t":0.39,"type":"chalk","d":0.024,"len":39,"color":"white","pan":-0.2,"big":0},{"t":0.425,"type":"chalk","d":0.061,"len":166,"color":"white","pan":-0.15,"big":0},{"t":0.5,"type":"chalk","d":0.052,"len":129,"color":"white","pan":-0.14,"big":0},{"t":0.561,"type":"chalk","d":0.047,"len":112,"color":"white","pan":-0.15,"big":0},{"t":0.622,"type":"chalk","d":0.063,"len":175,"color":"white","pan":-0.16,"big":0},{"t":0.705,"type":"chalk","d":0.03,"len":34,"color":"white","pan":-0.07,"big":0},{"t":0.744,"type":"chalk","d":0.048,"len":113,"color":"white","pan":-0.08,"big":0},{"t":0.809,"type":"chalk","d":0.064,"len":177,"color":"white","pan":-0.04,"big":0},{"t":0.889,"type":"chalk","d":0.037,"len":70,"color":"white","pan":-0.07,"big":0},{"t":0.941,"type":"chalk","d":0.037,"len":70,"color":"white","pan":-0.07,"big":0},{"t":0.998,"type":"chalk","d":0.042,"len":86,"color":"white","pan":-0.04,"big":0},{"t":1.051,"type":"chalk","d":0.068,"len":192,"color":"white","pan":-0.01,"big":0},{"t":1.133,"type":"chalk","d":0.024,"len":33,"color":"white","pan":-0.04,"big":0},{"t":1.177,"type":"chalk","d":0.04,"len":80,"color":"white","pan":0.03,"big":0},{"t":1.23,"type":"chalk","d":0.042,"len":85,"color":"white","pan":0.03,"big":0},{"t":1.282,"type":"chalk","d":0.036,"len":63,"color":"white","pan":0.02,"big":0},{"t":1.331,"type":"chalk","d":0.047,"len":108,"color":"white","pan":0.05,"big":0},{"t":1.391,"type":"chalk","d":0.033,"len":52,"color":"white","pan":0.03,"big":0},{"t":1.444,"type":"chalk","d":0.041,"len":83,"color":"white","pan":0.06,"big":0},{"t":1.496,"type":"chalk","d":0.039,"len":74,"color":"white","pan":0.08,"big":0},{"t":1.545,"type":"chalk","d":0.053,"len":130,"color":"white","pan":0.07,"big":0},{"t":1.615,"type":"chalk","d":0.049,"len":114,"color":"white","pan":0.08,"big":0},{"t":1.684,"type":"chalk","d":0.059,"len":152,"color":"white","pan":0.16,"big":0},{"t":1.763,"type":"chalk","d":0.03,"len":33,"color":"white","pan":0.13,"big":0},{"t":1.803,"type":"chalk","d":0.053,"len":127,"color":"white","pan":0.17,"big":0},{"t":1.872,"type":"chalk","d":0.044,"len":94,"color":"white","pan":0.16,"big":0},{"t":1.933,"type":"chalk","d":0.062,"len":162,"color":"white","pan":0.17,"big":0},{"t":2.014,"type":"chalk","d":0.064,"len":170,"color":"white","pan":0.16,"big":0},{"t":2.02,"type":"sub","t1":5.546,"zh":"网上有个说法:射和矮,这两个字弄反了。","en":"People online say the characters 射 and 矮 got swapped."},{"t":2.098,"type":"chalk","d":0.047,"len":106,"color":"white","pan":0.16,"big":0},{"t":2.1,"type":"vo","id":"n1"},{"t":2.165,"type":"chalk","d":0.071,"len":199,"color":"white","pan":0.16,"big":0},{"t":2.297,"type":"chalk","d":0.038,"len":162,"color":"white","pan":-0.32,"big":0},{"t":2.342,"type":"chalk","d":0.042,"len":206,"color":"white","pan":-0.31,"big":0},{"t":2.392,"type":"chalk","d":0.039,"len":157,"color":"white","pan":-0.29,"big":0},{"t":2.44,"type":"chalk","d":0.039,"len":126,"color":"white","pan":-0.24,"big":0},{"t":2.487,"type":"chalk","d":0.032,"len":50,"color":"white","pan":-0.23,"big":0},{"t":2.526,"type":"chalk","d":0.027,"len":14,"color":"white","pan":-0.22,"big":0},{"t":2.561,"type":"chalk","d":0.038,"len":73,"color":"white","pan":-0.2,"big":0},{"t":2.607,"type":"chalk","d":0.035,"len":53,"color":"white","pan":-0.18,"big":0},{"t":2.65,"type":"chalk","d":0.044,"len":103,"color":"white","pan":-0.16,"big":0},{"t":2.702,"type":"chalk","d":0.038,"len":67,"color":"white","pan":-0.13,"big":0},{"t":2.748,"type":"chalk","d":0.034,"len":49,"color":"white","pan":-0.12,"big":0},{"t":2.79,"type":"chalk","d":0.027,"len":12,"color":"white","pan":-0.12,"big":0},{"t":2.8,"type":"chalk","d":0.04,"len":50,"color":"white","pan":-0.28,"big":1},{"t":2.825,"type":"chalk","d":0.039,"len":73,"color":"white","pan":-0.1,"big":0},{"t":2.854,"type":"chalk","d":0.069,"len":134,"color":"white","pan":-0.3,"big":1},{"t":2.872,"type":"chalk","d":0.042,"len":91,"color":"white","pan":-0.08,"big":0},{"t":2.922,"type":"chalk","d":0.029,"len":23,"color":"white","pan":-0.06,"big":0},{"t":2.949,"type":"chalk","d":0.151,"len":356,"color":"white","pan":-0.25,"big":1},{"t":2.959,"type":"chalk","d":0.026,"len":7,"color":"white","pan":-0.06,"big":0},{"t":2.994,"type":"chalk","d":0.04,"len":78,"color":"white","pan":-0.05,"big":0},{"t":3.041,"type":"chalk","d":0.039,"len":77,"color":"white","pan":-0.03,"big":0},{"t":3.089,"type":"chalk","d":0.035,"len":54,"color":"white","pan":-0.02,"big":0},{"t":3.131,"type":"chalk","d":0.051,"len":85,"color":"white","pan":-0.28,"big":1},{"t":3.132,"type":"chalk","d":0.039,"len":76,"color":"white","pan":-0.01,"big":0},{"t":3.179,"type":"chalk","d":0.039,"len":73,"color":"white","pan":0.02,"big":0},{"t":3.203,"type":"chalk","d":0.051,"len":85,"color":"white","pan":-0.28,"big":1},{"t":3.226,"type":"chalk","d":0.042,"len":91,"color":"white","pan":0.04,"big":0},{"t":3.276,"type":"chalk","d":0.042,"len":91,"color":"white","pan":0.06,"big":0},{"t":3.28,"type":"chalk","d":0.063,"len":118,"color":"white","pan":-0.28,"big":1},{"t":3.326,"type":"chalk","d":0.035,"len":52,"color":"white","pan":0.07,"big":0},{"t":3.359,"type":"chalk","d":0.094,"len":201,"color":"white","pan":-0.27,"big":1},{"t":3.369,"type":"chalk","d":0.042,"len":91,"color":"white","pan":0.09,"big":0},{"t":3.419,"type":"chalk","d":0.034,"len":50,"color":"white","pan":0.1,"big":0},{"t":3.461,"type":"chalk","d":0.032,"len":36,"color":"white","pan":0.12,"big":0},{"t":3.489,"type":"chalk","d":0.078,"len":158,"color":"white","pan":-0.2,"big":1},{"t":3.501,"type":"chalk","d":0.027,"len":12,"color":"white","pan":0.12,"big":0},{"t":3.536,"type":"chalk","d":0.039,"len":76,"color":"white","pan":0.13,"big":0},{"t":3.584,"type":"chalk","d":0.035,"len":52,"color":"white","pan":0.14,"big":0},{"t":3.588,"type":"chalk","d":0.134,"len":310,"color":"white","pan":-0.17,"big":1},{"t":3.626,"type":"chalk","d":0.035,"len":54,"color":"white","pan":0.16,"big":0},{"t":3.746,"type":"chalk","d":0.032,"len":54,"color":"white","pan":-0.21,"big":1},{"t":3.878,"type":"chalk","d":0.052,"len":107,"color":"white","pan":0.08,"big":1},{"t":3.946,"type":"chalk","d":0.041,"len":71,"color":"white","pan":0.1,"big":1},{"t":4.01,"type":"chalk","d":0.053,"len":110,"color":"white","pan":0.09,"big":1},{"t":4.081,"type":"chalk","d":0.082,"len":206,"color":"white","pan":0.09,"big":1},{"t":4.183,"type":"chalk","d":0.032,"len":64,"color":"white","pan":0.11,"big":1},{"t":4.251,"type":"chalk","d":0.058,"len":125,"color":"white","pan":0.17,"big":1},{"t":4.321,"type":"chalk","d":0.059,"len":128,"color":"white","pan":0.18,"big":1},{"t":4.398,"type":"chalk","d":0.052,"len":107,"color":"white","pan":0.18,"big":1},{"t":4.466,"type":"chalk","d":0.054,"len":112,"color":"white","pan":0.15,"big":1},{"t":4.541,"type":"chalk","d":0.038,"len":90,"color":"white","pan":0.21,"big":1},{"t":4.6,"type":"chalk","d":0.082,"len":207,"color":"white","pan":0.16,"big":1},{"t":4.702,"type":"chalk","d":0.071,"len":168,"color":"white","pan":0.17,"big":1},{"t":4.793,"type":"chalk","d":0.077,"len":188,"color":"white","pan":0.17,"big":1},{"t":5.667,"type":"sub","t1":8.023,"zh":"射字左边是身,右边是寸。","en":"射 is 身 (body) plus 寸 (inch)."},{"t":5.746670240042346,"type":"vo","id":"n2"},{"t":6.147,"type":"chalk","d":0.22,"len":268,"color":"white","pan":-0.04,"big":0},{"t":6.397,"type":"chalk","d":0.03,"len":19,"color":"white","pan":-0.04,"big":0},{"t":6.436,"type":"chalk","d":0.031,"len":52,"color":"white","pan":-0.05,"big":0},{"t":6.479,"type":"chalk","d":0.056,"len":166,"color":"white","pan":-0.02,"big":0},{"t":6.549,"type":"chalk","d":0.032,"len":53,"color":"white","pan":-0.04,"big":0},{"t":6.592,"type":"chalk","d":0.032,"len":53,"color":"white","pan":-0.04,"big":0},{"t":6.637,"type":"chalk","d":0.036,"len":72,"color":"white","pan":-0.05,"big":0},{"t":6.683,"type":"chalk","d":0.046,"len":118,"color":"white","pan":-0.04,"big":0},{"t":7.147,"type":"chalk","d":0.2,"len":229,"color":"white","pan":0.13,"big":0},{"t":7.367,"type":"chalk","d":0.043,"len":106,"color":"white","pan":0.13,"big":0},{"t":7.421,"type":"chalk","d":0.049,"len":134,"color":"white","pan":0.14,"big":0},{"t":7.481,"type":"chalk","d":0.024,"len":28,"color":"white","pan":0.12,"big":0},{"t":8.023,"type":"sub","t1":10.6,"zh":"身高一寸,那不就是矮吗?","en":"One inch tall: isn’t that short?"},{"t":8.097,"type":"chalk","d":0.038,"len":97,"color":"white","pan":-0.14,"big":0},{"t":8.155,"type":"chalk","d":0.039,"len":92,"color":"white","pan":-0.12,"big":0},{"t":8.204,"type":"chalk","d":0.043,"len":105,"color":"white","pan":-0.16,"big":0},{"t":8.258,"type":"chalk","d":0.024,"len":20,"color":"white","pan":-0.21,"big":0},{"t":8.302,"type":"chalk","d":0.024,"len":10,"color":"white","pan":-0.18,"big":0},{"t":8.337,"type":"chalk","d":0.036,"len":56,"color":"white","pan":-0.2,"big":0},{"t":8.385,"type":"chalk","d":0.03,"len":15,"color":"white","pan":-0.21,"big":0},{"t":8.425,"type":"chalk","d":0.032,"len":37,"color":"white","pan":-0.21,"big":0},{"t":8.467,"type":"chalk","d":0.03,"len":22,"color":"white","pan":-0.21,"big":0},{"t":8.508,"type":"chalk","d":0.03,"len":27,"color":"white","pan":-0.22,"big":0},{"t":8.549,"type":"chalk","d":0.044,"len":71,"color":"white","pan":-0.2,"big":0},{"t":8.605,"type":"chalk","d":0.03,"len":14,"color":"white","pan":-0.22,"big":0},{"t":8.644,"type":"chalk","d":0.03,"len":28,"color":"white","pan":-0.21,"big":0},{"t":8.684,"type":"chalk","d":0.03,"len":16,"color":"white","pan":-0.21,"big":0},{"t":8.734,"type":"chalk","d":0.04,"len":47,"color":"white","pan":-0.18,"big":0},{"t":8.783,"type":"chalk","d":0.024,"len":4,"color":"white","pan":-0.19,"big":0},{"t":8.887,"type":"chalk","d":0.05,"len":81,"color":"white","pan":-0.31,"big":0},{"t":8.946,"type":"chalk","d":0.034,"len":27,"color":"white","pan":-0.31,"big":0},{"t":8.987,"type":"chalk","d":0.052,"len":86,"color":"white","pan":-0.3,"big":0},{"t":9.047,"type":"chalk","d":0.033,"len":25,"color":"white","pan":-0.27,"big":0},{"t":9.088,"type":"chalk","d":0.028,"len":8,"color":"white","pan":-0.27,"big":0},{"t":9.124,"type":"chalk","d":0.052,"len":86,"color":"white","pan":-0.26,"big":0},{"t":9.184,"type":"chalk","d":0.042,"len":55,"color":"white","pan":-0.24,"big":0},{"t":9.234,"type":"chalk","d":0.056,"len":99,"color":"white","pan":-0.23,"big":0},{"t":9.298,"type":"chalk","d":0.037,"len":39,"color":"white","pan":-0.19,"big":0},{"t":9.343,"type":"chalk","d":0.029,"len":13,"color":"white","pan":-0.19,"big":0},{"t":9.38,"type":"chalk","d":0.056,"len":99,"color":"white","pan":-0.18,"big":0},{"t":9.444,"type":"chalk","d":0.037,"len":38,"color":"white","pan":-0.17,"big":0},{"t":9.489,"type":"chalk","d":0.037,"len":38,"color":"white","pan":-0.16,"big":0},{"t":9.534,"type":"chalk","d":0.039,"len":43,"color":"white","pan":-0.14,"big":0},{"t":9.58,"type":"chalk","d":0.027,"len":8,"color":"white","pan":-0.15,"big":0},{"t":10.57,"type":"sub","t1":12.825,"zh":"矮字左边是矢,矢就是箭;","en":"On the left of 矮 is 矢, an arrow;"},{"t":10.649670240042347,"type":"vo","id":"n3"},{"t":10.85,"type":"chalk","d":0.2,"len":114,"color":"white","pan":0.1,"big":0},{"t":11.07,"type":"chalk","d":0.031,"len":26,"color":"white","pan":0.09,"big":0},{"t":11.111,"type":"chalk","d":0.032,"len":28,"color":"white","pan":0.1,"big":0},{"t":11.158,"type":"chalk","d":0.042,"len":50,"color":"white","pan":0.1,"big":0},{"t":11.211,"type":"chalk","d":0.041,"len":49,"color":"white","pan":0.1,"big":0},{"t":11.265,"type":"chalk","d":0.034,"len":32,"color":"white","pan":0.11,"big":0},{"t":12.75,"type":"chalk","d":0.2,"len":143,"color":"white","pan":0.19,"big":0},{"t":12.825,"type":"sub","t1":15.001,"zh":"右边是委,有放下的意思。","en":"on the right is 委, to let go."},{"t":12.97,"type":"chalk","d":0.032,"len":28,"color":"white","pan":0.19,"big":0},{"t":13.011,"type":"chalk","d":0.039,"len":44,"color":"white","pan":0.19,"big":0},{"t":13.061,"type":"chalk","d":0.03,"len":22,"color":"white","pan":0.19,"big":0},{"t":13.101,"type":"chalk","d":0.032,"len":28,"color":"white","pan":0.18,"big":0},{"t":13.145,"type":"chalk","d":0.025,"len":25,"color":"white","pan":0.2,"big":0},{"t":13.182,"type":"chalk","d":0.042,"len":51,"color":"white","pan":0.19,"big":0},{"t":13.236,"type":"chalk","d":0.037,"len":40,"color":"white","pan":0.19,"big":0},{"t":13.283,"type":"chalk","d":0.043,"len":54,"color":"white","pan":0.19,"big":0},{"t":13.9,"type":"chalk","d":0.024,"len":9,"color":"white","pan":0.1,"big":0},{"t":13.933,"type":"chalk","d":0.03,"len":28,"color":"white","pan":0.1,"big":0},{"t":13.973,"type":"chalk","d":0.037,"len":50,"color":"white","pan":0.11,"big":0},{"t":14.022,"type":"chalk","d":0.032,"len":34,"color":"white","pan":0.1,"big":0},{"t":14.068,"type":"chalk","d":0.03,"len":30,"color":"white","pan":0.11,"big":0},{"t":14.108,"type":"chalk","d":0.03,"len":23,"color":"white","pan":0.12,"big":0},{"t":14.147,"type":"chalk","d":0.036,"len":45,"color":"white","pan":0.12,"big":0},{"t":14.194,"type":"chalk","d":0.034,"len":40,"color":"white","pan":0.12,"big":0},{"t":14.248,"type":"chalk","d":0.03,"len":21,"color":"white","pan":0.14,"big":0},{"t":14.287,"type":"chalk","d":0.03,"len":19,"color":"white","pan":0.14,"big":0},{"t":14.327,"type":"chalk","d":0.024,"len":5,"color":"white","pan":0.14,"big":0},{"t":14.361,"type":"chalk","d":0.03,"len":17,"color":"white","pan":0.15,"big":0},{"t":14.4,"type":"chalk","d":0.03,"len":22,"color":"white","pan":0.16,"big":0},{"t":14.44,"type":"chalk","d":0.024,"len":7,"color":"white","pan":0.16,"big":0},{"t":14.475,"type":"chalk","d":0.024,"len":5,"color":"white","pan":0.15,"big":0},{"t":14.508,"type":"chalk","d":0.03,"len":7,"color":"white","pan":0.15,"big":0},{"t":14.55,"type":"chalk","d":0.038,"len":52,"color":"white","pan":0.15,"big":0},{"t":14.601,"type":"chalk","d":0.03,"len":26,"color":"white","pan":0.14,"big":0},{"t":14.642,"type":"chalk","d":0.036,"len":47,"color":"white","pan":0.15,"big":0},{"t":14.688,"type":"chalk","d":0.03,"len":15,"color":"white","pan":0.14,"big":0},{"t":14.728,"type":"chalk","d":0.03,"len":15,"color":"white","pan":0.14,"big":0},{"t":14.767,"type":"chalk","d":0.03,"len":16,"color":"white","pan":0.15,"big":0},{"t":14.808,"type":"chalk","d":0.034,"len":39,"color":"white","pan":0.16,"big":0},{"t":14.861,"type":"chalk","d":0.041,"len":48,"color":"white","pan":0.18,"big":0},{"t":14.911,"type":"chalk","d":0.024,"len":4,"color":"white","pan":0.18,"big":0},{"t":15.001,"type":"sub","t1":17.675,"zh":"把箭放出去,那不就是射吗?","en":"Letting an arrow go: isn’t that shooting?"},{"t":15.015,"type":"chalk","d":0.043,"len":58,"color":"white","pan":0.02,"big":0},{"t":15.066,"type":"chalk","d":0.051,"len":83,"color":"white","pan":0.04,"big":0},{"t":15.125,"type":"chalk","d":0.037,"len":39,"color":"white","pan":0.06,"big":0},{"t":15.171,"type":"chalk","d":0.029,"len":13,"color":"white","pan":0.06,"big":0},{"t":15.208,"type":"chalk","d":0.056,"len":99,"color":"white","pan":0.09,"big":0},{"t":15.272,"type":"chalk","d":0.052,"len":86,"color":"white","pan":0.1,"big":0},{"t":15.332,"type":"chalk","d":0.056,"len":99,"color":"white","pan":0.14,"big":0},{"t":15.396,"type":"chalk","d":0.043,"len":57,"color":"white","pan":0.15,"big":0},{"t":15.447,"type":"chalk","d":0.043,"len":57,"color":"white","pan":0.16,"big":0},{"t":15.497,"type":"chalk","d":0.048,"len":73,"color":"white","pan":0.18,"big":0},{"t":15.55,"type":"chalk","d":0.3,"len":301,"color":"white","pan":-0.05,"big":0},{"t":15.553,"type":"chalk","d":0.057,"len":103,"color":"white","pan":0.2,"big":0},{"t":15.619,"type":"chalk","d":0.042,"len":54,"color":"white","pan":0.23,"big":0},{"t":15.669,"type":"chalk","d":0.029,"len":13,"color":"white","pan":0.23,"big":0},{"t":15.706,"type":"chalk","d":0.037,"len":38,"color":"white","pan":0.24,"big":0},{"t":15.75,"type":"chalk","d":0.3,"len":302,"color":"white","pan":-0.05,"big":0},{"t":15.751,"type":"chalk","d":0.06,"len":111,"color":"white","pan":0.26,"big":0},{"t":15.819,"type":"chalk","d":0.038,"len":43,"color":"white","pan":0.27,"big":0},{"t":15.86,"type":"chalk","d":0.14,"len":57,"color":"white","pan":0,"big":0},{"t":15.865,"type":"chalk","d":0.027,"len":7,"color":"white","pan":0.27,"big":0},{"t":16.06,"type":"chalk","d":0.14,"len":57,"color":"white","pan":-0.1,"big":0},{"t":17.514978756516747,"type":"slide","d":0.9},{"t":17.735,"type":"sub","t1":21.732,"zh":"其实,射最早画的是一张弓,弓上搭着一支箭。","en":"In fact, the oldest 射 is a bow with an arrow on it."},{"t":17.814978756516748,"type":"vo","id":"n4"},{"t":18.234978756516746,"type":"whip"},{"t":18.295,"type":"chalk","d":0.1,"len":59,"color":"white","pan":-0.61,"big":0},{"t":18.315,"type":"chalk","d":0.5,"len":2548,"color":"white","pan":0.42,"big":0},{"t":18.585,"type":"chalk","d":0.1,"len":47,"color":"white","pan":-0.19,"big":0},{"t":18.685,"type":"chalk","d":0.181,"len":459,"color":"orange","pan":-0.27,"big":0},{"t":18.901,"type":"chalk","d":0.143,"len":339,"color":"orange","pan":-0.21,"big":0},{"t":19.044132922804906,"type":"twang"},{"t":19.079,"type":"chalk","d":0.146,"len":374,"color":"white","pan":-0.19,"big":0},{"t":19.26,"type":"chalk","d":0.081,"len":129,"color":"white","pan":-0.27,"big":0},{"t":19.376,"type":"chalk","d":0.07,"len":78,"color":"white","pan":-0.09,"big":0},{"t":19.481,"type":"chalk","d":0.07,"len":81,"color":"white","pan":-0.09,"big":0},{"t":19.601,"type":"chalk","d":0.03,"len":51,"color":"white","pan":-0.25,"big":0},{"t":19.641,"type":"chalk","d":0.036,"len":108,"color":"white","pan":-0.22,"big":0},{"t":19.688,"type":"chalk","d":0.03,"len":59,"color":"white","pan":-0.23,"big":0},{"t":19.729,"type":"chalk","d":0.03,"len":59,"color":"white","pan":-0.23,"big":0},{"t":19.77,"type":"chalk","d":0.032,"len":78,"color":"white","pan":-0.23,"big":0},{"t":19.821,"type":"chalk","d":0.03,"len":29,"color":"white","pan":-0.18,"big":0},{"t":19.861,"type":"chalk","d":0.031,"len":74,"color":"white","pan":-0.16,"big":0},{"t":19.902,"type":"chalk","d":0.03,"len":36,"color":"white","pan":-0.17,"big":0},{"t":19.941,"type":"chalk","d":0.024,"len":21,"color":"white","pan":-0.19,"big":0},{"t":19.974,"type":"chalk","d":0.033,"len":91,"color":"white","pan":-0.16,"big":0},{"t":20.018,"type":"chalk","d":0.03,"len":50,"color":"white","pan":-0.18,"big":0},{"t":20.059,"type":"chalk","d":0.036,"len":111,"color":"white","pan":-0.15,"big":0},{"t":20.105,"type":"chalk","d":0.03,"len":44,"color":"white","pan":-0.17,"big":0},{"t":20.145,"type":"chalk","d":0.03,"len":44,"color":"white","pan":-0.17,"big":0},{"t":20.195,"type":"chalk","d":0.024,"len":16,"color":"white","pan":-0.1,"big":0},{"t":20.229,"type":"chalk","d":0.032,"len":84,"color":"white","pan":-0.1,"big":0},{"t":20.27,"type":"chalk","d":0.034,"len":92,"color":"white","pan":-0.1,"big":0},{"t":20.315,"type":"chalk","d":0.033,"len":87,"color":"white","pan":-0.1,"big":0},{"t":20.398,"type":"chalk","d":0.046,"len":128,"color":"white","pan":-0.3,"big":0},{"t":20.452,"type":"chalk","d":0.041,"len":99,"color":"white","pan":-0.28,"big":0},{"t":20.501,"type":"chalk","d":0.054,"len":175,"color":"white","pan":-0.24,"big":0},{"t":20.563,"type":"chalk","d":0.041,"len":96,"color":"white","pan":-0.23,"big":0},{"t":20.612,"type":"chalk","d":0.036,"len":66,"color":"white","pan":-0.2,"big":0},{"t":20.656,"type":"chalk","d":0.049,"len":145,"color":"white","pan":-0.18,"big":0},{"t":20.713,"type":"chalk","d":0.058,"len":198,"color":"white","pan":-0.13,"big":0},{"t":20.778,"type":"chalk","d":0.046,"len":127,"color":"white","pan":-0.09,"big":0},{"t":20.832,"type":"chalk","d":0.05,"len":150,"color":"white","pan":-0.07,"big":0},{"t":20.89,"type":"chalk","d":0.049,"len":146,"color":"white","pan":-0.03,"big":0},{"t":21.032,"type":"chalk","d":0.1,"len":60,"color":"white","pan":0.32,"big":0},{"t":21.132,"type":"chalk","d":0.193,"len":635,"color":"orange","pan":0.22,"big":1},{"t":21.36,"type":"chalk","d":0.143,"len":415,"color":"orange","pan":0.29,"big":0},{"t":21.538,"type":"chalk","d":0.13,"len":357,"color":"white","pan":0.29,"big":1},{"t":21.702,"type":"sub","t1":24.362,"zh":"后来又加了一只手,在拉弓弦。","en":"Later a hand was added, pulling the string."},{"t":21.703,"type":"chalk","d":0.082,"len":141,"color":"white","pan":0.21,"big":1},{"t":21.78197875651675,"type":"vo","id":"n5"},{"t":21.835,"type":"chalk","d":0.03,"len":64,"color":"white","pan":0.27,"big":0},{"t":21.875,"type":"chalk","d":0.03,"len":54,"color":"white","pan":0.29,"big":0},{"t":21.917,"type":"chalk","d":0.03,"len":45,"color":"white","pan":0.28,"big":0},{"t":21.958,"type":"chalk","d":0.03,"len":62,"color":"white","pan":0.27,"big":0},{"t":21.997,"type":"chalk","d":0.03,"len":49,"color":"white","pan":0.28,"big":0},{"t":22.037,"type":"chalk","d":0.024,"len":18,"color":"white","pan":0.26,"big":0},{"t":22.071,"type":"chalk","d":0.03,"len":28,"color":"white","pan":0.28,"big":0},{"t":22.111,"type":"chalk","d":0.033,"len":90,"color":"white","pan":0.27,"big":0},{"t":22.164,"type":"chalk","d":0.024,"len":16,"color":"white","pan":0.33,"big":0},{"t":22.198,"type":"chalk","d":0.032,"len":83,"color":"white","pan":0.33,"big":0},{"t":22.24,"type":"chalk","d":0.034,"len":92,"color":"white","pan":0.33,"big":0},{"t":22.284,"type":"chalk","d":0.033,"len":87,"color":"white","pan":0.34,"big":0},{"t":22.367,"type":"chalk","d":0.057,"len":197,"color":"white","pan":0.22,"big":0},{"t":22.382,"type":"chalk","d":0.116,"len":293,"color":"white","pan":0.42,"big":1},{"t":22.433,"type":"chalk","d":0.041,"len":98,"color":"white","pan":0.25,"big":0},{"t":22.482,"type":"chalk","d":0.046,"len":128,"color":"white","pan":0.28,"big":0},{"t":22.533,"type":"chalk","d":0.075,"len":109,"color":"white","pan":0.38,"big":1},{"t":22.536,"type":"chalk","d":0.05,"len":150,"color":"white","pan":0.31,"big":0},{"t":22.594,"type":"chalk","d":0.044,"len":116,"color":"white","pan":0.34,"big":0},{"t":22.642,"type":"chalk","d":0.072,"len":99,"color":"white","pan":0.39,"big":1},{"t":22.646,"type":"chalk","d":0.049,"len":146,"color":"white","pan":0.37,"big":0},{"t":22.714795906701717,"type":"twang2"},{"t":23.812,"type":"chalk","d":0.07,"len":74,"color":"orange","pan":0.7,"big":0},{"t":23.917,"type":"chalk","d":0.104,"len":242,"color":"orange","pan":0.67,"big":0},{"t":24.056,"type":"chalk","d":0.179,"len":575,"color":"orange","pan":0.55,"big":0},{"t":24.271,"type":"chalk","d":0.079,"len":129,"color":"orange","pan":0.24,"big":0},{"t":24.332,"type":"sub","t1":27.122,"zh":"弓慢慢写成了身,手写成了寸。","en":"The bow slowly became 身, and the hand became 寸."},{"t":24.385,"type":"chalk","d":0.079,"len":129,"color":"orange","pan":0.19,"big":0},{"t":24.411978756516753,"type":"vo","id":"n6"},{"t":24.498,"type":"chalk","d":0.108,"len":257,"color":"orange","pan":0.18,"big":0},{"t":24.641,"type":"chalk","d":0.112,"len":276,"color":"orange","pan":0.14,"big":0},{"t":24.712,"type":"chalk","d":0.1,"len":60,"color":"white","pan":0.69,"big":0},{"t":24.788,"type":"chalk","d":0.158,"len":482,"color":"white","pan":0.29,"big":0},{"t":24.812,"type":"chalk","d":0.04,"len":79,"color":"orange","pan":0.62,"big":1},{"t":24.868,"type":"chalk","d":0.04,"len":212,"color":"orange","pan":0.57,"big":1},{"t":24.93,"type":"chalk","d":0.073,"len":558,"color":"orange","pan":0.59,"big":1},{"t":24.982,"type":"chalk","d":0.075,"len":112,"color":"white","pan":0.12,"big":0},{"t":25.027,"type":"chalk","d":0.04,"len":134,"color":"orange","pan":0.43,"big":1},{"t":25.087,"type":"chalk","d":0.04,"len":135,"color":"orange","pan":0.33,"big":1},{"t":25.092,"type":"chalk","d":0.075,"len":111,"color":"white","pan":-0.05,"big":0},{"t":25.148,"type":"chalk","d":0.04,"len":185,"color":"orange","pan":0.25,"big":1},{"t":25.202,"type":"chalk","d":0.07,"len":66,"color":"white","pan":-0.16,"big":0},{"t":25.205,"type":"chalk","d":0.05,"len":317,"color":"orange","pan":0.23,"big":1},{"t":25.281,"type":"chalk","d":0.044,"len":250,"color":"white","pan":0.32,"big":1},{"t":25.322,"type":"chalk","d":0.036,"len":109,"color":"white","pan":-0.26,"big":0},{"t":25.344,"type":"chalk","d":0.067,"len":487,"color":"white","pan":0.35,"big":1},{"t":25.368,"type":"chalk","d":0.03,"len":46,"color":"white","pan":-0.29,"big":0},{"t":25.41,"type":"chalk","d":0.024,"len":42,"color":"white","pan":-0.25,"big":0},{"t":25.432,"type":"chalk","d":0.032,"len":85,"color":"white","pan":0.29,"big":1},{"t":25.454,"type":"chalk","d":0.03,"len":31,"color":"white","pan":-0.22,"big":0},{"t":25.493,"type":"chalk","d":0.03,"len":31,"color":"white","pan":-0.22,"big":0},{"t":25.514,"type":"chalk","d":0.03,"len":33,"color":"white","pan":0.2,"big":0},{"t":25.514,"type":"chalk","d":0.03,"len":16,"color":"white","pan":0.05,"big":0},{"t":25.531,"type":"chalk","d":0.024,"len":11,"color":"white","pan":-0.22,"big":0},{"t":25.552,"type":"chalk","d":0.03,"len":44,"color":"white","pan":0.04,"big":0},{"t":25.553,"type":"chalk","d":0.033,"len":87,"color":"white","pan":0.2,"big":0},{"t":25.565,"type":"chalk","d":0.03,"len":27,"color":"white","pan":-0.21,"big":0},{"t":25.592,"type":"chalk","d":0.038,"len":139,"color":"white","pan":0.06,"big":0},{"t":25.597,"type":"chalk","d":0.03,"len":40,"color":"white","pan":0.19,"big":0},{"t":25.604,"type":"chalk","d":0.03,"len":33,"color":"white","pan":-0.2,"big":0},{"t":25.637,"type":"chalk","d":0.024,"len":16,"color":"white","pan":0.2,"big":0},{"t":25.641,"type":"chalk","d":0.03,"len":45,"color":"white","pan":0.05,"big":0},{"t":25.643,"type":"chalk","d":0.024,"len":12,"color":"white","pan":-0.2,"big":0},{"t":25.67,"type":"chalk","d":0.03,"len":19,"color":"white","pan":0.21,"big":0},{"t":25.677,"type":"chalk","d":0.03,"len":53,"color":"white","pan":-0.21,"big":0},{"t":25.681,"type":"chalk","d":0.03,"len":45,"color":"white","pan":0.05,"big":0},{"t":25.71,"type":"chalk","d":0.03,"len":58,"color":"white","pan":0.21,"big":0},{"t":25.717,"type":"chalk","d":0.03,"len":35,"color":"white","pan":-0.22,"big":0},{"t":25.721,"type":"chalk","d":0.03,"len":60,"color":"white","pan":0.04,"big":0},{"t":25.749,"type":"chalk","d":0.03,"len":19,"color":"white","pan":0.22,"big":0},{"t":25.758,"type":"chalk","d":0.032,"len":81,"color":"white","pan":-0.22,"big":0},{"t":25.76,"type":"chalk","d":0.033,"len":99,"color":"white","pan":0.04,"big":0},{"t":25.788,"type":"chalk","d":0.031,"len":73,"color":"white","pan":0.21,"big":0},{"t":25.8,"type":"chalk","d":0.03,"len":31,"color":"white","pan":-0.23,"big":0},{"t":25.813,"type":"chalk","d":0.03,"len":78,"color":"white","pan":0.1,"big":0},{"t":25.829,"type":"chalk","d":0.03,"len":9,"color":"white","pan":0.2,"big":0},{"t":25.84,"type":"chalk","d":0.03,"len":60,"color":"white","pan":-0.22,"big":0},{"t":25.853,"type":"chalk","d":0.03,"len":53,"color":"white","pan":0.06,"big":0},{"t":25.864,"type":"chalk","d":0.057,"len":173,"color":"white","pan":-0.07,"big":0},{"t":25.867,"type":"chalk","d":0.03,"len":40,"color":"white","pan":0.18,"big":0},{"t":25.879,"type":"chalk","d":0.03,"len":33,"color":"white","pan":-0.24,"big":0},{"t":25.903,"type":"chalk","d":0.03,"len":77,"color":"white","pan":0.14,"big":0},{"t":25.907,"type":"chalk","d":0.031,"len":73,"color":"white","pan":0.18,"big":0},{"t":25.918,"type":"chalk","d":0.03,"len":43,"color":"white","pan":-0.25,"big":0},{"t":25.921,"type":"chalk","d":0.046,"len":110,"color":"white","pan":-0.05,"big":0},{"t":25.943,"type":"chalk","d":0.03,"len":47,"color":"white","pan":0.11,"big":0},{"t":25.949,"type":"chalk","d":0.03,"len":34,"color":"white","pan":0.15,"big":0},{"t":25.96,"type":"chalk","d":0.03,"len":21,"color":"white","pan":-0.24,"big":0},{"t":25.967,"type":"chalk","d":0.057,"len":161,"color":"white","pan":-0.06,"big":0},{"t":25.983,"type":"chalk","d":0.038,"len":129,"color":"white","pan":0.1,"big":0},{"t":25.989,"type":"chalk","d":0.03,"len":33,"color":"white","pan":0.13,"big":0},{"t":25.998,"type":"chalk","d":0.03,"len":36,"color":"white","pan":-0.25,"big":0},{"t":26.024,"type":"chalk","d":0.057,"len":155,"color":"white","pan":-0.04,"big":0},{"t":26.039,"type":"chalk","d":0.031,"len":64,"color":"white","pan":0.15,"big":0},{"t":26.042,"type":"chalk","d":0.024,"len":12,"color":"white","pan":0.12,"big":0},{"t":26.078,"type":"chalk","d":0.042,"len":87,"color":"white","pan":-0.35,"big":0},{"t":26.08,"type":"chalk","d":0.041,"len":117,"color":"white","pan":0.13,"big":0},{"t":26.081,"type":"chalk","d":0.03,"len":43,"color":"white","pan":-0.04,"big":0},{"t":26.086,"type":"chalk","d":0.032,"len":75,"color":"white","pan":0.15,"big":0},{"t":26.121,"type":"chalk","d":0.03,"len":29,"color":"white","pan":-0.06,"big":0},{"t":26.127,"type":"chalk","d":0.034,"len":91,"color":"white","pan":0.13,"big":0},{"t":26.128,"type":"chalk","d":0.049,"len":118,"color":"white","pan":-0.34,"big":0},{"t":26.133,"type":"chalk","d":0.033,"len":74,"color":"white","pan":0.09,"big":0},{"t":26.171,"type":"chalk","d":0.024,"len":19,"color":"white","pan":0.11,"big":0},{"t":26.171,"type":"chalk","d":0.057,"len":142,"color":"white","pan":-0.03,"big":0},{"t":26.178,"type":"chalk","d":0.024,"len":15,"color":"white","pan":0.09,"big":0},{"t":26.185,"type":"chalk","d":0.054,"len":137,"color":"white","pan":-0.31,"big":0},{"t":26.215,"type":"chalk","d":0.03,"len":62,"color":"white","pan":0.15,"big":0},{"t":26.228,"type":"chalk","d":0.046,"len":91,"color":"white","pan":-0.02,"big":0},{"t":26.247,"type":"chalk","d":0.036,"len":51,"color":"white","pan":-0.3,"big":0},{"t":26.252,"type":"chalk","d":0.036,"len":52,"color":"white","pan":-0.01,"big":0},{"t":26.255,"type":"chalk","d":0.03,"len":42,"color":"white","pan":0.13,"big":0},{"t":26.275,"type":"chalk","d":0.055,"len":126,"color":"white","pan":0.01,"big":0},{"t":26.296,"type":"chalk","d":0.029,"len":17,"color":"white","pan":-0.01,"big":0},{"t":26.305,"type":"chalk","d":0.03,"len":43,"color":"white","pan":0.19,"big":0},{"t":26.329,"type":"chalk","d":0.024,"len":7,"color":"white","pan":0.03,"big":0},{"t":26.333,"type":"chalk","d":0.046,"len":98,"color":"white","pan":0.01,"big":0},{"t":26.343,"type":"chalk","d":0.03,"len":46,"color":"white","pan":0.18,"big":0},{"t":26.373,"type":"chalk","d":0.032,"len":30,"color":"white","pan":0.06,"big":0},{"t":26.385,"type":"chalk","d":0.032,"len":70,"color":"white","pan":0.18,"big":0},{"t":26.387,"type":"chalk","d":0.057,"len":148,"color":"white","pan":0.02,"big":0},{"t":26.413,"type":"chalk","d":0.027,"len":10,"color":"white","pan":0.06,"big":0},{"t":26.427,"type":"chalk","d":0.033,"len":76,"color":"white","pan":0.19,"big":0},{"t":26.441,"type":"chalk","d":0.049,"len":103,"color":"white","pan":0.07,"big":0},{"t":26.452,"type":"chalk","d":0.054,"len":133,"color":"white","pan":0.06,"big":0},{"t":26.49,"type":"chalk","d":0.041,"len":67,"color":"white","pan":0.08,"big":0},{"t":26.513,"type":"chalk","d":0.057,"len":149,"color":"white","pan":0.09,"big":0},{"t":26.531,"type":"chalk","d":0.053,"len":119,"color":"white","pan":0.11,"big":0},{"t":26.584,"type":"chalk","d":0.03,"len":39,"color":"white","pan":0.15,"big":0},{"t":26.624,"type":"chalk","d":0.03,"len":27,"color":"white","pan":0.13,"big":0},{"t":26.674,"type":"chalk","d":0.053,"len":119,"color":"white","pan":0.18,"big":0},{"t":26.727,"type":"chalk","d":0.054,"len":121,"color":"white","pan":0.21,"big":0},{"t":26.781,"type":"chalk","d":0.049,"len":103,"color":"white","pan":0.22,"big":0},{"t":26.83,"type":"chalk","d":0.057,"len":135,"color":"white","pan":0.24,"big":0},{"t":27.092,"type":"sub","t1":29.05,"zh":"那矮里为什么有支箭?","en":"Why is there an arrow in 矮?"},{"t":27.171978756516754,"type":"vo","id":"n7"},{"t":28.834,"type":"chalk","d":0.044,"len":95,"color":"orange","pan":-0.24,"big":0},{"t":28.892,"type":"chalk","d":0.04,"len":64,"color":"orange","pan":-0.22,"big":0},{"t":28.951,"type":"chalk","d":0.048,"len":111,"color":"orange","pan":-0.22,"big":0},{"t":29.015,"type":"chalk","d":0.064,"len":174,"color":"orange","pan":-0.22,"big":0},{"t":29.05,"type":"sub","t1":31.62,"zh":"古人拿箭当尺子,用来量长短。","en":"People once used arrows as rulers to measure length."},{"t":29.096,"type":"chalk","d":0.032,"len":55,"color":"orange","pan":-0.2,"big":0},{"t":29.152,"type":"chalk","d":0.053,"len":131,"color":"white","pan":-0.16,"big":0},{"t":29.224,"type":"chalk","d":0.04,"len":79,"color":"white","pan":-0.18,"big":0},{"t":29.274,"type":"chalk","d":0.036,"len":101,"color":"white","pan":-0.02,"big":0},{"t":29.281,"type":"chalk","d":0.058,"len":151,"color":"white","pan":-0.14,"big":0},{"t":29.32,"type":"chalk","d":0.024,"len":24,"color":"white","pan":0,"big":0},{"t":29.354,"type":"chalk","d":0.035,"len":95,"color":"white","pan":0.01,"big":0},{"t":29.355,"type":"chalk","d":0.04,"len":79,"color":"white","pan":-0.16,"big":0},{"t":29.4,"type":"chalk","d":0.03,"len":42,"color":"white","pan":0.02,"big":0},{"t":29.411,"type":"chalk","d":0.032,"len":40,"color":"white","pan":-0.17,"big":0},{"t":29.45,"type":"chalk","d":0.03,"len":46,"color":"white","pan":0.06,"big":0},{"t":29.457,"type":"chalk","d":0.04,"len":59,"color":"white","pan":-0.14,"big":0},{"t":29.489,"type":"chalk","d":0.03,"len":50,"color":"white","pan":0.07,"big":0},{"t":29.515,"type":"chalk","d":0.059,"len":156,"color":"white","pan":-0.16,"big":0},{"t":29.531,"type":"chalk","d":0.034,"len":90,"color":"white","pan":0.07,"big":0},{"t":29.577,"type":"chalk","d":0.034,"len":87,"color":"white","pan":0.06,"big":0},{"t":29.622,"type":"chalk","d":0.03,"len":58,"color":"white","pan":0.08,"big":0},{"t":29.672,"type":"chalk","d":0.024,"len":21,"color":"white","pan":0.13,"big":0},{"t":29.674,"type":"chalk","d":0.24,"len":610,"color":"white","pan":0.17,"big":0},{"t":29.705,"type":"chalk","d":0.047,"len":165,"color":"white","pan":0.16,"big":0},{"t":29.763,"type":"chalk","d":0.036,"len":103,"color":"white","pan":0.13,"big":0},{"t":29.811,"type":"chalk","d":0.024,"len":25,"color":"white","pan":0.14,"big":0},{"t":29.855,"type":"chalk","d":0.032,"len":74,"color":"white","pan":0.2,"big":0},{"t":29.897,"type":"chalk","d":0.032,"len":77,"color":"white","pan":0.21,"big":0},{"t":29.913781513570033,"type":"tick"},{"t":29.914,"type":"chalk","d":0.06,"len":58,"color":"white","pan":-0.02,"big":0},{"t":29.939,"type":"chalk","d":0.03,"len":35,"color":"white","pan":0.21,"big":0},{"t":29.981,"type":"chalk","d":0.03,"len":52,"color":"white","pan":0.19,"big":0},{"t":29.994,"type":"chalk","d":0.06,"len":52,"color":"white","pan":0.17,"big":0},{"t":30.02,"type":"chalk","d":0.036,"len":99,"color":"white","pan":0.2,"big":0},{"t":30.064,"type":"chalk","d":0.06,"len":58,"color":"white","pan":0.35,"big":0},{"t":30.126,"type":"chalk","d":0.036,"len":59,"color":"white","pan":-0.02,"big":0},{"t":30.17,"type":"chalk","d":0.029,"len":19,"color":"white","pan":-0.02,"big":0},{"t":30.194,"type":"chalk","d":0.18,"len":286,"color":"orange","pan":0.07,"big":0},{"t":30.207,"type":"chalk","d":0.054,"len":151,"color":"white","pan":-0.01,"big":0},{"t":30.268,"type":"chalk","d":0.049,"len":126,"color":"white","pan":0.03,"big":0},{"t":30.325,"type":"chalk","d":0.054,"len":152,"color":"white","pan":0.08,"big":0},{"t":30.374,"type":"chalk","d":0.1,"len":66,"color":"orange","pan":0.16,"big":0},{"t":30.387,"type":"chalk","d":0.041,"len":85,"color":"white","pan":0.09,"big":0},{"t":30.436,"type":"chalk","d":0.041,"len":86,"color":"white","pan":0.11,"big":0},{"t":30.484,"type":"chalk","d":0.08,"len":56,"color":"orange","pan":-0.02,"big":0},{"t":30.485,"type":"chalk","d":0.046,"len":112,"color":"white","pan":0.14,"big":0},{"t":30.54,"type":"chalk","d":0.055,"len":157,"color":"white","pan":0.18,"big":0},{"t":30.574,"type":"chalk","d":0.08,"len":55,"color":"orange","pan":0,"big":0},{"t":30.602,"type":"chalk","d":0.032,"len":38,"color":"white","pan":0.22,"big":0},{"t":30.643,"type":"chalk","d":0.027,"len":12,"color":"white","pan":0.22,"big":0},{"t":30.678,"type":"chalk","d":0.042,"len":90,"color":"white","pan":0.24,"big":0},{"t":30.724,"type":"chalk","d":0.18,"len":286,"color":"orange","pan":0.26,"big":0},{"t":30.728,"type":"chalk","d":0.036,"len":59,"color":"white","pan":0.27,"big":0},{"t":30.772,"type":"chalk","d":0.029,"len":19,"color":"white","pan":0.27,"big":0},{"t":30.809,"type":"chalk","d":0.053,"len":150,"color":"white","pan":0.29,"big":0},{"t":30.87,"type":"chalk","d":0.049,"len":126,"color":"white","pan":0.32,"big":0},{"t":30.903781513570035,"type":"tick"},{"t":30.904,"type":"chalk","d":0.1,"len":63,"color":"orange","pan":0.35,"big":0},{"t":30.927,"type":"chalk","d":0.041,"len":86,"color":"white","pan":0.36,"big":0},{"t":30.976,"type":"chalk","d":0.05,"len":131,"color":"white","pan":0.4,"big":0},{"t":31.034,"type":"chalk","d":0.036,"len":57,"color":"white","pan":0.41,"big":0},{"t":31.078,"type":"chalk","d":0.049,"len":126,"color":"white","pan":0.42,"big":0},{"t":31.135,"type":"chalk","d":0.041,"len":85,"color":"white","pan":0.44,"big":0},{"t":31.62,"type":"sub","t1":34.095,"zh":"所以短字里,也有这支箭。","en":"That is why 短 (short) has one too."},{"t":32.926,"type":"chalk","d":1.6,"len":3372,"color":"orange","pan":-0.64,"big":0},{"t":32.9260049551011,"type":"thread","d":1.6},{"t":34.096,"type":"sub","t1":35.649,"zh":"射,是拉弓放箭;","en":"射 means drawing a bow and shooting;"},{"t":34.1760049551011,"type":"vo","id":"n8"},{"t":34.6260049551011,"type":"wipe","d":0.75},{"t":35.476,"type":"chalk","d":0.03,"len":49,"color":"white","pan":-0.28,"big":0},{"t":35.516,"type":"chalk","d":0.03,"len":30,"color":"white","pan":-0.29,"big":0},{"t":35.556,"type":"chalk","d":0.036,"len":85,"color":"white","pan":-0.28,"big":0},{"t":35.612,"type":"chalk","d":0.03,"len":37,"color":"white","pan":-0.24,"big":0},{"t":35.649,"type":"sub","t1":38.578,"zh":"矮,就是个子短,委只管读音。","en":"矮 means short, and 委 only gives the sound."},{"t":35.652,"type":"chalk","d":0.03,"len":36,"color":"white","pan":-0.24,"big":0},{"t":35.702,"type":"chalk","d":0.03,"len":33,"color":"white","pan":-0.19,"big":0},{"t":35.74,"type":"chalk","d":0.03,"len":36,"color":"white","pan":-0.18,"big":0},{"t":35.781,"type":"chalk","d":0.03,"len":55,"color":"white","pan":-0.18,"big":0},{"t":35.822,"type":"chalk","d":0.031,"len":60,"color":"white","pan":-0.18,"big":0},{"t":35.923,"type":"chalk","d":0.06,"len":113,"color":"white","pan":-0.32,"big":0},{"t":35.992,"type":"chalk","d":0.048,"len":73,"color":"white","pan":-0.3,"big":0},{"t":36.047,"type":"chalk","d":0.057,"len":103,"color":"white","pan":-0.27,"big":0},{"t":36.113,"type":"chalk","d":0.031,"len":20,"color":"white","pan":-0.24,"big":0},{"t":36.152,"type":"chalk","d":0.032,"len":21,"color":"white","pan":-0.24,"big":0},{"t":36.192,"type":"chalk","d":0.056,"len":98,"color":"white","pan":-0.21,"big":0},{"t":36.256,"type":"chalk","d":0.056,"len":100,"color":"white","pan":-0.19,"big":0},{"t":36.32,"type":"chalk","d":0.052,"len":85,"color":"white","pan":-0.18,"big":0},{"t":36.379,"type":"chalk","d":0.06,"len":111,"color":"white","pan":-0.16,"big":0},{"t":36.539,"type":"chalk","d":0.03,"len":26,"color":"white","pan":0.09,"big":0},{"t":36.578,"type":"chalk","d":0.03,"len":28,"color":"white","pan":0.09,"big":0},{"t":36.619,"type":"chalk","d":0.03,"len":50,"color":"white","pan":0.09,"big":0},{"t":36.659,"type":"chalk","d":0.03,"len":49,"color":"white","pan":0.09,"big":0},{"t":36.699,"type":"chalk","d":0.03,"len":32,"color":"white","pan":0.1,"big":0},{"t":36.749,"type":"chalk","d":0.03,"len":37,"color":"white","pan":0.14,"big":0},{"t":36.788,"type":"chalk","d":0.03,"len":36,"color":"white","pan":0.14,"big":0},{"t":36.838,"type":"chalk","d":0.03,"len":28,"color":"white","pan":0.2,"big":0},{"t":36.877,"type":"chalk","d":0.03,"len":44,"color":"white","pan":0.2,"big":0},{"t":36.917,"type":"chalk","d":0.03,"len":22,"color":"white","pan":0.2,"big":0},{"t":36.955,"type":"chalk","d":0.03,"len":28,"color":"white","pan":0.19,"big":0},{"t":36.995,"type":"chalk","d":0.024,"len":25,"color":"white","pan":0.21,"big":0},{"t":37.029,"type":"chalk","d":0.03,"len":51,"color":"white","pan":0.19,"big":0},{"t":37.068,"type":"chalk","d":0.03,"len":40,"color":"white","pan":0.2,"big":0},{"t":37.108,"type":"chalk","d":0.03,"len":54,"color":"white","pan":0.2,"big":0},{"t":37.208,"type":"chalk","d":0.054,"len":83,"color":"white","pan":-0.01,"big":0},{"t":37.262,"type":"chalk","d":0.041,"len":47,"color":"white","pan":0,"big":0},{"t":37.303,"type":"chalk","d":0.041,"len":47,"color":"white","pan":0.01,"big":0},{"t":37.344,"type":"chalk","d":0.046,"len":61,"color":"white","pan":0.03,"big":0},{"t":37.39,"type":"chalk","d":0.055,"len":86,"color":"white","pan":0.05,"big":0},{"t":37.445,"type":"chalk","d":0.03,"len":27,"color":"white","pan":0.07,"big":0},{"t":37.484,"type":"chalk","d":0.03,"len":19,"color":"white","pan":0.08,"big":0},{"t":37.534,"type":"chalk","d":0.036,"len":31,"color":"white","pan":0.09,"big":0},{"t":37.57,"type":"chalk","d":0.049,"len":69,"color":"white","pan":0.1,"big":0},{"t":37.619,"type":"chalk","d":0.05,"len":71,"color":"white","pan":0.11,"big":0},{"t":37.669,"type":"chalk","d":0.061,"len":104,"color":"white","pan":0.14,"big":0},{"t":37.73,"type":"chalk","d":0.036,"len":32,"color":"white","pan":0.14,"big":0},{"t":37.774,"type":"chalk","d":0.029,"len":11,"color":"white","pan":0.15,"big":0},{"t":37.803,"type":"chalk","d":0.053,"len":82,"color":"white","pan":0.15,"big":0},{"t":37.856,"type":"chalk","d":0.024,"len":5,"color":"white","pan":0.18,"big":0},{"t":37.9,"type":"chalk","d":0.055,"len":86,"color":"white","pan":0.2,"big":0},{"t":37.955,"type":"chalk","d":0.049,"len":69,"color":"white","pan":0.22,"big":0},{"t":38.004,"type":"chalk","d":0.032,"len":21,"color":"white","pan":0.23,"big":0},{"t":38.044,"type":"chalk","d":0.027,"len":7,"color":"white","pan":0.23,"big":0},{"t":38.071,"type":"chalk","d":0.03,"len":27,"color":"white","pan":0.24,"big":0},{"t":38.111,"type":"chalk","d":0.03,"len":19,"color":"white","pan":0.25,"big":0},{"t":38.161,"type":"chalk","d":0.042,"len":49,"color":"white","pan":0.27,"big":0},{"t":38.203,"type":"chalk","d":0.046,"len":61,"color":"white","pan":0.28,"big":0},{"t":38.249,"type":"chalk","d":0.05,"len":71,"color":"white","pan":0.3,"big":0},{"t":38.299,"type":"chalk","d":0.05,"len":71,"color":"white","pan":0.31,"big":0},{"t":38.348,"type":"chalk","d":0.057,"len":92,"color":"white","pan":0.32,"big":0},{"t":39.698,"type":"sub","t1":41.385,"zh":"所以,没弄反。","en":"So they were never swapped."},{"t":39.728,"type":"chalk","d":0.024,"len":14,"color":"white","pan":0.31,"big":0},{"t":39.762,"type":"chalk","d":0.024,"len":14,"color":"white","pan":0.31,"big":0},{"t":39.778004955101096,"type":"vo","id":"n9"},{"t":39.798,"type":"chalk","d":0.03,"len":29,"color":"white","pan":0.31,"big":0},{"t":39.84,"type":"chalk","d":0.03,"len":29,"color":"white","pan":0.32,"big":0},{"t":39.881,"type":"chalk","d":0.037,"len":50,"color":"white","pan":0.33,"big":0},{"t":39.931,"type":"chalk","d":0.048,"len":81,"color":"white","pan":0.33,"big":0},{"t":39.991,"type":"chalk","d":0.036,"len":45,"color":"white","pan":0.33,"big":0},{"t":40.046,"type":"chalk","d":0.037,"len":48,"color":"white","pan":0.37,"big":0},{"t":40.096,"type":"chalk","d":0.034,"len":40,"color":"white","pan":0.37,"big":0},{"t":40.141,"type":"chalk","d":0.03,"len":25,"color":"white","pan":0.37,"big":0},{"t":40.182,"type":"chalk","d":0.037,"len":49,"color":"white","pan":0.37,"big":0},{"t":40.234,"type":"chalk","d":0.043,"len":67,"color":"white","pan":0.37,"big":0},{"t":40.29,"type":"chalk","d":0.033,"len":36,"color":"white","pan":0.36,"big":0},{"t":40.336,"type":"chalk","d":0.032,"len":36,"color":"white","pan":0.37,"big":0},{"t":40.388,"type":"chalk","d":0.033,"len":38,"color":"white","pan":0.41,"big":0},{"t":40.43,"type":"chalk","d":0.039,"len":54,"color":"white","pan":0.4,"big":0},{"t":40.482,"type":"chalk","d":0.055,"len":101,"color":"white","pan":0.42,"big":0},{"t":40.549,"type":"chalk","d":0.038,"len":51,"color":"white","pan":0.42,"big":0},{"t":40.687,"type":"chalk","d":0.041,"len":104,"color":"white","pan":0.47,"big":0},{"t":40.7280908990818,"type":"tap","big":1},{"t":40.778,"type":"chalk","d":0.071,"len":120,"color":"white","pan":0.31,"big":0},{"t":40.857,"type":"chalk","d":0.053,"len":73,"color":"white","pan":0.33,"big":0},{"t":40.918,"type":"chalk","d":0.04,"len":39,"color":"white","pan":0.35,"big":0},{"t":40.966,"type":"chalk","d":0.03,"len":13,"color":"white","pan":0.35,"big":0},{"t":41.004,"type":"chalk","d":0.048,"len":59,"color":"white","pan":0.38,"big":0},{"t":41.059,"type":"chalk","d":0.065,"len":103,"color":"white","pan":0.39,"big":0},{"t":41.132,"type":"chalk","d":0.063,"len":99,"color":"white","pan":0.42,"big":0},{"t":41.203,"type":"chalk","d":0.072,"len":123,"color":"white","pan":0.43,"big":0},{"t":41.283,"type":"chalk","d":0.072,"len":124,"color":"white","pan":0.45,"big":0},{"t":41.364,"type":"chalk","d":0.057,"len":82,"color":"white","pan":0.47,"big":0},{"t":41.428,"type":"chalk","d":0.067,"len":110,"color":"white","pan":0.48,"big":0},{"t":43.32809089908179,"type":"bell"},{"t":45.2280908990818,"type":"slide","d":0.85}]}\ No newline at end of filediff --git a/styles/chalkboard/demo/foley/lib/index.json b/styles/chalkboard/demo/foley/lib/index.jsonnew file mode 100644index 0000000..7ebd297--- /dev/null+++ b/styles/chalkboard/demo/foley/lib/index.json@@ -0,0 +1,3782 @@+[+{+"file": "stroke_fat_000.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.544,+"attack": 0.004,+"crest": 9.16,+"centroid": 5761,+"tonal_db": 16.8,+"tone_hz": 1649,+"low": 0.097,+"rms": -38.3,+"at": 0.256+},+{+"file": "stroke_fat_001.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.378,+"attack": 0.004,+"crest": 29.04,+"centroid": 7339,+"tonal_db": 12.1,+"tone_hz": 2937,+"low": 0.041,+"rms": -37.4,+"at": 0.912+},+{+"file": "stroke_fat_002.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.446,+"attack": 0.004,+"crest": 21.48,+"centroid": 6087,+"tonal_db": 26.3,+"tone_hz": 2344,+"low": 0.088,+"rms": -36.6,+"at": 1.39+},+{+"file": "stroke_fat_003.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.436,+"attack": 0.004,+"crest": 27.05,+"centroid": 7483,+"tonal_db": 19.9,+"tone_hz": 2241,+"low": 0.081,+"rms": -35.3,+"at": 1.93+},+{+"file": "stroke_fat_004.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.364,+"attack": 0.004,+"crest": 27.68,+"centroid": 7088,+"tonal_db": 17.8,+"tone_hz": 2320,+"low": 0.045,+"rms": -35.9,+"at": 2.424+},+{+"file": "stroke_fat_005.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.164,+"attack": 0.006,+"crest": 17.21,+"centroid": 7324,+"tonal_db": 13.9,+"tone_hz": 4025,+"low": 0.09,+"rms": -37.2,+"at": 2.834+},+{+"file": "stroke_fat_006.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.12,+"attack": 0.004,+"crest": 20.01,+"centroid": 6091,+"tonal_db": 13.7,+"tone_hz": 3990,+"low": 0.075,+"rms": -28.3,+"at": 3.042+},+{+"file": "stroke_fat_007.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.13,+"attack": 0.004,+"crest": 16.43,+"centroid": 7366,+"tonal_db": 16.9,+"tone_hz": 1488,+"low": 0.088,+"rms": -34.6,+"at": 3.22+},+{+"file": "stroke_fat_008.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.414,+"attack": 0.004,+"crest": 31.12,+"centroid": 6651,+"tonal_db": 14.5,+"tone_hz": 2452,+"low": 0.047,+"rms": -34.1,+"at": 3.414+},+{+"file": "stroke_fat_009.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.188,+"attack": 0.004,+"crest": 17.7,+"centroid": 7182,+"tonal_db": 15.8,+"tone_hz": 2423,+"low": 0.076,+"rms": -33.6,+"at": 3.984+},+{+"file": "stroke_fat_010.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.886,+"attack": 0.214,+"crest": 24.93,+"centroid": 5536,+"tonal_db": 13.9,+"tone_hz": 1531,+"low": 0.161,+"rms": -37.3,+"at": 4.208+},+{+"file": "stroke_fat_011.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.31,+"attack": 0.006,+"crest": 16.24,+"centroid": 5656,+"tonal_db": 17.6,+"tone_hz": 2493,+"low": 0.088,+"rms": -36.1,+"at": 5.138+},+{+"file": "stroke_fat_012.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.182,+"attack": 0.006,+"crest": 11.34,+"centroid": 8400,+"tonal_db": 13.4,+"tone_hz": 3973,+"low": 0.021,+"rms": -32.3,+"at": 5.528+},+{+"file": "tap_fat_013.wav",+"src": "fat",+"kind": "tap",+"dur": 0.056,+"attack": 0.006,+"crest": 4.82,+"centroid": 2887,+"tonal_db": 16.3,+"tone_hz": 2285,+"low": 0.338,+"rms": -49.3,+"at": 5.72+},+{+"file": "stroke_fat_014.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.5,+"attack": 0.004,+"crest": 24.6,+"centroid": 5593,+"tonal_db": 19.0,+"tone_hz": 2338,+"low": 0.076,+"rms": -34.1,+"at": 6.84+},+{+"file": "stroke_fat_015.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.328,+"attack": 0.006,+"crest": 31.86,+"centroid": 7255,+"tonal_db": 14.5,+"tone_hz": 3489,+"low": 0.046,+"rms": -31.5,+"at": 7.432+},+{+"file": "stroke_fat_016.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.482,+"attack": 0.006,+"crest": 20.91,+"centroid": 6221,+"tonal_db": 20.8,+"tone_hz": 2360,+"low": 0.113,+"rms": -39.6,+"at": 7.864+},+{+"file": "stroke_fat_017.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.676,+"attack": 0.004,+"crest": 33.05,+"centroid": 5364,+"tonal_db": 15.4,+"tone_hz": 2297,+"low": 0.156,+"rms": -38.2,+"at": 8.44+},+{+"file": "stroke_fat_018.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.148,+"attack": 0.004,+"crest": 16.93,+"centroid": 7756,+"tonal_db": 13.6,+"tone_hz": 1512,+"low": 0.075,+"rms": -39.6,+"at": 9.162+},+{+"file": "stroke_fat_019.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.128,+"attack": 0.004,+"crest": 18.45,+"centroid": 6388,+"tonal_db": 13.8,+"tone_hz": 1535,+"low": 0.07,+"rms": -27.5,+"at": 9.382+},+{+"file": "stroke_fat_020.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.128,+"attack": 0.004,+"crest": 20.79,+"centroid": 6507,+"tonal_db": 15.1,+"tone_hz": 1471,+"low": 0.132,+"rms": -26.7,+"at": 9.554+},+{+"file": "stroke_fat_021.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.392,+"attack": 0.004,+"crest": 32.15,+"centroid": 6992,+"tonal_db": 13.4,+"tone_hz": 3812,+"low": 0.045,+"rms": -30.7,+"at": 9.724+},+{+"file": "stroke_fat_022.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.134,+"attack": 0.004,+"crest": 14.72,+"centroid": 6510,+"tonal_db": 15.6,+"tone_hz": 2443,+"low": 0.108,+"rms": -29.1,+"at": 10.38+},+{+"file": "stroke_fat_023.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.178,+"attack": 0.006,+"crest": 15.55,+"centroid": 6966,+"tonal_db": 14.0,+"tone_hz": 3940,+"low": 0.057,+"rms": -37.2,+"at": 10.558+},+{+"file": "stroke_fat_024.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.442,+"attack": 0.004,+"crest": 23.94,+"centroid": 4214,+"tonal_db": 15.0,+"tone_hz": 1512,+"low": 0.19,+"rms": -32.3,+"at": 10.776+},+{+"file": "stroke_fat_025.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.424,+"attack": 0.004,+"crest": 14.19,+"centroid": 5508,+"tonal_db": 17.3,+"tone_hz": 1636,+"low": 0.101,+"rms": -38.8,+"at": 11.238+},+{+"file": "stroke_fat_026.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.412,+"attack": 0.004,+"crest": 15.26,+"centroid": 6485,+"tonal_db": 14.6,+"tone_hz": 1512,+"low": 0.052,+"rms": -30.9,+"at": 11.784+},+{+"file": "stroke_fat_027.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.576,+"attack": 0.004,+"crest": 14.14,+"centroid": 6604,+"tonal_db": 17.9,+"tone_hz": 2480,+"low": 0.05,+"rms": -38.5,+"at": 12.748+},+{+"file": "stroke_fat_028.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.4,+"attack": 0.004,+"crest": 20.98,+"centroid": 8337,+"tonal_db": 14.0,+"tone_hz": 4027,+"low": 0.045,+"rms": -40.3,+"at": 13.462+},+{+"file": "stroke_fat_029.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.446,+"attack": 0.004,+"crest": 26.18,+"centroid": 7259,+"tonal_db": 19.6,+"tone_hz": 2342,+"low": 0.069,+"rms": -37.2,+"at": 13.952+},+{+"file": "stroke_fat_030.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.762,+"attack": 0.004,+"crest": 39.52,+"centroid": 6969,+"tonal_db": 15.9,+"tone_hz": 3930,+"low": 0.056,+"rms": -38.0,+"at": 14.478+},+{+"file": "stroke_fat_031.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.094,+"attack": 0.064,+"crest": 4.56,+"centroid": 5419,+"tonal_db": 19.9,+"tone_hz": 2631,+"low": 0.056,+"rms": -43.2,+"at": 15.25+},+{+"file": "stroke_fat_032.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.112,+"attack": 0.004,+"crest": 13.76,+"centroid": 6211,+"tonal_db": 14.9,+"tone_hz": 1535,+"low": 0.154,+"rms": -28.7,+"at": 15.43+},+{+"file": "stroke_fat_033.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.3,+"attack": 0.004,+"crest": 29.12,+"centroid": 7196,+"tonal_db": 13.5,+"tone_hz": 3902,+"low": 0.057,+"rms": -29.3,+"at": 15.6+},+{+"file": "stroke_fat_034.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.422,+"attack": 0.004,+"crest": 24.3,+"centroid": 7173,+"tonal_db": 11.6,+"tone_hz": 1614,+"low": 0.043,+"rms": -34.6,+"at": 15.974+},+{+"file": "stroke_fat_035.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.128,+"attack": 0.006,+"crest": 13.37,+"centroid": 6635,+"tonal_db": 14.9,+"tone_hz": 1676,+"low": 0.149,+"rms": -29.4,+"at": 16.592+},+{+"file": "stroke_fat_036.wav",+"src": "fat",+"kind": "stroke",+"dur": 1.256,+"attack": 0.004,+"crest": 28.04,+"centroid": 6589,+"tonal_db": 15.9,+"tone_hz": 2364,+"low": 0.077,+"rms": -41.2,+"at": 16.774+},+{+"file": "tap_fat_037.wav",+"src": "fat",+"kind": "tap",+"dur": 0.052,+"attack": 0.004,+"crest": 6.17,+"centroid": 5494,+"tonal_db": 16.5,+"tone_hz": 4770,+"low": 0.149,+"rms": -42.8,+"at": 18.058+},+{+"file": "stroke_fat_038.wav",+"src": "fat",+"kind": "stroke",+"dur": 0.508,+"attack": 0.244,+"crest": 6.26,+"centroid": 7387,+"tonal_db": 13.5,+"tone_hz": 4055,+"low": 0.029,+"rms": -36.3,+"at": 18.122+},+{+"file": "stroke_tom_000.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.174,+"attack": 0.006,+"crest": 9.53,+"centroid": 2737,+"tonal_db": 15.6,+"tone_hz": 2145,+"low": 0.061,+"rms": -25.6,+"at": 1.526+},+{+"file": "stroke_tom_001.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.164,+"attack": 0.006,+"crest": 7.11,+"centroid": 2663,+"tonal_db": 15.6,+"tone_hz": 2438,+"low": 0.065,+"rms": -26.9,+"at": 1.872+},+{+"file": "stroke_tom_002.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.138,+"attack": 0.006,+"crest": 12.82,+"centroid": 2723,+"tonal_db": 16.0,+"tone_hz": 2590,+"low": 0.09,+"rms": -28.2,+"at": 2.082+},+{+"file": "stroke_tom_003.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.144,+"attack": 0.006,+"crest": 9.65,+"centroid": 2788,+"tonal_db": 14.6,+"tone_hz": 2361,+"low": 0.085,+"rms": -29.5,+"at": 2.464+},+{+"file": "stroke_tom_004.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.162,+"attack": 0.006,+"crest": 14.5,+"centroid": 2980,+"tonal_db": 14.0,+"tone_hz": 2256,+"low": 0.078,+"rms": -26.9,+"at": 2.714+},+{+"file": "stroke_tom_005.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.17,+"attack": 0.006,+"crest": 14.28,+"centroid": 2642,+"tonal_db": 19.1,+"tone_hz": 2438,+"low": 0.08,+"rms": -25.7,+"at": 3.088+},+{+"file": "stroke_tom_006.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.172,+"attack": 0.006,+"crest": 15.43,+"centroid": 2864,+"tonal_db": 15.6,+"tone_hz": 2153,+"low": 0.066,+"rms": -25.7,+"at": 3.704+},+{+"file": "stroke_tom_007.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.142,+"attack": 0.006,+"crest": 10.51,+"centroid": 2542,+"tonal_db": 16.1,+"tone_hz": 2133,+"low": 0.085,+"rms": -29.0,+"at": 4.084+},+{+"file": "stroke_tom_008.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.138,+"attack": 0.006,+"crest": 11.46,+"centroid": 2717,+"tonal_db": 17.3,+"tone_hz": 2180,+"low": 0.083,+"rms": -29.1,+"at": 4.362+},+{+"file": "stroke_tom_009.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.17,+"attack": 0.006,+"crest": 13.36,+"centroid": 2918,+"tonal_db": 16.8,+"tone_hz": 2848,+"low": 0.077,+"rms": -26.4,+"at": 4.596+},+{+"file": "stroke_tom_010.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.2,+"attack": 0.006,+"crest": 18.99,+"centroid": 2895,+"tonal_db": 13.7,+"tone_hz": 2745,+"low": 0.093,+"rms": -29.6,+"at": 4.91+},+{+"file": "stroke_tom_011.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.168,+"attack": 0.006,+"crest": 16.83,+"centroid": 3226,+"tonal_db": 12.3,+"tone_hz": 2912,+"low": 0.052,+"rms": -24.7,+"at": 5.33+},+{+"file": "stroke_tom_012.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.156,+"attack": 0.006,+"crest": 15.92,+"centroid": 2937,+"tonal_db": 11.8,+"tone_hz": 2479,+"low": 0.066,+"rms": -25.1,+"at": 5.54+},+{+"file": "stroke_tom_013.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.148,+"attack": 0.006,+"crest": 15.75,+"centroid": 2467,+"tonal_db": 16.0,+"tone_hz": 1594,+"low": 0.08,+"rms": -28.4,+"at": 5.816+},+{+"file": "stroke_tom_014.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.124,+"attack": 0.048,+"crest": 4.58,+"centroid": 3395,+"tonal_db": 20.4,+"tone_hz": 2941,+"low": 0.087,+"rms": -38.0,+"at": 6.162+},+{+"file": "tap_tom_015.wav",+"src": "tom",+"kind": "tap",+"dur": 0.054,+"attack": 0.006,+"crest": 3.04,+"centroid": 1830,+"tonal_db": 12.1,+"tone_hz": 1758,+"low": 0.617,+"rms": -38.7,+"at": 6.452+},+{+"file": "stroke_tom_016.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.196,+"attack": 0.004,+"crest": 11.79,+"centroid": 2676,+"tonal_db": 17.8,+"tone_hz": 1424,+"low": 0.138,+"rms": -30.1,+"at": 7.388+},+{+"file": "stroke_tom_017.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.196,+"attack": 0.004,+"crest": 15.79,+"centroid": 2057,+"tonal_db": 15.4,+"tone_hz": 2379,+"low": 0.195,+"rms": -31.9,+"at": 7.806+},+{+"file": "stroke_tom_018.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.174,+"attack": 0.006,+"crest": 11.67,+"centroid": 2161,+"tonal_db": 17.6,+"tone_hz": 1553,+"low": 0.201,+"rms": -36.2,+"at": 8.254+},+{+"file": "stroke_tom_019.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.198,+"attack": 0.008,+"crest": 17.63,+"centroid": 2507,+"tonal_db": 15.6,+"tone_hz": 2399,+"low": 0.127,+"rms": -26.3,+"at": 8.62+},+{+"file": "tap_tom_020.wav",+"src": "tom",+"kind": "tap",+"dur": 0.026,+"attack": 0.004,+"crest": 2.78,+"centroid": 1649,+"tonal_db": 9.8,+"tone_hz": 1758,+"low": 0.695,+"rms": -40.2,+"at": 9.178+},+{+"file": "stroke_tom_021.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.126,+"attack": 0.006,+"crest": 6.89,+"centroid": 2913,+"tonal_db": 14.7,+"tone_hz": 2807,+"low": 0.055,+"rms": -31.1,+"at": 9.61+},+{+"file": "stroke_tom_022.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.178,+"attack": 0.006,+"crest": 10.48,+"centroid": 2816,+"tonal_db": 15.4,+"tone_hz": 2367,+"low": 0.061,+"rms": -23.9,+"at": 10.018+},+{+"file": "stroke_tom_023.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.174,+"attack": 0.006,+"crest": 9.73,+"centroid": 2849,+"tonal_db": 16.1,+"tone_hz": 2604,+"low": 0.068,+"rms": -25.7,+"at": 10.252+},+{+"file": "stroke_tom_024.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.166,+"attack": 0.006,+"crest": 9.01,+"centroid": 3094,+"tonal_db": 13.7,+"tone_hz": 2156,+"low": 0.053,+"rms": -25.9,+"at": 10.61+},+{+"file": "stroke_tom_025.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.192,+"attack": 0.006,+"crest": 11.86,+"centroid": 2957,+"tonal_db": 13.6,+"tone_hz": 2590,+"low": 0.066,+"rms": -25.6,+"at": 10.814+},+{+"file": "stroke_tom_026.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.168,+"attack": 0.006,+"crest": 12.88,+"centroid": 2935,+"tonal_db": 14.4,+"tone_hz": 2391,+"low": 0.058,+"rms": -26.8,+"at": 11.086+},+{+"file": "stroke_tom_027.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.166,+"attack": 0.006,+"crest": 10.28,+"centroid": 2692,+"tonal_db": 14.7,+"tone_hz": 2396,+"low": 0.068,+"rms": -27.1,+"at": 11.738+},+{+"file": "stroke_tom_028.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.104,+"attack": 0.006,+"crest": 8.17,+"centroid": 2538,+"tonal_db": 13.9,+"tone_hz": 2145,+"low": 0.076,+"rms": -33.8,+"at": 12.002+},+{+"file": "stroke_tom_029.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.156,+"attack": 0.006,+"crest": 8.4,+"centroid": 2241,+"tonal_db": 16.1,+"tone_hz": 1418,+"low": 0.077,+"rms": -28.1,+"at": 12.504+},+{+"file": "stroke_tom_030.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.136,+"attack": 0.004,+"crest": 7.9,+"centroid": 2538,+"tonal_db": 16.3,+"tone_hz": 2396,+"low": 0.075,+"rms": -30.6,+"at": 12.838+},+{+"file": "stroke_tom_031.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.154,+"attack": 0.006,+"crest": 9.91,+"centroid": 3005,+"tonal_db": 16.2,+"tone_hz": 3000,+"low": 0.059,+"rms": -28.8,+"at": 13.06+},+{+"file": "stroke_tom_032.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.194,+"attack": 0.006,+"crest": 13.46,+"centroid": 2845,+"tonal_db": 13.3,+"tone_hz": 2596,+"low": 0.065,+"rms": -27.0,+"at": 13.272+},+{+"file": "stroke_tom_033.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.134,+"attack": 0.006,+"crest": 8.26,+"centroid": 2437,+"tonal_db": 18.3,+"tone_hz": 1488,+"low": 0.086,+"rms": -29.2,+"at": 13.54+},+{+"file": "stroke_tom_034.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.172,+"attack": 0.008,+"crest": 11.83,+"centroid": 3026,+"tonal_db": 14.4,+"tone_hz": 1521,+"low": 0.051,+"rms": -25.8,+"at": 13.864+},+{+"file": "stroke_tom_035.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.116,+"attack": 0.004,+"crest": 8.14,+"centroid": 2403,+"tonal_db": 14.0,+"tone_hz": 1488,+"low": 0.084,+"rms": -33.1,+"at": 14.208+},+{+"file": "stroke_tom_036.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.168,+"attack": 0.006,+"crest": 12.03,+"centroid": 2902,+"tonal_db": 14.2,+"tone_hz": 1758,+"low": 0.046,+"rms": -26.7,+"at": 14.936+},+{+"file": "stroke_tom_037.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.174,+"attack": 0.008,+"crest": 12.43,+"centroid": 2949,+"tonal_db": 15.2,+"tone_hz": 2350,+"low": 0.048,+"rms": -25.1,+"at": 15.16+},+{+"file": "stroke_tom_038.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.122,+"attack": 0.006,+"crest": 8.49,+"centroid": 2377,+"tonal_db": 16.0,+"tone_hz": 2180,+"low": 0.063,+"rms": -31.9,+"at": 15.478+},+{+"file": "stroke_tom_039.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.176,+"attack": 0.006,+"crest": 9.49,+"centroid": 2704,+"tonal_db": 18.9,+"tone_hz": 1488,+"low": 0.108,+"rms": -32.4,+"at": 16.584+},+{+"file": "stroke_tom_040.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.218,+"attack": 0.006,+"crest": 12.94,+"centroid": 2759,+"tonal_db": 15.7,+"tone_hz": 1860,+"low": 0.097,+"rms": -29.6,+"at": 17.008+},+{+"file": "stroke_tom_041.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.214,+"attack": 0.006,+"crest": 12.05,+"centroid": 3026,+"tonal_db": 14.7,+"tone_hz": 2168,+"low": 0.058,+"rms": -23.1,+"at": 17.574+},+{+"file": "stroke_tom_042.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.112,+"attack": 0.006,+"crest": 7.43,+"centroid": 2257,+"tonal_db": 17.1,+"tone_hz": 1424,+"low": 0.089,+"rms": -34.0,+"at": 18.01+},+{+"file": "stroke_tom_043.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.156,+"attack": 0.006,+"crest": 12.39,+"centroid": 2617,+"tonal_db": 18.4,+"tone_hz": 2174,+"low": 0.08,+"rms": -28.0,+"at": 18.518+},+{+"file": "tap_tom_044.wav",+"src": "tom",+"kind": "tap",+"dur": 0.03,+"attack": 0.008,+"crest": 3.66,+"centroid": 3688,+"tonal_db": 20.8,+"tone_hz": 2508,+"low": 0.12,+"rms": -40.7,+"at": 18.746+},+{+"file": "stroke_tom_045.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.186,+"attack": 0.006,+"crest": 15.09,+"centroid": 2912,+"tonal_db": 14.3,+"tone_hz": 1896,+"low": 0.062,+"rms": -23.6,+"at": 19.632+},+{+"file": "stroke_tom_046.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.226,+"attack": 0.008,+"crest": 14.87,+"centroid": 2807,+"tonal_db": 16.2,+"tone_hz": 2728,+"low": 0.075,+"rms": -25.4,+"at": 19.868+},+{+"file": "stroke_tom_047.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.174,+"attack": 0.006,+"crest": 13.36,+"centroid": 2435,+"tonal_db": 17.2,+"tone_hz": 1896,+"low": 0.076,+"rms": -23.9,+"at": 20.172+},+{+"file": "stroke_tom_048.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.154,+"attack": 0.006,+"crest": 10.68,+"centroid": 2460,+"tonal_db": 17.7,+"tone_hz": 1635,+"low": 0.077,+"rms": -27.3,+"at": 20.384+},+{+"file": "stroke_tom_049.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.096,+"attack": 0.004,+"crest": 8.63,+"centroid": 2616,+"tonal_db": 15.2,+"tone_hz": 1635,+"low": 0.065,+"rms": -32.8,+"at": 20.784+},+{+"file": "stroke_tom_050.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.134,+"attack": 0.006,+"crest": 13.95,+"centroid": 2741,+"tonal_db": 15.7,+"tone_hz": 2150,+"low": 0.053,+"rms": -29.2,+"at": 21.908+},+{+"file": "stroke_tom_051.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.158,+"attack": 0.008,+"crest": 14.69,+"centroid": 3197,+"tonal_db": 13.9,+"tone_hz": 2197,+"low": 0.042,+"rms": -24.6,+"at": 22.42+},+{+"file": "stroke_tom_052.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.144,+"attack": 0.008,+"crest": 13.95,+"centroid": 2959,+"tonal_db": 16.0,+"tone_hz": 2197,+"low": 0.045,+"rms": -28.4,+"at": 22.594+},+{+"file": "stroke_tom_053.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.146,+"attack": 0.006,+"crest": 9.99,+"centroid": 2487,+"tonal_db": 15.1,+"tone_hz": 2180,+"low": 0.054,+"rms": -27.5,+"at": 23.42+},+{+"file": "stroke_tom_054.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.236,+"attack": 0.006,+"crest": 13.44,+"centroid": 2592,+"tonal_db": 17.4,+"tone_hz": 1632,+"low": 0.04,+"rms": -24.0,+"at": 23.86+},+{+"file": "stroke_tom_055.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.148,+"attack": 0.008,+"crest": 10.45,+"centroid": 2414,+"tonal_db": 15.5,+"tone_hz": 1576,+"low": 0.058,+"rms": -27.4,+"at": 24.174+},+{+"file": "stroke_tom_056.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.094,+"attack": 0.034,+"crest": 4.1,+"centroid": 3493,+"tonal_db": 19.5,+"tone_hz": 2180,+"low": 0.037,+"rms": -36.5,+"at": 26.378+},+{+"file": "stroke_tom_057.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.138,+"attack": 0.012,+"crest": 6.56,+"centroid": 2641,+"tonal_db": 17.2,+"tone_hz": 2180,+"low": 0.061,+"rms": -32.9,+"at": 27.516+},+{+"file": "stroke_tom_058.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.038,+"attack": 0.014,+"crest": 3.55,+"centroid": 3168,+"tonal_db": 13.4,+"tone_hz": 2391,+"low": 0.05,+"rms": -40.7,+"at": 27.712+},+{+"file": "stroke_tom_059.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.12,+"attack": 0.012,+"crest": 4.76,+"centroid": 2443,+"tonal_db": 16.5,+"tone_hz": 2162,+"low": 0.046,+"rms": -32.6,+"at": 28.064+},+{+"file": "stroke_tom_060.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.124,+"attack": 0.006,+"crest": 6.23,+"centroid": 2720,+"tonal_db": 15.8,+"tone_hz": 2162,+"low": 0.043,+"rms": -31.8,+"at": 28.652+},+{+"file": "stroke_tom_061.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.092,+"attack": 0.004,+"crest": 6.55,+"centroid": 2438,+"tonal_db": 17.6,+"tone_hz": 1682,+"low": 0.066,+"rms": -33.5,+"at": 29.198+},+{+"file": "stroke_tom_062.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.128,+"attack": 0.006,+"crest": 6.27,+"centroid": 2676,+"tonal_db": 17.9,+"tone_hz": 2180,+"low": 0.05,+"rms": -30.0,+"at": 29.856+},+{+"file": "stroke_tom_063.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.16,+"attack": 0.006,+"crest": 8.1,+"centroid": 2775,+"tonal_db": 15.9,+"tone_hz": 2180,+"low": 0.05,+"rms": -28.3,+"at": 30.574+},+{+"file": "stroke_tom_064.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.094,+"attack": 0.004,+"crest": 7.41,+"centroid": 2281,+"tonal_db": 18.3,+"tone_hz": 2297,+"low": 0.075,+"rms": -33.2,+"at": 31.194+},+{+"file": "stroke_tom_065.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.108,+"attack": 0.004,+"crest": 5.8,+"centroid": 2200,+"tonal_db": 18.9,+"tone_hz": 2438,+"low": 0.075,+"rms": -33.3,+"at": 31.838+},+{+"file": "stroke_tom_066.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.14,+"attack": 0.006,+"crest": 8.96,+"centroid": 2407,+"tonal_db": 18.7,+"tone_hz": 2426,+"low": 0.067,+"rms": -31.1,+"at": 32.606+},+{+"file": "stroke_tom_067.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.138,+"attack": 0.006,+"crest": 8.07,+"centroid": 2467,+"tonal_db": 16.3,+"tone_hz": 2473,+"low": 0.054,+"rms": -29.7,+"at": 33.188+},+{+"file": "stroke_tom_068.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.136,+"attack": 0.006,+"crest": 10.03,+"centroid": 3033,+"tonal_db": 14.6,+"tone_hz": 2396,+"low": 0.041,+"rms": -29.0,+"at": 33.858+},+{+"file": "tap_tom_069.wav",+"src": "tom",+"kind": "tap",+"dur": 0.066,+"attack": 0.004,+"crest": 5.88,+"centroid": 2166,+"tonal_db": 18.5,+"tone_hz": 1898,+"low": 0.085,+"rms": -36.8,+"at": 34.114+},+{+"file": "stroke_tom_070.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.094,+"attack": 0.004,+"crest": 9.74,+"centroid": 2717,+"tonal_db": 15.0,+"tone_hz": 2584,+"low": 0.053,+"rms": -33.9,+"at": 34.47+},+{+"file": "stroke_tom_071.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.154,+"attack": 0.006,+"crest": 11.28,+"centroid": 2685,+"tonal_db": 14.2,+"tone_hz": 2883,+"low": 0.067,+"rms": -29.1,+"at": 34.826+},+{+"file": "stroke_tom_072.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.096,+"attack": 0.004,+"crest": 8.31,+"centroid": 2249,+"tonal_db": 16.4,+"tone_hz": 1564,+"low": 0.088,+"rms": -33.9,+"at": 35.096+},+{+"file": "stroke_tom_073.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.106,+"attack": 0.004,+"crest": 8.84,+"centroid": 2762,+"tonal_db": 15.2,+"tone_hz": 2438,+"low": 0.055,+"rms": -30.7,+"at": 35.956+},+{+"file": "stroke_tom_074.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.134,+"attack": 0.006,+"crest": 10.19,+"centroid": 2494,+"tonal_db": 17.9,+"tone_hz": 2256,+"low": 0.05,+"rms": -28.7,+"at": 36.71+},+{+"file": "stroke_tom_075.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.178,+"attack": 0.006,+"crest": 12.56,+"centroid": 2951,+"tonal_db": 15.3,+"tone_hz": 2197,+"low": 0.042,+"rms": -24.9,+"at": 37.294+},+{+"file": "stroke_tom_076.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.12,+"attack": 0.01,+"crest": 7.02,+"centroid": 2277,+"tonal_db": 19.4,+"tone_hz": 1488,+"low": 0.072,+"rms": -29.8,+"at": 37.596+},+{+"file": "tap_tom_077.wav",+"src": "tom",+"kind": "tap",+"dur": 0.054,+"attack": 0.006,+"crest": 4.23,+"centroid": 2122,+"tonal_db": 24.9,+"tone_hz": 1488,+"low": 0.113,+"rms": -39.3,+"at": 38.036+},+{+"file": "stroke_tom_078.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.196,+"attack": 0.01,+"crest": 11.34,+"centroid": 2623,+"tonal_db": 15.1,+"tone_hz": 2197,+"low": 0.061,+"rms": -28.1,+"at": 38.576+},+{+"file": "stroke_tom_079.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.182,+"attack": 0.008,+"crest": 14.53,+"centroid": 3058,+"tonal_db": 15.2,+"tone_hz": 1761,+"low": 0.039,+"rms": -24.0,+"at": 38.918+},+{+"file": "stroke_tom_080.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.172,+"attack": 0.006,+"crest": 9.13,+"centroid": 2646,+"tonal_db": 15.0,+"tone_hz": 2525,+"low": 0.05,+"rms": -24.9,+"at": 39.244+},+{+"file": "tap_tom_081.wav",+"src": "tom",+"kind": "tap",+"dur": 0.028,+"attack": 0.01,+"crest": 3.87,+"centroid": 3499,+"tonal_db": 19.5,+"tone_hz": 2484,+"low": 0.088,+"rms": -41.0,+"at": 39.556+},+{+"file": "stroke_tom_082.wav",+"src": "tom",+"kind": "stroke",+"dur": 0.068,+"attack": 0.012,+"crest": 2.41,+"centroid": 2153,+"tonal_db": 11.6,+"tone_hz": 1523,+"low": 0.568,+"rms": -37.2,+"at": 41.464+},+{+"file": "tap_wws_000.wav",+"src": "wws",+"kind": "tap",+"dur": 0.032,+"attack": 0.004,+"crest": 5.24,+"centroid": 1472,+"tonal_db": 14.6,+"tone_hz": 1406,+"low": 0.495,+"rms": -33.0,+"at": 0.242+},+{+"file": "stroke_wws_001.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.084,+"attack": 0.014,+"crest": 4.84,+"centroid": 5482,+"tonal_db": 13.4,+"tone_hz": 4734,+"low": 0.097,+"rms": -33.9,+"at": 0.57+},+{+"file": "stroke_wws_002.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.094,+"attack": 0.036,+"crest": 4.57,+"centroid": 6675,+"tonal_db": 18.5,+"tone_hz": 4711,+"low": 0.058,+"rms": -35.2,+"at": 0.778+},+{+"file": "stroke_wws_003.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.13,+"attack": 0.044,+"crest": 5.57,+"centroid": 6262,+"tonal_db": 15.5,+"tone_hz": 4811,+"low": 0.122,+"rms": -32.2,+"at": 0.938+},+{+"file": "tap_wws_004.wav",+"src": "wws",+"kind": "tap",+"dur": 0.032,+"attack": 0.004,+"crest": 7.47,+"centroid": 1742,+"tonal_db": 12.7,+"tone_hz": 2672,+"low": 0.386,+"rms": -31.6,+"at": 1.442+},+{+"file": "stroke_wws_005.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.228,+"attack": 0.136,+"crest": 5.46,+"centroid": 3033,+"tonal_db": 15.4,+"tone_hz": 2640,+"low": 0.371,+"rms": -28.2,+"at": 1.764+},+{+"file": "stroke_wws_006.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.2,+"attack": 0.004,+"crest": 6.38,+"centroid": 5241,+"tonal_db": 18.7,+"tone_hz": 4688,+"low": 0.195,+"rms": -29.1,+"at": 2.198+},+{+"file": "stroke_wws_007.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.11,+"attack": 0.004,+"crest": 19.55,+"centroid": 4752,+"tonal_db": 12.9,+"tone_hz": 3141,+"low": 0.159,+"rms": -31.6,+"at": 2.542+},+{+"file": "stroke_wws_008.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.118,+"attack": 0.072,+"crest": 4.37,+"centroid": 3576,+"tonal_db": 14.0,+"tone_hz": 2818,+"low": 0.247,+"rms": -28.0,+"at": 2.718+},+{+"file": "stroke_wws_009.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.054,+"attack": 0.02,+"crest": 4.22,+"centroid": 7353,+"tonal_db": 15.0,+"tone_hz": 4969,+"low": 0.087,+"rms": -36.6,+"at": 3.026+},+{+"file": "tap_wws_010.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.004,+"crest": 6.58,+"centroid": 2329,+"tonal_db": 12.2,+"tone_hz": 2859,+"low": 0.399,+"rms": -34.0,+"at": 3.294+},+{+"file": "stroke_wws_011.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.116,+"attack": 0.032,+"crest": 4.89,+"centroid": 5492,+"tonal_db": 12.8,+"tone_hz": 1447,+"low": 0.23,+"rms": -32.9,+"at": 3.378+},+{+"file": "tap_wws_012.wav",+"src": "wws",+"kind": "tap",+"dur": 0.038,+"attack": 0.004,+"crest": 3.75,+"centroid": 2060,+"tonal_db": 12.3,+"tone_hz": 1406,+"low": 0.321,+"rms": -27.4,+"at": 3.586+},+{+"file": "tap_wws_013.wav",+"src": "wws",+"kind": "tap",+"dur": 0.03,+"attack": 0.004,+"crest": 5.44,+"centroid": 1451,+"tonal_db": 12.8,+"tone_hz": 1430,+"low": 0.546,+"rms": -29.3,+"at": 4.134+},+{+"file": "tap_wws_014.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.004,+"crest": 3.91,+"centroid": 5203,+"tonal_db": 11.9,+"tone_hz": 4852,+"low": 0.205,+"rms": -36.4,+"at": 4.312+},+{+"file": "stroke_wws_015.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.044,+"attack": 0.012,+"crest": 4.16,+"centroid": 6560,+"tonal_db": 12.3,+"tone_hz": 2320,+"low": 0.104,+"rms": -35.5,+"at": 4.35+},+{+"file": "stroke_wws_016.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.246,+"attack": 0.004,+"crest": 13.5,+"centroid": 6283,+"tonal_db": 12.7,+"tone_hz": 4942,+"low": 0.128,+"rms": -28.5,+"at": 4.678+},+{+"file": "stroke_wws_017.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.226,+"attack": 0.004,+"crest": 17.68,+"centroid": 5170,+"tonal_db": 16.3,+"tone_hz": 4813,+"low": 0.173,+"rms": -25.6,+"at": 5.102+},+{+"file": "stroke_wws_018.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.246,+"attack": 0.006,+"crest": 13.58,+"centroid": 5448,+"tonal_db": 14.4,+"tone_hz": 2572,+"low": 0.205,+"rms": -29.6,+"at": 5.484+},+{+"file": "stroke_wws_019.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.24,+"attack": 0.004,+"crest": 9.36,+"centroid": 5707,+"tonal_db": 13.5,+"tone_hz": 4916,+"low": 0.129,+"rms": -31.2,+"at": 5.908+},+{+"file": "squeak_wws_020.wav",+"src": "wws",+"kind": "squeak",+"dur": 0.098,+"attack": 0.062,+"crest": 3.71,+"centroid": 1039,+"tonal_db": 32.1,+"tone_hz": 1477,+"low": 0.509,+"rms": -24.8,+"at": 6.236+},+{+"file": "stroke_wws_021.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.092,+"attack": 0.004,+"crest": 8.12,+"centroid": 3726,+"tonal_db": 16.6,+"tone_hz": 2754,+"low": 0.213,+"rms": -28.7,+"at": 6.394+},+{+"file": "tap_wws_022.wav",+"src": "wws",+"kind": "tap",+"dur": 0.022,+"attack": 0.004,+"crest": 4.81,+"centroid": 5770,+"tonal_db": 11.4,+"tone_hz": 4641,+"low": 0.146,+"rms": -37.3,+"at": 6.534+},+{+"file": "tap_wws_023.wav",+"src": "wws",+"kind": "tap",+"dur": 0.038,+"attack": 0.004,+"crest": 6.05,+"centroid": 1153,+"tonal_db": 15.7,+"tone_hz": 1875,+"low": 0.441,+"rms": -29.6,+"at": 6.888+},+{+"file": "tap_wws_024.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.006,+"crest": 4.71,+"centroid": 3088,+"tonal_db": 10.9,+"tone_hz": 4734,+"low": 0.243,+"rms": -37.0,+"at": 7.104+},+{+"file": "tap_wws_025.wav",+"src": "wws",+"kind": "tap",+"dur": 0.034,+"attack": 0.004,+"crest": 7.47,+"centroid": 2510,+"tonal_db": 13.7,+"tone_hz": 2297,+"low": 0.316,+"rms": -32.1,+"at": 7.48+},+{+"file": "stroke_wws_026.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.04,+"attack": 0.016,+"crest": 3.4,+"centroid": 5303,+"tonal_db": 11.5,+"tone_hz": 2906,+"low": 0.172,+"rms": -36.3,+"at": 7.57+},+{+"file": "stroke_wws_027.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.146,+"attack": 0.064,+"crest": 7.22,+"centroid": 5918,+"tonal_db": 18.0,+"tone_hz": 1418,+"low": 0.143,+"rms": -32.8,+"at": 7.706+},+{+"file": "stroke_wws_028.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.12,+"attack": 0.004,+"crest": 8.97,+"centroid": 4745,+"tonal_db": 12.4,+"tone_hz": 4840,+"low": 0.217,+"rms": -30.9,+"at": 8.002+},+{+"file": "tap_wws_029.wav",+"src": "wws",+"kind": "tap",+"dur": 0.032,+"attack": 0.004,+"crest": 6.44,+"centroid": 1451,+"tonal_db": 17.0,+"tone_hz": 2438,+"low": 0.427,+"rms": -31.8,+"at": 8.256+},+{+"file": "stroke_wws_030.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.188,+"attack": 0.094,+"crest": 3.9,+"centroid": 4952,+"tonal_db": 15.9,+"tone_hz": 2470,+"low": 0.271,+"rms": -30.7,+"at": 8.434+},+{+"file": "tap_wws_031.wav",+"src": "wws",+"kind": "tap",+"dur": 0.024,+"attack": 0.004,+"crest": 4.07,+"centroid": 2097,+"tonal_db": 12.1,+"tone_hz": 1898,+"low": 0.426,+"rms": -35.6,+"at": 9.582+},+{+"file": "stroke_wws_032.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.128,+"attack": 0.048,+"crest": 4.79,+"centroid": 4748,+"tonal_db": 16.9,+"tone_hz": 4969,+"low": 0.08,+"rms": -34.4,+"at": 9.71+},+{+"file": "tap_wws_033.wav",+"src": "wws",+"kind": "tap",+"dur": 0.036,+"attack": 0.006,+"crest": 3.84,+"centroid": 6009,+"tonal_db": 13.8,+"tone_hz": 2812,+"low": 0.118,+"rms": -36.2,+"at": 9.92+},+{+"file": "stroke_wws_034.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.106,+"attack": 0.072,+"crest": 5.3,+"centroid": 6094,+"tonal_db": 17.3,+"tone_hz": 4898,+"low": 0.041,+"rms": -32.7,+"at": 10.108+},+{+"file": "stroke_wws_035.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.17,+"attack": 0.042,+"crest": 7.93,+"centroid": 5039,+"tonal_db": 17.2,+"tone_hz": 2719,+"low": 0.16,+"rms": -30.6,+"at": 10.574+},+{+"file": "stroke_wws_036.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.258,+"attack": 0.076,+"crest": 7.71,+"centroid": 3606,+"tonal_db": 20.9,+"tone_hz": 2648,+"low": 0.183,+"rms": -28.3,+"at": 10.784+},+{+"file": "stroke_wws_037.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.106,+"attack": 0.032,+"crest": 5.26,+"centroid": 4530,+"tonal_db": 14.1,+"tone_hz": 4945,+"low": 0.235,+"rms": -33.1,+"at": 11.098+},+{+"file": "stroke_wws_038.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.178,+"attack": 0.082,+"crest": 5.08,+"centroid": 4953,+"tonal_db": 20.0,+"tone_hz": 4907,+"low": 0.215,+"rms": -30.1,+"at": 11.266+},+{+"file": "stroke_wws_039.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.11,+"attack": 0.034,+"crest": 5.03,+"centroid": 4452,+"tonal_db": 14.0,+"tone_hz": 2355,+"low": 0.177,+"rms": -30.6,+"at": 11.504+},+{+"file": "stroke_wws_040.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.046,+"attack": 0.02,+"crest": 3.54,+"centroid": 5753,+"tonal_db": 15.7,+"tone_hz": 3070,+"low": 0.098,+"rms": -35.7,+"at": 11.64+},+{+"file": "stroke_wws_041.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.148,+"attack": 0.054,+"crest": 5.47,+"centroid": 5930,+"tonal_db": 17.0,+"tone_hz": 4711,+"low": 0.103,+"rms": -32.3,+"at": 11.95+},+{+"file": "stroke_wws_042.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.032,+"attack": 0.012,+"crest": 3.66,+"centroid": 4595,+"tonal_db": 15.4,+"tone_hz": 2836,+"low": 0.175,+"rms": -35.7,+"at": 12.206+},+{+"file": "stroke_wws_043.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.15,+"attack": 0.092,+"crest": 5.25,+"centroid": 5915,+"tonal_db": 17.3,+"tone_hz": 4846,+"low": 0.099,+"rms": -30.7,+"at": 12.268+},+{+"file": "stroke_wws_044.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.096,+"attack": 0.054,+"crest": 4.8,+"centroid": 6824,+"tonal_db": 14.5,+"tone_hz": 4998,+"low": 0.097,+"rms": -32.3,+"at": 12.504+},+{+"file": "stroke_wws_045.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.19,+"attack": 0.004,+"crest": 10.28,+"centroid": 6890,+"tonal_db": 14.7,+"tone_hz": 2558,+"low": 0.091,+"rms": -29.8,+"at": 12.828+},+{+"file": "tap_wws_046.wav",+"src": "wws",+"kind": "tap",+"dur": 0.022,+"attack": 0.002,+"crest": 8.94,+"centroid": 3030,+"tonal_db": 13.3,+"tone_hz": 2672,+"low": 0.215,+"rms": -35.9,+"at": 13.172+},+{+"file": "stroke_wws_047.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.086,+"attack": 0.052,+"crest": 4.4,+"centroid": 6826,+"tonal_db": 12.8,+"tone_hz": 4652,+"low": 0.084,+"rms": -34.2,+"at": 13.238+},+{+"file": "stroke_wws_048.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.194,+"attack": 0.058,+"crest": 5.01,+"centroid": 6126,+"tonal_db": 15.4,+"tone_hz": 2774,+"low": 0.122,+"rms": -30.4,+"at": 13.446+},+{+"file": "tap_wws_049.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.004,+"crest": 9.11,+"centroid": 2194,+"tonal_db": 12.7,+"tone_hz": 2883,+"low": 0.309,+"rms": -33.0,+"at": 13.946+},+{+"file": "stroke_wws_050.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.132,+"attack": 0.08,+"crest": 4.5,+"centroid": 5401,+"tonal_db": 17.9,+"tone_hz": 2748,+"low": 0.122,+"rms": -31.0,+"at": 14.03+},+{+"file": "stroke_wws_051.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.12,+"attack": 0.044,+"crest": 5.92,+"centroid": 5634,+"tonal_db": 17.6,+"tone_hz": 4980,+"low": 0.118,+"rms": -34.0,+"at": 14.246+},+{+"file": "tap_wws_052.wav",+"src": "wws",+"kind": "tap",+"dur": 0.028,+"attack": 0.008,+"crest": 3.76,+"centroid": 6647,+"tonal_db": 11.3,+"tone_hz": 4734,+"low": 0.067,+"rms": -36.9,+"at": 14.378+},+{+"file": "stroke_wws_053.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.096,+"attack": 0.012,+"crest": 4.16,+"centroid": 5662,+"tonal_db": 16.6,+"tone_hz": 4928,+"low": 0.087,+"rms": -36.4,+"at": 14.814+},+{+"file": "tap_wws_054.wav",+"src": "wws",+"kind": "tap",+"dur": 0.032,+"attack": 0.006,+"crest": 7.46,+"centroid": 2643,+"tonal_db": 11.6,+"tone_hz": 3375,+"low": 0.392,+"rms": -30.7,+"at": 16.106+},+{+"file": "stroke_wws_055.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.102,+"attack": 0.07,+"crest": 9.92,+"centroid": 6830,+"tonal_db": 14.7,+"tone_hz": 4541,+"low": 0.09,+"rms": -34.1,+"at": 16.402+},+{+"file": "stroke_wws_056.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.114,+"attack": 0.022,+"crest": 4.06,+"centroid": 5757,+"tonal_db": 13.0,+"tone_hz": 2496,+"low": 0.126,+"rms": -31.6,+"at": 16.548+},+{+"file": "tap_wws_057.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.002,+"crest": 4.17,+"centroid": 5458,+"tonal_db": 14.7,+"tone_hz": 3023,+"low": 0.103,+"rms": -36.9,+"at": 16.712+},+{+"file": "stroke_wws_058.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.128,+"attack": 0.022,+"crest": 4.9,+"centroid": 6777,+"tonal_db": 12.5,+"tone_hz": 2859,+"low": 0.126,+"rms": -31.6,+"at": 16.748+},+{+"file": "stroke_wws_059.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.144,+"attack": 0.038,+"crest": 5.69,+"centroid": 5633,+"tonal_db": 13.5,+"tone_hz": 2584,+"low": 0.142,+"rms": -27.5,+"at": 16.966+},+{+"file": "tap_wws_060.wav",+"src": "wws",+"kind": "tap",+"dur": 0.028,+"attack": 0.004,+"crest": 5.93,+"centroid": 2453,+"tonal_db": 19.7,+"tone_hz": 2742,+"low": 0.433,+"rms": -33.1,+"at": 17.454+},+{+"file": "stroke_wws_061.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.432,+"attack": 0.392,+"crest": 6.25,+"centroid": 5391,+"tonal_db": 13.0,+"tone_hz": 1646,+"low": 0.116,+"rms": -33.1,+"at": 17.536+},+{+"file": "stroke_wws_062.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.264,+"attack": 0.194,+"crest": 6.08,+"centroid": 5630,+"tonal_db": 14.0,+"tone_hz": 4811,+"low": 0.079,+"rms": -32.4,+"at": 18.004+},+{+"file": "tap_wws_063.wav",+"src": "wws",+"kind": "tap",+"dur": 0.022,+"attack": 0.002,+"crest": 3.55,+"centroid": 3051,+"tonal_db": 8.5,+"tone_hz": 1711,+"low": 0.304,+"rms": -37.0,+"at": 18.302+},+{+"file": "stroke_wws_064.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.06,+"attack": 0.016,+"crest": 4.47,+"centroid": 2021,+"tonal_db": 13.8,+"tone_hz": 1465,+"low": 0.488,+"rms": -27.3,+"at": 18.432+},+{+"file": "stroke_wws_065.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.266,+"attack": 0.222,+"crest": 5.45,+"centroid": 5147,+"tonal_db": 16.4,+"tone_hz": 2722,+"low": 0.185,+"rms": -30.6,+"at": 18.504+},+{+"file": "stroke_wws_066.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.132,+"attack": 0.07,+"crest": 5.65,+"centroid": 6132,+"tonal_db": 13.5,+"tone_hz": 4857,+"low": 0.094,+"rms": -33.6,+"at": 18.814+},+{+"file": "stroke_wws_067.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.166,+"attack": 0.004,+"crest": 11.17,+"centroid": 6598,+"tonal_db": 14.0,+"tone_hz": 3129,+"low": 0.093,+"rms": -31.8,+"at": 19.156+},+{+"file": "stroke_wws_068.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.14,+"attack": 0.056,+"crest": 4.92,+"centroid": 3962,+"tonal_db": 13.9,+"tone_hz": 2145,+"low": 0.261,+"rms": -30.7,+"at": 19.342+},+{+"file": "stroke_wws_069.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.106,+"attack": 0.006,+"crest": 4.69,+"centroid": 6585,+"tonal_db": 12.3,+"tone_hz": 3023,+"low": 0.085,+"rms": -34.8,+"at": 19.51+},+{+"file": "tap_wws_070.wav",+"src": "wws",+"kind": "tap",+"dur": 0.044,+"attack": 0.004,+"crest": 8.02,+"centroid": 2264,+"tonal_db": 12.9,+"tone_hz": 1922,+"low": 0.447,+"rms": -29.9,+"at": 19.824+},+{+"file": "stroke_wws_071.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.1,+"attack": 0.036,+"crest": 3.7,+"centroid": 4742,+"tonal_db": 15.0,+"tone_hz": 2432,+"low": 0.09,+"rms": -34.0,+"at": 19.968+},+{+"file": "tap_wws_072.wav",+"src": "wws",+"kind": "tap",+"dur": 0.064,+"attack": 0.004,+"crest": 10.19,+"centroid": 4228,+"tonal_db": 14.9,+"tone_hz": 3164,+"low": 0.18,+"rms": -35.2,+"at": 20.412+},+{+"file": "stroke_wws_073.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.108,+"attack": 0.082,+"crest": 4.4,+"centroid": 5861,+"tonal_db": 11.7,+"tone_hz": 4898,+"low": 0.124,+"rms": -33.6,+"at": 20.504+},+{+"file": "stroke_wws_074.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.294,+"attack": 0.064,+"crest": 6.12,+"centroid": 3726,+"tonal_db": 12.8,+"tone_hz": 1491,+"low": 0.167,+"rms": -28.5,+"at": 20.652+},+{+"file": "stroke_wws_075.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.222,+"attack": 0.012,+"crest": 5.81,+"centroid": 2558,+"tonal_db": 19.9,+"tone_hz": 1661,+"low": 0.278,+"rms": -21.2,+"at": 20.976+},+{+"file": "tap_wws_076.wav",+"src": "wws",+"kind": "tap",+"dur": 0.046,+"attack": 0.004,+"crest": 3.35,+"centroid": 1797,+"tonal_db": 16.9,+"tone_hz": 2168,+"low": 0.341,+"rms": -37.7,+"at": 21.222+},+{+"file": "tap_wws_077.wav",+"src": "wws",+"kind": "tap",+"dur": 0.03,+"attack": 0.004,+"crest": 8.17,+"centroid": 2698,+"tonal_db": 9.5,+"tone_hz": 2344,+"low": 0.326,+"rms": -33.0,+"at": 21.36+},+{+"file": "stroke_wws_078.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.078,+"attack": 0.02,+"crest": 4.3,+"centroid": 4256,+"tonal_db": 16.6,+"tone_hz": 2906,+"low": 0.226,+"rms": -33.9,+"at": 21.452+},+{+"file": "stroke_wws_079.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.046,+"attack": 0.02,+"crest": 3.36,+"centroid": 4973,+"tonal_db": 14.1,+"tone_hz": 2965,+"low": 0.12,+"rms": -36.6,+"at": 21.746+},+{+"file": "stroke_wws_080.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.154,+"attack": 0.004,+"crest": 11.72,+"centroid": 5406,+"tonal_db": 10.7,+"tone_hz": 2918,+"low": 0.144,+"rms": -29.7,+"at": 21.97+},+{+"file": "tap_wws_081.wav",+"src": "wws",+"kind": "tap",+"dur": 0.028,+"attack": 0.004,+"crest": 7.04,+"centroid": 2430,+"tonal_db": 8.5,+"tone_hz": 2344,+"low": 0.336,+"rms": -34.0,+"at": 22.286+},+{+"file": "stroke_wws_082.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.122,+"attack": 0.008,+"crest": 6.53,+"centroid": 6624,+"tonal_db": 16.0,+"tone_hz": 2666,+"low": 0.118,+"rms": -34.0,+"at": 22.588+},+{+"file": "tap_wws_083.wav",+"src": "wws",+"kind": "tap",+"dur": 0.038,+"attack": 0.004,+"crest": 13.87,+"centroid": 4134,+"tonal_db": 11.7,+"tone_hz": 3117,+"low": 0.247,+"rms": -28.9,+"at": 23.224+},+{+"file": "stroke_wws_084.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.09,+"attack": 0.05,+"crest": 5.84,+"centroid": 6156,+"tonal_db": 15.3,+"tone_hz": 2871,+"low": 0.114,+"rms": -34.6,+"at": 23.328+},+{+"file": "tap_wws_085.wav",+"src": "wws",+"kind": "tap",+"dur": 0.032,+"attack": 0.004,+"crest": 6.37,+"centroid": 1641,+"tonal_db": 15.0,+"tone_hz": 2859,+"low": 0.527,+"rms": -32.0,+"at": 23.654+},+{+"file": "stroke_wws_086.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.122,+"attack": 0.066,+"crest": 5.76,+"centroid": 5134,+"tonal_db": 13.8,+"tone_hz": 2291,+"low": 0.095,+"rms": -32.6,+"at": 23.702+},+{+"file": "stroke_wws_087.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.158,+"attack": 0.08,+"crest": 6.82,+"centroid": 5225,+"tonal_db": 12.6,+"tone_hz": 3047,+"low": 0.115,+"rms": -30.0,+"at": 23.908+},+{+"file": "tap_wws_088.wav",+"src": "wws",+"kind": "tap",+"dur": 0.044,+"attack": 0.004,+"crest": 6.58,+"centroid": 1748,+"tonal_db": 9.4,+"tone_hz": 1676,+"low": 0.486,+"rms": -27.0,+"at": 24.266+},+{+"file": "stroke_wws_089.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.104,+"attack": 0.008,+"crest": 4.5,+"centroid": 5548,+"tonal_db": 15.8,+"tone_hz": 4793,+"low": 0.116,+"rms": -34.1,+"at": 24.322+},+{+"file": "stroke_wws_090.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.134,+"attack": 0.07,+"crest": 6.24,+"centroid": 5102,+"tonal_db": 14.2,+"tone_hz": 4641,+"low": 0.173,+"rms": -31.2,+"at": 24.644+},+{+"file": "tap_wws_091.wav",+"src": "wws",+"kind": "tap",+"dur": 0.03,+"attack": 0.004,+"crest": 6.57,+"centroid": 2211,+"tonal_db": 12.2,+"tone_hz": 1875,+"low": 0.39,+"rms": -32.4,+"at": 24.966+},+{+"file": "stroke_wws_092.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.126,+"attack": 0.036,+"crest": 8.07,+"centroid": 5208,+"tonal_db": 13.7,+"tone_hz": 3393,+"low": 0.183,+"rms": -32.2,+"at": 25.012+},+{+"file": "stroke_wws_093.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.044,+"attack": 0.012,+"crest": 3.93,+"centroid": 3726,+"tonal_db": 17.9,+"tone_hz": 1898,+"low": 0.179,+"rms": -33.8,+"at": 25.25+},+{+"file": "stroke_wws_094.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.224,+"attack": 0.062,+"crest": 10.23,+"centroid": 3841,+"tonal_db": 16.2,+"tone_hz": 2883,+"low": 0.257,+"rms": -29.1,+"at": 25.33+},+{+"file": "stroke_wws_095.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.108,+"attack": 0.048,+"crest": 3.93,+"centroid": 6223,+"tonal_db": 14.6,+"tone_hz": 2871,+"low": 0.117,+"rms": -34.8,+"at": 25.616+},+{+"file": "tap_wws_096.wav",+"src": "wws",+"kind": "tap",+"dur": 0.034,+"attack": 0.006,+"crest": 5.64,+"centroid": 2940,+"tonal_db": 18.1,+"tone_hz": 2531,+"low": 0.292,+"rms": -33.1,+"at": 26.34+},+{+"file": "stroke_wws_097.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.118,+"attack": 0.022,+"crest": 12.23,+"centroid": 7751,+"tonal_db": 14.5,+"tone_hz": 2496,+"low": 0.117,+"rms": -32.2,+"at": 26.408+},+{+"file": "tap_wws_098.wav",+"src": "wws",+"kind": "tap",+"dur": 0.038,+"attack": 0.008,+"crest": 4.61,+"centroid": 3354,+"tonal_db": 15.1,+"tone_hz": 1711,+"low": 0.309,+"rms": -30.1,+"at": 26.654+},+{+"file": "stroke_wws_099.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.08,+"attack": 0.02,+"crest": 4.45,+"centroid": 5945,+"tonal_db": 12.2,+"tone_hz": 4805,+"low": 0.113,+"rms": -36.8,+"at": 26.76+},+{+"file": "stroke_wws_100.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.132,+"attack": 0.016,+"crest": 4.74,+"centroid": 6046,+"tonal_db": 15.9,+"tone_hz": 2707,+"low": 0.128,+"rms": -33.4,+"at": 26.898+},+{+"file": "stroke_wws_101.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.096,+"attack": 0.074,+"crest": 4.69,+"centroid": 7809,+"tonal_db": 16.3,+"tone_hz": 2900,+"low": 0.067,+"rms": -36.2,+"at": 27.042+},+{+"file": "stroke_wws_102.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.116,+"attack": 0.004,+"crest": 5.1,+"centroid": 7465,+"tonal_db": 15.7,+"tone_hz": 3322,+"low": 0.091,+"rms": -35.8,+"at": 27.15+},+{+"file": "tap_wws_103.wav",+"src": "wws",+"kind": "tap",+"dur": 0.036,+"attack": 0.004,+"crest": 8.41,+"centroid": 2566,+"tonal_db": 17.4,+"tone_hz": 2766,+"low": 0.258,+"rms": -28.8,+"at": 27.47+},+{+"file": "stroke_wws_104.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.122,+"attack": 0.028,+"crest": 4.7,+"centroid": 7269,+"tonal_db": 17.7,+"tone_hz": 2818,+"low": 0.11,+"rms": -32.3,+"at": 27.534+},+{+"file": "tap_wws_105.wav",+"src": "wws",+"kind": "tap",+"dur": 0.026,+"attack": 0.002,+"crest": 6.02,+"centroid": 2515,+"tonal_db": 16.2,+"tone_hz": 2906,+"low": 0.265,+"rms": -34.7,+"at": 27.848+},+{+"file": "stroke_wws_106.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.1,+"attack": 0.034,+"crest": 6.11,+"centroid": 5741,+"tonal_db": 15.2,+"tone_hz": 2836,+"low": 0.093,+"rms": -34.8,+"at": 27.9+},+{+"file": "stroke_wws_107.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.232,+"attack": 0.146,+"crest": 4.17,+"centroid": 5763,+"tonal_db": 19.1,+"tone_hz": 2701,+"low": 0.204,+"rms": -27.5,+"at": 28.134+},+{+"file": "stroke_wws_108.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.16,+"attack": 0.038,+"crest": 5.11,+"centroid": 5931,+"tonal_db": 15.3,+"tone_hz": 4898,+"low": 0.186,+"rms": -27.7,+"at": 28.568+},+{+"file": "stroke_wws_109.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.13,+"attack": 0.01,+"crest": 6.67,+"centroid": 5519,+"tonal_db": 18.6,+"tone_hz": 2865,+"low": 0.127,+"rms": -30.7,+"at": 28.89+},+{+"file": "stroke_wws_110.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.034,+"attack": 0.016,+"crest": 3.23,+"centroid": 4120,+"tonal_db": 15.4,+"tone_hz": 2742,+"low": 0.234,+"rms": -36.5,+"at": 29.056+},+{+"file": "stroke_wws_111.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.094,+"attack": 0.01,+"crest": 5.32,+"centroid": 5911,+"tonal_db": 18.9,+"tone_hz": 2818,+"low": 0.123,+"rms": -26.0,+"at": 29.202+},+{+"file": "stroke_wws_112.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.134,+"attack": 0.012,+"crest": 9.2,+"centroid": 7009,+"tonal_db": 14.0,+"tone_hz": 2771,+"low": 0.097,+"rms": -30.4,+"at": 29.486+},+{+"file": "tap_wws_113.wav",+"src": "wws",+"kind": "tap",+"dur": 0.04,+"attack": 0.006,+"crest": 6.02,+"centroid": 1998,+"tonal_db": 15.8,+"tone_hz": 2883,+"low": 0.45,+"rms": -30.9,+"at": 30.402+},+{+"file": "stroke_wws_114.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.124,+"attack": 0.072,+"crest": 5.25,+"centroid": 5199,+"tonal_db": 12.0,+"tone_hz": 1418,+"low": 0.129,+"rms": -32.6,+"at": 30.482+},+{+"file": "tap_wws_115.wav",+"src": "wws",+"kind": "tap",+"dur": 0.04,+"attack": 0.006,+"crest": 6.2,+"centroid": 1809,+"tonal_db": 12.3,+"tone_hz": 2906,+"low": 0.443,+"rms": -29.0,+"at": 30.818+},+{+"file": "tap_wws_116.wav",+"src": "wws",+"kind": "tap",+"dur": 0.056,+"attack": 0.002,+"crest": 4.15,+"centroid": 6361,+"tonal_db": 19.8,+"tone_hz": 4992,+"low": 0.105,+"rms": -35.5,+"at": 30.926+},+{+"file": "stroke_wws_117.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.134,+"attack": 0.058,+"crest": 4.54,+"centroid": 4402,+"tonal_db": 17.0,+"tone_hz": 2836,+"low": 0.173,+"rms": -29.6,+"at": 31.064+},+{+"file": "tap_wws_118.wav",+"src": "wws",+"kind": "tap",+"dur": 0.04,+"attack": 0.002,+"crest": 4.9,+"centroid": 3607,+"tonal_db": 10.4,+"tone_hz": 4523,+"low": 0.227,+"rms": -32.9,+"at": 31.298+},+{+"file": "stroke_wws_119.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.104,+"attack": 0.048,+"crest": 4.34,+"centroid": 6653,+"tonal_db": 13.6,+"tone_hz": 4734,+"low": 0.132,+"rms": -34.6,+"at": 31.35+},+{+"file": "tap_wws_120.wav",+"src": "wws",+"kind": "tap",+"dur": 0.042,+"attack": 0.006,+"crest": 4.45,+"centroid": 1041,+"tonal_db": 15.9,+"tone_hz": 3094,+"low": 0.528,+"rms": -29.3,+"at": 32.266+},+{+"file": "stroke_wws_121.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.15,+"attack": 0.082,+"crest": 4.31,+"centroid": 4811,+"tonal_db": 15.1,+"tone_hz": 4975,+"low": 0.157,+"rms": -31.7,+"at": 32.366+},+{+"file": "stroke_wws_122.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.184,+"attack": 0.112,+"crest": 5.16,+"centroid": 5639,+"tonal_db": 13.4,+"tone_hz": 4840,+"low": 0.163,+"rms": -33.4,+"at": 32.588+},+{+"file": "stroke_wws_123.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.158,+"attack": 0.038,+"crest": 4.8,+"centroid": 4708,+"tonal_db": 13.9,+"tone_hz": 3357,+"low": 0.148,+"rms": -30.3,+"at": 32.81+},+{+"file": "stroke_wws_124.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.14,+"attack": 0.004,+"crest": 12.11,+"centroid": 4850,+"tonal_db": 13.5,+"tone_hz": 3123,+"low": 0.176,+"rms": -28.0,+"at": 33.154+},+{+"file": "stroke_wws_125.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.14,+"attack": 0.004,+"crest": 16.98,+"centroid": 4457,+"tonal_db": 11.3,+"tone_hz": 2883,+"low": 0.179,+"rms": -24.6,+"at": 33.448+},+{+"file": "stroke_wws_126.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.11,+"attack": 0.004,+"crest": 15.76,+"centroid": 3578,+"tonal_db": 9.7,+"tone_hz": 4699,+"low": 0.201,+"rms": -24.1,+"at": 33.758+},+{+"file": "stroke_wws_127.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.126,+"attack": 0.006,+"crest": 8.68,+"centroid": 4276,+"tonal_db": 14.8,+"tone_hz": 4746,+"low": 0.185,+"rms": -23.0,+"at": 34.05+},+{+"file": "stroke_wws_128.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.154,+"attack": 0.004,+"crest": 21.34,+"centroid": 5355,+"tonal_db": 10.9,+"tone_hz": 4945,+"low": 0.132,+"rms": -27.1,+"at": 34.33+},+{+"file": "stroke_wws_129.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.096,+"attack": 0.028,+"crest": 3.82,+"centroid": 4018,+"tonal_db": 14.1,+"tone_hz": 2080,+"low": 0.15,+"rms": -32.5,+"at": 34.518+},+{+"file": "stroke_wws_130.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.108,+"attack": 0.054,+"crest": 4.12,+"centroid": 5766,+"tonal_db": 14.2,+"tone_hz": 2982,+"low": 0.101,+"rms": -35.0,+"at": 34.672+},+{+"file": "stroke_wws_131.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.13,+"attack": 0.062,+"crest": 3.9,+"centroid": 4898,+"tonal_db": 14.6,+"tone_hz": 2912,+"low": 0.114,+"rms": -31.4,+"at": 34.832+},+{+"file": "stroke_wws_132.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.2,+"attack": 0.006,+"crest": 14.62,+"centroid": 5140,+"tonal_db": 12.8,+"tone_hz": 3278,+"low": 0.155,+"rms": -28.6,+"at": 35.206+},+{+"file": "tap_wws_133.wav",+"src": "wws",+"kind": "tap",+"dur": 0.05,+"attack": 0.006,+"crest": 9.5,+"centroid": 2880,+"tonal_db": 12.2,+"tone_hz": 3094,+"low": 0.35,+"rms": -24.7,+"at": 35.606+},+{+"file": "stroke_wws_134.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.078,+"attack": 0.048,+"crest": 3.19,+"centroid": 4199,+"tonal_db": 12.2,+"tone_hz": 1582,+"low": 0.157,+"rms": -36.1,+"at": 35.7+},+{+"file": "tap_wws_135.wav",+"src": "wws",+"kind": "tap",+"dur": 0.028,+"attack": 0.004,+"crest": 4.99,+"centroid": 2749,+"tonal_db": 15.3,+"tone_hz": 3305,+"low": 0.365,+"rms": -35.0,+"at": 35.846+},+{+"file": "stroke_wws_136.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.158,+"attack": 0.072,+"crest": 4.2,+"centroid": 5453,+"tonal_db": 13.3,+"tone_hz": 2502,+"low": 0.15,+"rms": -30.9,+"at": 35.896+},+{+"file": "stroke_wws_137.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.092,+"attack": 0.004,+"crest": 14.44,+"centroid": 4334,+"tonal_db": 15.2,+"tone_hz": 2848,+"low": 0.225,+"rms": -29.9,+"at": 36.21+},+{+"file": "stroke_wws_138.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.09,+"attack": 0.052,+"crest": 3.51,+"centroid": 4108,+"tonal_db": 13.8,+"tone_hz": 2098,+"low": 0.155,+"rms": -35.1,+"at": 36.312+},+{+"file": "tap_wws_139.wav",+"src": "wws",+"kind": "tap",+"dur": 0.028,+"attack": 0.006,+"crest": 3.34,+"centroid": 5295,+"tonal_db": 13.3,+"tone_hz": 2250,+"low": 0.11,+"rms": -36.7,+"at": 36.428+},+{+"file": "stroke_wws_140.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.1,+"attack": 0.048,+"crest": 6.17,+"centroid": 4630,+"tonal_db": 14.5,+"tone_hz": 2619,+"low": 0.204,+"rms": -31.7,+"at": 36.468+},+{+"file": "stroke_wws_141.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.262,+"attack": 0.164,+"crest": 6.69,+"centroid": 5450,+"tonal_db": 12.0,+"tone_hz": 2593,+"low": 0.143,+"rms": -30.9,+"at": 36.604+},+{+"file": "stroke_wws_142.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.156,+"attack": 0.094,+"crest": 4.66,+"centroid": 4957,+"tonal_db": 12.7,+"tone_hz": 2988,+"low": 0.12,+"rms": -31.8,+"at": 36.896+},+{+"file": "stroke_wws_143.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.496,+"attack": 0.076,+"crest": 8.17,+"centroid": 3992,+"tonal_db": 14.4,+"tone_hz": 2924,+"low": 0.266,+"rms": -24.8,+"at": 37.26+},+{+"file": "stroke_wws_144.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.162,+"attack": 0.062,+"crest": 4.74,+"centroid": 4032,+"tonal_db": 17.7,+"tone_hz": 2736,+"low": 0.243,+"rms": -29.1,+"at": 37.87+},+{+"file": "stroke_wws_145.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.16,+"attack": 0.008,+"crest": 6.35,+"centroid": 3924,+"tonal_db": 15.2,+"tone_hz": 2074,+"low": 0.24,+"rms": -30.6,+"at": 38.194+},+{+"file": "tap_wws_146.wav",+"src": "wws",+"kind": "tap",+"dur": 0.078,+"attack": 0.004,+"crest": 7.86,+"centroid": 3104,+"tonal_db": 14.8,+"tone_hz": 4980,+"low": 0.25,+"rms": -29.8,+"at": 38.492+},+{+"file": "stroke_wws_147.wav",+"src": "wws",+"kind": "stroke",+"dur": 0.172,+"attack": 0.008,+"crest": 5.16,+"centroid": 3624,+"tonal_db": 15.3,+"tone_hz": 1500,+"low": 0.255,+"rms": -31.2,+"at": 38.818+}+]\ No newline at end of filediff --git a/styles/chalkboard/demo/fonts/OFL-EMS.txt b/styles/chalkboard/demo/fonts/OFL-EMS.txtnew file mode 100644index 0000000..cb106eb--- /dev/null+++ b/styles/chalkboard/demo/fonts/OFL-EMS.txt@@ -0,0 +1,95 @@+EMS Delight and EMS Casual Hand (single-stroke SVG fonts) - SIL Open Font License 1.1+EMS Delight: derivative of "Delius" by Natalia Raices. EMS Casual Hand: derivative of "Covered By Your Grace" by Kimberly Geswein.+SVG single-stroke conversion: Sheldon B. Michaels, Windell H. Oskay (Evil Mad Scientist, https://gitlab.com/oskay/svg-fonts). Metadata kept inside each .svg.++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+https://openfontlicense.org+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/styles/chalkboard/demo/fonts/OFL-LXGWWenKai.txt b/styles/chalkboard/demo/fonts/OFL-LXGWWenKai.txtnew file mode 100644index 0000000..bb1634c--- /dev/null+++ b/styles/chalkboard/demo/fonts/OFL-LXGWWenKai.txt@@ -0,0 +1,94 @@+Copyright 2021-2026 LXGW (https://github.com/lxgw/LxgwWenKai), with Reserved Font Name '霞鹜', '霞鶩', '落霞孤鹜', '落霞孤鶩' and 'LXGW'. [ADDITIONAL PERMISSION] The Reserved Font Names '霞鹜', '霞鶩', '落霞孤鹜', '落霞孤鶩' and 'LXGW' may continue to be used in Modified Versions recompiled from the Original Version, without modifications to the font source code; or in Modified Versions subsetted or converted to other formats (e.g., WOFF/WOFF2) solely for web font delivery, provided such Modified Versions are not made available as installable desktop fonts (e.g., on mainstream platforms like Google Fonts, or third-party non-commercial platforms recognized by the author @lxgw; other web font platforms please contact the author @lxgw for confirmation).+Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+https://openfontlicense.org+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/styles/chalkboard/demo/index.html b/styles/chalkboard/demo/index.htmlnew file mode 100644index 0000000..e795a32--- /dev/null+++ b/styles/chalkboard/demo/index.html@@ -0,0 +1,5 @@+<!doctype html><html><head><meta charset="utf-8"><title>汉字的故事</title><style>+@font-face{font-family:'WenKaiRef';src:url(fonts/LXGWWenKai-Regular.ttf)}+@font-face{font-family:'SubKai';src:url(fonts/wenkai-sub.woff2) format('woff2')}+html,body{margin:0;background:#000;overflow:hidden}canvas{display:block;position:absolute;left:0;top:0}</style></head>+<body><canvas id="c"></canvas><canvas id="s"></canvas><script type="module" src="js/app.js"></script></body></html>diff --git a/styles/chalkboard/demo/js/ancient.js b/styles/chalkboard/demo/js/ancient.jsnew file mode 100644index 0000000..fb4c1e0--- /dev/null+++ b/styles/chalkboard/demo/js/ancient.js@@ -0,0 +1,54 @@+// The four forms of 射 on the timeline, redrawn by hand as chalk lines (no ancient-script font is used).+// 100 × 100 box, y down. `o: true` marks the parts that carry the bow (orange in every form, same height).+// Oracle bone: incised, thin and angular. Bronze: cast, heavier and rounder, a hand (又) grips the arrow.+// Seal: even curves; the bow has bent into 身, the hand plus a mark has become 寸.+import { clamp } from '/core/lib.js';+import { Stroke, catmull } from './chalk.js';+import { writeChar } from './hand.js';++const FORMS = {+ oracle: { w: .019, round: false, lines: [+ { o: true, p: [[47, 11], [42, 6], [27, 19], [19, 50], [27, 81], [42, 94], [47, 89]] }, // stave, tips turned back+ { o: true, p: [[43, 8], [43, 92]], w: .6 }, // string+ { p: [[78, 84], [17, 23]] }, // arrow shaft+ { p: [[31, 24], [17, 23], [18, 37]] }, // arrowhead+ { p: [[70, 86], [78, 84], [80, 92]] }, { p: [[66, 80], [74, 78], [76, 86]] }, // fletching+ ] },+ bronze: { w: .03, round: true, lines: [+ { o: true, p: [[49, 13], [43, 6], [30, 14], [20, 34], [17, 52], [21, 72], [31, 88], [43, 95], [49, 89]] },+ { o: true, p: [[44, 8], [43, 50], [44, 92]], w: .6 },+ { p: [[67, 74], [17, 22]] },+ { p: [[31, 22], [17, 22], [18, 36]] },+ { h: 1, p: [[68, 60], [80, 57], [88, 62], [89, 80], [90, 99]] }, // the hand (又) holding the nock: top finger and arm+ { h: 1, p: [[66, 71], [77, 70], [88, 71]] }, { h: 1, p: [[69, 82], [79, 81], [89, 82]] }, // two more fingers (the same hand the seal keeps)+ ] },+ seal: { w: .024, round: true, lines: [+ { o: true, p: [[32, 5], [26, 9], [20, 14]] },+ { o: true, p: [[18, 15], [18, 40], [18, 64]] },+ { o: true, p: [[18, 15], [32, 13], [42, 14], [44, 26], [44, 60], [44, 80], [40, 92], [28, 96]] },+ { o: true, p: [[18, 30], [44, 30]] }, { o: true, p: [[18, 46], [44, 46]] },+ { o: true, p: [[5, 76], [28, 66], [54, 59]] },+ { o: true, p: [[45, 52], [32, 72], [8, 93]] },+ { p: [[60, 21], [74, 19], [83, 24], [85, 40], [84, 66], [86, 96]] }, // 又 → 寸: top finger and the arm+ { p: [[62, 36], [74, 35], [84, 38]] }, { p: [[62, 51], [74, 50], [84, 53]] }, // two more fingers+ { p: [[60, 70], [72, 76]] }, // the mark that makes 寸+ ] },+};++// returns Stroke[] with timing; `bowLast` writes the bow first so the orange appears as the form's first gesture+export function writeForm(kind, cx, cy, size, clock, o = {}) {+ if (kind === 'kai') return writeChar('射', cx, cy, size, clock, { ...o, colors: { 0: 'orange', 1: 'orange', 2: 'orange', 3: 'orange', 4: 'orange', 5: 'orange', 6: 'orange' } });+ const F = FORMS[kind], out = [], sc = size / 100; let t = clock;+ F.lines.forEach((L, i) => {+ const P = L.p.map(([x, y]) => [cx + (x - 50) * sc, cy + (y - 50) * sc]);+ const pts = F.round ? catmull(P, 10) : P;+ const st = new Stroke(pts, { kind: 'write', w: size * F.w * (L.w ?? 1), color: L.o ? 'orange' : 'white', taper: F.round ? .12 : .3, taperLen: .2,+ land: F.round ? .8 : .4, wob: size * .002, wav: size * .5, skip: .14, press: 1.02, endSpecks: true, specks: .7, seed: 400 + i * 9.1 + size, R: o.R });+ const d = clamp(.05 + st.len / (size * (o.speed ?? 6)), .07, .4);+ if (out.length) t += .035;+ if (L.h && o.handAt != null && t < o.handAt) t = o.handAt; // the hand is drawn when the voice names it+ st.t0 = t; st.t1 = t + d; t += d; st.hand = !!L.h; out.push(st);+ });+ out.end = t;+ return out;+}diff --git a/styles/chalkboard/demo/js/app.js b/styles/chalkboard/demo/js/app.jsnew file mode 100644index 0000000..8e77de2--- /dev/null+++ b/styles/chalkboard/demo/js/app.js@@ -0,0 +1,195 @@+// Page: every frame is Canvas 2D (wall, slates, chalk, wet band, wipe, light), then a WebGL2 post pass+// (camera motion blur, vignette, grade). window.render(t) depends on t only.+import { clamp, lerp, ss, eio } from '/core/lib.js';+import { bake, drawStroke, n1, rng } from './chalk.js';+import { installDeposit, grainTile } from './r2d.js';+import { Post } from './post.js';+import { loadSvgFont } from './hand.js';+import { bakeWall, bakeSlate, paintGrid, WALL, PW, BH } from './stage.js';+import { drawFront } from './props.js';++const Q = new URLSearchParams(location.search), W = innerWidth, H = innerHeight;+const cv = document.getElementById('c');+cv.width = W; cv.height = H;+await loadSvgFont('fonts/' + (Q.get('font') || 'EMSDelight') + '.svg');+await loadSvgFont('fonts/EMSCasualHand.svg', 'child');+installDeposit();++if (Q.has('lab')) { await import('./lab.js').then(m => m.run(cv, W, H, Q)); }+else {+ const { build } = await import('./film.js');+ const F = build(W, H);+ for (const s of F.S) bake(s, s.o.R || 2);+ window.DUR = F.DUR; window.EV = F.EV;++ // ───────── static pictures+ const WALLI = bakeWall();+ const BACK = bakeSlate(PW + 140, BH, 61), FR = bakeSlate(PW, BH, 71, true), FL = bakeSlate(PW, BH, 81, true);+ { const c = BACK.cv.getContext('2d'); c.save(); c.translate(BACK.m, 0); for (const g of F.SMALL) paintGrid(c, g.x, g.y, g.size); c.restore(); }+ { const c = FL.cv.getContext('2d'); c.save(); c.translate(FL.m, 0); paintGrid(c, F.G1.x, F.G1.y, F.G1.size); paintGrid(c, F.G2.x, F.G2.y, F.G2.size); c.restore(); }+ const TILE = grainTile();++ const post = new Post(cv, W, H);+ const main = new OffscreenCanvas(W, H), mx = main.getContext('2d');+ const la = new OffscreenCanvas(W, H), lx = la.getContext('2d');+ const PAT = mx.createPattern(TILE, 'repeat');+ const KS = W / 1920; // camera scales are given for a 1920-wide frame+ const view = c0 => { const c = { ...c0, s: c0.s * KS }; return { ...c, m: [c.s, 0, 0, c.s, W / 2 - c.cx * c.s, H / 2 - c.cy * c.s], toScreen: (x, y) => [W / 2 + (x - c.cx) * c.s, H / 2 + (y - c.cy) * c.s], W, H }; };++ // the wet band left by the cloth, drying back toward the child's corner (front-panel units).+ // A soft mask (band ∩ right of the drying line, plus a few islands still drying behind it) darkens and+ // glosses the slate; a thin bright meniscus and a darker water line mark the edge; faint cloth streaks inside.+ const wetC = new OffscreenCanvas(W, H), wx = wetC.getContext('2d');+ const WETN = (() => { // uneven moisture, baked once (band units / 8)+ const o = new OffscreenCanvas(320, 60), c = o.getContext('2d'), img = c.createImageData(320, 60);+ for (let y = 0; y < 60; y++) for (let x = 0; x < 320; x++) { const v = n1(x / 9 + n1(y / 7, 2) * 3, 1) * .6 + n1(x / 3.2 + y * 1.7, 5) * .4; const q = 4 * (y * 320 + x); img.data[q] = img.data[q + 1] = img.data[q + 2] = 0; img.data[q + 3] = Math.round(clamp((v - .35) * 1.6) * 255); }+ c.putImageData(img, 0, 0); return o;+ })();+ function drawWet(ctx, t, ox, v) {+ const w = F.wet; if (t > w.t1 + .3) return;+ const u = clamp((t - w.t0) / (w.t1 - w.t0)), front = lerp(w.bx0, w.xEnd + 20, 1 - Math.pow(1 - u, 1.5));+ const mid = (w.y0 + w.y1) / 2, half = (w.y1 - w.y0) / 2;+ const bx = y => front + (n1(y / 70, 3) - .5) * 46 + (n1(y / 16, 4) - .5) * 12;+ const top = x => w.y0 + (n1(x / 160, 9) - .5) * 30, bot = x => w.y1 + (n1(x / 150, 11) - .5) * 34;+ const xe = y => w.xEnd - 70 * Math.pow(clamp(Math.abs(y - mid) / half), 3) + (n1(y / 40, 7) - .5) * 30; // the cloth's rounded end+ const fade = 1 - ss((t - w.t1) / .3);+ const M = [v.m[0], 0, 0, v.m[3], v.m[4] + ox * v.s, v.m[5]];+ const ys = []; for (let y = w.y0 - 30; y <= w.y1 + 30; y += 2) ys.push(y);+ const region = new Path2D(); ys.forEach((y, i) => { const x = Math.max(bx(y), w.x0); i ? region.lineTo(x, y) : region.moveTo(x, y); }); ys.slice().reverse().forEach(y => region.lineTo(Math.max(bx(y), xe(y)), y)); region.closePath();+ const band = new Path2D(); band.moveTo(w.x0, top(w.x0)); for (let x = w.x0; x <= w.xEnd + 80; x += 20) band.lineTo(x, top(x)); for (let x = w.xEnd + 80; x >= w.x0; x -= 20) band.lineTo(x, bot(x)); band.closePath();+ wx.setTransform(1, 0, 0, 1, 0, 0); wx.clearRect(0, 0, W, H); wx.globalCompositeOperation = 'source-over';+ wx.setTransform(...M); wx.filter = `blur(${Math.max(2, 7 * v.s)}px)`; wx.fillStyle = '#fff'; // a soft, natural gradient at the drying edge+ wx.save(); wx.clip(band); wx.fill(region);+ const R = rng(5); // small patches still drying behind the line+ for (let i = 0; i < 0; i++) {+ const x0 = w.bx0 + R() * (w.xEnd - w.bx0), y0 = w.y0 + 15 + R() * (w.y1 - w.y0 - 30), r0 = 5 + R() * 13, k = clamp(1 - (front - x0) / (90 + R() * 140));+ if (k > 0 && front > x0) { wx.globalAlpha = .8; wx.beginPath(); wx.ellipse(x0, y0, r0 * (1.5 + R()) * k, r0 * k, R() - .5, 0, 6.29); wx.fill(); }+ }+ wx.globalAlpha = 1; wx.restore(); wx.filter = 'none';+ { wx.globalCompositeOperation = 'destination-in'; const fg = wx.createLinearGradient(0, w.y0 - 25, 0, w.y1 + 25); // damp, not cut: the band fades out at top and bottom+ fg.addColorStop(0, 'rgba(0,0,0,0)'); fg.addColorStop(.2, 'rgba(0,0,0,1)'); fg.addColorStop(.8, 'rgba(0,0,0,1)'); fg.addColorStop(1, 'rgba(0,0,0,0)');+ wx.fillStyle = fg; wx.fillRect(w.x0 - 100, w.y0 - 60, w.xEnd - w.x0 + 300, w.y1 - w.y0 + 120); wx.globalCompositeOperation = 'source-over'; }+ wx.globalCompositeOperation = 'source-in'; wx.setTransform(1, 0, 0, 1, 0, 0);+ wx.fillStyle = 'rgba(0,12,7,.36)'; wx.fillRect(0, 0, W, H);+ wx.globalCompositeOperation = 'source-atop'; wx.setTransform(...M);+ wx.globalAlpha = .22; wx.drawImage(WETN, w.x0, w.y0 - 40, w.xEnd - w.x0 + 80, w.y1 - w.y0 + 80); wx.globalAlpha = 1;+ // the window's reflection on the wet paint: a soft, slanted glow that only the wet part shows+ const sh = wx.createLinearGradient(0, w.y0 - 20, 0, w.y1 + 20); // the wet paint's sheen: brightest near the band's top+ sh.addColorStop(0, 'rgba(185,215,200,.2)'); sh.addColorStop(.22, 'rgba(185,215,200,.08)'); sh.addColorStop(.6, 'rgba(185,215,200,0)'); sh.addColorStop(1, 'rgba(185,215,200,.04)');+ wx.fillStyle = sh; wx.fillRect(w.x0, w.y0 - 60, w.xEnd - w.x0 + 120, w.y1 - w.y0 + 120);+ ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = fade; ctx.drawImage(wetC, 0, 0); ctx.restore();+ }++ function drawWipeHaze(ctx, t, ox) {+ const w = F.wipe; if (t <= w.t0) return null;+ const P = w.path, n = Math.max(2, Math.round(P.length * clamp((t - w.t0) / (w.t1 - w.t0))));+ const p = new Path2D(); P.slice(0, n).forEach(([x, y], i) => i ? p.lineTo(x + ox, y) : p.moveTo(x + ox, y));+ return p;+ }++ function frame(t) {+ const c = F.camAt(t), v = view(c), ox = F.slideX(t);+ mx.setTransform(1, 0, 0, 1, 0, 0); mx.globalCompositeOperation = 'source-over'; mx.globalAlpha = 1; mx.filter = 'none';+ mx.fillStyle = '#000'; mx.fillRect(0, 0, W, H);+ mx.setTransform(...v.m); mx.imageSmoothingQuality = 'high';+ mx.drawImage(WALLI.cv, WALL[0], WALL[1], WALL[2], WALL[3]);+ // back board and its chalk (only ever seen once the panel has moved)+ if (ox > 1) {+ mx.drawImage(BACK.cv, -BACK.m, 0, BACK.cv.width, BH);+ for (const s of F.S) if (s.layer === 'BK' && t > s.t0) drawStroke(mx, s, t);+ }+ // FR (static), then FL on its offset with a soft occlusion shadow on what is behind its left edge+ mx.drawImage(FR.cv, PW - FR.m, 0, FR.cv.width, BH);+ for (const s of F.S) if (s.layer === 'FR' && t > s.t0) drawStroke(mx, s, t); // the clean panel behind (end card)+ if (ox > 1) { const g = mx.createLinearGradient(ox - 60, 0, ox, 0); g.addColorStop(0, 'rgba(0,0,0,0)'); g.addColorStop(1, 'rgba(0,0,0,.45)'); mx.fillStyle = g; mx.fillRect(ox - 60, 0, 60, BH); }+ mx.drawImage(FL.cv, ox - FL.m, 0, FL.cv.width, BH);+ drawWet(mx, t, ox, v);+ // front-panel chalk: kept strokes straight onto the frame; wiped ones on their own layer+ const focus = 0;+ lx.setTransform(1, 0, 0, 1, 0, 0); lx.clearRect(0, 0, W, H); lx.filter = 'none'; lx.globalCompositeOperation = 'source-over';+ lx.setTransform(v.m[0], 0, 0, v.m[3], v.m[4] + ox * v.s, v.m[5]);+ const hp = drawWipeHaze(mx, t, 0);+ for (const s of F.S) if (s.layer === 'FL' && s.phase === 'pre' && (!hp || s.wiped) && t > s.t0) drawStroke(lx, s, t);+ if (hp) {+ const ww = F.wipe.w;+ lx.globalCompositeOperation = 'destination-out'; lx.filter = `blur(${Math.max(1, 16 * v.s)}px)`; lx.lineCap = 'round'; lx.lineJoin = 'round'; lx.lineWidth = ww; lx.strokeStyle = '#000';+ lx.stroke(hp); lx.globalCompositeOperation = 'source-over'; lx.filter = 'none';+ for (const s of F.S) if (s.layer === 'FL' && s.phase === 'pre' && !s.wiped && t > s.t0) drawStroke(lx, s, t); // the eraser went round what it kept+ }+ mx.setTransform(1, 0, 0, 1, 0, 0); if (focus > .2) mx.filter = `blur(${focus * KS}px)`; mx.drawImage(la, 0, 0); mx.filter = 'none';+ if (hp) {+ mx.save(); mx.setTransform(v.m[0], 0, 0, v.m[3], v.m[4] + ox * v.s, v.m[5]); mx.filter = `blur(${Math.max(1, 12 * v.s)}px)`;+ mx.strokeStyle = 'rgba(160,176,168,.024)'; mx.lineCap = 'round'; mx.lineJoin = 'round'; mx.lineWidth = F.wipe.w * .9; mx.stroke(hp); mx.restore();+ }+ mx.setTransform(v.m[0], 0, 0, v.m[3], v.m[4] + ox * v.s, v.m[5]);+ for (const s of F.S) if (s.layer === 'FL' && s.phase === 'post' && t > s.t0) drawStroke(mx, s, t);+ mx.setTransform(...v.m);+ if (t < F.T.back0) for (const s of F.S) if (s.layer === 'WORLD' && t > s.t0) drawStroke(mx, s, t);+ // slate micro grain where it can be seen+ if (v.s / KS > .6) {+ mx.save(); mx.beginPath(); mx.rect(0, 0, 6400, BH); mx.clip();+ PAT.setTransform(new DOMMatrix([.25, 0, 0, .25, 0, 0])); mx.globalCompositeOperation = 'soft-light'; mx.globalAlpha = Math.min(.2, (v.s / KS - .6) * .3);+ mx.fillStyle = PAT; mx.fillRect(0, 0, 6400, BH); mx.restore();+ }+ // morning light from the windows on the left: a soft falloff and a slanted patch low on the left+ mx.save(); mx.setTransform(...v.m);+ const lg = mx.createLinearGradient(-1500, 0, 7900, 0); lg.addColorStop(0, 'rgb(255,250,240)'); lg.addColorStop(.45, 'rgb(236,236,232)'); lg.addColorStop(1, 'rgb(196,198,200)');+ mx.globalCompositeOperation = 'multiply'; mx.fillStyle = lg; mx.fillRect(-1500, -1500, 9400, 4900);+ mx.globalCompositeOperation = 'screen'; mx.filter = `blur(${Math.max(3, 40 * v.s)}px)`;+ const pane = (x, y, w, h, a) => { mx.fillStyle = `rgba(255,212,150,${a})`; mx.beginPath(); mx.moveTo(x, y); mx.lineTo(x + w, y + w * .28); mx.lineTo(x + w, y + w * .28 + h); mx.lineTo(x, y + h); mx.closePath(); mx.fill(); };+ for (let i = 0; i < 3; i++) for (let j = 0; j < 2; j++) pane(-260 + i * 400, 1060 + j * 330 + i * 400 * .28, 360, 300, .07 - i * .018);+ mx.restore();+ // the chalk's front: a few bright grains where the writing is now+ for (const s of F.S) {+ if (t <= s.t0 || t >= s.t1) continue;+ const f = s.prog(t); const p = s.at(f * s.len), o = s.layer === 'FL' ? ox : 0;+ drawFront(mx, t, v, p[0] + o, p[1], s.color, Math.min(s.w, 9), .5);+ }+ return c;+ }++ // ───────── subtitles: the voice line in Chinese, a translation in English, on a soft dark plate above the bottom safe area+ await document.fonts.load('40px SubKai');+ const sc = document.getElementById('s'); sc.width = W; sc.height = H; const sx = sc.getContext('2d');+ const SZ = { zh: Math.round(38 * KS), en: Math.round(25 * KS), zhY: H - Math.round(100 * KS), enY: H - Math.round(62 * KS) };+ const subAt = t => F.SUBS.find(q => t >= q.t0 && t < q.t1);+ const NOSUBS = Q.has('nosubs'); // ?nosubs: picture only (poster, gallery frame)+ function subtitle(t) {+ sx.clearRect(0, 0, W, H); if (NOSUBS) return;+ const q = subAt(t); if (!q) return;+ const a = Math.min(1, (t - q.t0) / .12, (q.t1 - t) / .12);+ sx.font = `${SZ.zh}px SubKai`; const wz = sx.measureText(q.zh).width; sx.font = `${SZ.en}px SubKai`; const we = sx.measureText(q.en).width;+ const w = Math.max(wz, we) + 56 * KS, x0 = (W - w) / 2, y0 = SZ.zhY - SZ.zh - 14 * KS, y1 = SZ.enY + 16 * KS;+ sx.globalAlpha = a * .62; sx.fillStyle = '#0a0f0c'; sx.beginPath(); sx.roundRect(x0, y0, w, y1 - y0, 10 * KS); sx.fill();+ sx.globalAlpha = a; sx.textAlign = 'center'; sx.textBaseline = 'alphabetic';+ sx.font = `${SZ.zh}px SubKai`; sx.fillStyle = '#f3efe4'; sx.fillText(q.zh, W / 2, SZ.zhY);+ sx.font = `${SZ.en}px SubKai`; sx.fillStyle = '#d9d4c6'; sx.fillText(q.en, W / 2, SZ.enY);+ sx.globalAlpha = 1;+ }+ const subBoxes = t => {+ const q = subAt(t); if (!q) return [];+ sx.font = `${SZ.zh}px SubKai`; const wz = sx.measureText(q.zh).width; sx.font = `${SZ.en}px SubKai`; const we = sx.measureText(q.en).width;+ return [{ id: 'sub-zh-' + q.id, text: q.zh, x0: (W - wz) / 2, y0: SZ.zhY - SZ.zh, x1: (W + wz) / 2, y1: SZ.zhY + SZ.zh * .25 },+ { id: 'sub-en-' + q.id, text: q.en, x0: (W - we) / 2, y0: SZ.enY - SZ.en, x1: (W + we) / 2, y1: SZ.enY + SZ.en * .3 }];+ };+ const shotOf = t => F.camAt(t).shot;+ window.render = t => {+ const c = frame(t);+ const tp = t - .5 / 30, pc = shotOf(tp) === c.shot ? F.camAt(tp) : c, k = pc.s / c.s;+ const bl = [k, 0, 0, 0, k, 0, W / 2 - k * W / 2 + pc.s * KS * (c.cx - pc.cx), H / 2 - k * H / 2 + pc.s * KS * (c.cy - pc.cy), 1];+ post.draw(main, bl, t, .3);+ subtitle(t);+ };+ window.TEXTS = t => {+ const c = F.camAt(t), v = view(c), ox = F.slideX(t), out = [];+ for (const q of F.TX) {+ if (t < q.t0 || t >= q.t1) continue;+ const o = q.layer === 'FL' ? ox : 0, [a, b] = v.toScreen(q.box[0] + o, q.box[1]), [d, e] = v.toScreen(q.box[2] + o, q.box[3]);+ out.push({ id: q.id, text: q.text, x0: a, y0: b, x1: d, y1: e });+ }+ return out; // subtitles follow the voice; not part of the reading-time check+ };+ window.F = F; if (Q.has('dbg')) for (const [k, v] of Object.entries(F.T)) console.warn('T', k, JSON.stringify(v, (a, b) => typeof b === 'number' ? +b.toFixed(2) : b));+ window.render(+(Q.get('t') || 0));+}+window.READY = true;diff --git a/styles/chalkboard/demo/js/chalk.js b/styles/chalkboard/demo/js/chalk.jsnew file mode 100644index 0000000..123215f--- /dev/null+++ b/styles/chalkboard/demo/js/chalk.js@@ -0,0 +1,416 @@+// Chalk stroke engine: hand-drawn polylines → baked board-space coverage sprites.+// A sprite stores, per pixel, chalk coverage (0..1), the arc length where the stroke passes it (for+// progressive reveal in stroke order) and the lateral position across the chalk tip (for a round leading edge).+// The board's own grain (in the WebGL pass) then decides which grains actually catch the chalk.+import { clamp, lerp, hash, TAU } from '/core/lib.js';++// ───────── deterministic noise+export const h1 = (i, s = 0) => { const n = Math.sin(i * 127.1 + s * 311.7 + 74.7) * 43758.5453; return n - Math.floor(n); };+export const n1 = (x, s = 0) => { const i = Math.floor(x), f = x - i, u = f * f * (3 - 2 * f); return lerp(h1(i, s), h1(i + 1, s), u); };+const h2 = (x, y, s) => { const n = Math.sin(x * 127.1 + y * 311.7 + s * 74.7) * 43758.5453; return n - Math.floor(n); };+export const n2 = (x, y, s = 0) => {+ const ix = Math.floor(x), iy = Math.floor(y), fx = x - ix, fy = y - iy, ux = fx * fx * (3 - 2 * fx), uy = fy * fy * (3 - 2 * fy);+ return lerp(lerp(h2(ix, iy, s), h2(ix + 1, iy, s), ux), lerp(h2(ix, iy + 1, s), h2(ix + 1, iy + 1, s), ux), uy);+};+export function rng(seed) { let a = (seed * 2654435761) >>> 0 || 1; return () => { a |= 0; a = a + 0x6D2B79F5 | 0; let t = Math.imul(a ^ a >>> 15, 1 | a); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; }+const sst = (a, b, x) => { const t = clamp((x - a) / (b - a)); return t * t * (3 - 2 * t); };++// ───────── geometry+export function resample(p, step) { // [[x,y],...] → evenly spaced+ const o = [p[0].slice()]; let carry = 0;+ for (let i = 1; i < p.length; i++) {+ const [ax, ay] = p[i - 1], [bx, by] = p[i], d = Math.hypot(bx - ax, by - ay);+ let s = step - carry;+ while (s <= d) { o.push([ax + (bx - ax) * s / d, ay + (by - ay) * s / d]); s += step; }+ carry = d - (s - step);+ }+ const L = p[p.length - 1], E = o[o.length - 1];+ if (Math.hypot(L[0] - E[0], L[1] - E[1]) > step * .2) o.push(L.slice());+ return o;+}+export function catmull(p, sub = 8) { // centripetal-ish Catmull–Rom through points+ if (p.length < 3) return p.map(q => q.slice());+ const o = [];+ for (let i = 0; i < p.length - 1; i++) {+ const p0 = p[Math.max(0, i - 1)], p1 = p[i], p2 = p[i + 1], p3 = p[Math.min(p.length - 1, i + 2)];+ for (let k = 0; k < sub; k++) {+ const t = k / sub, t2 = t * t, t3 = t2 * t;+ o.push([0, 1].map(j => .5 * (2 * p1[j] + (-p0[j] + p2[j]) * t + (2 * p0[j] - 5 * p1[j] + 4 * p2[j] - p3[j]) * t2 + (-p0[j] + 3 * p1[j] - 3 * p2[j] + p3[j]) * t3)));+ }+ }+ o.push(p[p.length - 1].slice()); return o;+}+// smooth a polyline but keep sharp corners (turns sharper than `deg`) as corners+export function smoothKeepCorners(p, deg = 55, sub = 8) {+ if (p.length < 3) return p.map(q => q.slice());+ const parts = [[p[0]]];+ for (let i = 1; i < p.length - 1; i++) {+ const a = Math.atan2(p[i][1] - p[i - 1][1], p[i][0] - p[i - 1][0]), b = Math.atan2(p[i + 1][1] - p[i][1], p[i + 1][0] - p[i][0]);+ let d = Math.abs(b - a); if (d > Math.PI) d = TAU - d;+ parts[parts.length - 1].push(p[i]);+ if (d * 180 / Math.PI > deg) parts.push([p[i]]);+ }+ parts[parts.length - 1].push(p[p.length - 1]);+ const o = [];+ parts.forEach((q, k) => { const c = catmull(q, sub); (k ? c.slice(1) : c).forEach(x => o.push(x)); });+ return o;+}++// optional hook for a renderer that bakes the board's grain into the chalk (Canvas 2D pipeline): fn(cov, x0, y0, W, H, R) → cov'+export const CFG = { deposit: null };++// ───────── stroke+let SEED = 11;+export const COLORS = {+ white: [.95, .94, .90], kid: [.98, .90, .58], blue: [.45, .72, .99], orange: [1.0, .56, .26],+ red: [.98, .40, .36], amber: [1.0, .64, .32], yellow: [.99, .87, .45], green: [.55, .85, .52], violet: [.74, .60, .97], cyan: [.47, .86, .90],+};+export class Stroke {+ // pts [[x,y],...] board units. o: { w (half width, units), color, kind 'line'|'side'|'dot'|'write',+ // press, wob (hand wobble amp), taper (0..1 how much the end thins), land (landing blob), seed, specks }+ constructor(pts, o = {}) {+ this.o = o; this.kind = o.kind || 'line'; this.w = o.w ?? 7; this.color = o.color || 'white';+ this.seed = o.seed ?? (SEED += 7.31); this.press = o.press ?? 1;+ const step = Math.max(.5, this.w * .12);+ let p = resample(pts, step);+ const wob = o.wob ?? 1.6, wav = o.wav ?? 160;+ if (wob > 0 && p.length > 3) { // hand wobble along the normal: slow drift + a finer tremor+ let s = 0; const q = [];+ for (let i = 0; i < p.length; i++) {+ const a = p[Math.max(0, i - 1)], b = p[Math.min(p.length - 1, i + 1)];+ const tx = b[0] - a[0], ty = b[1] - a[1], tl = Math.hypot(tx, ty) || 1;+ if (i) s += Math.hypot(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]);+ const ramp = Math.min(1, s / 12);+ const off = wob * ramp * ((n1(s / wav, this.seed) - .5) * 2 + .35 * (n1(s / (wav * .18), this.seed + 3) - .5) * 2);+ q.push([p[i][0] - ty / tl * off, p[i][1] + tx / tl * off]);+ }+ p = q;+ }+ this.pts = p; const n = p.length; this.cum = new Float32Array(n);+ for (let i = 1; i < n; i++) this.cum[i] = this.cum[i - 1] + Math.hypot(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]);+ this.len = Math.max(.01, this.cum[n - 1]);+ this.t0 = 1e9; this.t1 = 1e9; this.sprite = null;+ }+ at(L) {+ const c = this.cum, p = this.pts; L = clamp(L, 0, this.len);+ let lo = 0, hi = c.length - 1; if (hi === 0) return p[0].slice();+ while (hi - lo > 1) { const m = (lo + hi) >> 1; if (c[m] < L) lo = m; else hi = m; }+ const u = (L - c[lo]) / ((c[hi] - c[lo]) || 1);+ return [lerp(p[lo][0], p[hi][0], u), lerp(p[lo][1], p[hi][1], u)];+ }+ dir(L) { const a = this.at(L - 2), b = this.at(L + 2); const d = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1; return [(b[0] - a[0]) / d, (b[1] - a[1]) / d]; }+ get start() { return this.pts[0]; }+ get end() { return this.pts[this.pts.length - 1]; }+ // hand speed: slow landing, fast middle, slow lift. u → fraction of length+ ease(u) { const k = this.o.ease ?? .8; return u - Math.sin(TAU * u) / TAU * k; }+ prog(t) { if (t <= this.t0) return 0; if (t >= this.t1) return 1; return this.ease((t - this.t0) / (this.t1 - this.t0)); }+ // speed (relative, ~0.2..1.8) at arc fraction f: invert ease numerically+ speedAt(f) {+ let lo = 0, hi = 1; for (let k = 0; k < 18; k++) { const m = (lo + hi) / 2; if (this.ease(m) < f) lo = m; else hi = m; }+ const u = (lo + hi) / 2, k = this.o.ease ?? .8; return 1 - k * Math.cos(TAU * u);+ }+ // half width at arc length s+ width(s) {+ const o = this.o, w = this.w, L = this.len, f = s / L;+ if (o.wfn) return w * o.wfn(s, L) * (.96 + .08 * n1(s / (w * 3.2), this.seed + 9));+ let m = 1;+ const land = o.land ?? 1;+ m *= 1 + .06 * land * (1 - sst(0, Math.min(L * .35, w * 2.4), s)); // chalk bites on landing+ const tp = o.taper ?? .25, tl = Math.min(L * (o.taperLen ?? .3), Math.max(w * 3, L * (o.taperLen ?? .3)));+ m *= 1 - tp * sst(L - tl, L, s); // lifting off+ if (o.endPress) m *= 1 + o.endPress * sst(L - w * 3, L - w * .6, s) * (1 - sst(L - w * .6, L, s) * .4);+ m *= .93 + .14 * n1(s / (w * 3.2), this.seed + 9);+ if (this.kind === 'write') m *= 1 + .06 * Math.sin(f * 3.1);+ return w * m;+ }+ pressure(s) {+ const o = this.o, L = this.len, w = this.w;+ let p = this.press * (o.pfn ? o.pfn(s, L) : 1);+ const v = this.speedAt(s / L);+ p *= lerp(1.12, .78, clamp((v - .2) / 1.6)); // fast = lighter+ p *= 1 + .14 * (o.land ?? 1) * (1 - sst(0, Math.min(L * .3, w * 2), s));+ const tp = o.taper ?? .25; p *= 1 - tp * .9 * sst(L - Math.max(w * 3, L * (o.taperLen ?? .3)), L, s);+ const skip = n1(s / (o.skipWav ?? 55), this.seed + 21); // chalk skipping over bumps+ p *= 1 - (o.skip ?? .35) * sst(.62, .95, skip);+ p *= .84 + .26 * n1(s / 13, this.seed + 33) + .08 * (n1(s / 3.5, this.seed + 34) - .5);+ return clamp(p, 0, 1.3);+ }+}++// ───────── baking+export function bake(st, R = 2) {+ if (st.o.outline) return bakeOutline(st, R);+ const o = st.o, pts = st.pts, side = st.kind === 'side';+ const wmax = st.w * 1.4 + 1, spr = o.specks ?? 1, mar = wmax + (spr ? Math.min(st.w * 3.2, 34) + 4 : 2);+ let x0 = 1e9, y0 = 1e9, x1 = -1e9, y1 = -1e9;+ for (const [x, y] of pts) { x0 = Math.min(x0, x); y0 = Math.min(y0, y); x1 = Math.max(x1, x); y1 = Math.max(y1, y); }+ x0 -= mar; y0 -= mar; x1 += mar; y1 += mar + (spr ? Math.min(st.w * 2, 20) : 0);+ const W = Math.max(2, Math.ceil((x1 - x0) * R)), H = Math.max(2, Math.ceil((y1 - y0) * R)), N = W * H;+ const D = new Float32Array(N).fill(1e9), S = new Float32Array(N).fill(-1), Lat = new Float32Array(N);+ const n = pts.length;+ // closest-point parametrisation, segment by segment+ for (let i = 0; i < Math.max(1, n - 1); i++) {+ const a = pts[i], b = pts[Math.min(n - 1, i + 1)];+ const ax = (a[0] - x0) * R, ay = (a[1] - y0) * R, bx = (b[0] - x0) * R, by = (b[1] - y0) * R;+ const dx = bx - ax, dy = by - ay, sl = Math.hypot(dx, dy) || 1e-6, tx = dx / sl, ty = dy / sl;+ const r = wmax * R;+ const px0 = Math.max(0, Math.floor(Math.min(ax, bx) - r)), px1 = Math.min(W - 1, Math.ceil(Math.max(ax, bx) + r));+ const py0 = Math.max(0, Math.floor(Math.min(ay, by) - r)), py1 = Math.min(H - 1, Math.ceil(Math.max(ay, by) + r));+ const cum = st.cum[i];+ for (let py = py0; py <= py1; py++) {+ const qy = py + .5 - ay;+ for (let px = px0; px <= px1; px++) {+ const qx = px + .5 - ax;+ let u = (qx * tx + qy * ty) / sl; u = u < 0 ? 0 : u > 1 ? 1 : u;+ const cx = qx - tx * u * sl, cy = qy - ty * u * sl, d = Math.hypot(cx, cy);+ const k = py * W + px;+ if (d < r && d < D[k]) { D[k] = d; S[k] = cum + u * sl / R; Lat[k] = (tx * cy - ty * cx) >= 0 ? d / R : -d / R; }+ }+ }+ }+ const cov = new Float32Array(N), sd = st.seed;+ const K = side ? st.w * .55 : Math.max(2.2, st.w * .5); // streaks across the tip+ for (let k = 0; k < N; k++) {+ if (S[k] < 0) continue;+ const s = S[k], lat = Lat[k], w = st.width(s), nn = Math.abs(lat) / w;+ if (nn > 1.45) continue;+ // ends: no perfect round caps. Side strokes end flat; tip strokes end blunt and ragged+ const cap = s <= 1e-3 ? -1 : s >= st.len - 1e-3 ? 1 : 0;+ let capK = 1;+ if (cap) {+ if (side) { const dd = D[k] / R; if (dd > w * .35 * n1(lat / 9, sd + (cap > 0 ? 3 : 4))) continue; }+ else {+ const dd = D[k] / R, ang = Math.atan2(lat, dd);+ const lim = w * ((cap < 0 ? .72 : .55) + .3 * n1(ang * 2.2 + 3, sd + (cap > 0 ? 17 : 29)));+ if (dd > lim) continue;+ capK = .78 * (1 - dd / lim * .5);+ }+ }+ const sgn = lat >= 0 ? 1 : 0;+ const rg = o.clean ?? 1, e = 1 + (side ? .2 : .13 * rg) * (n1(s / (st.w * .55 + 1), sd + 50 + sgn * 13) - .5) * 2 + .07 * rg * (n1(s / 1.3, sd + 70 + sgn) - .5) * 2;+ const fp = sst(e, e - (side ? .26 : .14), nn);+ if (fp <= 0) continue;+ const l = lat / w; // -1..1 across the tip+ // the tip is rounded: it presses hardest in the middle and only grazes the board at its edges+ const prof = Math.pow(Math.max(0, 1 - Math.min(1, nn) * Math.min(1, nn)), side ? .25 : .3);+ const drift = n1(s / (side ? 260 : 120), sd + 5) * 3;+ let str = n1((l + 1) * K + drift, sd + 101);+ str = side ? .55 + .6 * Math.pow(str, 1.2) : .8 + .3 * str;+ str *= side ? .82 + .3 * n2((l + 1) * K * 3, s / 16, sd + 7) : .9 + .16 * n2((l + 1) * K * 2.5, s / 3, sd + 7);+ let p = st.pressure(s);+ if (side) { p *= lerp(o.sideLo ?? .55, 1, (l + 1) / 2); p *= sst(-20 - 30 * n1(l * 3, sd), 70, s) * (1 - .8 * sst(st.len - 90 - 40 * n1(l * 2.5, sd + 1), st.len, s)); }+ cov[k] = clamp(fp * (.25 + .75 * prof) * str * p * capK * (side ? .78 : .8));+ }+ // loose powder: specks that fall off the chalk, a few more below the line and near the end+ if (spr) {+ const rr = rng(Math.floor(sd * 1000) + 3), cnt = o.endSpecks ? Math.floor(2 + rr() * 3 * spr) : Math.floor(st.len * (side ? .22 : .13) * spr + 3);+ for (let j = 0; j < cnt; j++) {+ const endBias = o.endSpecks || rr() < .25, s = endBias ? st.len * (1 - Math.pow(rr(), 2) * (o.endSpecks ? .12 : .25)) : rr() * st.len;+ const c = st.at(s), d = st.dir(s), w = st.width(s);+ const sideSign = rr() < .5 ? -1 : 1, off = Math.min(w * (1.0 + Math.pow(rr(), 2.2) * 1.6), w + 14) * sideSign;+ let x = c[0] - d[1] * off, y = c[1] + d[0] * off + Math.pow(rr(), 2.5) * Math.min(w * 1.6, 14);+ const rad = (.28 + rr() * .45) * (side ? 1.2 : 1), a = .5 + rr() * .4;+ const cx = (x - x0) * R, cy = (y - y0) * R, rp = rad * R + .7;+ for (let py = Math.max(0, Math.floor(cy - rp)); py <= Math.min(H - 1, Math.ceil(cy + rp)); py++)+ for (let px = Math.max(0, Math.floor(cx - rp)); px <= Math.min(W - 1, Math.ceil(cx + rp)); px++) {+ const dd = Math.hypot(px + .5 - cx, py + .5 - cy), v = a * clamp((rp - dd) / .9);+ if (v <= 0) continue;+ const k = py * W + px;+ if (v > cov[k]) { cov[k] = v; if (S[k] < 0 || S[k] > s) S[k] = s; }+ }+ }+ }+ return pack(st, cov, S, Lat, W, H, x0, y0, R);+}++// ───────── a Kai-script stroke: the font's own outline is the mask, the chalk fills it, the median reveals it+// o.outline = { path: Path2D in font units (y up), m: [a, b, c, d, e, f] font → board, box: [x0, y0, x1, y1] board }+function bakeOutline(st, R) {+ const o = st.o, ol = o.outline, sd = st.seed, sz = o.size;+ const mar = 10 + sz * .02;+ const x0 = ol.box[0] - mar, y0 = ol.box[1] - mar, x1 = ol.box[2] + mar, y1 = ol.box[3] + mar + sz * .01;+ const W = Math.max(2, Math.ceil((x1 - x0) * R)), H = Math.max(2, Math.ceil((y1 - y0) * R)), N = W * H;+ // 1. rasterise the outline+ const mc = new OffscreenCanvas(W, H), mx = mc.getContext('2d'), [a, b, c, d, e, f] = ol.m;+ mx.setTransform(R * a, R * b, R * c, R * d, R * (e - x0), R * (f - y0));+ mx.fillStyle = '#fff'; mx.fill(ol.path);+ const md = mx.getImageData(0, 0, W, H).data, A = new Float32Array(N);+ for (let k = 0; k < N; k++) A[k] = md[4 * k + 3] / 255;+ // 2. distance to the outside (chamfer), in board units, with the anti-aliased edge as sub-pixel offset+ const Dn = new Float32Array(N), BIG = 1e6;+ for (let k = 0; k < N; k++) Dn[k] = A[k] >= .5 ? BIG : 0;+ const D1 = 1, D2 = 1.4142;+ for (let y = 0; y < H; y++) for (let x = 0; x < W; x++) {+ const k = y * W + x; if (!Dn[k]) continue; let v = Dn[k];+ if (x > 0) v = Math.min(v, Dn[k - 1] + D1);+ if (y > 0) { v = Math.min(v, Dn[k - W] + D1); if (x > 0) v = Math.min(v, Dn[k - W - 1] + D2); if (x < W - 1) v = Math.min(v, Dn[k - W + 1] + D2); }+ Dn[k] = v;+ }+ for (let y = H - 1; y >= 0; y--) for (let x = W - 1; x >= 0; x--) {+ const k = y * W + x; if (!Dn[k]) continue; let v = Dn[k];+ if (x < W - 1) v = Math.min(v, Dn[k + 1] + D1);+ if (y < H - 1) { v = Math.min(v, Dn[k + W] + D1); if (x < W - 1) v = Math.min(v, Dn[k + W + 1] + D2); if (x > 0) v = Math.min(v, Dn[k + W - 1] + D2); }+ Dn[k] = v;+ }+ // 3. where along the median each pixel lies (reveal order) and how far across+ const S = new Float32Array(N).fill(-1), Lat = new Float32Array(N), Dm = new Float32Array(N).fill(1e9);+ const P = st.pts.filter((q, i) => i % 3 === 0 || i === st.pts.length - 1), cum = [0];+ for (let i = 1; i < P.length; i++) cum.push(cum[i - 1] + Math.hypot(P[i][0] - P[i - 1][0], P[i][1] - P[i - 1][1]));+ const scaleS = st.len / (cum[cum.length - 1] || 1), rr = sz * .16 * R;+ for (let i = 0; i < Math.max(1, P.length - 1); i++) {+ const p = P[i], q = P[Math.min(P.length - 1, i + 1)];+ const ax = (p[0] - x0) * R, ay = (p[1] - y0) * R, bx = (q[0] - x0) * R, by = (q[1] - y0) * R;+ const dx = bx - ax, dy = by - ay, sl = Math.hypot(dx, dy) || 1e-6, tx = dx / sl, ty = dy / sl;+ const qx0 = Math.max(0, Math.floor(Math.min(ax, bx) - rr)), qx1 = Math.min(W - 1, Math.ceil(Math.max(ax, bx) + rr));+ const qy0 = Math.max(0, Math.floor(Math.min(ay, by) - rr)), qy1 = Math.min(H - 1, Math.ceil(Math.max(ay, by) + rr));+ for (let py = qy0; py <= qy1; py++) for (let px = qx0; px <= qx1; px++) {+ const k = py * W + px; if (A[k] <= .01) continue;+ const ux = px + .5 - ax, uy = py + .5 - ay; let u = (ux * tx + uy * ty) / sl; u = u < 0 ? 0 : u > 1 ? 1 : u;+ const cx = ux - tx * u * sl, cy = uy - ty * u * sl, dd = Math.hypot(cx, cy);+ if (dd < Dm[k]) { Dm[k] = dd; S[k] = (cum[i] + u * sl / R) * scaleS; Lat[k] = ((tx * cy - ty * cx) >= 0 ? dd : -dd) / R; }+ }+ }+ // 4. chalk inside the outline: eroded, ragged edge; streaks along the stroke; pressure along it+ const cov = new Float32Array(N), er = o.erode ?? sz * .0032, soft = o.soft ?? sz * .006;+ for (let k = 0; k < N; k++) {+ if (A[k] <= .01 || S[k] < 0) continue;+ const s = S[k], lat = Lat[k], depth = Dn[k] / R + (A[k] - .5) / R;+ const sg = lat >= 0 ? 1 : 0;+ const rag = er * (.55 + .9 * n1(s / (sz * .012) + sg * 7.3, sd + 50)) + er * .5 * (n1(s / (sz * .003), sd + 60 + sg) - .5);+ const de = depth - rag;+ if (de <= -.4) continue;+ const edge = sst(-.4, soft, de);+ const drift = n1(s / (sz * .25), sd + 5) * 3;+ let str = .87 + .2 * n1(lat / (sz * .0068) + drift, sd + 101);+ str *= .93 + .12 * n2(lat / (sz * .0045), s / (sz * .007), sd + 7);+ const p = st.pressure(s);+ cov[k] = clamp(edge * str * p * .93);+ }+ // loose powder just outside the edge, a little more below+ const r2 = rng(Math.floor(sd * 997) + 5);+ for (let k = 0; k < N; k++) {+ if (A[k] <= .02 || A[k] >= .98) continue; // the anti-aliased rim of the outline+ if (r2() > .05) continue;+ const ox = (r2() - .5) * sz * .02, oy = (r2() - .2) * sz * .03, x = (k % W) + ox * R, y = Math.floor(k / W) + oy * R;+ const rad = (.25 + r2() * .4) * R + .6, al = .45 + r2() * .4, sNear = S[k] < 0 ? 0 : S[k];+ for (let py = Math.max(0, Math.floor(y - rad)); py <= Math.min(H - 1, Math.ceil(y + rad)); py++)+ for (let px = Math.max(0, Math.floor(x - rad)); px <= Math.min(W - 1, Math.ceil(x + rad)); px++) {+ const q = py * W + px, v = al * clamp((rad - Math.hypot(px + .5 - x, py + .5 - y)) / .9);+ if (v > cov[q]) { cov[q] = v; if (S[q] < 0 || S[q] > sNear) S[q] = sNear; }+ }+ }+ return pack(st, cov, S, Lat, W, H, x0, y0, R);+}+function pack(st, cov, S, Lat, W, H, x0, y0, R) {+ if (CFG.deposit) cov = CFG.deposit(cov, x0, y0, W, H, R);+ const N = W * H, cv = new OffscreenCanvas(W, H), cx = cv.getContext('2d'), img = cx.createImageData(W, H), dd = img.data;+ const col = COLORS[st.color] || st.color, cr = Math.round(col[0] * 255), cg = Math.round(col[1] * 255), cb = Math.round(col[2] * 255);+ const A8 = new Uint8ClampedArray(N), LN = new Float32Array(N);+ for (let k = 0; k < N; k++) {+ const a = Math.round(cov[k] * 255); A8[k] = a;+ dd[4 * k] = cr; dd[4 * k + 1] = cg; dd[4 * k + 2] = cb; dd[4 * k + 3] = a;+ if (S[k] >= 0) LN[k] = clamp(Math.abs(Lat[k]) / st.width(S[k]), 0, 1.5);+ }+ cx.putImageData(img, 0, 0);+ st.sprite = { cv, W, H, x0, y0, R, A8, S, LN, rgb: [cr, cg, cb], img: null, part: null, lastCut: -1 };+ return st;+}++// partial sprite for a stroke in progress: everything up to arc length sNow, with a round leading edge+export function partial(st, sNow) {+ const sp = st.sprite;+ if (!sp.part) { sp.part = new OffscreenCanvas(sp.W, sp.H); sp.pctx = sp.part.getContext('2d'); sp.img = sp.pctx.createImageData(sp.W, sp.H); }+ if (Math.abs(sp.lastCut - sNow) < 1e-4) return sp.part;+ const d = sp.img.data, A = sp.A8, S = sp.S, LN = sp.LN, [r, g, b] = sp.rgb, w = st.width(sNow);+ const soft = Math.max(.6, w * .18);+ for (let k = 0, N = sp.W * sp.H; k < N; k++) {+ const s = S[k]; let a = 0;+ if (s >= 0 && A[k]) {+ const l = Math.min(1, LN[k]), cut = sNow - w * (1 - Math.sqrt(1 - l * l));+ if (s <= cut) a = A[k]; else if (s < cut + soft) a = A[k] * (1 - (s - cut) / soft);+ if (s > sNow - w * 1.6 && s <= cut + soft) a = Math.min(255, a * 1.12); // fresh chalk right at the tip+ }+ const q = 4 * k; d[q] = r; d[q + 1] = g; d[q + 2] = b; d[q + 3] = a;+ }+ sp.pctx.putImageData(sp.img, 0, 0); sp.lastCut = sNow;+ return sp.part;+}++// draw a stroke (complete or partial) into a 2D context already transformed board → screen+export function drawStroke(ctx, st, t) {+ const f = st.prog(t); if (f <= 0) return;+ const sp = st.sprite, img = f >= 1 ? sp.cv : partial(st, f * st.len);+ ctx.drawImage(img, sp.x0, sp.y0, sp.W / sp.R, sp.H / sp.R);+}++// ───────── shape builders+export const line = (x0, y0, x1, y1, o = {}) => {+ const L = Math.hypot(x1 - x0, y1 - y0) || 1, nx = -(y1 - y0) / L, ny = (x1 - x0) / L, bow = (o.bow ?? .012) * L * ((hash(SEED) - .5) * 2);+ const mid = [(x0 + x1) / 2 + nx * bow, (y0 + y1) / 2 + ny * bow];+ return new Stroke(catmull([[x0, y0], mid, [x1, y1]], 12), o);+};+export const curve = (p, o = {}) => new Stroke(catmull(p, 10), o);+export const poly = (p, o = {}) => new Stroke(p, o);+export function arc(cx, cy, r, a0, a1, o = {}) {+ const n = Math.max(12, Math.ceil(Math.abs(a1 - a0) * r / 6)), p = [], ry = o.ry ?? r, wob = o.rwob ?? .025;+ for (let i = 0; i <= n; i++) { const a = lerp(a0, a1, i / n), rr = r * (1 + wob * (n1(i / n * 3, (o.seed ?? 3) + 40) - .5) * 2); p.push([cx + Math.cos(a) * rr, cy + Math.sin(a) * rr * ry / r]); }+ return new Stroke(p, { wav: 260, ...o });+}+export function zigzag(x0, y0, x1, y1, amp, wl, o = {}) {+ const L = Math.hypot(x1 - x0, y1 - y0), tx = (x1 - x0) / L, ty = (y1 - y0) / L, nx = -ty, ny = tx, k = Math.max(2, Math.round(L / wl * 2));+ const p = [[x0, y0]];+ for (let i = 1; i < k; i++) { const s = i / k * L, a = (i % 2 ? 1 : -1) * amp * (.85 + .3 * hash(i * 3.7 + SEED)); p.push([x0 + tx * s + nx * a, y0 + ty * s + ny * a]); }+ p.push([x1, y1]);+ return new Stroke(smoothKeepCorners(p, 170, 3), { wob: .6, ...o });+}+// arrow head as one short stroke: barb → tip → barb+export function head(x, y, ang, size, o = {}) {+ const a1 = ang + Math.PI - .5, a2 = ang + Math.PI + .5;+ return new Stroke([[x + Math.cos(a1) * size, y + Math.sin(a1) * size], [x, y], [x + Math.cos(a2) * size, y + Math.sin(a2) * size]], { wob: .3, taper: .3, ...o });+}++// ───────── Chinese characters from stroke-order medians (makemeahanzi / hanzi-writer-data)+// returns Stroke[] in writing order. data.medians: [[[x,y],...],...] in a 1024 box, y up, baseline 900.+export function glyph(data, cx, cy, size, o = {}) {+ const rot = (o.rot ?? 0) * Math.PI / 180, sc = size / 1024, out = [];+ const seed = o.seed ?? 5, R = rng(seed * 977);+ const mlen = data.medians.map(m => m.slice(1).reduce((a, q, i) => a + Math.hypot(q[0] - m[i][0], q[1] - m[i][1]), 0));+ const mainIdx = mlen.indexOf(Math.max(...mlen));+ data.medians.forEach((m, si) => {+ // one affine map per stroke, font units (y up) → board: scale, a touch of hand jitter, the character's tilt+ const jr = (R() - .5) * (o.jit ?? .012), jx = (R() - .5) * size * (o.jitp ?? .004), jy = (R() - .5) * size * (o.jitp ?? .004);+ const raw = m.map(([x, y]) => [(x - 512) * sc, (900 - y - 512) * sc]);+ const mx = raw.reduce((a, q) => a + q[0], 0) / raw.length, my = raw.reduce((a, q) => a + q[1], 0) / raw.length;+ // a personal hand (optional): horizontals rise a little to the right; the main (longest) stroke is drawn out+ const ex = raw[raw.length - 1][0] - raw[0][0], ey = raw[raw.length - 1][1] - raw[0][1], el = Math.hypot(ex, ey) || 1;+ const dev = Math.max(...raw.map(([qx, qy]) => Math.abs((qx - raw[0][0]) * ey - (qy - raw[0][1]) * ex) / el));+ const horiz = Math.abs(ex) > el * .9 && dev < el * .12, isMain = o.hand && si === mainIdx;+ const rotS = jr - (o.hand && horiz ? (o.slant ?? 2.4) * Math.PI / 180 : 0), ux = ex / el, uy = ey / el, kk = isMain ? (o.mainLen ?? 1.07) - 1 : 0;+ const F = (x, y) => {+ let X = (x - 512) * sc, Y = (900 - y - 512) * sc; let dx = X - mx, dy = Y - my;+ if (kk) { const pr = dx * ux + dy * uy; dx += kk * pr * ux; dy += kk * pr * uy; }+ X = mx + dx * Math.cos(rotS) - dy * Math.sin(rotS) + jx; Y = my + dx * Math.sin(rotS) + dy * Math.cos(rotS) + jy;+ return [cx + X * Math.cos(rot) - Y * Math.sin(rot), cy + X * Math.sin(rot) + Y * Math.cos(rot)];+ };+ const O = F(0, 0), Ux = F(1, 0), Uy = F(0, 1), M = [Ux[0] - O[0], Ux[1] - O[1], Uy[0] - O[0], Uy[1] - O[1], O[0], O[1]];+ let p = m.map(([x, y]) => F(x, y));+ const L = p.slice(1).reduce((a, q, i) => a + Math.hypot(q[0] - p[i][0], q[1] - p[i][1]), 0);+ const a = p[p.length - 2] || p[0], b = p[p.length - 1], dl = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1, dx = (b[0] - a[0]) / dl, dy = (b[1] - a[1]) / dl;+ let taper = .2, taperLen = .3;+ const pie = dy > .35 && dx < -.3, hook = p.length >= 3 && dl < L * .2 && dy < -.2;+ if (pie) { taper = .45; taperLen = .35; } else if (hook) { taper = .4; taperLen = .15; }+ if (o.outline !== false) {+ const nums = data.strokes[si].match(/-?\d+(\.\d+)?/g).map(Number), bx = [1e9, 1e9, -1e9, -1e9];+ for (let i = 0; i + 1 < nums.length; i += 2) { const q = F(nums[i], nums[i + 1]); bx[0] = Math.min(bx[0], q[0]); bx[1] = Math.min(bx[1], q[1]); bx[2] = Math.max(bx[2], q[0]); bx[3] = Math.max(bx[3], q[1]); }+ const pts = smoothKeepCorners(p, 48, 6);+ out.push(new Stroke(pts, { kind: 'write', w: size * .022, color: o.color || 'white', taper, taperLen, wob: 0, land: 1.0, skip: .22, press: o.press ?? 1.08, size,+ outline: { path: new Path2D(data.strokes[si]), m: M, box: bx }, erode: o.erode, soft: o.soft, ...o.extra, seed: seed * 31 + si * 7.7 }));+ return;+ }+ // (centre-line version, kept for the ghosts of the old lesson)+ const ext = (u, v, e) => { const d = Math.hypot(u[0] - v[0], u[1] - v[1]) || 1; return [u[0] + (u[0] - v[0]) / d * e, u[1] + (u[1] - v[1]) / d * e]; };+ if (p.length >= 2) { p[0] = ext(p[0], p[1], size * .016); p[p.length - 1] = ext(p[p.length - 1], p[p.length - 2], size * .012); }+ out.push(new Stroke(smoothKeepCorners(p, 48, 6), { kind: 'write', w: o.w ?? size * .0155, color: o.color || 'white', taper, taperLen, wob: o.wob ?? size * .004, wav: size * .5, land: 1.1, skip: .25, press: o.press ?? 1.05, specks: .8, ...o.extra, seed: seed * 31 + si * 7.7 }));+ });+ return out;+}diff --git a/styles/chalkboard/demo/js/film.js b/styles/chalkboard/demo/js/film.jsnew file mode 100644index 0000000..747397c--- /dev/null+++ b/styles/chalkboard/demo/js/film.js@@ -0,0 +1,273 @@+// 《没弄反》 Not Swapped: the whole film as data. Layout of both boards, every stroke with its time, the sliding+// panel, the drying wet band, the one wipe, the camera, the texts for readcheck and the sound events.+// Units: world = the board's slate (x 0…6400, y 0…1700). Front-panel things are stored in panel-local units+// (layer 'FL'); the panel's offset slideX(t) moves them. Back-board things are in world units (layer 'BK').+import { clamp, lerp, ss, eio, eo } from '/core/lib.js';+import { Stroke, catmull, n1, rng } from './chalk.js';+import { writeChar, writeLine, writeLatin, latinWidth } from './hand.js';+import { HZ } from './hz.js';+const HZ_COUNT = c => HZ[c].map((_, i) => i);+import { writeForm } from './ancient.js';+import { PW } from './stage.js';++export const G1 = { x: 1150, y: 800, size: 620 }, G2 = { x: 2200, y: 800, size: 620 }; // painted grids on FL+export const SMALL = [{ x: 560, y: 1330, size: 300 }]; // one painted small grid on the back board+const CH = 520; // big characters+// voice-over (vo/, edge-tts zh-CN-XiaoxiaoNeural +15%): lengths from vo/dur.json; the picture is timed to the voice+export const VO = { n1: 3.146, n2: 4.553, n3: 6.725, n4: 3.617, n5: 2.28, n6: 2.41, n7: 6.623, n8: 4.102, n9: 1.307 };+// subtitles: the voice as said (Chinese) and a free English translation, one line each+export const SUB = {+ n1: [['网上有个说法:射和矮,这两个字弄反了。', 'People online say the characters 射 and 矮 got swapped.']],+ n2: [['射字左边是身,右边是寸。', '射 is 身 (body) plus 寸 (inch).'], ['身高一寸,那不就是矮吗?', 'One inch tall: isn\u2019t that short?']],+ n3: [['矮字左边是矢,矢就是箭;', 'On the left of 矮 is 矢, an arrow;'], ['右边是委,有放下的意思。', 'on the right is 委, to let go.'], ['把箭放出去,那不就是射吗?', 'Letting an arrow go: isn\u2019t that shooting?']],+ n4: [['其实,射最早画的是一张弓,弓上搭着一支箭。', 'In fact, the oldest 射 is a bow with an arrow on it.']],+ n5: [['后来又加了一只手,在拉弓弦。', 'Later a hand was added, pulling the string.']],+ n6: [['弓慢慢写成了身,手写成了寸。', 'The bow slowly became 身, and the hand became 寸.']],+ n7: [['那矮里为什么有支箭?', 'Why is there an arrow in 矮?'], ['古人拿箭当尺子,用来量长短。', 'People once used arrows as rulers to measure length.'], ['所以短字里,也有这支箭。', 'That is why 短 (short) has one too.']],+ n8: [['射,是拉弓放箭;', '射 means drawing a bow and shooting;'], ['矮,就是个子短,委只管读音。', '矮 means short, and 委 only gives the sound.']],+ n9: [['所以,没弄反。', 'So they were never swapped.']],+};+const isCJK = c => /[\p{Script=Han}]/u.test(c);+export const needOf = txt => { let a = 0, b = 0; for (const c of txt) { if (/\s/.test(c)) continue; isCJK(c) ? a++ : b++; } return Math.max(1.5, a / 4.5 + b / 15 + 1.5); };++export function build(W = 1920, H = 1080) {+ const S = [], TX = [], EV = [], SUBS = [];+ const add = (arr, layer, phase = 'pre') => { arr.forEach(s => { s.layer = layer; s.phase = phase; S.push(s); }); return arr; };+ const text = (id, txt, layer, strokes, t1 = 1e9, pad = 6) => {+ let x0 = 1e9, y0 = 1e9, x1 = -1e9, y1 = -1e9;+ for (const s of strokes) for (const [x, y] of s.pts) { x0 = Math.min(x0, x); y0 = Math.min(y0, y); x1 = Math.max(x1, x); y1 = Math.max(y1, y); }+ TX.push({ id, text: txt, layer, box: [x0 - pad, y0 - pad, x1 + pad, y1 + pad], t0: strokes[0].t0, t1 });+ };+ const line = (pts, o, t0, dur) => { const s = new Stroke(o.smooth ? catmull(pts, 10) : pts, { kind: 'write', taper: .2, taperLen: .2, land: .6, skip: .14, endSpecks: true, specks: .6, ...o }); s.t0 = t0; s.t1 = t0 + dur; return s; };+ const centred = (txt, cx, cy, size, t, o = {}) => { const w = writeLine(txt, 0, 0, size, 0, o).x; return writeLine(txt, cx - w / 2, cy, size, t, o); };+ const centredLatin = (txt, cx, by, cap, t, o = {}) => writeLatin(txt, cx - latinWidth(txt, cap) / 2, by, cap, t, o);+ // a voice line and its subtitle: the subtitle stays up for its reading time; returns the earliest start of the next line+ const vo = (id, t) => {+ EV.push({ t, type: 'vo', id });+ const parts = SUB[id], zh = parts.map(p => p[0]).join(''), en = parts.map(p => p[1]).join(' '), end = t + VO[id], t0 = t - .08;+ const t1 = end + .3; // next line may start 0.35 s after this one ends+ // one subtitle per sentence, timed by its share of the spoken characters (a pause counts as half a character)+ const w = parts.map(p => [...p[0]].reduce((a, c) => a + (isCJK(c) ? 1 : /[,。;?:]/.test(c) ? .5 : 0), 0)), W0 = w.reduce((a, b) => a + b, 0);+ let acc = 0;+ parts.forEach((p, k) => {+ const a = k ? t + VO[id] * acc / W0 : t0; acc += w[k];+ const b = k === parts.length - 1 ? Math.max(end + .3, a + 1.0) : t + VO[id] * acc / W0;+ SUBS.push({ id: id + (parts.length > 1 ? '-' + (k + 1) : ''), t0: a, t1: b, zh: p[0], en: p[1], vend: end });+ EV.push({ t: +a.toFixed(3), type: 'sub', t1: +b.toFixed(3), zh: p[0], en: p[1] }); // for the .srt+ });+ T[id] = end; return t1 + .05;+ };+ const T = {};++ // ───────── already on the board before the film starts (front panel, top right): the date, the child's question+ const date = add(writeLine('10月28日 星期三', 2660, 104, 66, -20, { seed: 2, latinScale: .7, speed: 60 }), 'FL');+ text('date', '10月28日 星期三', 'FL', date);+ const kidZh = add(writeLine('射和矮弄反了吗?', 2330, 262, 104, -19, { hand: 'child', seed: 7, speed: 60 }), 'FL');+ text('kid-zh', '射和矮弄反了吗?', 'FL', kidZh);++ // ───────── S1 · title at the top of the lesson; the wet streak dries; the two characters go into their grids+ const ti = add(writeLine('汉字的故事', 1000, 252, 124, .05, { seed: 4, speed: 22 }), 'FL');+ const tie = add(writeLatin('The Story of Chinese Characters', 1012, 400, 46, ti.end + .04, { seed: 5, lspeed: 200 }), 'FL');+ text('title', '汉字的故事', 'FL', ti); text('title-en', 'The Story of Chinese Characters', 'FL', tie);+ EV.push({ t: .05, type: 'title' });+ T.title = tie.end; T.dry = ti.end + .45;+ const wet = { x0: 1690, y0: 160, y1: 430, xEnd: 2280, t0: ti.end - .35, t1: T.dry + .45, bx0: 1700 };+ let next = vo('n1', 2.1);+ const she = add(writeChar('射', G1.x, G1.y, CH, 2.8, { seed: 11, speed: 9, gap: .01 }), 'FL');+ const ai = add(writeChar('矮', G2.x, G2.y, CH, she.end + .1, { seed: 21, speed: 11, gap: .01 }), 'FL');+ T.s2 = Math.max(next, ai.end + .3, T.dry - .3 + 3.2, tie[0].t0 + 3.4); // the question frame holds until the title and the child's question are read++ // ───────── S2 · 射 close: 身 | 寸, then widen while 一寸高? is written+ next = vo('n2', T.s2 + .05);+ const L1 = 921, M1 = 1176, R1 = 1395;+ let t = T.s2 + .45;+ add([line([[L1 + 8, 1132], [M1 - 14, 1128]], { w: 8, color: 'white' }, t, .22)], 'FL');+ const lShen = add(writeChar('身', (L1 + M1) / 2, 1212, 100, t + .25, { seed: 12, speed: 40 }), 'FL'); t = T.s2 + 1.45;+ add([line([[M1 + 14, 1128], [R1 - 6, 1124]], { w: 8, color: 'white' }, t, .2)], 'FL');+ const lCun = add(writeChar('寸', (M1 + R1) / 2, 1212, 100, t + .22, { seed: 13, speed: 40 }), 'FL');+ text('lab-shen', '身', 'FL', lShen); text('lab-cun', '寸', 'FL', lCun);+ T.wide = T.s2 + 2.15;+ const q1 = add(centred('一寸高?', G1.x, 1345, 100, T.wide + .25, { seed: 14, speed: 50 }), 'FL'); t = q1.end + .06;+ const q1e = add(centredLatin('An inch tall?', G1.x, 1462, 50, t, { seed: 15, lspeed: 110 }), 'FL');++ // ───────── S3 · 矮: 矢 (an arrow) | 委, 放箭?, the crossed arrows; hold; the panel slides+ T.s3 = next; next = vo('n3', T.s3);+ const L2 = 1971, M2 = 2187, R2 = 2454;+ t = T.s3 + .2;+ add([line([[L2 + 6, 1132], [M2 - 14, 1129]], { w: 8, color: 'white' }, t, .2)], 'FL');+ const lShi = add(writeChar('矢', (L2 + M2) / 2, 1212, 100, t + .22, { seed: 22, speed: 40 }), 'FL');+ t = T.s3 + 2.1;+ add([line([[M2 + 14, 1129], [R2 - 6, 1125]], { w: 8, color: 'white' }, t, .2)], 'FL');+ const lWei = add(writeChar('委', (M2 + R2) / 2, 1212, 100, t + .22, { seed: 23, speed: 40 }), 'FL');+ text('lab-shi', '矢', 'FL', lShi); text('lab-wei', '委', 'FL', lWei);+ const q2 = add(centred('放箭?', G2.x, 1345, 100, T.s3 + 3.25, { seed: 24, speed: 50 }), 'FL'); t = q2.end + .06;+ const q2e = add(centredLatin('Let an arrow fly?', G2.x, 1462, 50, t, { seed: 25, lspeed: 110 }), 'FL');+ t = T.s3 + 4.9;+ const A1 = [[1536, 580], [1640, 740], [1700, 870], [1792, 1030]], A2 = [[1796, 580], [1700, 730], [1620, 890], [1534, 1030]];+ const arr1 = line(A1, { w: 9, color: 'white', smooth: true, taper: .05 }, t, .3), arr2 = line(A2, { w: 9, color: 'white', smooth: true, taper: .05 }, t + .2, .3);+ const head = (p, q, t0) => { const a = Math.atan2(p[1] - q[1], p[0] - q[0]), L = 50; return line([[p[0] + Math.cos(a + 2.6) * L, p[1] + Math.sin(a + 2.6) * L], p, [p[0] + Math.cos(a - 2.6) * L, p[1] + Math.sin(a - 2.6) * L]], { w: 9, color: 'white', taper: .1 }, t0, .14); };+ const h1 = head(arr1.end, arr1.at(arr1.len - 30), t + .31), h2 = head(arr2.end, arr2.at(arr2.len - 30), t + .51);+ add([arr1, arr2, h1, h2], 'FL');+ T.s4 = Math.max(T.n3 + .05, q2e[0].t0 + 2.5);++ // ───────── S4 · the front panel slides away, the back board, the timeline+ T.slide0 = T.s4; T.slide1 = T.s4 + .9; T.whip = T.slide0 + .72; T.s5 = T.whip + .28;+ EV.push({ t: T.slide0, type: 'slide', d: .9 }, { t: T.whip, type: 'whip' });+ t = T.whip + .08; // the timeline is already being drawn as the whip lands+ const TLY = 905;+ add([line([[230, TLY], [1400, TLY - 3], [2400, TLY - 6], [3060, TLY - 8]], { w: 8, color: 'white', smooth: true, taper: .05 }, t, .5)], 'BK');+ add([line([[262, TLY - 34], [258, TLY + 34]], { w: 8, color: 'white' }, t - .02, .1)], 'BK');++ // ───────── S5 · one character across three thousand years, paced by the voice+ const FX = [560, 1240, 1920, 2600], FY = 600, FS = 430;+ const forms = [], names = [['甲骨文', 'oracle bone'], ['金文', 'bronze'], ['小篆', 'seal'], ['楷书', 'today']];+ T.s5a = T.whip + .3;+ next = vo('n4', Math.max(T.slide0 + .3, next));+ const starts = [T.s5a + .05, 0, 0, 0];+ starts[1] = T.n4 - .4; // bronze: bow and arrow first; its hand lands as the voice says 一只手+ T.n5s = next; next = vo('n5', next); starts[2] = next - .7;+ T.n6s = next; next = vo('n6', next); starts[3] = T.n6s + .3;+ ['oracle', 'bronze', 'seal', 'kai'].forEach((k, i) => {+ t = starts[i];+ add([line([[FX[i], TLY - 26], [FX[i], TLY + 26]], { w: 8, color: 'white' }, t, .1)], 'BK');+ const f = add(writeForm(k, FX[i], FY, k === 'kai' ? FS * .96 : FS, t + .1, { seed: 40 + i, speed: k === 'kai' ? 22 : 9, handAt: k === 'bronze' ? T.n5s + .6 : null }), 'BK');+ forms.push(f); t = Math.max(...f.filter(x => !x.hand).map(x => x.t1)) + .05; // the name follows the bow and arrow, not the late hand+ const nz = add(centred(names[i][0], FX[i], 1002, 84, t, { seed: 50 + i, speed: 70 }), 'BK');+ const ne = add(centredLatin(names[i][1], FX[i], 1100, 44, nz.end + .03, { seed: 60 + i, lspeed: 120 }), 'BK');+ text('form-zh-' + i, names[i][0], 'BK', nz); text('form-en-' + i, names[i][1], 'BK', ne);+ if (i === 3) { T.kl = ne.end; T.kf = f.end; }+ });+ EV.push({ t: forms[0][1].t1, type: 'twang' }, { t: forms[1][forms[1].length - 1].t1, type: 'twang2' });+ t = T.kf + .05;+ const ex = add(centred('身←弓 · 寸←手', FX[3], 1215, 84, t, { seed: 70, speed: 80, cgap: .02 }), 'BK');+ const exe = add(centred('body ← bow · inch ← hand', FX[3], 1300, 54, ex[0].t0 + .35, { seed: 71, lspeed: 120, latinScale: .74, space: .3, speed: 80 }), 'BK');+ text('ex-zh', '身←弓 · 寸←手', 'BK', ex); text('ex-en', 'body ← bow · inch ← hand', 'BK', exe);+ T.ex = Math.max(ex.end, exe.end); T.s6 = Math.max(ex[0].t0 + 2.7, exe[0].t0 + 2.85); // the question of n7 starts over this frame (a J-cut)++ // ───────── S6 · 短: its 矢 in orange; an arrow used as a ruler; 以矢为正; the orange line leaves for 矮+ const g = SMALL[0];+ next = vo('n7', next); T.s6 = Math.max(T.s6, T.n7 - VO.n7 + 1.0);+ t = T.s6 + .12;+ const duan = add(writeChar('短', g.x, g.y, 250, t, { seed: 83, speed: 16, gap: .01, colors: { 0: 'orange', 1: 'orange', 2: 'orange', 3: 'orange', 4: 'orange' }, R: 3 }), 'BK');+ text('duan', '短', 'BK', duan);+ const yz = add(writeLine('以矢为正', 800, 1300, 104, duan.end - .3, { seed: 90, speed: 60 }), 'BK');+ const yze = add(writeLatin('the arrow is the ruler', 806, 1418, 44, yz.end + .05, { seed: 91, lspeed: 120 }), 'BK');+ text('yz-zh', '以矢为正', 'BK', yz); text('yz-en', 'the arrow is the ruler', 'BK', yze);+ // the arrow as a ruler: an orange arrow laid along a white line, the line ticked off in arrow lengths ("古人拿箭当尺子")+ t = Math.max(duan.end + .1, T.n7 - VO.n7 + 1.7); // as the voice says 古人拿箭当尺子+ const RY = 1520, RX = 820, AL = 300;+ const ruler = [+ line([[RX, RY + 50], [RX + 2 * AL + 10, RY + 48]], { w: 7, color: 'white' }, t, 0.24),+ line([[RX, RY + 22], [RX, RY + 80]], { w: 7, color: 'white' }, t + 0.24, 0.06),+ line([[RX + AL, RY + 24], [RX + AL, RY + 76]], { w: 7, color: 'white' }, t + 0.32, 0.06),+ line([[RX + 2 * AL, RY + 22], [RX + 2 * AL, RY + 80]], { w: 7, color: 'white' }, t + 0.39, 0.06),+ line([[RX + 6, RY], [RX + AL - 8, RY]], { w: 8, color: 'orange' }, t + 0.52, 0.18), // shaft+ line([[RX + AL - 34, RY - 18], [RX + AL - 8, RY], [RX + AL - 34, RY + 18]], { w: 8, color: 'orange', taper: .1 }, t + 0.70, 0.10), // head+ line([[RX + 30, RY - 16], [RX + 8, RY], [RX + 30, RY + 16]], { w: 7, color: 'orange', taper: .1 }, t + 0.81, 0.08),+ line([[RX + 52, RY - 16], [RX + 30, RY], [RX + 52, RY + 16]], { w: 7, color: 'orange', taper: .1 }, t + 0.90, 0.08),+ line([[RX + AL + 6, RY], [RX + 2 * AL - 8, RY]], { w: 8, color: 'orange' }, t + 1.05, 0.18), // laid again: two arrows long+ line([[RX + 2 * AL - 34, RY - 18], [RX + 2 * AL - 8, RY], [RX + 2 * AL - 34, RY + 18]], { w: 8, color: 'orange', taper: .1 }, t + 1.23, 0.10),+ ];+ add(ruler, 'BK'); EV.push({ t: t + .24, type: 'tick' }, { t: t + 1.23, type: 'tick' });+ T.thread = Math.max(T.n7 - 2.3, ruler[ruler.length - 1].t1 + .2, yze[0].t0 + 2.8);+ const lab = [(L2 + M2) / 2 + PW, 1212];+ const TH = [[500, 1440], [506, 1600], [700, 1640], [1600, 1636], [2600, 1630], [3200, 1626], [4000, 1630], [4600, 1624], [4770, 1570], [4800, 1330], [4900, 1236], [4990, 1210],+ [lab[0] - 40, lab[1] - 92], [lab[0] + 60, lab[1] - 80], [lab[0] + 96, lab[1] + 10], [lab[0] + 40, lab[1] + 86], [lab[0] - 70, lab[1] + 74], [lab[0] - 98, lab[1] - 10], [lab[0] - 40, lab[1] - 92]];+ const thread = line(TH, { w: 9, color: 'orange', smooth: true, taper: .04, wob: 1.2 }, T.thread, 1.6);+ thread.ease = u => u; // even speed: half of it is seen leaving, half arriving+ thread.layer = 'WORLD'; thread.phase = 'pre'; S.push(thread);+ T.threadEnd = T.thread + 1.6; T.threadCut = T.thread + .6;+ EV.push({ t: T.thread, type: 'thread', d: 1.6 });++ // ───────── S8 · the one wipe, the right readings, the answer+ T.s8 = T.threadCut; T.wipe0 = Math.max(T.threadEnd + .1, T.n7 + .05); T.wipe1 = T.wipe0 + .75;+ EV.push({ t: T.wipe0, type: 'wipe', d: .75 });+ const WP = [[860, 1412], [1350, 1420], [1590, 1240], [1650, 860], [1666, 500], [1690, 860], [1760, 1240], [2010, 1420], [2500, 1408]];+ const wipe = { t0: T.wipe0, t1: T.wipe1, w: 360, path: catmull(WP, 12) };+ [q1, q1e, q2, q2e, [arr1, arr2, h1, h2]].forEach(a => a.forEach(s => s.wiped = true));+ t = T.wipe1 + .1;+ next = vo('n8', Math.max(next, T.wipe0 - .45));+ const r1 = add(centred('弓 + 手', G1.x, 1345, 100, t, { seed: 31, speed: 90 }), 'FL', 'post'); t = r1.end + .05;+ const r1e = add(centredLatin('bow + hand', G1.x, 1462, 50, t, { seed: 32, lspeed: 110 }), 'FL', 'post'); t = Math.max(r1e.end + .1, T.n8 - 2.2);+ const r2 = add(centred('矢 + 委', G2.x, 1345, 100, t, { seed: 33, speed: 90 }), 'FL', 'post'); t = r2.end + .05;+ const r2e = add(centred('arrow → length · wei → sound', G2.x + 40, 1450, 56, t, { seed: 34, lspeed: 120, latinScale: .74, space: .3, speed: 80 }), 'FL', 'post'); t = r2e.end;+ text('r1', '弓 + 手', 'FL', r1); text('r1e', 'bow + hand', 'FL', r1e); text('r2', '矢 + 委', 'FL', r2); text('r2e', 'arrow → length · wei → sound', 'FL', r2e);+ T.verdict = T.n8 + 1.45; // the verdict waits 1.5 s after the readings are said (same frame: the readings stay)+ next = vo('n9', T.verdict + .05); t = T.verdict;+ const ans = add(writeLine('没弄反', 2620, 560, 124, t, { seed: 35, speed: 40 }), 'FL', 'post'); t = ans.end + .08;+ const tick = add(writeChar('✓', 3090, 540, 140, t, { seed: 37, speed: 60 }), 'FL', 'post'); t = tick.end + .05;+ const anse = add(writeLatin('Not swapped', 2630, 706, 50, t, { seed: 36, lspeed: 90 }), 'FL', 'post'); t = anse.end;+ text('ans', '没弄反', 'FL', ans); text('anse', 'Not swapped', 'FL', anse);+ EV.push({ t: tick.end, type: 'tap', big: 1 });+ T.s9 = Math.max(t + .3, anse[0].t0 + 2.25); T.wall = T.s9 + 1.0;+ T.endc = T.wall + 1.2;+ EV.push({ t: T.s9 + .3, type: 'bell' });+ const wipedIds = { q1: [q1, '一寸高?'], q1e: [q1e, 'An inch tall?'], q2: [q2, '放箭?'], q2e: [q2e, 'Let an arrow fly?'] };+ for (const [id, [st, txt]] of Object.entries(wipedIds)) text(id, txt, 'FL', st, T.wipe0 + .3);++ // ───────── end card · the front panel slides back; on the clean panel behind it, the sign-off is written+ T.back0 = T.endc; T.back1 = T.endc + .85;+ EV.push({ t: T.back0, type: 'slide', d: .85 });+ const e1 = add(centred('汉字的故事', 4800, 740, 200, T.back0 + .2, { seed: 98, speed: 170 }), 'FR');+ const e1e = add(centredLatin('The Story of Chinese Characters', 4800, 990, 70, T.back0 + .7, { seed: 99, lspeed: 420 }), 'FR');+ const c2 = add(centredLatin('LemoLab × Claude Opus 5.5', 4800, 1240, 80, T.back0 + .45, { seed: 97, lspeed: 240 }), 'FR');+ text('end-title', '汉字的故事', 'FR', e1); text('end-title-en', 'The Story of Chinese Characters', 'FR', e1e); text('end-credit', 'LemoLab × Claude Opus 5.5', 'FR', c2);+ T.DUR = +Math.max(c2[0].t0 + 3.0, e1e[0].t0 + needOf('The Story of Chinese Characters') + .05).toFixed(2);++ // ───────── the sliding panel: away at S4, back at the end card+ const slideX = tt => PW * (eio(clamp((tt - T.slide0) / (T.slide1 - T.slide0))) - eio(clamp((tt - T.back0) / (T.back1 - T.back0))));++ // ───────── camera: keys [t, cx, cy, s] in world units, eased between keys; each shot cuts to its own keys+ const QF = { cx: 1800, cy: 901, s: .58 }; // the question / verdict frame (panel-local), clear of the subtitle bar+ const shots = [+ { t0: 0, keys: [[0, 1360, 300, 1.5], [ti.end - .05, 1400, 310, 1.42], [T.dry, QF.cx, QF.cy, QF.s], [T.s2, QF.cx + 10, QF.cy, QF.s]] },+ { t0: T.s2, keys: [[T.s2, 1100, 925, 1.15], [T.wide, 1110, 925, 1.15], [T.wide + .8, QF.cx, QF.cy, QF.s], [T.s4, QF.cx, QF.cy, QF.s]] },+ { t0: T.whip, blur: 3, keys: [[T.whip, 1500, 760, .86], [T.whip + .3, 900, 728, .9], [T.s5a, 900, 728, .9]] },+ { t0: T.s5a + .001, keys: [[T.s5a, 900, 728, .9], [T.s5a + 1.3, 790, 775, 1.15], [starts[2] + .12, 830, 775, 1.15], [starts[2] + .8, 1580, 775, 1.15], [starts[3], 1640, 775, 1.15], [starts[3] + .7, 2250, 775, 1.15], [T.kf + .15, 2260, 776, 1.15], [T.kf + 1.0, 2540, 929, .88], [T.s6, 2550, 930, .885]] },+ { t0: T.s6, keys: [[T.s6, 850, 1440, 1.0], [T.threadCut, 870, 1444, 1.0]] },+ { t0: T.s8, keys: [[T.s8, QF.cx + PW, QF.cy, QF.s], [T.s9, QF.cx + PW, QF.cy, QF.s]] },+ { t0: T.s9, keys: [[T.s9, QF.cx + PW, QF.cy, QF.s], [T.s9 + .5, 5150, 840, .46], [T.wall, 3200, 860, .284], [T.endc, 3200, 862, .283]] },+ { t0: T.endc, keys: [[T.endc, 4800, 1000, .8], [T.DUR, 4800, 996, .81]] },+ ];+ shots.forEach((s, i) => s.t1 = i + 1 < shots.length ? shots[i + 1].t0 : 1e9);+ const camAt = tt => {+ let i = 0; while (i + 1 < shots.length && tt >= shots[i + 1].t0) i++;+ const sh = shots[i], K = sh.keys;+ let k = 0; while (k + 1 < K.length - 1 && tt > K[k + 1][0]) k++;+ const a = K[k], b = K[Math.min(K.length - 1, k + 1)], u = b[0] > a[0] ? eio(clamp((tt - a[0]) / (b[0] - a[0]))) : 1;+ let cx = lerp(a[1], b[1], u), cy = lerp(a[2], b[2], u), s = lerp(a[3], b[3], u);+ if (sh.follow) {+ const gg = Array.isArray(sh.follow) ? sh.follow : [sh.follow], f = front(gg, tt - .15);+ if (f) {+ const fx = f[0] + (gg[0].layer === 'FL' ? slideX(tt) : 0), k2 = sh.followK ?? .5, w = followWeight(gg, tt);+ cx = lerp(cx, lerp(cx, fx, k2), w); cy = lerp(cy, lerp(cy, f[1], k2 * .6), w);+ }+ }+ return { cx, cy, s, shot: i };+ };+ // chalk events for the sound: every stroke, with its length, colour and where it sits across the frame+ for (const st of S) {+ if (st.t1 <= 0 || st.t0 >= T.DUR) continue;+ const c = camAt((st.t0 + st.t1) / 2), p = st.at(st.len / 2), x = p[0] + (st.layer === 'FL' ? slideX(st.t0) : st.layer === 'FR' ? PW : 0);+ const sx = (x - c.cx) * c.s / W * 2;+ if (Math.abs(sx) > 1.3) continue; // off screen: not heard+ EV.push({ t: +st.t0.toFixed(3), type: 'chalk', d: +(st.t1 - st.t0).toFixed(3), len: Math.round(st.len * c.s), color: st.color, pan: +clamp(sx * .6, -.7, .7).toFixed(2), big: st.w > 12 ? 1 : 0 });+ }+ EV.sort((a, b) => a.t - b.t);+ return { S, TX, EV, SUBS, T, wet, wipe, slideX, camAt, shots, DUR: T.DUR, G1, G2, SMALL, FX, FY };+}++// where the writing is now inside a group of strokes (null outside the group's time)+function front(group, t) {+ const g = Array.isArray(group) ? group : [group];+ if (!g.length || t < g[0].t0 - .3 || t > g[g.length - 1].t1 + .3) return null;+ for (let i = 0; i < g.length; i++) {+ const s = g[i]; if (t <= s.t1) { if (t < s.t0) { const p = g[i - 1]; return p ? lerpP(p.end, s.start, (t - p.t1) / Math.max(.01, s.t0 - p.t1)) : s.start; } return s.at(s.prog(t) * s.len); }+ }+ return g[g.length - 1].end;+}+const lerpP = (a, b, u) => [lerp(a[0], b[0], ss(u)), lerp(a[1], b[1], ss(u))];+function followWeight(group, t) {+ const g = Array.isArray(group) ? group : [group], a = g[0].t0, b = g[g.length - 1].t1;+ return ss((t - a + .3) / .5) * (1 - ss((t - b) / .6));+}diff --git a/styles/chalkboard/demo/js/hand.js b/styles/chalkboard/demo/js/hand.jsnew file mode 100644index 0000000..2ffdd64--- /dev/null+++ b/styles/chalkboard/demo/js/hand.js@@ -0,0 +1,183 @@+// Turning stroke data into chalk strokes: the teacher's hard-chalk kai (pressed starts, pressed corners, sharp+// 撇, footed 捺, quick hooks), the child's wobbly even-width hand, and single-line English from an OFL SVG font.+// Every function returns Stroke[] with t0/t1 already set; `clock` is a running time cursor.+import { clamp, lerp } from '/core/lib.js';+import { Stroke, smoothKeepCorners, rng, n1 } from './chalk.js';+import { HZ } from './hz.js';++const sst = (a, b, x) => { const t = clamp((x - a) / (b - a)); return t * t * (3 - 2 * t); };+const g2 = (x, k) => Math.exp(-(x / k) * (x / k));++export function parseStroke(str) {+ const [type, ...ps] = str.trim().split(/\s+/);+ return { type, pts: ps.map(p => p.split(',').map(Number)) };+}++// width along the stroke for the teacher's hand: 起笔顿, 折处顿, 撇出锋, 捺有脚, 钩快提+function profile(type, anchors, wu) {+ const cum = [0]; for (let i = 1; i < anchors.length; i++) cum.push(cum[i - 1] + Math.hypot(anchors[i][0] - anchors[i - 1][0], anchors[i][1] - anchors[i - 1][1]));+ const tot = cum[cum.length - 1] || 1, corners = [];+ for (let i = 1; i < anchors.length - 1; i++) {+ const a = Math.atan2(anchors[i][1] - anchors[i - 1][1], anchors[i][0] - anchors[i - 1][0]), b = Math.atan2(anchors[i + 1][1] - anchors[i][1], anchors[i + 1][0] - anchors[i][0]);+ let d = Math.abs(b - a); if (d > Math.PI) d = 2 * Math.PI - d;+ if (d > .8) corners.push(cum[i] / tot);+ }+ const end = type[type.length - 1], start = type[0], hook = end === 'g' && anchors.length > 2 ? cum[anchors.length - 2] / tot : null;+ return (s, L) => {+ const u = s / L; let m = 1;+ if (start === 'n') m *= .5 + .5 * sst(0, .55, u);+ else if (start === 'd') m *= .5 + .5 * sst(0, .7, u);+ else m *= 1 + .24 * g2(s, wu * 1.7);+ for (const c of corners) if (c !== hook) m *= 1 + .17 * g2(s - c * L, wu * 1.4);+ if (end === 'g') { const hs = hook * L; m *= 1 + .2 * g2(s - hs, wu * 1.2); if (s > hs) m *= lerp(1.05, .3, sst(0, 1, (s - hs) / Math.max(1, L - hs))); }+ else if (end === 'p') m *= 1 - .72 * Math.pow(sst(.28, 1, u), 1.1);+ else if (end === 't') m *= 1.08 - .86 * sst(.12, 1, u);+ else if (end === 'x') m *= 1 - .78 * sst(.62, 1, u);+ else if (end === 'n') m *= u < .8 ? 1 + .5 * sst(.25, .8, u) : 1.5 - 1.2 * sst(.8, 1, u);+ else if (end === 'd') m *= 1 + .3 * sst(.45, .95, u);+ else m *= 1 + .12 * g2(L - s, wu * 1.6);+ return m;+ };+}++// 提按: the chalk presses at the start, lightens through the middle, and either settles (blunt ends) or lifts (points)+function pressureFor(type) {+ const end = type[type.length - 1];+ return (s, L) => { const u = s / L;+ let p = 1.07 - .2 * Math.sin(Math.PI * Math.min(1, u * 1.05)) * .9;+ if ('ptx'.includes(end)) p *= 1 - .22 * sst(.55, 1, u); else if (end !== 'g') p *= 1 + .06 * sst(.8, 1, u);+ return p; };+}++// a Chinese character. o: { hand: 'teacher' | 'child', color, w (half width as a fraction of size), seed,+// rot (deg), speed (size units per second), gap (s between strokes), only: [stroke indices], colors: {i: color} }+export function writeChar(ch, cx, cy, size, clock, o = {}) {+ const data = HZ[ch]; if (!data) throw new Error('no stroke data for ' + ch);+ const child = o.hand === 'child', R = rng((o.seed ?? 1) * 7919 + ch.codePointAt(0)), out = [];+ const rotC = ((o.rot ?? 0) + (child ? (R() - .5) * 12 : (R() - .5) * 1.4)) * Math.PI / 180;+ const sc = size / 100 * (child ? .9 + R() * .2 : 1), dy = child ? (R() - .5) * size * .1 : 0;+ const wu = size * (o.w ?? (child ? .034 : size < 150 ? .038 : .03)); // small writing a little bolder so it reads at 1080p+ let t = clock;+ data.forEach((str, si) => {+ const { type, pts } = parseStroke(str);+ // per-stroke hand: teacher's horizontals rise a little to the right; the child's strokes drift and tilt+ const mx = pts.reduce((a, p) => a + p[0], 0) / pts.length, my = pts.reduce((a, p) => a + p[1], 0) / pts.length;+ const rs = (type[0] === 'h' && !child ? -2.6 : 0) * Math.PI / 180 + (child ? (R() - .5) * .16 : (R() - .5) * .025);+ const jx = (R() - .5) * (child ? 5 : .9), jy = (R() - .5) * (child ? 5 : .9), stretch = child ? .9 + R() * .22 : 1;+ if (o.only && !o.only.includes(si)) return; // (after the random draws, so a part matches the whole)+ const P = pts.map(([x, y]) => {+ let X = mx + ((x - mx) * Math.cos(rs) - (y - my) * Math.sin(rs)) * stretch + jx, Y = my + ((x - mx) * Math.sin(rs) + (y - my) * Math.cos(rs)) * stretch + jy;+ X = (X - 50) * sc; Y = (Y - 50) * sc + dy;+ return [cx + X * Math.cos(rotC) - Y * Math.sin(rotC), cy + X * Math.sin(rotC) + Y * Math.cos(rotC)];+ });+ if (!child && /\p{Script=Han}/u.test(ch)) {+ // a real hand: straight strokes bow very slightly, horizontals arch; 横/竖/折 enter with a short pressed tick from the upper left+ if (P.length === 2) {+ const [a0, a1] = P, dx = a1[0] - a0[0], dy = a1[1] - a0[1], L = Math.hypot(dx, dy) || 1, nx = -dy / L, ny = dx / L;+ const bow = (type[0] === 'h' ? -.018 : (R() - .5) * .024) * L;+ P.splice(1, 0, [(a0[0] + a1[0]) / 2 + nx * bow * Math.sign(ny || 1), (a0[1] + a1[1]) / 2 + ny * bow * Math.sign(ny || 1)]);+ }+ if ('hsz'.includes(type[0]) && type !== 'd') {+ const a0 = P[0], a1 = P[1], dx = a1[0] - a0[0], dy = a1[1] - a0[1], L = Math.hypot(dx, dy) || 1, ux = dx / L, uy = dy / L, k = wu * 1.15;+ // tick comes from 50° to the upper left of the stroke's direction+ const rot = a => [ux * Math.cos(a) - uy * Math.sin(a), ux * Math.sin(a) + uy * Math.cos(a)];+ const A = rot(-2.3), B = rot(2.3), [tx, ty] = A[0] + A[1] < B[0] + B[1] ? A : B; // whichever side is up-left+ P.unshift([a0[0] + tx * k, a0[1] + ty * k]);+ }+ }+ const line = smoothKeepCorners(P, 46, 8);+ const wfn = child ? ((s, L) => (1 + .1 * g2(s, wu * 1.5)) * (1 - .25 * sst(.85, 1, s / L))) : profile(type, P, wu);+ const st = new Stroke(line, {+ kind: 'write', w: wu, color: (o.colors && o.colors[si]) || o.color || (child ? 'kid' : 'white'), wfn, taper: 0, land: .3,+ wob: child ? size * .009 : size * .0025, wav: size * (child ? .35 : .6), skip: child ? .14 : .08, press: child ? .98 : 1.12, clean: child ? 1 : .6,+ endSpecks: true, specks: child ? .6 : 1, seed: (o.seed ?? 1) * 31 + si * 7.7 + ch.codePointAt(0) % 97, R: o.R,+ pfn: child ? null : pressureFor(type),+ });+ const len = st.len, spd = (o.speed ?? 3.4) * size;+ const d = clamp(.02 + len / spd, size < 150 ? .03 : .04, .5) * (type === 'd' ? .8 : 1);+ if (out.length) { const pe = out[out.length - 1].end; t += (o.gap ?? (size < 150 ? .008 : .015)) + Math.hypot(st.start[0] - pe[0], st.start[1] - pe[1]) / (spd * 3); }+ st.t0 = t; st.t1 = t + d; t += d; st.ch = ch; st.si = si;+ out.push(st);+ });+ out.end = t;+ return out;+}++// a run of characters left to right (Chinese, or Latin through the SVG font), baseline-free: cy is the CJK centre line+export function writeLine(text, x, cy, size, clock, o = {}) {+ const out = []; let t = clock, X = x; const R = rng((o.seed ?? 3) * 131);+ for (const ch of [...text]) {+ if (ch === ' ') { X += size * (o.space ?? .38); continue; }+ if (HZ[ch]) {+ const k = o.hand === 'child' ? .92 + R() * .2 : 1, sz = size * k * (('?·'.includes(ch)) ? .8 : /[0-9]/.test(ch) ? .9 : 1);+ const adv = size * (o.track ?? 1.04) * (ch === '·' ? .5 : ch === '?' ? .78 : /[0-9]/.test(ch) ? .58 : 1) * (o.hand === 'child' ? .94 + R() * .14 : 1);+ const s = writeChar(ch, X + adv * (ch === '?' ? (o.hand === 'child' ? .08 : .3) : .5), cy, sz, t, { ...o, seed: (o.seed ?? 1) + out.length }); // ? sits close to its sentence+ out.push(...s); t = s.end + (o.cgap ?? .02); X += adv;+ } else {+ const s = writeLatin(ch, X, cy + size * .3, size * (o.latinScale ?? .62), t, o);+ out.push(...s); t = s.end; X = s.x;+ }+ }+ out.end = t; out.x = X;+ return out;+}++// ───────── single-line Latin from an SVG font (EMS family, OFL)+const FONTS = {};+export async function loadSvgFont(url, name = 'main') {+ const txt = await (await fetch(url)).text(), doc = new DOMParser().parseFromString(txt, 'image/svg+xml');+ const ff = doc.querySelector('font-face'), upm = +ff.getAttribute('units-per-em') || 1000, def = +doc.querySelector('font').getAttribute('horiz-adv-x') || 500;+ const G = {};+ for (const g of doc.querySelectorAll('glyph')) {+ const u = g.getAttribute('unicode'); if (!u || [...u].length !== 1) continue;+ G[u] = { adv: +(g.getAttribute('horiz-adv-x') || def), paths: pathToPolys(g.getAttribute('d') || '') };+ }+ return (FONTS[name] = { G, upm, cap: +(ff.getAttribute('cap-height') || 700) });+}+function pathToPolys(d) {+ const tok = d.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/g) || [], out = []; let i = 0, cmd = '', x = 0, y = 0, cur = null, sx = 0, sy = 0;+ const num = () => +tok[i++];+ while (i < tok.length) {+ if (/[a-zA-Z]/.test(tok[i])) cmd = tok[i++];+ const rel = cmd === cmd.toLowerCase(), C = cmd.toUpperCase();+ if (C === 'M') { x = num() + (rel ? x : 0); y = num() + (rel ? y : 0); sx = x; sy = y; cur = [[x, y]]; out.push(cur); cmd = rel ? 'l' : 'L'; }+ else if (C === 'L') { x = num() + (rel ? x : 0); y = num() + (rel ? y : 0); cur.push([x, y]); }+ else if (C === 'H') { x = num() + (rel ? x : 0); cur.push([x, y]); }+ else if (C === 'V') { y = num() + (rel ? y : 0); cur.push([x, y]); }+ else if (C === 'C' || C === 'Q') {+ const n = C === 'C' ? 3 : 2, p = []; for (let k = 0; k < n; k++) { p.push([num() + (rel ? x : 0), num() + (rel ? y : 0)]); }+ const P0 = [x, y];+ for (let k = 1; k <= 10; k++) {+ const t = k / 10, u = 1 - t;+ if (n === 3) cur.push([u * u * u * P0[0] + 3 * u * u * t * p[0][0] + 3 * u * t * t * p[1][0] + t * t * t * p[2][0], u * u * u * P0[1] + 3 * u * u * t * p[0][1] + 3 * u * t * t * p[1][1] + t * t * t * p[2][1]]);+ else cur.push([u * u * P0[0] + 2 * u * t * p[0][0] + t * t * p[1][0], u * u * P0[1] + 2 * u * t * p[0][1] + t * t * p[1][1]]);+ }+ [x, y] = p[n - 1];+ }+ else if (C === 'Z') { cur && cur.push([sx, sy]); x = sx; y = sy; }+ else i++;+ }+ return out.filter(p => p.length > 1);+}+// one Latin string: baseline at by, cap height `cap`; returns strokes and the end x+export function writeLatin(text, x, by, cap, clock, o = {}) {+ const F = FONTS[o.font || (o.hand === 'child' && FONTS.child ? 'child' : 'main')], k = cap / F.cap, out = [], R = rng((o.seed ?? 5) * 17 + text.length);+ const child = o.hand === 'child', slant = (o.slant ?? (child ? .06 : .1)), wu = cap * (o.lw ?? (child ? .075 : .068));+ let X = x, t = clock;+ for (const ch of [...text]) {+ const g = F.G[ch]; if (!g) { X += 300 * k; continue; }+ const dy = child ? (R() - .5) * cap * .12 : 0, sk = child ? .92 + R() * .16 : 1;+ for (const poly of g.paths) {+ const P = poly.map(([px, py]) => { const yy = py * sk; return [X + (px + yy * slant) * k, by - yy * k + dy]; });+ const st = new Stroke(P, { kind: 'write', w: wu, color: o.color || (child ? 'kid' : 'white'), taper: .12, taperLen: .2, land: .6,+ wob: child ? cap * .02 : cap * .006, wav: cap * 1.4, skip: .15, press: child ? .85 : 1, endSpecks: true, specks: .5, seed: (o.seed ?? 5) * 13 + out.length * 3.1, R: o.R });+ const d = clamp(.025 + st.len / (cap * (o.lspeed ?? 40)), .025, .25);+ if (out.length) t += .008;+ st.t0 = t; st.t1 = t + d; t += d; out.push(st);+ }+ X += g.adv * k * (child ? .95 + R() * .12 : 1) * (o.ltrack ?? 1);+ }+ out.end = t; out.x = X;+ return out;+}+export const latinWidth = (text, cap, font = 'main') => { const F = FONTS[font], k = cap / F.cap; return [...text].reduce((a, c) => a + (F.G[c]?.adv ?? 300) * k, 0); };diff --git a/styles/chalkboard/demo/js/hz.js b/styles/chalkboard/demo/js/hz.jsnew file mode 100644index 0000000..5464719--- /dev/null+++ b/styles/chalkboard/demo/js/hz.js@@ -0,0 +1,102 @@+// Hand-authored stroke data for every Chinese character in the film (our own data, released with the demo).+// Each character is its strokes in writing order (GF 0023-2020). A stroke is "type x,y x,y …": the centre line+// through its anchor points in a 100 × 100 box (y down). Proportions were checked by eye against LXGW WenKai+// (OFL 1.1) set behind the data; no outline was copied.+// The type sets how the chalk presses along the stroke (see hand.js):+// h 横 s 竖 p 撇 n 捺 d 点 t 提 x 悬针竖 z… turns (横折, 撇点 …): corners pressed+// last letter g = ends in a hook; last letter p / t = ends in a point; d = ends in a dot+export const HZ = {+ 射: ['p 33,9 28,17 24,23', 's 17,23 17,64', 'zg 17,23 44,22 44,94 30,87', 'h 18,36 43,35', 'h 18,48 43,47', 't 5,66 43,57',+ 'p 52,46 38,66 22,80 3,89', 'h 49,36 98,33', 'sg 84,11 84,94 69,87', 'd 57,51 68,65'],+ 矮: ['p 18,14 14,32 8,48', 'h 18,31 38,30', 'h 7,52 40,51', 'p 25,30 24,58 15,78 5,93', 'd 27,67 41,83',+ 'p 85,10 66,18 46,24', 'h 54,31 93,29', 's 70,22 70,54', 'p 69,34 55,47 40,57', 'd 72,35 97,51',+ 'zd 62,54 53,74 92,93', 'p 78,62 70,80 38,96', 'h 39,64 98,61'],+ 身: ['p 52,6 47,14 43,20', 's 27,20 27,61', 'zg 27,20 70,19 71,94 50,87', 'h 28,33 70,32', 'h 28,45 70,44', 't 9,66 71,57',+ 'p 89,40 60,68 30,84 3,93'],+ 寸: ['h 7,36 95,33', 'sg 63,8 64,94 40,85', 'd 27,50 43,68'],+ 弓: ['z 22,18 79,16 76,38', 'h 30,39 77,37', 'zg 29,38 24,60 79,57 75,80 70,96 46,87'],+ 手: ['p 75,10 48,19 20,26', 'h 22,40 79,37', 'h 6,60 96,55', 'sg 52,23 55,60 55,94 30,84'],+ 矢: ['p 40,11 32,30 17,48', 'h 34,26 78,24', 'h 9,55 91,51', 'p 50,26 48,50 35,72 8,93', 'n 50,58 70,80 92,94'],+ 委: ['p 77,10 54,17 30,22', 'h 18,31 89,28', 's 53,18 54,52', 'p 52,33 35,47 10,55', 'd 56,34 96,52',+ 'zd 47,53 32,79 83,96', 'p 69,60 55,82 15,96', 'h 8,68 97,64'],+ 没: ['d 17,13 31,26', 'd 8,36 24,48', 't 6,90 29,57', 'p 45,14 44,32 32,51', 'z 46,19 70,18 71,38 92,41',+ 'zp 39,53 77,52 57,80 25,97', 'n 45,63 71,85 97,96'],+ 弄: ['h 23,15 85,12', 'h 28,32 79,30', 's 53,15 53,46', 'h 20,48 83,45', 'h 7,70 95,66', 'p 38,56 36,75 13,96', 's 67,52 67,97'],+ 反: ['p 77,10 50,18 25,22', 'p 24,21 23,55 15,76 6,92', 'zp 30,40 78,37 55,74 18,97', 'n 40,49 70,78 95,94'],+ 了: ['zp 18,17 80,15 51,40', 'sg 47,38 54,52 55,94 30,82'],+ 和: ['p 47,9 30,19 10,27', 'h 8,38 52,36', 's 29,23 30,96', 'p 29,45 16,66 5,80', 'd 34,48 50,64', 's 58,32 60,78',+ 'z 59,32 90,31 88,70', 'h 61,68 87,67'],+ 是: ['s 28,13 32,45', 'z 30,14 75,12 72,40', 'h 32,27 72,26', 'h 32,41 72,40', 'h 13,53 89,50', 's 54,52 53,85',+ 'h 55,67 78,66', 'p 36,60 26,79 6,96', 'n 28,79 55,90 97,93'],+ 不: ['h 10,18 88,15', 'p 61,19 44,47 5,75', 's 45,40 46,96', 'd 60,47 89,71'],+ 月: ['p 28,14 27,58 17,82 7,96', 'zg 29,15 76,14 77,93 59,84', 'h 30,40 76,38', 'h 29,61 76,59'],+ 日: ['s 22,18 25,95', 'z 23,18 77,16 74,86', 'h 26,52 73,50', 'h 28,85 74,83'],+ 星: ['s 25,15 28,43', 'z 27,15 77,13 74,40', 'h 28,28 74,26', 'h 29,42 74,40', 'p 33,47 25,63 9,76', 'h 26,60 81,57',+ 'h 27,74 80,72', 's 53,49 53,90', 'h 9,90 95,87'],+ 期: ['h 9,27 52,25', 's 18,13 19,68', 's 41,12 42,66', 'h 20,39 41,38', 'h 20,53 41,52', 'h 6,69 54,67', 'p 22,78 14,88 6,95',+ 'd 36,78 45,88', 'p 60,17 59,60 52,80 45,95', 'zg 61,18 82,17 82,93 68,86', 'h 62,38 81,37', 'h 62,57 81,56'],+ 三: ['h 18,24 82,21', 'h 25,50 79,48', 'h 7,82 96,79'],+ 甲: ['s 17,15 21,64', 'z 19,15 82,13 78,57', 'h 22,35 79,33', 'h 22,57 79,55', 'x 47,17 48,98'],+ 骨: ['s 27,12 28,38', 'z 28,12 73,10 70,37', 'z 35,25 54,24 54,38', 'd 18,33 13,54', 'zg 20,40 89,37 77,54',+ 's 28,51 30,98', 'zg 29,52 73,50 74,97 56,87', 'h 31,63 72,62', 'h 31,76 72,75'],+ 文: ['d 47,10 48,27', 'h 10,30 92,27', 'p 74,32 55,64 30,83 6,95', 'n 27,33 55,68 92,94'],+ 金: ['p 52,7 32,32 6,55', 'n 52,20 75,40 97,52', 'h 32,42 74,40', 'h 22,59 82,56', 's 53,44 53,90', 'd 29,67 40,82',+ 'p 74,64 66,79 57,87', 'h 8,91 97,88'],+ 小: ['sg 52,9 53,92 30,82', 'p 31,33 21,56 7,74', 'd 70,34 92,71'],+ 篆: ['p 28,8 18,24 9,34', 'h 19,18 47,16', 'd 31,21 38,30', 'p 66,7 58,22 50,30', 'h 61,15 91,13', 'd 68,20 77,29',+ 'z 39,30 69,29 66,49', 'h 35,40 67,39', 'h 12,52 92,50', 'p 44,56 30,64 15,69', 'zg 49,56 60,72 56,95 41,90',+ 'p 46,68 30,78 14,83', 'p 50,75 30,88 8,93', 'p 77,58 68,66 58,71', 'n 59,69 78,82 95,88'],+ 楷: ['h 8,38 38,36', 's 22,10 23,96', 'p 22,40 13,62 5,78', 'd 26,48 36,61', 'h 45,27 60,25', 'zt 44,11 44,47 63,40',+ 'p 84,21 76,28 68,33', 'zg 70,9 70,42 75,46 93,46 94,32', 'p 63,49 57,57', 's 45,58 46,96', 'z 46,58 83,57 82,95',+ 'h 48,75 81,74', 'h 48,91 81,90'],+ 书: ['z 24,28 71,27 68,51', 'zg 10,54 90,52 86,80 82,90 64,79', 's 47,8 47,98', 'd 70,15 83,29'],+ 一: ['h 7,50 94,47'],+ 高: ['d 47,7 49,20', 'h 11,22 88,19', 's 31,30 33,48', 'z 32,30 70,29 67,46', 'h 34,46 66,45', 's 17,55 18,97',+ 'zg 18,55 78,53 78,95 64,88', 's 35,66 36,86', 'z 36,66 64,65 61,80', 'h 37,81 61,80'],+ 放: ['d 24,12 26,27', 'h 6,31 50,29', 'zg 25,46 40,45 37,90 18,80', 'p 25,34 18,65 4,88', 'p 64,9 52,38 44,57',+ 'h 58,32 93,30', 'p 84,33 72,65 41,96', 'n 59,40 72,68 98,95'],+ 箭: ['p 30,8 20,25 10,37', 'h 20,22 48,19', 'd 31,26 37,33', 'p 66,7 58,21 50,31', 'h 60,20 93,17', 'd 66,25 76,33',+ 'd 36,36 43,42', 'p 66,34 58,42', 'h 9,46 94,42', 's 21,55 22,95', 'zg 22,55 46,54 46,94 35,88', 'h 23,68 45,67',+ 'h 23,79 45,78', 's 61,56 62,80', 'sg 78,50 79,95 62,87'],+ 疾: ['d 55,6 56,20', 'h 24,23 91,20', 'p 25,24 23,62 16,82 9,96', 'd 9,33 19,49', 't 5,64 23,55', 'p 50,31 43,48 36,60',+ 'h 47,44 81,42', 'h 34,63 91,60', 'p 60,45 57,68 29,96', 'n 61,67 78,84 96,94'],+ 侯: ['p 36,10 22,38 4,58', 's 26,38 26,96', 'z 43,18 76,15 75,33', 'h 35,33 92,31', 'p 50,37 43,51 37,62', 'h 47,48 84,46',+ 'h 32,66 95,63', 'p 61,48 58,70 29,96', 'n 62,68 78,84 96,93'],+ 短: ['p 19,12 15,32 8,48', 'h 18,30 40,28', 'h 5,55 46,53', 'p 27,30 27,60 17,80 5,92', 'd 28,64 42,81', 'h 42,19 91,16',+ 's 48,34 50,62', 'z 49,34 81,33 79,58', 'h 51,57 79,56', 'd 55,67 63,81', 'p 82,67 77,78 70,87', 'h 38,92 97,89'],+ 以: ['zt 23,18 23,78 52,62', 'd 40,27 55,44', 'p 79,15 72,48 55,74 36,92', 'n 66,64 80,78 96,91'],+ 为: ['d 24,10 39,23', 'zg 16,35 86,33 81,80 77,92 55,80', 'p 51,13 45,50 30,75 6,96', 'd 42,48 57,67'],+ 正: ['h 18,20 85,17', 's 52,18 52,88', 'h 53,53 82,51', 's 27,42 28,88', 'h 6,91 97,88'],+ 尺: ['z 25,16 75,14 71,42', 'h 28,44 74,43', 'p 25,16 26,48 20,74 6,95', 'n 42,48 62,72 96,92'],+ 长: ['p 72,12 55,26 35,38', 'h 8,48 93,45', 'zt 28,10 28,82 48,72', 'n 42,52 66,74 96,92'],+ 读: ['d 14,12 24,24', 'zt 6,40 19,40 19,82 31,72', 'h 42,16 90,14', 's 66,6 66,30', 'zg 40,32 86,30 80,42', 'd 52,40 59,47',+ 'd 52,51 59,58', 'h 36,62 95,59', 'p 70,45 66,72 40,94', 'd 69,78 92,94'],+ 音: ['d 49,6 51,18', 'h 18,22 82,20', 'd 32,28 38,40', 'p 68,27 62,40', 'h 9,46 92,43', 's 24,55 25,95', 'z 25,55 75,53 73,95',+ 'h 26,74 73,73', 'h 27,93 73,92'],+ 吗: ['s 11,26 14,70', 'z 13,27 33,26 31,58', 'h 16,59 31,58', 'z 42,14 80,13 70,52', 'zg 48,30 44,57 88,55 86,80 80,96 64,88', 'h 37,72 75,70'],+ 汉: ['d 20,14 36,30', 'd 12,38 30,52', 't 15,90 39,57', 'zp 42,26 84,22 70,54 52,76 30,96', 'n 52,34 70,64 98,95'],+ 字: ['d 51,8 52,24', 'd 18,26 12,46', 'zg 16,28 81,24 72,42', 'zp 32,45 72,42 52,58', 'sg 52,58 56,94 38,86', 'h 6,71 96,67'],+ 的: ['p 26,14 22,32', 's 14,38 15,95', 'z 15,38 51,36 50,92', 'h 16,61 50,60', 'h 16,89 50,88', 'p 66,12 54,40 46,55', 'zg 60,38 88,36 87,94 72,88', 'd 58,57 70,71'],+ 故: ['h 6,40 46,38', 's 26,14 27,57', 's 15,62 17,93', 'z 17,63 44,61 42,90', 'h 18,89 43,88', 'p 66,10 57,38 47,52', 'h 58,38 95,35', 'p 84,40 70,72 42,98', 'n 60,44 74,72 98,95'],+ 事: ['h 10,19 92,17', 's 22,28 24,42', 'z 23,28 76,26 74,41', 'h 25,42 74,41', 'z 22,52 82,50 78,77', 'h 6,64 98,62', 'h 22,77 78,76', 'sg 52,6 52,95 34,86'],+ 黑: ['s 24,15 25,47', 'z 25,15 80,13 78,40', 'd 31,25 39,35', 'p 70,20 63,29 56,36', 'h 27,42 78,41', 's 48,14 48,68', 'h 25,54 77,52',+ 'h 9,69 91,66', 'p 21,78 15,86 10,93', 'd 33,77 42,92', 'd 54,78 66,91', 'd 75,77 93,94'],+ 板: ['h 8,38 40,36', 's 26,10 26,96', 'p 26,40 16,62 5,82', 'd 30,48 40,64', 'p 93,10 70,18 48,22', 'p 47,24 47,55 40,78 32,94',+ 'zp 51,44 89,42 76,68 41,96', 'n 55,52 72,78 94,94'],+ 粉: ['d 15,22 22,38', 'p 38,20 32,36 26,46', 'h 6,51 42,49', 's 22,11 22,96', 'p 22,52 14,70 4,86', 'd 26,58 36,72',+ 'p 64,13 58,36 46,57', 'n 72,13 84,38 98,58', 'zg 54,52 90,50 86,90 76,92 60,82', 'p 70,57 64,80 46,95'],+ 笔: ['p 31,10 18,30 6,44', 'h 20,23 56,20', 'd 29,30 40,40', 'p 67,8 60,24 50,35', 'h 63,22 96,19', 'd 69,31 82,42',+ 'p 82,44 52,51 16,55', 'h 13,60 82,57', 'h 6,78 95,71', 'zg 46,40 47,76 50,90 60,94 86,94 92,78'],+ // digits for the date (teacher's hand)+ '0': ['s 50,12 36,22 30,50 35,80 50,90 65,80 70,50 64,22 50,12'],+ '1': ['z 36,28 54,12 54,90'],+ '2': ['z 31,30 38,16 53,11 67,18 69,33 60,50 30,88 74,86'],+ '8': ['s 64,22 51,12 37,19 37,33 51,46 66,59 67,78 51,90 35,80 35,62 51,46 65,33 64,22'],+ // punctuation and signs, drawn the same way+ '?': ['s 30,28 37,16 50,11 62,14 69,25 65,37 53,46 49,56 49,66', 'd 47,82 50,91'],+ '+': ['h 18,52 82,50', 's 50,20 50,82'],+ '←': ['h 92,52 10,50', 'zp 30,30 10,50 30,70'],+ '→': ['h 8,50 90,52', 'zp 70,30 90,52 70,72'],+ '·': ['d 44,44 56,57'],+ '✓': ['zp 12,50 38,80 92,10'],+};diff --git a/styles/chalkboard/demo/js/lab.js b/styles/chalkboard/demo/js/lab.jsnew file mode 100644index 0000000..ceec680--- /dev/null+++ b/styles/chalkboard/demo/js/lab.js@@ -0,0 +1,29 @@+// Check page (?lab=hz): every character's chalk strokes over LXGW WenKai (red, behind) on the same 100-unit box,+// to see proportions while authoring hz.js. ?lab=latin shows the single-line fonts. Not part of the film.+import { bake, drawStroke } from './chalk.js';+import { HZ } from './hz.js';+import { writeChar, writeLatin, loadSvgFont } from './hand.js';+export async function run(cv, W, H, Q) {+ const o = new OffscreenCanvas(W, H), x = o.getContext('2d');+ x.fillStyle = '#132219'; x.fillRect(0, 0, W, H);+ if (Q.get('lab') === 'latin') {+ let y = 120;+ for (const f of ['EMSDelight', 'EMSCasualHand']) {+ await loadSvgFont('fonts/' + f + '.svg');+ const s = writeLatin(f + ': An inch tall? Let an arrow fly. body <- bow 10 28', 40, y, 54, -5);+ s.forEach(st => { bake(st, 1.5); drawStroke(x, st, 1e9); }); y += 160;+ }+ } else {+ await document.fonts.load('100px WenKaiRef');+ const chars = [...(Q.get('chars') || Object.keys(HZ).join(''))], S = +(Q.get('size') || 200), cols = Math.floor(W / (S + 20));+ chars.forEach((ch, i) => {+ const ox = 10 + (i % cols) * (S + 20), oy = 10 + Math.floor(i / cols) * (S + 20);+ x.strokeStyle = 'rgba(200,180,110,.25)'; x.strokeRect(ox, oy, S, S);+ x.font = `${S}px WenKaiRef`; x.fillStyle = 'rgba(220,60,60,.45)'; x.textBaseline = 'alphabetic'; x.fillText(ch, ox, oy + S * .88);+ const st = writeChar(ch, ox + S / 2, oy + S / 2, S, -10, { hand: Q.get('hand') || 'teacher', seed: 3 });+ st.forEach(s => { bake(s, 1); drawStroke(x, s, 1e9); });+ });+ }+ const c = cv.getContext('2d'); c.drawImage(o, 0, 0);+ window.render = () => {};+}diff --git a/styles/chalkboard/demo/js/post.js b/styles/chalkboard/demo/js/post.jsnew file mode 100644index 0000000..79339f7--- /dev/null+++ b/styles/chalkboard/demo/js/post.js@@ -0,0 +1,55 @@+// WebGL2 post pass only: camera motion blur, lens vignette, a gentle filmic grade and dither over the finished+// Canvas 2D frame. It draws nothing of its own.+const VS = `#version 300 es+in vec2 p; void main(){ gl_Position = vec4(p, 0., 1.); }`;+const FS = `#version 300 es+precision highp float;+uniform vec2 uRes; uniform sampler2D tSrc; uniform mat3 uBlur; uniform float uVig, uSeed;+out vec4 o;+float hsh(vec2 p){ p = fract(p * vec2(123.34, 456.21)); p += dot(p, p + 45.32); return fract(p.x * p.y); }+vec3 at(vec2 px){ return texture(tSrc, px / uRes).rgb; }+void main(){+ vec2 px = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y);+ vec2 pp = (uBlur * vec3(px, 1.)).xy, v = px - pp; float lv = length(v);+ vec3 c;+ if (lv > .6) { int n = int(clamp(lv / 1.5, 4., 24.)); c = vec3(0.);+ for (int i = 0; i < 24; i++){ if (i >= n) break; c += at(pp + v * ((float(i) + .5) / float(n))); } c /= float(n); }+ else c = at(px);+ vec2 q = (px / uRes - .5) * vec2(1., uRes.y / uRes.x) * 2.;+ c *= 1. - uVig * smoothstep(.35, 1.25, length(q * vec2(.92, 1.25)));+ c = max(c, 0.); c = c * (1. + c * .08) / (1. + c * .55) * 1.5;+ float l = dot(c, vec3(.3, .55, .15));+ c += vec3(-.006, .002, .010) * (1. - smoothstep(0., .25, l));+ c *= mix(vec3(1.), vec3(1.025, 1.0, .965), smoothstep(.4, .95, l));+ c = mix(vec3(l), c, 1.04);+ c += (hsh(px + uSeed * 91.) - .5) / 255.;+ o = vec4(clamp(c, 0., 1.), 1.);+}`;+export class Post {+ constructor(canvas, W, H) {+ const gl = canvas.getContext('webgl2', { preserveDrawingBuffer: true, antialias: false, premultipliedAlpha: false });+ if (!gl) throw new Error('WebGL2 not available');+ this.gl = gl; this.W = W; this.H = H;+ const p = gl.createProgram();+ for (const [type, src] of [[gl.VERTEX_SHADER, VS], [gl.FRAGMENT_SHADER, FS]]) {+ const s = gl.createShader(type); gl.shaderSource(s, src); gl.compileShader(s);+ if (!gl.getShaderParameter(s, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s)); gl.attachShader(p, s);+ }+ gl.bindAttribLocation(p, 0, 'p'); gl.linkProgram(p); this.p = p;+ const b = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, b); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);+ gl.enableVertexAttribArray(0); gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);+ this.tex = gl.createTexture();+ }+ draw(src, blur, t, vig = .42) {+ const gl = this.gl;+ gl.bindTexture(gl.TEXTURE_2D, this.tex);+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false); gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src);+ for (const [k, v] of [[gl.TEXTURE_MIN_FILTER, gl.LINEAR], [gl.TEXTURE_MAG_FILTER, gl.LINEAR], [gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE], [gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE]]) gl.texParameteri(gl.TEXTURE_2D, k, v);+ gl.useProgram(this.p); gl.viewport(0, 0, this.W, this.H);+ const U = n => gl.getUniformLocation(this.p, n);+ gl.uniform2f(U('uRes'), this.W, this.H); gl.uniformMatrix3fv(U('uBlur'), false, blur); gl.uniform1f(U('uVig'), vig); gl.uniform1f(U('uSeed'), t);+ gl.activeTexture(gl.TEXTURE0); gl.uniform1i(U('tSrc'), 0);+ gl.drawArrays(gl.TRIANGLES, 0, 3); gl.finish();+ }+}diff --git a/styles/chalkboard/demo/js/props.js b/styles/chalkboard/demo/js/props.jsnew file mode 100644index 0000000..002d93d--- /dev/null+++ b/styles/chalkboard/demo/js/props.js@@ -0,0 +1,122 @@+// Things that live in front of the board. There is no hand, no chalk stick and no eraser object:+// strokes grow by themselves; the only sign of "where the chalk is" is the growing front itself,+// a few loose grains and a faint glint. A Track is an invisible pen path used for timing and for+// the follow camera; a Wipe is the eraser's footprint moving across the board on its own.+import { clamp, lerp } from '/core/lib.js';+import { COLORS, rng } from './chalk.js';++const ss = t => { t = clamp(t); return t * t * (3 - 2 * t); };+const eo = t => 1 - Math.pow(1 - clamp(t), 3);+const css = (c, k = 1, a = 1) => `rgba(${Math.round(clamp(c[0] * k) * 255)},${Math.round(clamp(c[1] * k) * 255)},${Math.round(clamp(c[2] * k) * 255)},${a})`;++// ───────── an invisible pen: a sequence of strokes; front(t) = where the writing is now+export class Track {+ constructor(id) { this.id = id; this.jobs = []; }+ add(st) { this.jobs.push(st); this.jobs.sort((a, b) => a.t0 - b.t0); }+ front(t) {+ const J = this.jobs; if (!J.length) return null;+ if (t <= J[0].t0) return J[0].start.slice();+ for (let i = 0; i < J.length; i++) {+ const s = J[i];+ if (t <= s.t1) return s.at(s.prog(t) * s.len);+ const n = J[i + 1];+ if (n && t < n.t0) { const u = ss((t - s.t1) / (n.t0 - s.t1)); return [lerp(s.end[0], n.start[0], u), lerp(s.end[1], n.start[1], u)]; }+ }+ return J[J.length - 1].end.slice();+ }+}++// ───────── the eraser's footprint, moving on its own: [[t, x, y, ang], ...]+export class Wipe {+ // path: [[t, x, y], ...] — a smooth Catmull–Rom gesture through the keys; the footprint's long side stays across the motion+ constructor(path, o = {}) { this.path = path; this.w = o.w ?? 250; this.h = o.h ?? 100; this.t0 = path[0][0]; this.t1 = path[path.length - 1][0]; }+ pos(t) {+ const P = this.path, n = P.length; t = clamp(t, this.t0, this.t1);+ let i = 0; while (i < n - 2 && t > P[i + 1][0]) i++;+ const u = (t - P[i][0]) / (P[i + 1][0] - P[i][0]), p0 = P[Math.max(0, i - 1)], p1 = P[i], p2 = P[i + 1], p3 = P[Math.min(n - 1, i + 2)];+ const u2 = u * u, u3 = u2 * u, c = j => .5 * (2 * p1[j] + (-p0[j] + p2[j]) * u + (2 * p0[j] - 5 * p1[j] + 4 * p2[j] - p3[j]) * u2 + (-p0[j] + 3 * p1[j] - 3 * p2[j] + p3[j]) * u3);+ return [c(1), c(2)];+ }+ at(t) {+ const a = this.pos(t - .004), b = this.pos(t + .004), p = this.pos(t);+ return [p[0], p[1], Math.atan2(b[1] - a[1], b[0] - a[0]) + Math.PI / 2];+ }+}++// ───────── chalk dust: deterministic particles (positions are closed-form in time)+export class Dust {+ constructor() { this.p = []; this.puffs = []; this.sprites = {}; }+ emit(t, x, y, n, o = {}) {+ const R = rng(Math.floor(t * 1000 + x * 3 + y * 7));+ for (let i = 0; i < n; i++) {+ const a = (o.dir ?? -Math.PI / 2) + (R() - .5) * (o.spread ?? 6.28), sp = (o.speed ?? 60) * (.3 + R());+ this.p.push({ t0: t + R() * (o.dt ?? 0), x: x + (R() - .5) * (o.jx ?? 6), y: y + (R() - .5) * (o.jy ?? 6), vx: Math.cos(a) * sp + (o.vx ?? 0), vy: Math.sin(a) * sp + (o.vy ?? 0),+ life: (o.life ?? 1.2) * (.5 + R()), size: (o.size ?? 1.4) * (.5 + R() * 1.1), a: (o.a ?? .7) * (.4 + R() * .6), col: o.color || 'white', seed: R() * 100, g: (o.g ?? 90) * (.6 + R() * .8) });+ }+ }+ puff(t, x, y, r, o = {}) { this.puffs.push({ t0: t, x, y, r, life: o.life ?? .6, a: o.a ?? .25, vx: o.vx ?? 0, vy: o.vy ?? -10, grow: o.grow ?? 1.8, col: o.color || 'white' }); }+ sprite(col) {+ if (this.sprites[col]) return this.sprites[col];+ const k = COLORS[col] || COLORS.white;+ const c = new OffscreenCanvas(32, 32), x = c.getContext('2d'), g = x.createRadialGradient(16, 16, 0, 16, 16, 16);+ g.addColorStop(0, css(k, 1.05, 1)); g.addColorStop(.35, css(k, 1, .8)); g.addColorStop(1, css(k, 1, 0));+ x.fillStyle = g; x.fillRect(0, 0, 32, 32);+ const c2 = new OffscreenCanvas(128, 128), y = c2.getContext('2d');+ for (let i = 0; i < 14; i++) {+ const R = rng(i + 5), cx = 64 + (R() - .5) * 40, cy = 64 + (R() - .5) * 40, rr = 18 + R() * 26, gg = y.createRadialGradient(cx, cy, 0, cx, cy, rr);+ gg.addColorStop(0, css(k, 1, .22)); gg.addColorStop(1, css(k, 1, 0)); y.fillStyle = gg; y.fillRect(0, 0, 128, 128);+ }+ return (this.sprites[col] = { dot: c, puff: c2 });+ }+ draw(ctx, t, cam) {+ const s = cam.s;+ for (const q of this.puffs) {+ const u = (t - q.t0) / q.life; if (u < 0 || u > 1) continue;+ const r = q.r * (1 + q.grow * eo(u)) * s, [x, y] = cam.toScreen(q.x + q.vx * u * q.life, q.y + q.vy * u * q.life);+ ctx.globalAlpha = q.a * Math.sin(Math.PI * Math.min(1, u * 4) / 2) * (1 - u) * (1 - u);+ ctx.drawImage(this.sprite(q.col).puff, x - r, y - r, r * 2, r * 2);+ }+ for (const q of this.p) {+ const tau = t - q.t0; if (tau < 0 || tau > q.life) continue;+ const k = 5, e = (1 - Math.exp(-k * tau)) / k; // drag-damped launch, then a slow fall with a little turbulence+ const x = q.x + q.vx * e + Math.sin(tau * 3 + q.seed) * 6 * tau, y = q.y + q.vy * e + q.g * (tau - e) / k * 2.2 + Math.cos(tau * 2.3 + q.seed) * 3 * tau;+ const [sx, sy] = cam.toScreen(x, y);+ if (sx < -20 || sy < -20 || sx > cam.W + 20 || sy > cam.H + 20) continue;+ const u = tau / q.life, sz = Math.max(1.1, q.size * s * 1.8);+ ctx.globalAlpha = q.a * Math.min(1, tau * 30) * (1 - u * u);+ ctx.drawImage(this.sprite(q.col).dot, sx - sz, sy - sz, sz * 2, sz * 2);+ }+ ctx.globalAlpha = 1;+ }+}++// the writing position: a few bright grains and a faint glint right at the growing front+export function drawFront(ctx, t, cam, x, y, color, w, k = 1) {+ const [sx, sy] = cam.toScreen(x, y), s = cam.s, col = COLORS[color] || COLORS.white;+ const R = rng(Math.floor(t * 240) * 7 + 3);+ const r = Math.max(5, w * s * 1.6);+ const g = ctx.createRadialGradient(sx, sy, 0, sx, sy, r * 1.8);+ g.addColorStop(0, css(col, 1.25, .32 * k)); g.addColorStop(.35, css(col, 1.1, .12 * k)); g.addColorStop(1, css(col, 1, 0));+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(sx, sy, r * 1.8, 0, 6.29); ctx.fill();+ for (let i = 0; i < 9; i++) {+ const a = R() * 6.28, d = Math.pow(R(), .7) * r * 1.3, z = .8 + R() * 1.6;+ ctx.fillStyle = css(col, 1.3, (.45 + R() * .55) * k);+ ctx.fillRect(sx + Math.cos(a) * d - z / 2, sy + Math.sin(a) * d - z / 2, z, z);+ }+ ctx.fillStyle = `rgba(255,255,250,${.75 * k})`; ctx.fillRect(sx - 1, sy - 1, 2, 2);+}++// out-of-focus motes between the lens and the board (parallax depth layer)+export function drawMotes(ctx, t, cam, W, H) {+ const R = rng(77);+ for (let i = 0; i < 22; i++) {+ const depth = .45 + R() * .5, bx = R() * 3400 - 100, by = R() * 2000 - 100;+ const px = W / 2 + (bx - cam.cx) * cam.s / depth + Math.sin(t * .35 + i) * 18, py = H / 2 + (by - cam.cy) * cam.s / depth - t * (6 + i % 5 * 3) + Math.cos(t * .27 + i * 2) * 12;+ const x = ((px % (W + 300)) + W + 300) % (W + 300) - 150, y = ((py % (H + 300)) + H + 300) % (H + 300) - 150;+ const r = (14 + R() * 38) * (1.3 - depth), light = .5 + .5 * (1 - y / H);+ const g = ctx.createRadialGradient(x, y, r * .2, x, y, r);+ const a = (.03 + R() * .035) * light;+ g.addColorStop(0, `rgba(235,240,232,${a * .7})`); g.addColorStop(.75, `rgba(235,240,232,${a})`); g.addColorStop(1, 'rgba(235,240,232,0)');+ ctx.fillStyle = g; ctx.beginPath(); ctx.arc(x, y, r, 0, 6.29); ctx.fill();+ }+}diff --git a/styles/chalkboard/demo/js/r2d.js b/styles/chalkboard/demo/js/r2d.jsnew file mode 100644index 0000000..2df36be--- /dev/null+++ b/styles/chalkboard/demo/js/r2d.js@@ -0,0 +1,69 @@+// Canvas 2D renderer for the board (the full-length film). Everything visible is drawn with Canvas 2D:+// the board, frame, tray and wall are baked once in board space; the board's grain is baked into every chalk+// sprite (CFG.deposit) so chalk sits only on the slate's peaks; the eraser is a blurred destination-out band;+// the classroom light is a multiply gradient. WebGL2 only runs the post pass (post.js).+import { clamp, lerp } from '/core/lib.js';+import { CFG, rng, n1 } from './chalk.js';++// ───────── the slate's grain: one periodic tile, 256 board units square, 4 samples per unit+const TS = 1024, TU = 4;+function periodicNoise(cells, seed) { // value noise that wraps every TS samples+ const R = rng(seed), g = new Float32Array(cells * cells); for (let i = 0; i < g.length; i++) g[i] = R();+ const out = new Float32Array(TS * TS), per = TS / cells;+ for (let y = 0; y < TS; y++) {+ const fy = y / per, iy = Math.floor(fy), ty = fy - iy, uy = ty * ty * (3 - 2 * ty), y0 = iy % cells, y1 = (iy + 1) % cells;+ for (let x = 0; x < TS; x++) {+ const fx = x / per, ix = Math.floor(fx), tx = fx - ix, ux = tx * tx * (3 - 2 * tx), x0 = ix % cells, x1 = (ix + 1) % cells;+ out[y * TS + x] = lerp(lerp(g[y0 * cells + x0], g[y0 * cells + x1], ux), lerp(g[y1 * cells + x0], g[y1 * cells + x1], ux), uy);+ }+ }+ return out;+}+export const GRAIN = (() => {+ const oct = [[512, .42], [280, .5], [120, .4], [50, .27], [20, .22]], T = new Float32Array(TS * TS).fill(.5);+ oct.forEach(([c, a], k) => { const n = periodicNoise(c, 91 + k * 17); for (let i = 0; i < T.length; i++) T[i] += (n[i] - .5) * a; });+ const R = rng(7); const cells = 280, per = TS / cells, hole = new Uint8Array(cells * cells); for (let i = 0; i < hole.length; i++) hole[i] = R() < .06;+ for (let y = 0; y < TS; y++) for (let x = 0; x < TS; x++) if (hole[(Math.floor(y / per) % cells) * cells + Math.floor(x / per) % cells]) T[y * TS + x] -= .35;+ return T;+})();+export function grainAt(bx, by) {+ let x = (bx * TU) % TS, y = (by * TU) % TS; if (x < 0) x += TS; if (y < 0) y += TS;+ const ix = Math.floor(x), iy = Math.floor(y), fx = x - ix, fy = y - iy, x1 = (ix + 1) % TS, y1 = (iy + 1) % TS;+ return lerp(lerp(GRAIN[iy * TS + ix], GRAIN[iy * TS + x1], fx), lerp(GRAIN[y1 * TS + ix], GRAIN[y1 * TS + x1], fx), fy);+}+// chalk deposit: coverage → what actually stays on the grains (2×2 supersampled), plus a faint powder halo+export function installDeposit() {+ const sst = (a, b, x) => { const t = clamp((x - a) / (b - a)); return t * t * (3 - 2 * t); };+ CFG.deposit = (cov, x0, y0, W, H, R) => {+ const N = W * H, out = new Float32Array(N);+ // halo: box-blurred coverage (radius ~3 units)+ const r = Math.max(1, Math.round(3 * R)), tmp = new Float32Array(N), hal = new Float32Array(N);+ for (let y = 0; y < H; y++) { let acc = 0; const o = y * W; for (let x = -r; x < W; x++) { if (x + r < W) acc += cov[o + x + r]; if (x - r - 1 >= 0) acc -= cov[o + x - r - 1]; if (x >= 0) tmp[o + x] = acc / (2 * r + 1); } }+ for (let x = 0; x < W; x++) { let acc = 0; for (let y = -r; y < H; y++) { if (y + r < H) acc += tmp[(y + r) * W + x]; if (y - r - 1 >= 0) acc -= tmp[(y - r - 1) * W + x]; if (y >= 0) hal[y * W + x] = acc / (2 * r + 1); } }+ for (let k = 0; k < N; k++) {+ const a = cov[k], h = hal[k];+ if (a <= .002 && h <= .002) continue;+ const px = k % W, py = (k - px) / W;+ let d = 0, gm = 0;+ if (a > .002) {+ const thr = .5 + (.55 - a) * 1.15;+ for (let j = 0; j < 4; j++) {+ const g = grainAt(x0 + (px + .25 + .5 * (j & 1)) / R, y0 + (py + .25 + .5 * (j >> 1)) / R); gm += g;+ d += sst(thr - .07, thr + .07, g);+ }+ d *= .25; gm *= .25;+ } else gm = grainAt(x0 + (px + .5) / R, y0 + (py + .5) / R);+ const al = d * (.62 + .36 * Math.min(1, a * 1.4)), hv = h * .05 * (.6 + .8 * gm);+ out[k] = al + (1 - al) * hv;+ }+ return out;+ };+}++// grain tile as a grey image, for the slate's micro texture (soft-light) in close shots+export function grainTile() {+ const cv = new OffscreenCanvas(TS, TS), x = cv.getContext('2d'), img = x.createImageData(TS, TS);+ for (let i = 0; i < TS * TS; i++) { const v = Math.round(clamp(GRAIN[i]) * 255); img.data[4 * i] = img.data[4 * i + 1] = img.data[4 * i + 2] = v; img.data[4 * i + 3] = 255; }+ x.putImageData(img, 0, 0); return cv;+}+diff --git a/styles/chalkboard/demo/js/stage.js b/styles/chalkboard/demo/js/stage.jsnew file mode 100644index 0000000..5ecb5ed--- /dev/null+++ b/styles/chalkboard/demo/js/stage.js@@ -0,0 +1,120 @@+// The classroom's front wall, baked once. World units: the board's slate is x 0…6400, y 0…1700.+// A fixed back board spans the whole width; two front panels slide on their own tracks in front of it:+// FL starts over x 0…3200 and slides right over FR (x 3200…6400), uncovering the back board's left half.+// A freshly wiped board: one even deep ink green with its own fine grain and very slow mottling, nothing else.+import { clamp } from '/core/lib.js';+import { rng, n1 } from './chalk.js';++export const BW = 6400, BH = 1700, PW = 3200; // board, panel width+export const WALL = [-1500, -1500, 9400, 4900]; // x0, y0, w, h+export const WALL_R = .5; // px per unit for the wall bake+export const SLATE_R = 1; // px per unit for the slates++export const css = (c, a = 1) => `rgba(${c[0]},${c[1]},${c[2]},${a})`;++// a smooth noise image whose alpha is the noise (fixed colour); scaled up it stays smooth+function noiseLayer(w, h, seed, rgb, aMax, pow = 1) {+ const o = new OffscreenCanvas(w, h), x = o.getContext('2d'), img = x.createImageData(w, h), R = rng(seed);+ const g = Array.from({ length: (w + 2) * (h + 2) }, R);+ for (let j = 0; j < h; j++) for (let i = 0; i < w; i++) {+ const v = (g[j * (w + 2) + i] + g[(j + 1) * (w + 2) + i + 1] + g[(j + 2) * (w + 2) + i + 2] + g[j * (w + 2) + i + 2]) / 4, q = 4 * (j * w + i);+ img.data[q] = rgb[0]; img.data[q + 1] = rgb[1]; img.data[q + 2] = rgb[2]; img.data[q + 3] = Math.round(Math.pow(clamp((v - .2) / .6), pow) * aMax * 255);+ }+ x.putImageData(img, 0, 0); return o;+}++// one slate (board units, origin at its top-left), with optional wooden edge strips on its sides+export function bakeSlate(w, h, seed, edges = false) {+ const R = SLATE_R, m = edges ? 34 : 0, cv = new OffscreenCanvas(Math.ceil((w + 2 * m) * R), Math.ceil(h * R)), c = cv.getContext('2d');+ c.scale(R, R); c.translate(m, 0); c.imageSmoothingQuality = 'high';+ c.fillStyle = '#0f1c15'; c.fillRect(0, 0, w, h);+ // very slow, very low mottling: the paint is even, not patchy+ c.drawImage(noiseLayer(Math.ceil(w / 260), Math.ceil(h / 260), seed, [22, 36, 29], .5), 0, 0, w, h);+ c.drawImage(noiseLayer(Math.ceil(w / 60), Math.ceil(h / 60), seed + 1, [10, 18, 14], .28), 0, 0, w, h);+ if (edges) { // the panel's own wooden stiles+ for (const x0 of [-m, w]) wood(c, x0, 0, m, h, false, seed + (x0 < 0 ? 5 : 6));+ for (const x0 of [0, w - 26]) { const g = c.createLinearGradient(x0, 0, x0 + 26, 0); const L = x0 === 0; g.addColorStop(0, `rgba(0,0,0,${L ? .38 : 0})`); g.addColorStop(1, `rgba(0,0,0,${L ? 0 : .38})`); c.fillStyle = g; c.fillRect(x0, 0, 26, h); }+ }+ return { cv, m, w, h };+}++function wood(c, x, y, w, h, horiz, seed, base = '#6a4a2e') {+ const R = rng(seed); c.save(); c.beginPath(); c.rect(x, y, w, h); c.clip();+ c.fillStyle = base; c.fillRect(x, y, w, h);+ for (let i = 0; i < 60; i++) {+ const t = R(), a = .04 + R() * .1, lw = .6 + R() * 2.2; c.strokeStyle = R() < .5 ? `rgba(40,22,10,${a})` : `rgba(160,118,74,${a})`; c.lineWidth = lw; c.beginPath();+ if (horiz) { const yy = y + t * h; c.moveTo(x, yy); for (let k = 1; k <= 24; k++) c.lineTo(x + w * k / 24, yy + (n1(k * .7 + i, seed) - .5) * 4); }+ else { const xx = x + t * w; c.moveTo(xx, y); for (let k = 1; k <= 24; k++) c.lineTo(xx + (n1(k * .7 + i, seed) - .5) * 4, y + h * k / 24); }+ c.stroke();+ }+ const g = horiz ? c.createLinearGradient(0, y, 0, y + h) : c.createLinearGradient(x, 0, x + w, 0);+ g.addColorStop(0, 'rgba(255,225,180,.16)'); g.addColorStop(.45, 'rgba(0,0,0,0)'); g.addColorStop(1, 'rgba(0,0,0,.28)');+ c.fillStyle = g; c.fillRect(x, y, w, h); c.restore();+}++// chalk stick lying in the tray (world units)+function chalkStick(c, x, y, len, r, col, ang = 0) {+ c.save(); c.translate(x, y); c.rotate(ang);+ c.save(); c.filter = 'blur(3px)'; c.fillStyle = 'rgba(0,0,0,.35)'; c.beginPath(); c.ellipse(4, r * .9, len / 2, r * .45, 0, 0, 6.29); c.fill(); c.restore();+ const g = c.createLinearGradient(0, -r, 0, r);+ g.addColorStop(0, css(col.map(v => Math.min(255, v + 20)))); g.addColorStop(.45, css(col)); g.addColorStop(1, css(col.map(v => v * .62)));+ c.fillStyle = g; c.beginPath(); c.roundRect(-len / 2, -r, len, 2 * r, r * .5); c.fill();+ c.fillStyle = css(col.map(v => v * .8)); c.beginPath(); c.ellipse(len / 2 - r * .25, 0, r * .3, r * .95, 0, 0, 6.29); c.fill();+ c.restore();+}++// the wall, frame, tray, clock (static). Returns {cv} covering WALL at WALL_R px per unit.+export function bakeWall() {+ const [X0, Y0, W, H] = WALL, R = WALL_R, cv = new OffscreenCanvas(Math.ceil(W * R), Math.ceil(H * R)), c = cv.getContext('2d');+ c.scale(R, R); c.translate(-X0, -Y0); c.imageSmoothingQuality = 'high';+ // upper wall: warm white paint; lower: the classroom's green dado+ c.fillStyle = '#bdb8a8'; c.fillRect(X0, Y0, W, H);+ c.drawImage(noiseLayer(90, 50, 31, [205, 200, 186], .5), X0, Y0, W, H);+ c.drawImage(noiseLayer(400, 220, 32, [150, 146, 134], .12), X0, Y0, W, H);+ const DY = 2380;+ c.fillStyle = '#56705f'; c.fillRect(X0, DY, W, Y0 + H - DY);+ c.drawImage(noiseLayer(90, 20, 33, [70, 90, 76], .45), X0, DY, W, Y0 + H - DY);+ c.fillStyle = 'rgba(30,40,34,.5)'; c.fillRect(X0, DY - 6, W, 10);+ c.fillStyle = 'rgba(255,255,240,.18)'; c.fillRect(X0, DY + 4, W, 3);+ // the board unit's shadow on the wall (light from the windows on the left, a little from above)+ c.save(); c.filter = 'blur(40px)'; c.fillStyle = 'rgba(30,26,20,.45)'; c.fillRect(-40, -40, BW + 150, BH + 230); c.restore();+ // frame: four rails+ const F = 70;+ c.fillStyle = '#0b130f'; c.fillRect(0, 0, BW, BH);+ wood(c, -F, -F, BW + 2 * F, F, true, 1); wood(c, -F, BH, BW + 2 * F, F, true, 2); wood(c, -F, 0, F, BH, false, 3); wood(c, BW, 0, F, BH, false, 4);+ c.strokeStyle = 'rgba(0,0,0,.55)'; c.lineWidth = 3; c.strokeRect(-1.5, -1.5, BW + 3, BH + 3);+ // chalk tray: a shelf under the bottom rail, its top face catching light+ const TY = BH + F;+ c.save(); c.filter = 'blur(12px)'; c.fillStyle = 'rgba(0,0,0,.45)'; c.fillRect(-F - 30, TY + 40, BW + 2 * F + 60, 46); c.restore();+ wood(c, -F - 30, TY, BW + 2 * F + 60, 34, true, 5, '#7a5838'); wood(c, -F - 30, TY + 34, BW + 2 * F + 60, 40, true, 6, '#5d4128');+ c.fillStyle = 'rgba(255,236,200,.16)'; c.fillRect(-F - 30, TY + 34, BW + 2 * F + 60, 3);+ { const r = rng(19); for (let i = 0; i < 260; i++) { const x = -F + r() * (BW + 2 * F), y = TY + 6 + r() * 24, s = .8 + r() * 2; c.fillStyle = `rgba(230,228,220,${.06 + r() * .14})`; c.fillRect(x, y, s * 2, s); } }+ chalkStick(c, 900, TY + 17, 92, 9, [236, 233, 222], -.04);+ chalkStick(c, 1010, TY + 19, 70, 9, [236, 233, 222], .03);+ chalkStick(c, 1105, TY + 18, 36, 9, [240, 150, 86], .1); // the short orange stub+ chalkStick(c, 5600, TY + 18, 88, 9, [236, 233, 222], .02);+ // wall clock above the middle of the board: 7:58+ const cx = 3200, cy = -560, rr = 200;+ c.save(); c.filter = 'blur(14px)'; c.fillStyle = 'rgba(30,26,20,.4)'; c.beginPath(); c.arc(cx + 14, cy + 18, rr + 8, 0, 6.29); c.fill(); c.restore();+ c.fillStyle = '#2a2a28'; c.beginPath(); c.arc(cx, cy, rr + 16, 0, 6.29); c.fill();+ const fg = c.createRadialGradient(cx - 40, cy - 60, 10, cx, cy, rr); fg.addColorStop(0, '#f6f3ea'); fg.addColorStop(1, '#d9d4c6');+ c.fillStyle = fg; c.beginPath(); c.arc(cx, cy, rr, 0, 6.29); c.fill();+ c.strokeStyle = '#2b2b29'; c.lineCap = 'round';+ for (let i = 0; i < 60; i++) { const a = i / 60 * 6.2832, big = i % 5 === 0; c.lineWidth = big ? 9 : 3; c.beginPath(); c.moveTo(cx + Math.sin(a) * rr * (big ? .78 : .86), cy - Math.cos(a) * rr * (big ? .78 : .86)); c.lineTo(cx + Math.sin(a) * rr * .92, cy - Math.cos(a) * rr * .92); c.stroke(); }+ const hand = (a, l, w, col = '#222') => { c.strokeStyle = col; c.lineWidth = w; c.beginPath(); c.moveTo(cx - Math.sin(a) * l * .15, cy + Math.cos(a) * l * .15); c.lineTo(cx + Math.sin(a) * l, cy - Math.cos(a) * l); c.stroke(); };+ hand((7 + 58 / 60) / 12 * 6.2832, rr * .5, 14); hand(58 / 60 * 6.2832, rr * .78, 9);+ c.fillStyle = '#222'; c.beginPath(); c.arc(cx, cy, 12, 0, 6.29); c.fill();+ const gl = c.createLinearGradient(cx - rr, cy - rr, cx + rr, cy + rr); gl.addColorStop(0, 'rgba(255,255,255,.22)'); gl.addColorStop(.4, 'rgba(255,255,255,0)');+ c.fillStyle = gl; c.beginPath(); c.arc(cx, cy, rr, 0, 6.29); c.fill();+ return { cv };+}++// the painted tian-zi grid on the front panel: a permanent, dull ochre line under the chalk (panel-local units)+export function paintGrid(c, cx, cy, size, a = 1) {+ const h = size / 2;+ c.save(); c.globalAlpha = a;+ c.strokeStyle = 'rgba(196,176,112,.36)'; c.lineWidth = 5; c.strokeRect(cx - h, cy - h, size, size);+ c.setLineDash([size / 34, size / 46]); c.lineWidth = 3; c.strokeStyle = 'rgba(196,176,112,.24)';+ c.beginPath(); c.moveTo(cx - h, cy); c.lineTo(cx + h, cy); c.moveTo(cx, cy - h); c.lineTo(cx, cy + h); c.stroke();+ c.restore();+}diff --git a/styles/chalkboard/demo/lines.json b/styles/chalkboard/demo/lines.jsonnew file mode 100644index 0000000..2cf2612--- /dev/null+++ b/styles/chalkboard/demo/lines.json@@ -0,0 +1,48 @@+[+ {+ "id": "n1",+ "text": "网上有个说法:射和矮,这两个字弄反了。"+ },+ {+ "id": "n2",+ "text": "射字左边是身,右边是寸。身高一寸,那不就是矮吗?",+ "asr": "设置左边是身,右边是寸。身高一寸,那不就是矮吗?"+ },+ {+ "id": "n3",+ "text": "矮字左边是矢,矢就是箭;右边是委,有放下的意思。把箭放出去,那不就是射吗?",+ "say": "矮字左边是史,史就是箭;右边是伟,有放下的意思。把箭放出去,那不就是射吗?",+ "asr": "矮字左边是实,实就是箭,右边是尾,有放下的意思。把箭放出去,那不就是射吗?"+ },+ {+ "id": "n4",+ "text": "其实,射最早画的是一张弓,弓上搭着一支箭。",+ "asr": "其实,社最早画的是一张弓,弓上搭着一支剑。"+ },+ {+ "id": "n5",+ "text": "后来又加了一只手,在拉弓弦。",+ "asr": "后来又加了一只手,再拉弓弦。"+ },+ {+ "id": "n6",+ "text": "弓慢慢写成了身,手写成了寸。",+ "asr": "工慢慢写成了身,手写成了寸。"+ },+ {+ "id": "n7",+ "text": "那矮里为什么有支箭?古人拿箭当尺子,用来量长短。所以短字里,也有这支箭。",+ "say": "那矮里为什么有支箭?古人拿箭当尺子,用来良长短。所以短字里,也有这支箭。",+ "asr": "那矮里为什么有支箭?古人拿箭当尺子,用来良长短。所以短字里,也有这支箭。"+ },+ {+ "id": "n8",+ "text": "射,是拉弓放箭;矮,就是个子短,委只管读音。",+ "say": "射,是拉弓放箭;矮,就是个子短,伟只管读音。",+ "asr": "射,是拉弓放箭;矮,就是个子短,伟只管读音。"+ },+ {+ "id": "n9",+ "text": "所以,没弄反。"+ }+]\ No newline at end of filediff --git a/styles/chalkboard/demo/lines_en.json b/styles/chalkboard/demo/lines_en.jsonnew file mode 100644index 0000000..65e68db--- /dev/null+++ b/styles/chalkboard/demo/lines_en.json@@ -0,0 +1,56 @@+[+ {+ "id": "n1",+ "text": "People online say the characters 射 and 矮 got swapped.",+ "say": "People online say the characters, Shè and Ǎi, got swapped.",+ "rate": "+14%",+ "asr": "People online say the characters, Shah and I, got swapped."+ },+ {+ "id": "n2",+ "text": "射 is 身 (body) plus 寸 (inch). One inch tall: isn’t that short?",+ "say": "Shè, is Shēn, body, plus Tsun, inch. One inch tall: isn't that short?",+ "asr": "Shut is shin body plus son inch one inch tall isn't that short?"+ },+ {+ "id": "n3",+ "text": "On the left of 矮 is 矢, an arrow; on the right is 委, to let go. Letting an arrow go: isn’t that shooting?",+ "say": "On the left of Ǎi is Shǐ, an arrow; on the right is Wěi, to let go. Letting an arrow go: isn't that shooting?",+ "asr": "On the left of I is sure an arrow on the right is way to let go. Letting an arrow go, isn't that shooting?"+ },+ {+ "id": "n4",+ "text": "In fact, the oldest 射 is a bow with an arrow on it.",+ "say": "In fact, the oldest Shè is a bow with an arrow on it.",+ "asr": "In fact, the oldest shur is a bow with an arrow on it."+ },+ {+ "id": "n5",+ "text": "Later a hand was added, pulling the string.",+ "rate": "+14%"+ },+ {+ "id": "n6",+ "text": "The bow slowly became 身, and the hand became 寸.",+ "say": "The bow became Shēn, and the hand became Tsun.",+ "rate": "+14%",+ "asr": "The bow became shin and the hand became son."+ },+ {+ "id": "n7",+ "text": "Why is there an arrow in 矮? People once used arrows as rulers to measure length. That is why 短 (short) has one too.",+ "say": "Why is there an arrow in Ǎi? People once used arrows as rulers to measure length. That is why Duǎn, short, has one too.",+ "rate": "+12%",+ "asr": "Why is there an arrow in eye? People once used arrows as rulers to measure length. That is why Dwan Short has won too."+ },+ {+ "id": "n8",+ "text": "射 means drawing a bow and shooting; 矮 means short, and 委 only gives the sound.",+ "say": "Shè means drawing a bow and shooting. Ai means short, and Wěi only gives the sound.",+ "asr": "She means drawing a bow and shooting. AI means short, and Wei only gives the sound."+ },+ {+ "id": "n9",+ "text": "So they were never swapped."+ }+]\ No newline at end of filediff --git a/styles/chalkboard/demo/stills/styleframe.jpg b/styles/chalkboard/demo/stills/styleframe.jpgnew file mode 100644index 0000000..83a6e8bBinary files /dev/null and b/styles/chalkboard/demo/stills/styleframe.jpg differdiff --git a/styles/chalkboard/demo/tools/foley_lib.py b/styles/chalkboard/demo/tools/foley_lib.pynew file mode 100644index 0000000..be862a5--- /dev/null+++ b/styles/chalkboard/demo/tools/foley_lib.py@@ -0,0 +1,55 @@+"""Slice real chalk recordings (CC0 / CC BY, see CREDITS) into a tagged grain library for mix.py.+usage: python -I tools/foley_lib.py <out_dir> <src_name>=<file> [...]+Writes <out_dir>/<kind>_<src>_<n>.wav (48 kHz mono, normalised) and <out_dir>/index.json with per-grain features.+kinds: tap (short, sharp attack), stroke (a continuous scrape), squeak (a strong tone between 1.4 and 5 kHz)."""+import sys, os, json+import numpy as np, soundfile as sf, soxr+from scipy.signal import butter, sosfilt+SR = 48000+out = sys.argv[1]; os.makedirs(out, exist_ok=True)+srcs = [a.split('=', 1) for a in sys.argv[2:]]+hp = lambda x, f: sosfilt(butter(2, f, 'high', fs=SR, output='sos'), x)+lib = []+for name, path in srcs:+ y, sr = sf.read(path, always_2d=True); y = y.mean(1).astype(np.float64)+ if sr != SR: y = soxr.resample(y, sr, SR)+ y = hp(y, 70); y /= np.abs(y).max() + 1e-12+ hop = int(.002 * SR); n = len(y) // hop+ env = np.array([np.sqrt(np.mean(y[i * hop:(i + 1) * hop] ** 2)) for i in range(n)])+ sm = np.convolve(env, np.ones(5) / 5, 'same')+ floor = np.percentile(sm, 15) + 1e-9+ act = sm > floor * 5+ # merge gaps shorter than 24 ms, drop blips shorter than 8 ms+ segs, i = [], 0+ while i < n:+ if not act[i]: i += 1; continue+ j = i+ while j < n and (act[j] or (j + 12 < n and act[j:j + 12].any())): j += 1+ if j - i >= 4: segs.append((i, j))+ i = j + 1+ for k, (a, b) in enumerate(segs):+ s0, s1 = max(0, a * hop - int(.004 * SR)), min(len(y), b * hop + int(.01 * SR))+ x = y[s0:s1].copy(); d = len(x) / SR+ if d < .012: continue+ e = env[a:b]; pk = int(np.argmax(e)); attack = pk * hop / SR+ crest = float(np.abs(x).max() / (np.sqrt(np.mean(x ** 2)) + 1e-12))+ X = np.abs(np.fft.rfft(x * np.hanning(len(x)), n=1 << int(np.ceil(np.log2(max(len(x), 2048))))))+ f = np.fft.rfftfreq((len(X) - 1) * 2, 1 / SR)+ cen = float((X * f).sum() / (X.sum() + 1e-12))+ band = (f > 1400) & (f < 5000)+ tonal = float(20 * np.log10(X[band].max() / (np.median(X[band]) + 1e-12))) if band.any() else 0+ fpk = float(f[band][np.argmax(X[band])]) if band.any() else 0+ lo = float(X[(f > 80) & (f < 600)].sum() / (X.sum() + 1e-12))+ kind = 'squeak' if tonal > 30 and d > .05 else ('tap' if d < .09 and attack < .012 else 'stroke')+ fade = min(len(x) // 4, int(.006 * SR)); x[:fade] *= np.linspace(0, 1, fade); x[-fade:] *= np.linspace(1, 0, fade)+ x = x / (np.abs(x).max() + 1e-12) * .9+ fn = f'{kind}_{name}_{k:03d}.wav'; sf.write(os.path.join(out, fn), x.astype(np.float32), SR)+ lib.append({'file': fn, 'src': name, 'kind': kind, 'dur': round(d, 4), 'attack': round(attack, 4), 'crest': round(crest, 2),+ 'centroid': round(cen), 'tonal_db': round(tonal, 1), 'tone_hz': round(fpk), 'low': round(lo, 3),+ 'rms': round(float(20 * np.log10(np.sqrt(np.mean(y[s0:s1] ** 2)) + 1e-12)), 1), 'at': round(s0 / SR, 3)})+json.dump(lib, open(os.path.join(out, 'index.json'), 'w'), indent=0)+from collections import Counter+print(len(lib), 'grains', Counter((g['src'], g['kind']) for g in lib))+for kd in ('tap', 'stroke', 'squeak'):+ ds = [g['dur'] for g in lib if g['kind'] == kd]+ if ds: print(kd, 'dur min/median/max', round(min(ds), 3), round(float(np.median(ds)), 3), round(max(ds), 3))diff --git a/styles/chalkboard/demo/tools/srt.py b/styles/chalkboard/demo/tools/srt.pynew file mode 100644index 0000000..94579ee--- /dev/null+++ b/styles/chalkboard/demo/tools/srt.py@@ -0,0 +1,13 @@+"""<slug>.srt from the subtitle cues the page exports into events.json (type 'sub': t, t1, zh, en): one Chinese line and one+English line per cue, timed with the voice. usage: python styles/chalkboard/demo/tools/srt.py <out.srt>"""+import os, sys, json+HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+ev = json.load(open(os.path.join(HERE, 'events.json')))['ev']+cues = sorted((e for e in ev if e['type'] == 'sub'), key=lambda e: e['t'])+ts = lambda x: '%02d:%02d:%02d,%03d' % (x // 3600, x % 3600 // 60, x % 60, round(x % 1 * 1000) % 1000)+out = []+for k, e in enumerate(cues):+ t1 = min(e['t1'], cues[k + 1]['t']) if k + 1 < len(cues) else e['t1']+ out.append(f"{k + 1}\n{ts(max(0, e['t']))} --> {ts(t1)}\n{e['zh']}\n{e['en']}\n")+open(sys.argv[1], 'w', encoding='utf-8').write('\n'.join(out))+print(f'{sys.argv[1]}: {len(cues)} cues')diff --git a/styles/chalkboard/demo/tools/subset.py b/styles/chalkboard/demo/tools/subset.pynew file mode 100644index 0000000..b1f3e54--- /dev/null+++ b/styles/chalkboard/demo/tools/subset.py@@ -0,0 +1,17 @@+"""fonts/wenkai-sub.woff2: LXGW WenKai (OFL) cut down to the characters the subtitles use (every string in SUB in js/film.js)+plus printable ASCII. The chalk writing on the board is our own stroke data and needs no font.+usage: python styles/chalkboard/demo/tools/subset.py"""+import os, re+from fontTools import subset+HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+src = open(os.path.join(HERE, 'js/film.js'), encoding='utf-8').read()+i = src.index('export const SUB = {'); j = src.index('};', i)+block = re.sub(r'\\u([0-9a-fA-F]{4})', lambda m: chr(int(m.group(1), 16)), src[i:j])+chars = {c for c in block if not c.isspace()} | set('汉字的故事’‘“”…·→←×') | {chr(c) for c in range(0x20, 0x7f)}+opt = subset.Options(); opt.flavor = 'woff2'; opt.layout_features = ['*']+font = subset.load_font(os.path.join(HERE, 'fonts/LXGWWenKai-Regular.ttf'), opt)+s = subset.Subsetter(opt); s.populate(text=''.join(sorted(chars))); s.subset(font)+cmap = font.getBestCmap(); miss = sorted(c for c in chars if ord(c) not in cmap and c != ' ')+if miss: raise SystemExit('subset.py: the font has no glyph for ' + ''.join(miss))+subset.save_font(font, os.path.join(HERE, 'fonts/wenkai-sub.woff2'), opt)+print(f'wenkai-sub.woff2: {len(chars)} characters')diff --git a/styles/chalkboard/demo/vo/dur.json b/styles/chalkboard/demo/vo/dur.jsonnew file mode 100644index 0000000..24ecd61--- /dev/null+++ b/styles/chalkboard/demo/vo/dur.json@@ -0,0 +1,11 @@+{+ "n1": 3.146,+ "n2": 4.553,+ "n3": 6.725,+ "n4": 3.617,+ "n5": 2.28,+ "n6": 2.41,+ "n7": 6.623,+ "n8": 4.102,+ "n9": 1.304+}\ No newline at end of filediff --git a/styles/chalkboard/demo/vo/words.json b/styles/chalkboard/demo/vo/words.jsonnew file mode 100644index 0000000..ae87ed2--- /dev/null+++ b/styles/chalkboard/demo/vo/words.json@@ -0,0 +1,765 @@+{+"n1": [+[+"网",+-0.16,+0.2+],+[+"上",+0.2,+0.34+],+[+"有",+0.34,+0.52+],+[+"个",+0.52,+0.62+],+[+"说",+0.62,+0.82+],+[+"法,",+0.82,+1.1+],+[+"涉",+1.3,+1.42+],+[+"合",+1.42,+1.56+],+[+"矮,",+1.56,+1.94+],+[+"这",+2.12,+2.22+],+[+"两",+2.22,+2.32+],+[+"个",+2.32,+2.4+],+[+"字",+2.4,+2.5+],+[+"弄",+2.5,+2.7+],+[+"反",+2.7,+2.94+],+[+"了。",+2.94,+3.18+]+],+"n2": [+[+"设",+-0.12,+0.28+],+[+"置",+0.28,+0.44+],+[+"左",+0.44,+0.62+],+[+"边",+0.62,+0.82+],+[+"是",+0.82,+1.04+],+[+"身,",+1.04,+1.26+],+[+"右",+1.48,+1.6+],+[+"边",+1.6,+1.8+],+[+"是",+1.8,+1.98+],+[+"寸。",+1.98,+2.48+],+[+"身",+2.8,+2.9+],+[+"高",+2.9,+3.08+],+[+"一",+3.08,+3.3+],+[+"寸,",+3.3,+3.56+],+[+"那",+3.74,+3.82+],+[+"不",+3.82,+3.94+],+[+"就是",+3.94,+4.14+],+[+"矮",+4.14,+4.28+],+[+"吗?",+4.28,+4.5+]+],+"n3": [+[+"矮",+-0.18,+0.18+],+[+"字",+0.18,+0.34+],+[+"左",+0.34,+0.5+],+[+"边",+0.5,+0.68+],+[+"是",+0.68,+0.86+],+[+"实,",+0.86,+1.12+],+[+"实",+1.38,+1.48+],+[+"就是",+1.48,+1.78+],+[+"箭,",+1.78,+2.2+],+[+"右",+2.4,+2.5+],+[+"边",+2.5,+2.68+],+[+"是",+2.68,+2.92+],+[+"为,",+2.92,+3.08+],+[+"有",+3.3,+3.46+],+[+"放",+3.46,+3.64+],+[+"下",+3.64,+3.84+],+[+"的",+3.84,+3.98+],+[+"意思。",+3.98,+4.28+],+[+"把",+4.78,+4.9+],+[+"箭",+4.9,+5.04+],+[+"放",+5.04,+5.28+],+[+"出去,",+5.28,+5.62+],+[+"那",+5.9,+5.98+],+[+"不",+5.98,+6.1+],+[+"就是",+6.1,+6.26+],+[+"射",+6.26,+6.44+],+[+"吗?",+6.44,+6.7+]+],+"n4": [+[+"其实,",+0.16,+0.56+],+[+"社",+0.82,+0.96+],+[+"最",+0.96,+1.18+],+[+"早",+1.18,+1.38+],+[+"画",+1.38,+1.5+],+[+"的是",+1.5,+1.74+],+[+"一",+1.74,+1.92+],+[+"张",+1.92,+2.08+],+[+"弓,",+2.08,+2.36+],+[+"弓",+2.5,+2.7+],+[+"上",+2.7,+2.84+],+[+"搭",+2.84,+3.04+],+[+"着",+3.04,+3.2+],+[+"一",+3.2,+3.28+],+[+"支",+3.28,+3.42+],+[+"剑。",+3.42,+3.64+]+],+"n5": [+[+"后",+-0.14,+0.18+],+[+"来",+0.18,+0.32+],+[+"又",+0.32,+0.5+],+[+"加",+0.5,+0.66+],+[+"了",+0.66,+0.78+],+[+"一",+0.78,+0.92+],+[+"只",+0.92,+1.08+],+[+"手,",+1.08,+1.34+],+[+"再",+1.56,+1.62+],+[+"拉",+1.62,+1.76+],+[+"弓",+1.76,+2.0+],+[+"弦。",+2.0,+2.16+]+],+"n6": [+[+"工",+-0.6,+0.2+],+[+"慢慢",+0.2,+0.5+],+[+"写",+0.5,+0.72+],+[+"成",+0.72,+0.94+],+[+"了",+0.94,+1.08+],+[+"身,",+1.08,+1.28+],+[+"手",+1.56,+1.68+],+[+"写",+1.68,+1.84+],+[+"成",+1.84,+2.06+],+[+"了",+2.06,+2.22+],+[+"寸。",+2.22,+2.32+]+],+"n7": [+[+"那",+-0.14,+0.22+],+[+"矮",+0.22,+0.34+],+[+"里",+0.34,+0.46+],+[+"为什么",+0.46,+0.78+],+[+"有",+0.78,+1.0+],+[+"支",+1.0,+1.16+],+[+"箭?",+1.16,+1.56+],+[+"古",+1.88,+2.0+],+[+"人",+2.0,+2.16+],+[+"拿",+2.16,+2.3+],+[+"箭",+2.3,+2.48+],+[+"当",+2.48,+2.66+],+[+"尺",+2.66,+2.9+],+[+"子,",+2.9,+3.22+],+[+"用",+3.42,+3.46+],+[+"来",+3.46,+3.56+],+[+"量",+3.56,+3.74+],+[+"长",+3.74,+3.94+],+[+"短。",+3.94,+4.5+],+[+"所以",+4.84,+5.0+],+[+"短",+5.0,+5.24+],+[+"字",+5.24,+5.4+],+[+"里,",+5.4,+5.7+],+[+"也",+5.9,+5.96+],+[+"有",+5.96,+6.14+],+[+"这",+6.14,+6.18+],+[+"支",+6.18,+6.32+],+[+"箭。",+6.32,+6.64+]+],+"n8": [+[+"射,",+0.06,+0.42+],+[+"是",+0.58,+0.7+],+[+"拉",+0.7,+0.86+],+[+"弓",+0.86,+1.02+],+[+"放",+1.02,+1.24+],+[+"箭,",+1.24,+1.62+],+[+"矮,",+1.84,+2.06+],+[+"就是",+2.22,+2.42+],+[+"个",+2.42,+2.6+],+[+"子",+2.6,+2.72+],+[+"短,",+2.72,+3.06+],+[+"为",+3.22,+3.32+],+[+"只",+3.32,+3.5+],+[+"管",+3.5,+3.62+],+[+"读",+3.62,+3.84+],+[+"音。",+3.84,+4.04+]+],+"n9": [+[+"所以,",+0.1,+0.54+],+[+"没",+0.74,+0.88+],+[+"弄",+0.88,+1.02+],+[+"反。",+1.02,+1.26+]+]+}\ No newline at end of filediff --git a/styles/chalkboard/demo/vo_en/dur.json b/styles/chalkboard/demo/vo_en/dur.jsonnew file mode 100644index 0000000..894ec49--- /dev/null+++ b/styles/chalkboard/demo/vo_en/dur.json@@ -0,0 +1,11 @@+{+ "n1": 3.346,+ "n2": 4.649,+ "n3": 5.889,+ "n4": 2.939,+ "n5": 2.372,+ "n6": 2.378,+ "n7": 6.6,+ "n8": 4.967,+ "n9": 1.266+}\ No newline at end of filediff --git a/styles/chalkboard/poster.jpg b/styles/chalkboard/poster.jpgnew file mode 100644index 0000000..83a6e8bBinary files /dev/null and b/styles/chalkboard/poster.jpg differdiff --git a/styles/chalkboard/style.json b/styles/chalkboard/style.jsonnew file mode 100644index 0000000..d27e9c3--- /dev/null+++ b/styles/chalkboard/style.json@@ -0,0 +1,19 @@+{+ "slug": "chalkboard",+ "num": "73",+ "en": "Chalkboard",+ "cn": "黑板粉笔",+ "category_en": "Hand-drawn & Painting",+ "category_cn": "手绘与绘画",+ "film": "The Story of Chinese Characters",+ "line": "On a freshly wiped classroom board, chalk writes a popular claim about two characters, wipes it, and writes 射 back through three thousand years until the answer goes under a child's question.",+ "line_cn": "刚擦干净的教室黑板上,粉笔先写下网上流行的说法,再一擦,把「射」从三千年前一路写回来,最后在孩子的问题下面写上答案。",+ "uses": [+ "Where a word or character comes from",+ "Clearing up a common misconception",+ "A worked problem, step by step",+ "A short lesson on one idea"+ ],+ "frame_sec": 42.5,+ "dur": 49.28+}