Repository navigation
v0.2.0
Implements Synod 0.2.
Added
- The player reads
synod-scene/1files and draws them on a canvas: circles, rounded rectangles, labels, lines and groups, with per-property keyframes, smootherstep easing, OKLab colour blending, group transforms, glow, and fit-and-letterbox on the Paper ground. It follows the reader rules in the Synod formats guide, and the same scene always draws the same frames. - API:
loadScene,compileScene,renderToContext(draw into any 2D context, for example anOffscreenCanvasfor video export) andcreatePlayer. A player hasplay,pause,toggle,seek,setRate(0.25x to 4x),setLoop,setStopAtPause(Predict mode),nextFact,prevFact,factAt,timeOfSeq,setScene,resize,renderFrame(at)anddestroy, and the eventstime,marker,fact,play,pauseandscene. attachWebKitBridgeposts player events to aWKWebViewscript message handler, and the IIFE build addsSynodPlayer.mount(selector, options)for Swift to call.- Release assets:
synod-player-<tag>.js(ES module),synod-player-<tag>.iife.js(globalSynodPlayer),synod-player-<tag>.d.tsandSHA256SUMS. No runtime dependencies and no bundled fonts. Each bundle is at most 48 KB minified and 16 KB gzip (about 21 KB and 9 KB today). - A demo page that loads a
scene.json(file, drag and drop,?scene=<url>or one of the bundled golden scenes) with transport controls, markers and a?bench=1timing overlay. - Tests: display-list goldens for all 29 golden scenes and the hand-made fixtures, WebKit pixel goldens, a Chromium smoke test and a WebKit frame-time gate in CI.
- Performance, measured by
npm run benchin Node with a no-op 2D context (so these are evaluate-and-draw call costs, not rasterisation): about 0.02 ms per frame for raft and webapp and 0.09 ms for the 50-node, 200-message stress scene, loading and compiling raft in about 7 ms, and no heap growth over 10,000 frames. Numbers in Safari on Apple silicon at 120 Hz are pending the owner's manual check and will be added here.