summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* anim: part, the shapes of an object inside a rectangle as an object of their ownGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s.part(of, .{ .x, .y, .w, .h }) takes the shapes of an object whose bounds' centre lies in the rectangle (x, y its centre, in the object's units: the same literal s.rect would lay over it standing at the origin at scale 1) and makes them an object, around the rectangle's centre, so indicate, scaleTo and rotate turn it about itself. The object draws the rest from then on (its new cut), so a part can be written in, moved away or morphed while the page around it stays. A part stands where its shapes stood and shows as the object does after the plays laid so far: taken from a page that has faded in, it is there; taken first, it fades in with nothing until played. A shape goes to the first part that takes it; parts of parts work the same way. transformInto morphs into the whole of its target, as if nothing were cut from it, so a morph's result can be split into parts taken after it (which then stand where they were and show as it does). How: Source.part holds the object as it was (a pointer: in a compiled scene to a comptime constant, in a live one into the frame's arena) and the area; Object.cut lists the areas taken from it; both are in the object's id. anim.sift makes either drawing out of the whole one, sharing its geometry; the Painter sifts its cached whole, so a page is parsed once however many parts it gives. In a compiled scene the part follows its object through the plays laid before it was taken (keys copied, moved by the area's centre at the object's scale and rotation); in a live one it starts from the object's shown and settled poses. build now also moves a shape's clip with its centring (it moved the shape and left the clip behind). Test, at the end of root.zig: a row of three squares, the right one taken once the row has faded in, then each moved: the compiled and the live scene agree at every instant, the part fades with the row, stands where its square stood, and the row keeps the other two. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* anim: Typst runs with / as its root, so a source can name any fileGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | The Typst step ran in .zig-cache/typst with Typst's default root, the directory of the file it compiles, so a source could name no file but one in the cache: #image("/home/me/manual.pdf", page: 31) failed with "would escape the project root". It now runs with --root /, which makes an absolute path in a source the file's own path; relative paths still resolve in the cache, as before. Why / and not the build root: the file a scene names (a manual, a paper) lives where its owner keeps it, outside any project, and a copy or link under the project is one jj add away from being committed. / is safe in that Typst only reads what a source names, and a scene's sources are its author's code, compiled by a build that can already read and run anything. The cache is still keyed by preamble and source alone: a file changed in place keeps its old SVG until its cache entry goes (typst.zig says so). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* svg: an image that is an SVG document in a data URI is drawnGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | Typst places an SVG image, and a PDF page imported with image(), as an <image> whose href is the document in base64; svg.zig skipped every <image>, so any Typst object holding one silently lost it. The parser now decodes such a document and walks it into the same drawing, mapped into the image's x, y, width and height (stretched with preserveAspectRatio="none", else fitted and centered, as SVG says), with its own ids, gradients and percentages and nothing inherited from around it but opacity. It is not clipped to its box (a PDF page never draws outside itself, and a clip per shape costs the renderers a pass over every contour). Raster images still draw nothing. The root's view box and size come from one function both documents use. Tests: a unit test at the end of svg.zig (ids of its own, stretched and fitted corners, a PNG skipped); two corpus cases for zig build diff, image.svg (two data-URI images, one stretched and turned, beside an outer gradient that shares an id with an inner one) and typst-image.typ (two SVGs placed by Typst): both renderers match resvg (mean 0.09-0.11). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* Merge the audio work and the incremental reload loopGabriel Schneider2 days
|\ | | | | | | | | | | | | The mixer's knee, newSound, sfxr, voice rate and groups, the scope's public pieces, micscope and spheres as examples; with the loader workaround for Zig 0.17.1's incremental linker and the panic-trace link. The README's hot-reload bullet takes the incremental loop's paragraph; zig build test: 164/164 steps, 132/132 tests. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * Keep a loaded sketch library's name valid, for panic tracesGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | A panic's stack trace finds a library's debug info by the name dlopen was given, and the load link was deleted right after loading: every frame in a sketch printed as ??? (a sketch that links libc; one that does not is not seen by Zig's own dl_iterate_phdr at all). Link and fd now live as long as the library is loaded, and Library.close removes them; a host that dies leaves its dangling links in $XDG_RUNTIME_DIR. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * Load libraries from Zig 0.17.1's incremental linkerGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-fincremental` selects Zig's new ELF linker, and 0.17.1's writes DT_VERSYM without DT_VERDEF or DT_VERNEED when nothing is versioned: glibc then reads a null version table at the first relocation against an export, and dlopen faults. When a library has that shape, the host loads a copy of it in an anonymous memory file with DT_VERSYM dropped (nothing in it is versioned, so nothing is lost); the build's own file is never written, and every other library loads as before. The copy is 10 ms for the counter's 28 MB library. Fixed in Zig after 0.17.1 (6d27011edb): the check then never fires. The reload test's second build goes through the new linker. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | scope: its kernels, pipelines and a camera for sketches, and note helpersGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A sketch that analyses buffers of its own (micscope's tape of takes) had to copy the scope's shaders to run them. scope.kernels.{waveform, spectrogram, spectrum} and scope.pipelines.{wave, spectrogram, spectrum} are now public, documented with what each reads and writes, beside the parameter and view blocks already in scope.layouts; Scope.gpu.tape is documented as the history on the GPU for a kernel of the sketch's. Views.camera, when given, makes the rects world rects: the views are made at their size there and drawn at camera.toScreen(rect), so moving or zooming the camera recomputes nothing (micscope's world of panels). scope.midi(freq, a4), scope.hz(note, a4) and scope.note_names, as micscope's tuner and spheres' chords each spell them; place() names its argument freq so hz can be the function. Test: notes and frequencies convert both ways (A4 at 440 and 442, E2, middle C, a round trip at 432) and name their pitch class. The README's scope paragraph says all of it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | audio: a voice's rate (its pitch), and groups of voices under one gainGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Voice.rate is the voice's playback speed and so its pitch: 2 is an octave up and half as long, 0 holds it, and changing it does not restart the voice. The mixer keeps a fractional cursor and resamples by linear interpolation between a sample and the next (the last toward silence, or the first when looping): the least code that sounds right, a little dull far from 1; at rate 1 the samples come out exactly. An infinite or NaN rate ends the voice instead of crashing the conversion. Voice.group (0-7) puts a voice under a group's gain, which draw declares each frame with f.gain(group, value) (Command.gain); a group not given one plays at 1, so it is declared state and replays like the voices. The mixer glides each group toward its gain by 1/480 a sample (10 ms for a full swing), so a gain set in one step does not click. Music ducking under speech is then the sketch lowering one number; nothing ducks by itself. The web host ignores gains as it ignores voices. Test: half and double speed against the interpolated samples, rate 0 holding, an infinite rate ending; a looping voice in group 1 at gain 0.5 gliding there and staying while group 0's is untouched, and going back to 1 when the gain is no longer declared. test-audio also builds the voices sketch for the web, which compiles the web host's newSound and gain. The README lists rate, group and f.gain with what they do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | sk.sfxr: the sfxr sound-effect generator, from 02-dont-rat-me-outGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02-dont-rat-me-out's synth.zig, a pure and deterministic port of DrPetter's sfxr, moves into the library as src/sketch/sfxr.zig, exposed as sk.sfxr: render(params, rate, out) gives a coin, blip, laser or explosion as samples for host.newSound. Its knobs count in samples at 44.1 kHz, so the one change is the rate: every length (envelope, arpeggio, repeat, phaser offset, period) grows by rate/44.1 kHz and every per-sample step (slides, duty sweep, vibrato, filter coefficients and their ramps) shrinks by it, to first order for the slides and filters; at 44.1 kHz each factor is 1 and the samples are the original's to the bit. Two spellings change without changing a sample: the phaser buffer is @splat (Zig 0.17 has no ** on arrays) and the phaser delay is clamped before it is converted, so a long sweep cannot overflow it. Test: four parameter sets that between them turn every knob render the lengths and Wyhash of the samples the original rendered at 44.1 kHz (run once, outside the repo), and at 48 kHz a sound as long within 1 %. test/voices.zig makes its blip with sfxr in draw, at in.sample_rate, and is the README's example: a blip in six lines. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | host.newSound: samples a sketch made become a sound, played by voicesGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A sketch that synthesised a one-shot had to stream it (and keep a replay from re-firing it by hand) or encode a WAV for decodeSound. host.newSound (samples) copies mono samples at in.sample_rate into the host and gives an Audio like a loaded one, so the one-shot is a voice: reconciled by key and serial, mixed, faded and limited by the host. It is kept for the life of the host like every sound, and .none if a sample is not finite. The vtable entry is C callconv (pointer and length), as anything new in abi.zig is, for a second host; the web host keeps the copy for samples() (its voices are silent). Tests: a unit test that the sound is a copy and that NaN and infinity are refused; test/voices.zig makes a 1000-sample blip in setup and declares it under a serial space bumps, and test/voices.script checks it sounds once, stays silent through a recording of it played, stepped and seeked, and sounds again for a new serial. For that, expect-audio KEY also passes when voice KEY was mixed since it was last asked, and expect-no-audio KEY says it was not. zig build test-audio runs the script too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | audio: the voice mix plays at true volume below a knee and is limited only ↵Gabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | above it Every mixed sample went through x/(1 + |x|), so one voice at 0.5 played at 0.33, bent. The mix now passes through untouched up to 0.75 (-2.5 dBFS) and above it follows knee + (1 - knee)·u/(1 + u), u the excess over the room left (the old curve is its knee-0 case): same value and slope at the knee, rising, tending to 1. A clip normalised to full scale only has its peaks bent (1 plays at 0.875); two at full scale sum to 0.958. Per sample, no state, no lookahead, on the frame thread as before. A unit test checks the curve: identity to the bit below the knee (every 997th float, both signs), rising and at most 1 from the knee to infinity (every float near the knee), odd, slope 1 at the knee; `zig build test-audio` runs the mixer's tests alone. The README says what the mixer does, and that SDL clips the total of the voice mix and the streams. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Merge the session recorder and the talk primitivesGabriel Schneider2 days
|\ \ | | | | | | | | | | | | | | | | | | Recording (sessions, marks, clips, the reload speed-ups under them) and anim's Deck with its example talk, together; no conflicts; zig build test: 161/161 steps, 127/127 tests. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| * | anim: Event.key, and the talk example runs in a windowGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | An Event says its key (abi.Event.key), which the player and the talk example each spelled out by hand; `zig build talk` shows examples/talk.zig in a window on the generic host, its state under .zig-cache, and `zig build talk-lib --watch` beside it reloads every edit in place. Co-Authored-By: Claude Fable 5.2 <[email protected]>
| * | anim: the stock player runs on the DeckGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The player's State is an anim.Deck plus the viewer's settings; keys and clicks become an Ask: click, space and page down step (space plays or pauses a scene with no pause), page up and backspace go back a step, ] and [ go a slide, P plays or pauses, left/right/home/end/,/. seek through Ask.to and Ask.end. A compiled scene is a talk without gates. The HUD shows the slide and step, and when the talk waits. Exported, each pause holds the scene file's hold (1 s). Its frozen hold (held, stopBetween, proceed) is gone. Scripts read deck.t and deck.playing where they read t and playing.
| * | anim: the player's render path moves into anim.PainterGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | render, paint, reveal, built, stage, guides and labels move verbatim from player.zig into src/anim/Painter.zig, with the viewer's settings and the Typst module as parameters, so a sketch that runs a Deck itself paints its shot the same way: a Painter in its Session and paint() once a frame. The scene's frame size is anim.width/height and a Shot carries its t. Pixels unchanged: the scene tests' screenshots and all 92 exported frames match the previous build's.
| * | anim: talks: gates that let time run on, pause, beside, loop, clear, slides ↵Gabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and the Deck A talk is a live scene re-run from the top every frame, a function of its time and of the gates opened so far. Frame.gate(open) waits while time runs on and records the value it opened with; pause() is the presenter's click. beside and loop are the sub-animations, slide() the second navigation level, clear() the end of a slide. anim.Deck is the playhead and the gate log as plain data for any sketch's State: update() takes an Ask (next, back, next_slide, back_slide, to, end) and runs the talk with the app mutable, shot() runs it read-only for drawing. A click during a step finishes it; back cuts to the picture held before the last click; an edit that moves the last opened gate moves t with it; exported, every gate holds Deck.hold. Live takes a namespace or a tuple of them (sources) and exposes frame. Builder.pause, Instant.clock and Frame.clock are gone: t runs through gates. A test-anim step runs the module's tests and the player's scenes.
* | | Bound a scripted run's memory sessions; check a script records the same twiceGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A scripted run from fresh state records in memory, and a very long one grew without end. It stops at 256 MiB (ten hours or more of play at 60 Hz; a write the memory database cannot make, out of memory included, is the same): once, a warning, and no more frames, while what it holds still reads (marks, clips, past sessions). test-same plays test/past.script twice into two databases and compares them value by value with test/same_sessions.zig, but for a session's started and ended (the wall clock): every frame, keyframe, stretch and mark follows from the script alone. A third run from fresh state leaves its state file and no database. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Mend a sessions database a crash tore, compact one at exitGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A database whose last commit a power loss tore (its root header written, its bytes not all) was refused and renamed aside, a new one begun. Now it is opened at the last commit before the tear whose trailer verifies and whose sessions read whole, scanned back from the end, as pardes's state file is; renaming it to <path>.broken.<seconds> stays the last resort, when no commit is whole, and nothing is deleted. Every commit leaves the nodes it copied behind, about a kilobyte a second of play: a clean exit compacts the file (into <path>.new, synced, renamed over it) once it is 64 MiB and past twice what its batches and keyframes hold plus 64 MiB. Tests: a database of two sessions, cut at six places inside its last commit, opens at the commit before with every frame of both; one with no whole commit is kept aside byte for byte; a compacted one is smaller and holds every frame and keyframe. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Export a session to a file of its own, and import oneGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | export-session [S] FILE writes session S (this run's by default, committed first), with the marks and clips that point into it, as session 0 of a new database: written beside FILE, synced, renamed over it. import FILE appends each session of such a file to this database, from "import <file name>", its marks and clips renamed NAME@<file name> (cut to 32 bytes). The copy is value by value, the same few lines for both, over whatever a session holds; sessions lists where one came from. test-import records test/past.script's session, exports it, imports it into another database and replays it there: the mark it carries is the State half a second in exactly, and two seconds in is frame 120's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Keep a sketch's files in .sketchbook/, a shipped game's in XDGGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zig build run, probe and export pass --state .sketchbook/<name>.state. The host makes that directory with a .gitignore of * (a sessions database grows, and the jj snapshot build_info takes would commit it while under a megabyte), and moves the state and store an older build kept beside it in once, with renameat2(NOREPLACE): when both exist nothing moves and the host says so. Without --state an interactive run keeps its files in $XDG_DATA_HOME/<name>/ (~/.local/share without it), not the cwd; a script or an export still uses sketch.state. test-paths checks all three cases. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Play past sessions back, re-synced at their keyframesGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | play session S [at SECONDS] restores the session's keyframe before that time (a binary search over its keyframes' times), replays its frames up to it and leaves it paused there; without a time it plays from the start. At each later keyframe the replay reaches, the State is compared with it over the leaves migration kept: a keyframe taken of what update made (periodic, mark, before a reload, exit) that differs is reported once, "diverged before frame F: N values, first <field>", and every keyframe is restored, so a replay across a jump the log does not hold (set, load, a sketch command) goes on from the State that followed it. A session built from another source or build says so. The console's status line names the session, frame and time, the mark, the clip and where it records. test-past records a session, replays it by the same build (the mark's State exactly, frame 120's two seconds in, no divergence), then by a build with an edited fixture (one divergence, before the mark). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Make snapshots named marks and recordings named clips of sessionsGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state file keeps live state only (SKETCH03, one slot). save NAME is a keyframe and a mark in the sessions database, synced to disk; load, diff, snapshot and expect-snapshot take mark names, through the keyframe's own layout migrated to today's, compared over the leaves migration kept. A file from before (SKETCH01/02) has its used snapshot slots imported as marks "1".."7" at open, then drops them; a run that records nothing leaves them alone. record NAME, stop and play NAME make and play clips: a frame range of a session and its start keyframe, nothing overwritten, nothing invalidated by a later save, no capacity. The 64 MiB .inputs file, its --fresh memset and Timeline's Bank are gone; numbers still work as names, so every existing script runs unchanged. Event times in a clip are the session's, not restarted at record. reload.script also checks that a field a reload drops is still in the keyframe taken before it (expect-key). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | | Record every run's frames to a sessions database in xitdbGabriel Schneider2 days
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Live play was recorded only after someone typed record N, into 16 fixed slots. Now every run is a session in one xitdb database per sketch, beside its state file (<name>.xitdb): an append-only log of the frames live update was fed, one commit a second of session time, and keyframes of the State at start, every minute, on jumps, before and after reloads and at exit. A kill -9 loses at most the uncommitted second (test-kill). Whether a build records travels in the sketch: App.Options.record, null meaning Debug, reaching the host as Info.record. Scripted runs from fresh state record in memory, exports not at all. Each stretch of a session keeps its build, layout and Info.source: the repository revision (one jj or git call per build, build_info), zig version, backend and mode. Sessions.zig takes plain data (bytes, events, strings, a path, an Io), so a second host can drive it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* | Load sketch libraries through a symlink and identify builds by statGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | A load copied the whole library to $XDG_RUNTIME_DIR (a read/write loop across filesystems) and then hashed all of it for the build id: 40 ms for a 10 MB Debug library, 200 ms for drat-meout's 58 MB. dlopen only needs a fresh name, so the host links one to an fd open on the library, which also pins the file a build may rename over meanwhile. The build id recordings carry is a hash of the file's inode, size and modification time: Zig's own linker writes no build-id note in Debug.
* | Build layout signatures without std.fmt at comptimeGabriel Schneider2 days
| | | | | | | | | | | | | | | | Each comptimePrint costs about a millisecond of comptime, and a sketch's State, Session and Store reflection makes hundreds: drat-meout's library spent about 0.4 s of its sema on them. Numbers are spelled by a small decimal function instead; the signatures, leaf hashes and tag strings are byte for byte the same, so state files keep their meaning.
* | Compute abi.hash's layout half once per abi change, not in every compileGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | The comptime walk over the shared types cost about half a second of every sketch library's compile. abi_hash.zig runs it at build time, once per change of the abi sources (watched like any input), and build.zig hands the number to host and sketches as the module abi_hash; abi.hash folds in the build as before. The value is the walk's own, computed for the build machine in Debug.
* | Refuse a sketch library built by another compiler, backend or modeGabriel Schneider2 days
|/ | | | | | | | abi.hash now covers the zig version, codegen backend and optimize mode: Zig's own calling convention (Host.VTable, every Allocator) differs between them, so a Debug host loading a ReleaseFast or LLVM library faulted on its first draw. Libraries export sketch_build, and the host's refusal says what differs and what to run instead.
* gpu: add a post-process pass with optional depth sampling, and describe the ↵Gabriel Schneider2 days
| | | | | | | | | | executor pardes shares `f.postProcess(source, target, .{...})` records a fullscreen pass that samples a completed render into a distinct target image: colour at fragment binding 0 and, with `sample_depth`, depth at 1, which needs the source's latest pass to have depth and one sample (missing depth, multisampled depth and feedback loops are rejected). The scene format's version 4 carries it, the executor records it on the caller's command buffer and owns the sampler, the web host does the same with its texture and sampler pairs, and native profiling reports the work as `postprocess`. The README says how to use it. docs/pardes-rendering.md describes the executor as pardes uses it for addon scenes: a borrowed SDL GPU device, `record` into the caller's command buffer, `run`, `output` and `postProcess`. The working copy as it stood on 2026-11-16; message written by Claude from the diff, at the author's request.
* Add display-paced frame timing and presentation feedback in ZigGabriel Schneider3 days
|
* Add glTF scene rendering, resource setup and 9P controlsGabriel Schneider3 days
|
* host: add optional Tracy profiling and reduce upload allocation stallsGabriel Schneider6 days
|
* Add reusable GPU backdrop filtering to the shared canvasGabriel Schneider6 days
| | | | Draw native GPU frames through the same bounded canvas used by headless capture. Backdrop commands reuse one snapshot and shader state, with an unchanged fallback on unsupported renderers. Verified through native debugger lenses, restart, and repeated font zoom checks.
* frame: a library's own state for the frameGabriel Schneider7 days
| | | | | | | | canim keeps its table of places on the frame rather than in a process global, so two players at once each have their own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
* sketchbook: JetBrains Mono NL (no ligatures) for the code faces, and its ↵Gabriel Schneider7 days
| | | | medium weight (.code_medium)
* sketchbook: JetBrains Mono bundled as three more faces (.code, .code_bold, ↵Gabriel Schneider7 days
| | | | .code_italic), for programs
* sketchbook: text rasterized at one scale and drawn at another ↵Gabriel Schneider7 days
| | | | (f.textScaled), steady under a moving camera
* sketchbook: a scene file says its page colour (background)Gabriel Schneider7 days
|
* sketchbook: dashed strokes in sk.draw (dashed, Tessellation.strokeDashes)Gabriel Schneider7 days
|
* sketchbook: text in six faces of the Go family, all bundled (f.textIn, ↵Gabriel Schneider7 days
| | | | host.textSizeIn, sk.Face)
* sketchbook: anim, manim-style scenes as a module (from the game's vecanim), ↵Gabriel Schneider7 days
| | | | | | | | | | | | | with objects a scene draws itself The player takes its canvas from the room it has and fits the scene's frame into it, plays through and quits when exported, and draws vector objects in runs around custom ones. The renderers' resvg comparison and the timings come along as `zig build diff` and `zig build bench`; the comparison's reference is padded to whole blocks rather than squeezed, which had put Typst text over the limit. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: shapes antialiased up to 3840x2160; SDL's Vulkan backend no ↵Gabriel Schneider7 days
| | | | | | longer defragments (it lost a frame's first draws) Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: frames for ffmpeg (--export, on a clock of its own), text sizes, ↵Gabriel Schneider7 days
| | | | | | a font from the environment Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: drop a patch leftover (standalone repo: tests pass as they are)Gabriel Schneider7 days
| | | | Co-Authored-By: Claude Fable 5.2 <[email protected]>
* sketchbook: a drawing layer on top, host fixes for replay and migrationGabriel Schneider7 days
|
* sketchbook: Zig 0.17, a Store on disk, requests, a scope (waveform, ↵Gabriel Schneider7 days
| | | | spectrum, spectrogram), audio codecs and fonts, web host
* sketchbook: await in scriptsGabriel Schneider2026-09-25
| | | | | | await FIELD VALUE plays frames until a state field holds the value, for up to a minute: for waits whose length is the sketch's business, such as a line of dialogue typing out.
* sketchbook: fills blendGabriel Schneider2026-09-25
| | | | | | The renderer's draw blend mode was left at SDL's default, none, so every translucent fill (panels, labels, HUD bars) drew opaque natively while the web honored alpha. It blends now.
* sketchbook: what the game's review neededGabriel Schneider2026-09-25
| | | | | | | | | | | - input.started: true on the first update of a run, never after a reload, for a sketch to stop what should not resume from saved state. - A console line that errors fails its script. Sketch commands answer unknown, done or failed (abi.Outcome) instead of a bool that hid errors. - addScript also takes the hot-reloadable library, run through the generic host, so scripts can reload a real build. - Sounds that do not load are .none, not an empty clip. - sk_tag reads an enum field's tag name from the web build, for tests.
* sketchbook: headless runs never open a windowGabriel Schneider2026-09-25
| | | | | | | | The offscreen hints lost to the environment: with SDL_VIDEO_DRIVER=wayland set, every headless test and script opened a real window. They are overrides now. The offscreen driver has no Vulkan surface on every driver, so a headless host's GPU renderer gets no window and draws into a canvas-sized texture, which screenshots read.
* Put the game first: lib/sketchbook, sketches/vecanimGabriel Schneider2026-09-25
The root is the game. The platform library moves to lib/sketchbook (with serve_web.py, which serves any sketch's web build, as a tool of it), and vecanim to sketches/vecanim, still its own package on the same library.