diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 01:05:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | d302e4887c4c3fa534fec73a2141d3dc78436ccd (patch) | |
| tree | 9457e65b10a560c5c8cf1727d021ecaac38c09ab /src/host/probe.zig | |
| parent | cfedacb6d8c1e194575d5b5c62d2a724bdf2add6 (diff) | |
| download | sketchbook-d302e4887c4c3fa534fec73a2141d3dc78436ccd.tar.gz sketchbook-d302e4887c4c3fa534fec73a2141d3dc78436ccd.zip | |
anim: part, the shapes of an object inside a rectangle as an object of their own
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
Diffstat (limited to 'src/host/probe.zig')
0 files changed, 0 insertions, 0 deletions
