| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sound a sketch makes leaves for the device about one pull after draw, and
SDL opens 1024-sample pulls at 48 kHz (21 ms); 256 leaves in about 6.5 ms,
but the audio server then runs every client at that size, and drops out
under load. The only way to ask was SDL_AUDIO_DEVICE_SAMPLE_FRAMES in the
environment. Now an app declares `pub const audio_pull = 256;` beside its
name; abi.Info carries it (0, SDL's own, when it is not declared), and the
host sets it as SDL's hint just before it opens the device, at normal
priority, so the environment variable still wins. It is read once, at
start; the web host has no device to open and ignores it. The sound
overlay's header says what the device took: OUTPUT ch1 / ... / pull 256.
Test: audio, on SDL's dummy driver: the device opened with nothing asked
takes 1024 at once, asked 256 takes 256, and with 512 in SDL's copy of the
environment takes 512 though 256 was asked. test-audio: 48/48 steps, 9/9
tests. README: the app table's row, and a paragraph in sound with the
trade-off.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
objects
The Store's deletion with shared-page keyframes and the 64 MiB cap; f.audioBuffer and in.lead with spheres on them; the embedded-SVG image, Typst's root, part, and the manual example. No conflicts; zig build test: 179/179 steps, 140/140 tests; spheres 75/75, micscope 67/67.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A compute shader's output was heard only after the sketch read it back
(f.download, a frame later) and pushed it behind a lead of its own
choosing; spheres kept 100 ms, and a change it made left for the device
96 ms later on average (measured, dummy driver, 60 Hz).
f.audioBuffer(key, buffer, .{ .count, .offset }) streams `count` f32 a
shader wrote: the host copies them back while it runs the frame's
commands, waiting on the copy's fence (Executor.read: 0.2 ms on average
here, 2 ms at the 99th percentile on a loaded machine), and queues them
on the stream, so nothing is in flight between frames and the sketch
keeps no books. Input.lead says how far ahead to make sound: the slowest
of the last 64 frames' worth of samples (timed between the ends of the
frames' commands, where the pushes are), plus the device's pull (what
SDL takes from a stream at once, read from the device: 1024 here), plus
half a pull for each underrun, a sample less each frame after; capped at
8192. A sketch pushes `in.lead -| in.stream(key).queued` a frame, and
its change leaves after about what is queued ahead of it, a pull: 19 to
27 ms on average with SDL's 1024-sample pulls, 6.3 to 6.5 ms with 256
(SDL_AUDIO_DEVICE_SAMPLE_FRAMES; 17 under heavy load). Stream.underruns
counts the pushes that found a stream empty though the frame before had
fed it (a gap).
The voices keep their 2048 samples: mixed to the lead, a one-shot longer
than it is mixed over several frames, and voices.script's expect-audio
and expect-no-audio, which look one frame at a time, failed.
On the web, audio.buffer reads the buffer back with mapAsync and queues
it on arrival, in order, counting it as queued meanwhile; in.lead stays
at 100 ms there.
The measurements (a probe patched into the host for the purpose, kept
out of the tree) are in the 02-pardes-code scratch, .scratch/sketch/gpusynth.
Tests: the lead's arithmetic (audio.zig, in test-audio's filter); spheres'
play script checks its stream is fed. zig build test: 164/164 steps,
49/49 tests run (the rest cached); zig build test-audio: 48/48 steps, with
the voices sketch's wasm, so web.zig compiles; voices.script passes four
runs in four. web/host.js: node --check only, no browser run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
first
A save grew without bound. Now Sessions.max_save is 64 MiB and
layout.max_state 32 MiB, so history always has room (the compile error
says so: "State is N bytes, and may be 32 MiB, half of a save, so
history has room: ...").
A commit that leaves the file past the cap trims it (Sessions.trim): one
transaction drops history oldest first, a keyframe by removing its pages
(its frame, batch and time stay, so keyframe numbers, keyBefore and
marks by index still resolve) and a batch of frames by emptying its
slot, until the keyframes' written pages and the batches left count
three quarters of the cap; then the file is compacted into `<path>.new`
and renamed over it, and the run goes on in the new file (compact now
reopens). A dropped keyframe's pages may still be shared by a later one,
so a round can free less than it counted: the next round lowers the
count by the overshoot, four rounds at most. Never dropped: the present
(the newest keyframe and the batches from its own on), the keyframe of
the newest mark of each name, the keyframe of the newest clip of each
name and every batch holding one of its frames. A session left with
nothing loses its keyframes, batches and stretches; its summary stays.
Asked for, what was dropped is error.HistoryDropped, which the console
says in words ("That part of the history is gone: a save keeps 64 MiB,
the newest.").
Marks are pinned under the cap: a mark of a new name needs room for a
whole State, history trimmed to make it; without, it is refused,
error.SaveFull, the console saying how to make room: save over a mark's
name (the older one then goes with history) or start another save. A
mark over an existing name is always taken. (The spec's "room" rule,
refusing only after a trim failed, let one mark take the file past the
cap; room for a whole State keeps the cap hard, at the price of
refusing early for a big State.)
Builds that do not record (`history` false, from Info.record) use the
same mechanism with the history limit zero: every commit holding a
keyframe drops all it may (no compaction unless past the cap), and the
exit compacts, so the disk holds at most the last minute of input while
it runs and the present and the marks after. The exit compaction a
recording build made past twice its contents plus 64 MiB is gone: the
cap's compaction does that work.
Measured (Debug, unit test): a trim of a 64 MiB file to 48 MiB takes
165-187 ms (two rounds of drop and compaction, the first ending 0.5%
over); a no-history trim at a keyframe, 0-5 ms. ReleaseFast not
measured.
The console's `marks` reads each mark's keyframe fields, not its State:
an older mark of a name may have gone with history (listed "dropped"
when its session went whole). Docs: record means "keep history" in
App.Options, sketch.Build and abi.Info.
Tests: zig build test, 168/168 steps, 137/137 tests. New, in
Sessions.zig: 100 keyframes of 1 MiB each with marks at the 5th and
20th: the file never past the cap, the oldest keyframes and frames
HistoryDropped, both marks and the newest keyframe whole, the present's
frames readable; without history, 20 keyframes and a mark: only the
mark and the present stay, the file compacted at exit under three times
the State and the present reopening whole; 2 MiB marks until one is
refused (SaveFull, the file under the cap), then one over an old name
taken and the file under the cap, every mark whole. micscope 67/67,
10/10; spheres 75/75, 3/3; noc e2e 292/292; the drat-meout copy 87/87,
30/30.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A sketch kept its live State in a mapped state file and its history in
a sessions database beside it. Now the database is the save, the one
file: the present is its newest keyframe and the frames logged after
it, and a run starts there (Sessions.present: the newest session with a
keyframe, its last keyframe loaded and the frames after it read). Host
restores it (migrating across a layout change, as a seek does) and
replays the frames through `update`, unlogged, `started` as it was fed
(true only from a session's first frame); played by another build, they
are not replayed, and the run says how many frames that was. The run's
first keyframe then starts from the present's pages, so a session costs
what changed since the last one. --fresh still starts from defaults,
the save untouched.
State is process memory (memory.State: one page-aligned allocation, its
layout, and its layout header for the stretches); a reload's adopt
allocates the new layout's defaults and migrates the old bytes into it,
and returns null when unchanged. Gone: StateFile, its slots, used bits,
resize, dropSnapshots and the adopt that rewrote a file's header; the
sketch-facing `Host.state` keeps `layout`; Timeline restores into
`state.live()`. `adopt` no longer runs `init`: openPresent does when
there is no present.
Every run saves: the database is opened in a file for every run but a
scripted one from fresh state (memory, nothing on disk) and an export
(none). So release builds keep their State as before, and marks and
clips work there; `.record` keeps or trims history (next change).
The save is `<stem>.xitdb`, `<stem>` being --state without `.xitdb` or
`.state`: `--state x.state` and `--state x.xitdb` name the same save.
Defaults: `.sketchbook/<name>.xitdb` under zig build run, and
`$XDG_DATA_HOME/<name>/<name>.xitdb`. A sketch's appended files are
`<stem>.<name>` (micscope's takes: `.sketchbook/micscope.take-3.f32`,
where Phase 1 wrote `micscope.state.take-3.f32`; that naming never left
this workspace, so nothing of the user's is renamed). A scripted run
from fresh state or an export appends to `<stem>.<pid>.<name>` and
removes those at exit; the private state file and the exit's moving of
files by prefix are gone from root.zig.
Old state files: in a new save, `<stem>.state` (one slot or eight, any
of the three formats) is imported once: slot 0 becomes the present (in
today's layout), slots 1-7 marks "1".."7" (migrated to it, as before);
the file is read through a read-only mapping and left exactly as it
was. It is never read again: the save then has a session. A file that
is no state file is said and left. .sketchbook/'s move of an older
build's `<stem>.state` from beside it stays, now by stem.
sketchbook-probe is deleted (86 lines, its build step, Sketchbook's
probe_exe, App.addProbe): it mapped the state file. Reading the save
instead would show State as of the newest keyframe, up to a minute old,
never the frames after it, which only `update` can turn into State;
and it would need a read-only open the host has no other use for. The
planned 9P state/ tree reads live State from the process.
A kill -9 now loses what the session log always lost: the frames not
yet committed (under a second: in test-kill 15 of 255 frames, the
next run starting from frame 240's State), keyframes and marks queued
since the last commit (a mark commits at once, synced), the session's
end time and an open clip's end. The mapped file lost nothing to a
kill. A power loss reopens at the last commit the disk holds whole
(`mend`); commits are fsynced only for marks and at exit, so what the
OS had not written back is lost (not measured); the mapped file, never
synced, could tear page by page.
Measured: drat-meout's State, 20 extra jump keyframes in a 2,400-frame
script, 100,708 B more than the same frames without them: about 5 KB
a keyframe, where the whole State (17.7-20 KiB) was written each time.
Tests: zig build test, 168/168 steps. test-kill runs for a recording
and a non-recording build, and the second run checks `updates` is 240
(replayed), not only the session's frame count. test-paths: the XDG
directory holds `replay.xitdb` alone; .sketchbook/ holds `.gitignore`
and `replay.xitdb`; the next run's State is the one the last left; an
older `old.state` beside .sketchbook/ is moved in once, never over a
file, and left as it was when it is no state file. test-same: a run
from fresh state leaves no file at all. Rewritten: memory.zig's state
file tests as State's (migrate, unchanged) and OldState's (refused
untouched; drat-meout's v1 fixture imports every value, the file
unchanged), Host's snapshot import as importOld (State live, two marks,
the file byte for byte as it was), Host's setup test without a file,
the timeline test on a State. micscope 67/67, 10/10; spheres 75/75,
3/3; noc e2e 292/292; the drat-meout copy 87/87, 30/30.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Phase 1 left two loose ends in micscope's take files. A new take could
continue an old file when its id met one already written without a jump
in between (the jump is what moves next_id past written files), and a
deleted take's file stayed on disk.
The host gains one call beside appendFile: f.host.writeFile(name, bytes)
writes a new, empty file of that name, through the same vtable entry
with a `replace` flag. The old file is unlinked, so a readFile mapping
of it keeps its bytes, and the host's cached mapping is retired (kept
until exit, the sketch may hold it) so the next readFile maps the new
file. The web host writes nothing, as for appendFile.
micscope writes each take's file so when the take begins: on the
frame whose transport request is newly `recording`, live, and not a
jump (a jump's requests are restored State's, not a beginning; a fresh
Session counts old requests as handled, so a restart mid-recording
keeps its file), before the takes are read; `open` writes a file's
samples so too.
A deleted take's file stays: its State entry comes back with any seek
or mark from before the delete, marks are kept with no end, and an
exported session carries them; neither the sketch (which cannot see
the history) nor the host (which cannot read State's meaning) can tell
when none is left. So "never, safely": the file is kept.
Tests: zig build test, 164/166 steps, 132/132 tests (the appendFile
test now also replaces a file and reads back only the new bytes); the
one failure was the Typst bench's 1 ms bound (1.024 ms), timing code this
change does not touch, on a machine loaded by other builds; it passed in
the next full run (166/166, with the change above this one). micscope's zig build test, 67/67 steps,
10/10 tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A sketch's data is State: flat bytes, what grows has its capacity in its
type. The Store, a heap in a file mapped at 0x2000_0000_0000 with 64 GiB
reserved, its power-of-two allocator, its root adopt and migration, and
its test, are gone from memory.zig; so are Context.store and store_root,
Info.store, Memory.store, the Store declaration's glue, Init.store,
Frame.store and Console.store, the web host's store in wasm memory, the
host's StoreFile wiring and `<state>.store` file, the `.store` suffix in
moving an old state into .sketchbook/, the build's tests' `rm` of it, and
layout.check's `pointers` flag (State is the one checked memory now).
Its one real user, micscope, moved off it in the change before. Old
`.state.store` files are not read, converted or deleted, and stay
ignored by .gitignore. A sketch that still declares a Store gets no
error for the declaration: nothing reads it, and a `*Store` parameter is
a compile error (no argument of that type).
layout.of(T, .state) refuses a State bigger than layout.max_state, 64 MiB,
one constant: "State is N bytes, and a save holds at most 64 MiB: lower
a capacity (an array, an sk.List), or keep what need not be saved in
Session." The pointer-hash gap the spec found (a Store pointer's
element type changing kept the old bytes) is gone with the only
persisted memory that held pointers.
README: no Store row, allocator row, migration paragraph, file bullet or
known limits; draw and command lose their store parameter; State's row
says 64 MiB at most; data that grows and is the user's work goes in a
List in State or, bigger than a save, in files the sketch appends to.
Tests: zig build test, 166/166 steps (the store's unit test gone; new: a
65-MiB State fails to compile with the message above, by expect_errors).
micscope, spheres, noc's e2e and drat-meout's test unchanged and green.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The library could read a file and not write one, so micscope kept its
takes in the Store: a tape appended every frame while recording, which a
save of 64 MiB could not hold (under six minutes of 48 kHz audio, and
micscope allows ten-minute takes). Now a sketch has one call that
writes: f.host.appendFile(name, bytes) appends to `<state>.<name>`, beside
the state file (in .sketchbook/ under `zig build run`), creating it, and
returns the file's path for readFile, or "" when nothing was written. It
is pointer and length in, a C-callconv entry in the vtable like newSound.
Only draw and command have a host, so a write is not replayed, like
sound. The web host writes nothing and returns "". readFile still maps a
file once, so what is appended after is not in what it returned.
A scripted --fresh run works on `<state>.<pid>`; the files it appends to
are `<state>.<pid>.<name>`, and the exit now moves every file of the run
(found by that prefix in the state's directory) to the given name, or
removes them for an export, where it moved the state and its store by
two fixed suffixes.
micscope: State lists the takes (sk.List(Take, 64): id, source) and the
counter, next_id; `update` adds a take when recording starts and removes
one on delete. Each take's samples are `take-<id>.f32` (mono f32 at the
host's rate), appended to by draw as it records and by `open`, which also
puts them straight into Session (the web keeps no files). Session holds
the tape (every take's samples, read from their files once a process)
and a clip per take (start, len, and heard, the playhead, which a restart
no longer keeps); draw makes the tape follow State: a take State lost
leaves it, one it lacks is read from its file. A deleted take's file
stays, so a seek back finds it again; after a jump (start, seek, load,
set, reload) draw moves next_id past take files already written
(--fresh keeps them, and a seek back finds the future's) with a
`next-id N` command. Gone: the Store, the remove request, the `takes N`
command that told State the Store's count, adoptTape. Old
micscope.state.store files are not read: their takes stay in them.
README: appendFile among the host calls, a paragraph on it, and the
private run's appended files.
Tests: zig build test, 164/164 steps, 133/133 tests (one new: appendFile
appends beside the state and names the file). micscope's zig build test,
67/67 steps, 10/10 tests; transport.script reads `takes.len`, loses the
miscounted-takes check with its mechanism, and gains a deleted take read
back from its file after `load` and the counter moved past written files.
Pictures: the four scripts' 18 screenshots before and after, compared by
pixel: the differences are where two runs of one build differ by
themselves (playheads, the microphone's take lengths, the live view).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| | |
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]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
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.
|
| |
|
|
| |
medium weight (.code_medium)
|
| |
|
|
| |
.code_italic), for programs
|
| |
|
|
| |
(f.textScaled), steady under a moving camera
|
| |
|
|
| |
host.textSizeIn, sk.Face)
|
| |
|
|
|
|
| |
a font from the environment
Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
| | |
|
| |
|
|
| |
spectrum, spectrogram), audio codecs and fonts, web host
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
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.
|