luvcraft/tests.lisp
A duplicate remains idempotent even if the closing native canvas would reject a callback before the attachment gate can inspect it.
Removal remains legal after the terminal transition so teardown and constructor rollback never lose their release path.
The rejected release failed deliberately, but ADD invoked it once and preserved the semantic rejection as the primary condition.
Interpreting keys belongs to the layer above; what the core promises is that a focused object is offered the event and that nothing else sees it.
This is the application teardown policy: keep the release report on its owner thread while each individual release crosses, synchronously, to the native canvas owner.
Moving straight from one interaction to another still owes the capture.
A player who was not in mouse look is not put into it by focusing.
The Vulkan viewport performs the Y inversion: moving from the centre to the top-left subtracts one in both vertex-coordinate axes here. The quad's own corner offset survives the subtraction as rounding, so the shift is read to single-float tolerance rather than exactly.
The design-grid lanes describe the arrow, not where it is drawn.
The shader rounds by insetting the outline and growing the distance back, which only reads as the drawn shape if every inset corner sits exactly one radius inside both of the edges that meet there.
The tip is the hotspot, so the design grid starts there.
The live hotbar occupies 114 pixels at 1280 high, hence 57 in this proportional 960 by 640 framing fixture.
Which key reaches this is the command layer's business; what the wall promises is the framing it asks the camera for once it is focused.
The final pose is head-on and every surface corner lies inside the six-percent picture margin plus the hotbar's excluded lower region.
A one-chunk world with a flat surface top at y=1, for walking animals over.
It rests on the surface it started on, has not fallen through the world or climbed it, and has actually gone somewhere.
And it stays inside the chunk it was spawned in: a turtle walking into the world boundary turns away from it rather than leaving.
Stone is not turtle country, an occupied cell is nobody's, and a species nothing has claimed is an error rather than a silent absence.
Only the resident chunk offers sites, so the neighbourhood has to be visited a few times before it is as full as it wants to be.
Every vertex of every turned box stays within the animal: the yaw rotation moves the model around its own position rather than away from it, whatever heading it walks on.
A headless session with one turtle in front of a player looking at it.
A wall between the two is decided by which the ray reaches first, not by whether the animal is within reach.
And an animal beyond the player's reach is out of it.
A mount carries the player, so the ordinary controller stands down.
An unridden turtle rests first; a reined one walks. The rider steers with the session's own movement intent, the same one the player's legs would have read.
Wherever it went, the player went too.
And the camera it asks for is a seat on the animal: over its own footprint, above its back, facing the way it faces give or take the sway of its gait.
Shift-TAB is the same toggle: it puts the rider down somewhere their own box fits and gives the animal its mind back.
And it ignores a rider's wishes rather than failing to understand them.
A local step remains pure domain arithmetic: the window is not asked.
Crossing selects the aggregate once; a fifth window participates by adding a method, with no type switch in the continuation operation.
Offsets belong to each representation: the live/neighborhood chunks use local dense order, while the snapshot includes a halo.
The quad is the exact outline: the vertex stage dilates it by pixels.
Geometry carries only the static em padding (none by default); band
selection receives the exact bounds used by pack-slug-outline. Their
spare Z lanes carry the default ink components.
:BACK reads left-to-right in world X from a viewer on negative Z.
One missing voxel leaves an L-shaped component. The retained screen becomes invalid and rediscovery refuses to pretend it is rectangular.
A rectangle straddling a chunk seam is discovered as one component whose retained admitted sites are exactly its blocks, without any coordinate objects retained per member.
Every popped site exposes its four coplanar relations.
A covered seed and a wrong material report their own statuses.
Eight blocks can carry eighty columns because font fit is a surface projection; no terminal-cell count is attached to one voxel.
Establish the small nursery before observing automatic GC. Explicit SB-EXT:GC calls intentionally do not run after-GC hooks.
Tracy tells zones apart by the address of their source location, and recompiling a file re-runs the LOAD-TIME-VALUE that asks for one. Two requests describing the same zone therefore have to answer with the same pointer, or a recompile in the middle of a capture would split the zone.
The shim owns TracyCZoneCtx values at their native size. Lisp observes
only the stack discipline that with-tracy-zone relies on, so adding fields
to Tracy's opaque context cannot silently truncate zone-end events again.
Explicit placement into generated air is an overlay value too.
Stable coordinate order makes saves readable and diffs meaningful.
Four dense matrix rows are representation for the declared :WORLD-TO-SHADOW map, not sixteen falsely homogeneous quantities.
Painted tiles fill a prefix of the capacity; the headroom past them stays zero, waiting for a live image to define a new material into it.
The colour atlas remains ordinary opaque sRGB material colour.
The normal materialization is derived from exactly that height field:
alpha preserves it byte-for-byte, rgb stays unit length within RGBA8
quantization, and at least one tangent lane responds to relief.
The tenth slot is the urbit material, and its chip is the 0 key.
The pier lives under the checkout's build directory, named by the wall.
A pier vere has not made an .urb in boots as a comet; one it has, resumes. The urbit itself is not run here: booting a comet is a networked, minutes-long affair that belongs on a wall, not in a test.
The full inventory may select a block with no number key; the title makes that distinction visible rather than advertising an eleventh key.
The first two rows locate the orthographic footprint. Translation smaller than one 0.0625-world-unit shadow texel cannot move it, to within the rounding of the anchor's own walk, which is a millionth of a texel against the texel's 1/1024 of the footprint.
A frame's texel lattice is the set of world points with integer light-space texel coordinates. When the sun moves, the lattice has to turn, and it must do so about the eye: a point near the camera should see nearly the same texel coordinate before and after, however far the camera stands from the world origin.
Row X has length 1/extent. Undo that scale before comparing the neighboring orientations around the former abs(forward.y)=0.92 switch.
Gravity settles the body exactly on the block tops.
A held right input accelerates into, but not through, a two-block wall.
Jump is an edge request, not a second form of flying.
A head-high wall closes the direct line but leaves both sides open.
Waiting after an immediate terminal result is also immediate; the completion notification may already be sitting in its mailbox.
Vertex lanes are atlas-independent: local corner coordinates, the tile offset under the atlas mapping, and four base-three edge digits.
Scheduling while FIRST is active must remain desired work, not a second queued wake which can run behind an unread first result.
This changes RIGHT, but not the boundary LEFT's mesh observes.
This touches RIGHT's -X boundary and must invalidate LEFT.
Removing RIGHT's boundary block also exposes a face owned by LEFT. One completed replacement must leave the whole old pair visible.
The second stone means placing after removing the first still has a solid target beyond the empty adjacent site.
(canvas)A native destination with a lifetime and frame clock.
Test whether two compatible scalars are equal.
((agent application-agent) &key)(canvas)Return true when the caller is CANVAS's native event/frame thread.
Logical conjunction of tests and raw truth values.
(canvas function)Run FUNCTION with a timestamp on CANVAS's native frame/event thread. The initial native implementation is synchronous: the caller waits for the function's values. The protocol leaves room for a real frame scheduler.
(canvas)(overlay)Release resources owned by an object attached to luvcraft.
A GPU presentation relationship configured for a canvas.
(context surface-texture)Return the stable presentation slot key for SURFACE-TEXTURE in CONTEXT. Applications use this to retain per-frame resources without assuming that a backend returns the same Lisp wrapper every time it revisits a native drawable.
A MuPDF context: its allocator, its store, and its error stack.
(overlay frame-key)Evict OVERLAY resources retained for one canvas FRAME-KEY. Offscreen captures use a fresh target, so an overlay which caches per-frame GPU state must detach that entry before the shared capture target is destroyed.
An explicitly owned libghostty-vt terminal.
One screenshot or film transaction around an application-owned frame. The object is control-plane state, allocated once per capture. TARGET and READBACK-BUFFER are dense GPU resources owned and destroyed by the shared capture implementation.
(application capture)Undo application-owned CAPTURE preparation on the calling thread. When shared GPU resources were created they are still alive and visible through CAPTURE-TARGET and CAPTURE-READBACK-BUFFER during this method. Applications with target-keyed GPU caches should synchronously evict those entries on their canvas thread…
(session overlay)Attach OVERLAY at SESSION's next native frame boundary and return it. ADD consumes a newly offered OVERLAY on both success and terminal rejection. Once SESSION begins stopping, the rejected overlay is released exactly once before APPLICATION-ATTACHMENT-CLOSED is signalled.
(controller function)Run FUNCTION as CONTROLLER's sole teardown, or observe its published result. A concurrent caller waits while the owner runs. A later caller receives the same values or signals the same condition without running FUNCTION again.
(session overlay &key (release-p t))Detach OVERLAY at a frame boundary and optionally release it there. The no-release path is intentionally preserved for FUSE-LUVCRAFT-OVERLAY: that path may run inside a frame whose command stream still borrows OVERLAY.
Named release failures reported without replacing an active transfer.
An application attachment was offered after terminal teardown began.
Logical disjunction of tests and raw truth values.
(controller)(&key application-name directory
(runtime (make-instance 'native-tracy-capture-runtime))
(open-on-completion-p t)
(graceful-stop-seconds 5.0d0))The shared subprocess owner for this Lisp application's captures.
()Terminally detach Luvcraft's current controller without waiting on it. Detachment is atomic and precedes release, so a later game session obtains a fresh controller even while the prior capture finishes on its owner thread.
(controller)Logical negation of one test or raw truth value.
(window x y z)Resolve world site X,Y,Z through WINDOW. Return (VALUES MATERIALIZATION OFFSET AVAILABILITY). AVAILABILITY is :AVAILABLE or :UNAVAILABLE; field and subsystem policy must interpret that fact rather than making the spatial protocol call absence air, solid, zero, or open sky. Implementations keep their existing…
(focus session)Return a non-negative targeting score when FOCUS can be entered by TAB.
(focus session)Notify FOCUS that SESSION has entered its interaction mode.
(focus session)Notify FOCUS that SESSION has left its interaction mode.
(focus session canvas event)Handle EVENT while FOCUS owns SESSION's modal player interaction.
(overlay)Return where OVERLAY draws: :SCENE, :WORLD-PANEL, :VIEWMODEL, :HUD, or :NONE. Scene overlays inhabit world depth; viewmodels are first-person geometry above the world but below held items and the crosshair. World panels retain world projection and depth while drawing analytic application graphics at native…
The first-person body: two arms and what they hold.
(intent urge)(session focus)Enter modal interaction with FOCUS, suspending ordinary player input. This is the common session transition behind using a world terminal or book, mounting a vehicle, and other interactions described by #8JCMA5.
(intent)(&body body)(name &body body)All named failures from a completed release sequence.
(canvas enabled)Capture or release relative pointer motion for CANVAS.
(session)Test whether one compatible scalar is less than another.
The componentwise absolute value of a raw value.
Subtraction or unary negation.
(session seconds)(controller)(body session item)A comically large phone: a graphite slab with a live terminal on its face toward the player. Held in the right hand; TAB focuses its display.
(surface font-pathname margin rows)(weight)The phone's font: Input Mono Condensed from the user's fonts when it is installed (its licence keeps it out of the repository), else the wall's. WEIGHT is "Regular" or "Bold".
(session surface columns rows
&key (class 'terminal-display)
(fixture (terminal-display-fixture))
(margin 0.12)
(font-scale 1.0)
(font-pathname *terminal-display-font-pathname*)
(bold-font-pathname *terminal-display-bold-font-pathname*)
(default-foreground *terminal-display-default-foreground*)
(screen-role :terminal-screen)
(faceplate-role :terminal-faceplate)
(add-p t))Build a COLUMNS by ROWS Ghostty terminal display of CLASS on SURFACE. SURFACE is anything answering the terminal-surface protocol: a wall of blocks or a phone screen. SCREEN-ROLE and FACEPLATE-ROLE name the shader materials of the panel behind the text and the glass in front of it; the defaults are the wall's tube. …
(display)Attach an interactive login-free bash in the checkout to DISPLAY. The shell learns where this game's portal server listens and which wall it is on, so a luvcraft started in it appears right here.
(display session mode)Select DISPLAY's focused wall MODE. The built-in modes are the EQL-specialized symbols :SHELL and :FILM. LUVCRAFT/MCCLIM adds an :AFTER method which supplies the film browser, while the display continues to own focus and movie lifetime.
The mode a phone's display starts in when it is first taken out. The phone is a terminal like a wall is, so :SHELL is what it knows by itself. The complete luvcraft system includes the Telegram presentation and sets this to :TELEGRAM when that part loads. DEFVAR deliberately preserves that application-owned choice…
(phone session)(width height x y)Make the quad the cursor shader draws its arrow inside, tip at screen X,Y. Only the hotspot and the scale live here: each vertex carries its offset from the tip in the shader's design grid, and the fragment stage turns that into the outline, the fill, and the shadow.
Division of two represented quantities.
Addition over compatible quantities.
()The pointer's visible corners, tip first, in its own design grid. The tip is the hotspot, so it sits at the origin exactly. Rounding does not move any of these: a corner's arc is tangent to both its edges and reaches back out to the corner itself, which is why this table can be read as the shape you see rather than…
(outline radius)Move every edge of OUTLINE inward by RADIUS and meet the corners again. Growing the distance to this back by RADIUS restores OUTLINE with each convex corner replaced by an arc of that radius. A reflex corner offsets outward instead and so stays crisp, which is what the notch between head and tail wants.
The maximum of compatible quantities.
The non-negative remainder of integer division.
(from to)Multiplication and scalar scaling.
(session event)(&key (id (gensym "BLOCK-WORLD-"))
(chunk-width 16)
(chunk-height 16)
(chunk-depth 16)
(cell-extent 1d0)
source)(x y z)(world x y z)(world origin-x origin-y origin-z face width height
&key (material *terminal-block*))Place a WIDTH by HEIGHT terminal-material rectangle in resident WORLD. ORIGIN is the lower-left block as seen from FACE's outward side.
(world x y z face
&key (material *terminal-block*)
(absent-neighbor-policy :air))Discover the maximal exposed rectangular terminal surface at X,Y,Z,FACE. Return the surface and :RECTANGLE. A seed which is not terminal, is covered, or belongs to a non-rectangular coplanar component instead returns NIL and a descriptive status. Discovery runs the compiled TERMINAL-SURFACE-DISCOVERY program; this…
(position)(view previous inspection-parameters ink-strength player
&optional (bevel-width luft:+mesh-bevel-width+) (exposure 1.0f0))(surface viewport-width viewport-height
&optional (left-inset 0.0) (top-inset 0.0)
(right-inset 0.0) (bottom-inset 0.0))Return a camera pose which contains SURFACE inside the safe view. Framing is solved rather than approximated. For an eye at distance D from the surface centre along EYE-DIRECTION, a corner at offset O from that centre lands at DOT(O, camera-right) * focal / (aspect * (D - DOT(O, EYE-DIRECTION))) across and at the…
(session)(camera pose)(camera)(surface &optional offset)Return the point OFFSET cell-depths outside SURFACE's lower left corner, as seen from its outward side.
(direction)(camera)(camera)(camera)(left right)(origin &rest vector-scales)Test whether one compatible scalar is at most another.
(camera target seconds)Test whether one compatible scalar is greater than another.
The 50-degree vertical field of view used during modal focus.
(vector)((variable &rest initargs) &body body)(terminal &key
(program (or (uiop:getenv "SHELL") "/bin/sh"))
arguments directory environment
(term "xterm-256color") on-output)Start PROGRAM under a PTY whose output drives TERMINAL. The device owns its child, PTY stream, IO thread, and Ghostty response route; it does not own TERMINAL. All terminal mutation and PTY traffic are serialized by the device's worker. Use CALL-WITH-PTY-DEVICE-TERMINAL for renderer-side snapshot work which must…
(device &key (timeout 5.0))(device function)(terminal)(device &key (timeout 2.0))(surface film-aspect)(display &rest open-arguments)(x y z)(system block coordinate)(system)(system)(system seconds)(&key (surface luvcraft::*grass-block*))(world x y z)Return one site as BLOCK and :RESIDENT, or NIL and :ABSENT. This sparse world-coordinate accessor constructs coordinate descriptors and a chunk lookup key. It is appropriate for inspectors, ray hits, collision probes, and sparse interaction. Algorithms over many cells should select a chunk/domain once and use…
(world)Solve and publish voxel light from scratch for WORLD's resident chunks. Returns the chunks whose published light changed. The selected production solver must have an explicit SOLVE-LIGHT-REGION-USING method.
A small, slow, deliberate animal with a domed shell.
(species world x y z seed)Make a SPECIES animal standing on the ground at cell X,Y,Z, or NIL. SPECIES is a keyword, so a new animal joins the world's population by adding one EQL method here rather than by editing a spawn table. A method returns NIL when the site does not suit it: this is where an animal says what ground it lives on and how…
Compare compatible quantities and produce dimensionless values.
(critter world seconds)Advance CRITTER's behaviour and body by SECONDS in WORLD. This is the only part of an animal a new species really has to think about; terrain contact is the shared body protocol and appearance is MAP-CRITTER-BOXES.
(critter)(critter)(critter)The living animals near the player, and how to find more.
An explicitly owned AVFrame.
(population world x z)Keep POPULATION's animals living on resident terrain near X,Z. Called once a frame beside residency: animals which have wandered out of the neighbourhood are forgotten, and a couple of deterministic candidate sites are offered to the population's species until it is as full as it wants to be.
(population)One individuated animal walking the block world.
(population critter)(population world)(critter)How many boxes MAP-CRITTER-BOXES emits for CRITTER, at most +CRITTER-MODEL-BOX-LIMIT+.
The componentwise square root of a raw value.
(&key (world (make-critter-test-world)))(session &key (max-distance +luvcraft-target-reach+))Return the animal SESSION's centre view ray reaches first, and how far. An animal standing behind a wall is not targeted: whichever of the animal and the terrain the ray meets first is what the player is looking at.
A player mounted on an animal, going where it goes. The rider steers with the session's own movement intent. Going forward is going forward whether the player's legs or an animal's are doing it, so a mount reads the same urges the player controller would have read rather than keeping a second copy of them.
(focus)Whether FOCUS moves the player itself instead of the player controller. A terminal on a wall leaves the player standing in front of it and the ordinary scalar controller keeps running. A mount does not: it carries the player, so the controller must stand down for as long as the interaction lasts.
(population world seconds)(focus session seconds)Let FOCUS take its own turn in SESSION's simulation, before the player's. A focus which only reads input needs nothing here; a moving one -- a mount, a vehicle, a cutscene -- does its own work in this method.
(player)(player)(focus session)Return FOCUS's desired CAMERA-POSE in SESSION, or NIL for an FOV-only cue.
(target current)(body world x y z)(player)(critter session)Create and return a focusable interaction for targeted CRITTER, or NIL. The animal counterpart of ACTIVATE-LUVCRAFT-TARGET: an animal which can be mounted answers with the ride, and one which cannot answers NIL and is simply looked at.
(critter forward turn seconds)Ask CRITTER to walk FORWARD and turn TURN over SECONDS, as a rider does. FORWARD and TURN are wishes in -1..1, not velocities: what the animal makes of them is the animal's business, and one which ignores its rider simply has no method here.
(record slot-name)(declaration)Return DECLARATION's backend or Common Lisp representation type, or NIL.
(declaration)Return DECLARATION's homogeneous quantity specification, or NIL.
(player seconds)(realization actual-parameter-declarations
&key actual-result-declaration)(clock profile)Mutable time-of-day state owned by a luvcraft session. SLY can pause it, set a time, change its rate, or pin it without restarting.
One top-level defining form of a source file.
(name)Return the live arithmetic definition named by NAME, or NIL.
One inspectable application of shared function source to checked values.
(specification)(sky view-distance)Accumulated lighting dirtiness for one world, owned by its session. Content edits and residency transitions feed this object through the world's hooks; RECONCILE-LIGHTING settles the queues and publishes.
Construct a meaningful literal.
PROPERTY: VALUES; -- the property a keyword, the values a list written space-separated.
The block-world camera's 70-degree vertical field of view.
Expose a quantity's raw representation.
(name)Return the represented-value declaration published by global NAME, or NIL.
(&key (id (gensym "VOXEL-SPACE-"))
(chunk-shape (make-chunk-shape))
(cell-extent 1d0))(&key (width 16) (height 16) (depth 16))(space coordinate)(x y z)(window domain local direction)Step LOCAL and resolve WINDOW only when the step crosses DOMAIN. Return the destination OFFSET, wrapped LOCAL-COORDINATE, and crossing as STEP-CHUNK-DOMAIN-SITE does, followed by the neighboring MATERIALIZATION and its AVAILABILITY. A local step returns NIL and :LOCAL for the last two values. The one generic window…
(x y z)((offset destination crossing direction materialization availability
window domain local directions &optional result)
&body body)Execute BODY for the DIRECTIONS neighboring LOCAL through WINDOW. DIRECTIONS is the caller's explicit neighborhood policy. DESTINATION has dynamic extent on each iteration and must be copied before BODY retains it. Interior steps remain domain arithmetic; window dispatch occurs only at an actual chunk crossing.…
(world chunk)(world chunk dependency-stamp)Copy CHUNK and its one-cell halo into immutable worker-owned columns. Every resident chunk's indices are already offsets under WORLD's vocabulary, so the halo is gathered by plain slab copies from the up to 27 neighbours, with no per-cell decomposition, translation, or block object lookup. The vocabulary's members…
(world chunk)Describe exactly which resident data CHUNK's exposed mesh observes. Content and light are named as separate revision domains: relighting must invalidate a mesh without impersonating an authored edit, and the stamp preserves which domain made a product stale.
One inspectable environment light, packed into raw per-frame GPU lanes.
(world &key immutable-p)Capture every resident chunk of WORLD for a from-scratch relight. With IMMUTABLE-P, copy content indices and capture absent-boundary semantics; the returned region may then be solved without reading the live world.
(materialization field-name)Return MATERIALIZATION's retained representation for FIELD-NAME.
(actual expected)Require ACTUAL storage to satisfy EXPECTED represented-value meaning. Quantity specifications and layouts agree exactly. A NIL expected representation leaves representation choice open; otherwise ACTUAL's Common Lisp type must be a known subtype. Return ACTUAL on success. #GZ53LD
(representation)Return the finite site domain bound to REPRESENTATION.
(domain)Return the exact number of sites in finite DOMAIN. This deliberately says nothing about coordinate or offset representation. Those mappings belong to concrete domain protocols and are added only when a client needs to traverse them.
(row lane-name)(materialization field-name)(mesher world chunk)How the children of a list are arranged.
(declaration)Return DECLARATION's heterogeneous quantity layout, or NIL.
A block-level piece of an Org document.
(specification)(role stage)Return the current durable shader specification for ROLE and STAGE.
(left right)(width height &optional x y)(glyphs atlas center right up scale min-x min-y max-x max-y
&key (ink '(0.96 0.32 0.48)))Build one dense model-and-atlas record per drawable glyph occurrence. INK is the linear RGB carried in the record's three spare lanes.
(outline &key horizontal-band-count vertical-band-count)Build conservative, sorted horizontal and vertical Slug curve bands. A band count left unspecified is chosen per axis by CHOOSE-SLUG-BAND-COUNT.
A constant dilation of every glyph quad in em, added on the CPU when the quads are laid out. Zero leaves the work to the per-vertex dilation; the value luv used before dynamic dilation was 0.035.
(domain column row)(domain offset)(domain text)(surface &optional session)True when SURFACE's last coherently published derived state is current.
(block world x y z)(name)Return the live frontier program definition named by NAME.
(realization)(world x y z face material absent-neighbor-policy)Discover the coplanar exposed component of MATERIAL containing X,Y,Z. Return the retained execution, or NIL and a status when the seed itself is not an exposed terminal face.
(domain surface font-advance font-height margin font-scale)Fit DOMAIN uniformly inside SURFACE and return scale, left, bottom, width, and height in world units. FONT-SCALE is an explicit multiplier on contain.
(terminal text)(presentation column row)(&key (scheduling :lifo) field-definition)Make the reference solver's packed LIFO or level-scheduled worklist. This machinery belongs to the test-only voxel-light oracle. Both modes retain ENTRY plus dense OFFSET and LEVEL lanes, never a cons or coordinate object per item. #QS1ERH #LDP5UR
(worklist entry offset level)(worklist)(worklist)(name-and-options lambda-list &body body)Define a function whose complete dynamic extent is an ambient trace zone. The inferred name is PACKAGE/FUNCTION. Use (NAME :ZONE ZONE-NAME) to provide a more semantic name and :VALUE FORM to attach a Tracy work count.
Headings, paragraphs, figures and their IDs, mentions, marks.
(name-and-options &rest method-tail)Define a method whose complete dynamic extent is an ambient trace zone. The inferred name includes the generic function, non-T required specializers, and qualifiers. :ZONE and :VALUE have the same meaning as in ZDEFUN.
(needle tree)((name &key (color 0) (value nil value-supplied-p)) &body body)Measure BODY as a Tracy zone named NAME. When VALUE is supplied, evaluate it as the zone exits and attach the resulting unsigned integer to the zone. This is useful for semantic work counts such as sites visited: Tracy can then distinguish a slower realization from one which simply performed more work. A literal…
((name &key (tracy-value nil tracy-value-supplied-p)) &body body)Measure BODY as nested zone NAME for whichever measurement is watching. TRACY-VALUE, when supplied, is attached to the Tracy zone at exit. It does not affect the bounded CPU trace, whose zones retain time and runtime costs. Two independent things may be: a Tracy viewer attached to this image, and an opt-in…
((sample accessor zone) &body body)(&key label)((trace) &body body)(specification &body body)Measure BODY with concise ambient zone syntax. SPECIFICATION is either a zone name or (NAME :VALUE FORM). This is the ordinary spelling for a meaningful region inside a definition; ZDEFUN and ZDEFMETHOD cover whole definitions.
((name symbol) (type (eql 'arithmetic-operator)))(trace)Test whether one compatible scalar is at least another.
(trace &optional (stream *standard-output*))((observation) &body body)Measure time, allocation, GC time, and collections while executing BODY. OBSERVATION is reset in place and BODY's values are preserved. SBCL's byte and GC clocks are process-wide; in a multithreaded image this deliberately attributes concurrent runtime activity during the observed extent too.
(name &key (zone-function name) (file "") (line 0) (color 0))Return a stable foreign source location describing zone NAME. Locations are interned by their fields rather than allocated per expansion. Recompiling a file re-runs its LOAD-TIME-VALUE forms, and Tracy tells zones apart by the address of their location: without the table, recompiling a function in the middle of a…
(designator)(state &optional center)True while this image is offering zones to a Tracy viewer.
(&key (application-name "luv"))Load the Tracy client, start the profiler, and answer whether it is running. The client collects on demand, so starting it does not begin a capture: it makes this image discoverable, and zones start recording when a viewer connects. Leaving it started is the intended state for a durable image.
(encoder texture usage)Prepare TEXTURE for semantic USAGE in ENCODER's following commands. The backend owns any layout transition, hazard barrier, or validation needed to realize the usage. Application code does not dispatch on the backend. #T5MQO0
Sample a two-dimensional texture through a sampler at a UV coordinate.
(benchmark reader)(benchmark &optional (stream *standard-output*))An inspectable immutable unit of CPU work after it is submitted.
(request)Compute REQUEST on the production worker and return a transferable value.
(predicate &key (timeout 2.0))(&key (chunk-radius 4)
(chunk-width 16)
(chunk-height 16)
(chunk-depth 16)
(seed 121))(world)(source world chunk-x chunk-z)(overlay x y z)(overlay)(source world chunk-x chunk-z)(&key (chunk-width 16)
(chunk-height 16)
(chunk-depth 16)
(seed 121))(overlay block x y z)(world &key camera player selected-block carried)(description)(source world center-x center-z &key (radius 4))Materialize a square resident window and evict everything outside it. Return the entering and leaving chunk-coordinate keys. Entering chunks are created as one staged transaction: establish all desired domains, materialize terrain, populate landmarks, then replay sparse edits.
(description)Return CAMERA, PLAYER, selected block, and carried blocks restored from DESCRIPTION.
(session width height &key camera-lanes)Pack the frame environment: camera lanes plus the evaluated sky. Lane order must match *FRAME-UNIFORM-MEMBERS* exactly; the construction-time check in BLOCK-WORLD-CAMERA-UNIFORM-SIZE keeps the two honest. CAMERA-LANES may replace the session camera's own five lanes with a camera expressed in some other space; the…
(block)Flatten BLOCK's byte-offset members into frame-buffer float positions. This is deliberately luvcraft's fixed 32-bit-lane ABI adapter, not a claim about general uniform-block packing. The shader owns offsets and member quantities; the host independently owns the product it writes.
(session)The frame buffer byte size derived from the shader-visible block layout. Checked against the host's packed frame data at construction, so growing the frame uniform cannot silently diverge between shader and host.
How many tiles wide a newly materialized block atlas texture is.
(layout positions)(kind description)Resolve a portable block value with keyword KIND and property DESCRIPTION.
(kind description)Restore a world source named by keyword KIND from DESCRIPTION.
(descriptions)(pathname)(writer description)Submit immutable DESCRIPTION without waiting for filesystem I/O. Only the latest checkpoint which has not begun is retained. Return its monotonic ticket.
(writer &key (timeout 10.0))(pathname)Read and validate one luvcraft save from PATHNAME. Return the restored world and its still-portable resume description.
(world x y z)(format)The colour transfer a sampled texture FORMAT applies before shader math. This describes representation decoding, not a quantity. Alpha remains linear for the sRGB formats; the transfer names their RGB-channel behavior.
The replaceable interpretation of atlas tile identities as dense offsets. Re-evaluating this definition constructs a new domain. Existing offsets stay closed by the old domain; atlas refresh and later publication explicitly adopt the new one instead of pretending a vocabulary is materialized only once.
(&optional (domain *block-atlas-tile-domain*))()Return the little world's horizontal RGBA8 atlas as packed pixel words. RGB is the material's procedural colour and A is opaque coverage. The array spans the full tile capacity; tiles past the painted count stay zero, waiting for a material to claim them.
()Return the relief-correlated tangent-space normal atlas as packed RGBA8. RGB is a linear encoded unit normal and A is the procedural height from which it was derived. This is a derived materialization, not an authored asset.
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(tile x y)Return the 0..255 surface height of atlas tile TILE at tile-local X,Y. Like the colour, each named tile is one EQL method, so a live image can re-sculpt a single material's micro-surface and rebuild both atlases without touching the rest of the palette. See #CHUKWD for why relief and normals are generated beside…
(offset &optional (domain *block-atlas-tile-domain*))(block face)(block)BLOCK's own linear material radiance, independent of propagated light.
(source x z height)(source x z surface height)(session number)(&optional (name *urbit-default-pier*))(&key (blocks (placeable-block-kinds)) (quantity nil))Make an inventory containing BLOCKS in display and number-key order. QUANTITY is the initial count of every material, or NIL for creative-mode unlimited supply.
(inventory block)(inventory)(inventory block &optional (quantity 1))Consume QUANTITY of BLOCK and report success. Unlimited entries always succeed. Finite entries remain present at zero so the view and number-key ordering do not jump as blocks are used.
(inventory block &optional (quantity 1))Add QUANTITY of BLOCK to finite INVENTORY storage and return its entry. Adding to an unlimited entry leaves it unlimited. A previously unavailable block is appended, preserving the stable order of existing number keys.
(inventory)(name &key (errorp t))(world x y z)(camera sky &optional anchor)Pack a texel-stable orthographic light-space transform as four vec4 rows. Returns the rows and the ANCHOR to hand back next frame. The anchor is the world point the light-space texel lattice is built around: it follows the camera in whole texels of the current light basis, so camera translation never moves the…
(current previous scale &optional previous-previous)Return a visible RGBA temporal derivative and normalized summary values. With PREVIOUS-PREVIOUS, compute the absolute second temporal derivative; otherwise compute the absolute first derivative. RGB channel order is irrelevant because the output is grayscale. Values returned after the image are normalized mean…
Advance the scalar player controller by one small physics step. INTENT is what the player is trying to do rather than what they pressed: the controller asks for directions and a hurry, and never learns that there is a keyboard.
(player)One named verb over a session.
(body world x y z)(body)(body world seconds)(action)Block the calling worker until ACTION reaches a terminal state. The canvas thread must never call this; it advances ACTION a little each frame. A provider/tool thread may wait here without stalling rendering.
(tile &optional (domain *block-atlas-tile-domain*))(mesher snapshot)(snapshot)(snapshot)(snapshot)(snapshot)(&key (name "luv single CPU producer"))Make one sleeping SB-CONCURRENCY mailbox worker. There is intentionally no pool yet. One worker proves the ownership and publication protocol, prevents CPU oversubscription, and keeps completion order intelligible while taking expensive work out of an owner callback.
(system &key (timeout 10.0))(chunk)(world x y z)(chunk stamp)(session action)
The second direct presentation stands behind a terminal-display owner, like the Telegram and film-browser wall modes do.