@vibecook/ice 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -50
- package/dist/chunk-BA7XJC27.js +2429 -0
- package/dist/chunk-BA7XJC27.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/{chunk-VGVDJZSP.js → chunk-DYK6KNLG.js} +13206 -7387
- package/dist/chunk-DYK6KNLG.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-IBWWLA6D.js +634 -0
- package/dist/chunk-IBWWLA6D.js.map +1 -0
- package/dist/{chunk-OR5FNVUE.js → chunk-JS6PG6YD.js} +398 -167
- package/dist/chunk-JS6PG6YD.js.map +1 -0
- package/dist/chunk-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-ZPUPBULB.js +7399 -0
- package/dist/chunk-ZPUPBULB.js.map +1 -0
- package/dist/desk-engine.js +36 -0
- package/dist/desk-engine.js.map +1 -0
- package/dist/desk-kit.js +244 -0
- package/dist/desk-kit.js.map +1 -0
- package/dist/desk-objects.js +12728 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +469 -0
- package/dist/desk.js.map +1 -0
- package/dist/devtools.js +233 -189
- package/dist/devtools.js.map +1 -1
- package/dist/dom.js +7 -19
- package/dist/index.js +232 -20
- package/dist/kernel.js +53 -25
- package/dist/react.js +1045 -38
- package/dist/react.js.map +1 -1
- package/dist/types/packages/core/src/behavior/define-behavior.d.ts +11 -0
- package/dist/types/packages/core/src/behavior/runtime.d.ts +4 -0
- package/dist/types/packages/core/src/canvas/define-canvas-type.d.ts +86 -0
- package/dist/types/packages/core/src/canvas/define-container.d.ts +17 -0
- package/dist/types/packages/core/src/canvas/diagnostics.d.ts +27 -0
- package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +70 -0
- package/dist/types/packages/core/src/canvas/extensions.d.ts +125 -0
- package/dist/types/packages/core/src/canvas/frame-behavior-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/frame-preview.d.ts +79 -0
- package/dist/types/packages/core/src/canvas/frame-projection.d.ts +38 -0
- package/dist/types/packages/core/src/canvas/frame-view.d.ts +36 -0
- package/dist/types/packages/core/src/canvas/migrate.d.ts +14 -0
- package/dist/types/packages/core/src/canvas/placement.d.ts +30 -0
- package/dist/types/packages/core/src/canvas/presentation-transition.d.ts +100 -0
- package/dist/types/packages/core/src/canvas/runtime-extension-host.d.ts +16 -0
- package/dist/types/packages/core/src/canvas/session.d.ts +47 -0
- package/dist/types/packages/core/src/catalog/camera-derived.d.ts +16 -27
- package/dist/types/packages/core/src/catalog/desk.d.ts +326 -0
- package/dist/types/packages/core/src/catalog/gesture.d.ts +51 -0
- package/dist/types/packages/core/src/catalog/graph.d.ts +2 -2
- package/dist/types/packages/core/src/catalog/index.d.ts +2 -0
- package/dist/types/packages/core/src/catalog/pointer.d.ts +42 -0
- package/dist/types/packages/core/src/catalog/selection-presence.d.ts +7 -0
- package/dist/types/packages/core/src/catalog/settings-resources.d.ts +28 -2
- package/dist/types/packages/core/src/catalog/surface.d.ts +1 -0
- package/dist/types/packages/core/src/doc/doc-commit-sink.d.ts +18 -2
- package/dist/types/packages/core/src/doc/doc-kit.d.ts +21 -2
- package/dist/types/packages/core/src/doc/envelope.d.ts +5 -2
- package/dist/types/packages/core/src/doc/schema-migrate.d.ts +1 -1
- package/dist/types/packages/core/src/doc/version-gate.d.ts +21 -3
- package/dist/types/packages/core/src/engine/commit-sink.d.ts +10 -1
- package/dist/types/packages/core/src/engine/engine.d.ts +6 -0
- package/dist/types/packages/core/src/engine/frame-control.d.ts +74 -0
- package/dist/types/packages/core/src/engine/guests.d.ts +4 -1
- package/dist/types/packages/core/src/engine/world-doors.d.ts +12 -0
- package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +146 -13
- package/dist/types/packages/core/src/index.d.ts +33 -12
- package/dist/types/packages/core/src/input/queue.d.ts +3 -1
- package/dist/types/packages/core/src/interaction/install.d.ts +30 -0
- package/dist/types/packages/core/src/interaction/wakes.d.ts +24 -0
- package/dist/types/packages/core/src/nav/nav-geometry.d.ts +100 -0
- package/dist/types/packages/core/src/nav/nested-canvas.d.ts +47 -4
- package/dist/types/packages/core/src/ops/cascade.d.ts +2 -1
- package/dist/types/packages/core/src/ops/claims.d.ts +6 -0
- package/dist/types/packages/core/src/ops/insert.d.ts +4 -0
- package/dist/types/packages/core/src/ops/point-pick.d.ts +4 -1
- package/dist/types/packages/core/src/ops/sibling-order.d.ts +14 -4
- package/dist/types/packages/core/src/ops/tray.d.ts +48 -0
- package/dist/types/packages/core/src/presence/presence-kit.d.ts +5 -0
- package/dist/types/packages/core/src/schema/meta.d.ts +10 -0
- package/dist/types/packages/core/src/schema/prefab.d.ts +8 -0
- package/dist/types/packages/core/src/settings/defaults.d.ts +25 -6
- package/dist/types/packages/core/src/surface/gpu-device.d.ts +55 -0
- package/dist/types/packages/core/src/systems/camera-sim.d.ts +29 -0
- package/dist/types/packages/core/src/systems/chrome.d.ts +15 -23
- package/dist/types/packages/core/src/systems/drag-mods.d.ts +34 -0
- package/dist/types/packages/core/src/systems/held.d.ts +71 -0
- package/dist/types/packages/core/src/systems/insert-ghost.d.ts +2 -0
- package/dist/types/packages/core/src/systems/l0-input.d.ts +14 -0
- package/dist/types/packages/core/src/systems/l1-pick.d.ts +37 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- package/dist/types/packages/core/src/systems/l3-behave.d.ts +4 -1
- package/dist/types/packages/core/src/systems/l3-claim.d.ts +7 -0
- package/dist/types/packages/core/src/systems/l3-connect.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l3-drop.d.ts +30 -1
- package/dist/types/packages/core/src/systems/l3-marquee.d.ts +2 -1
- package/dist/types/packages/core/src/systems/l3-ports.d.ts +1 -1
- package/dist/types/packages/core/src/systems/l4-cursor.d.ts +5 -0
- package/dist/types/packages/core/src/systems/nav-flight.d.ts +85 -3
- package/dist/types/packages/core/src/systems/nav-tap.d.ts +44 -0
- package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +108 -0
- package/dist/types/packages/core/src/systems/zoom-through.d.ts +30 -0
- package/dist/types/packages/core/src/tools/define-tool.d.ts +10 -0
- package/dist/types/packages/core/src/widget/define-widget.d.ts +166 -63
- package/dist/types/packages/core/src/widget/equip.d.ts +14 -2
- package/dist/types/packages/core/src/widget/held-tools.d.ts +83 -0
- package/dist/types/packages/core/src/widget/menu-actions.d.ts +44 -0
- package/dist/types/packages/core/src/widget/mount-store.d.ts +21 -46
- package/dist/types/packages/core/src/widget/spawn.d.ts +1 -1
- package/dist/types/packages/desk/src/assets/blue-noise.gen.d.ts +10 -0
- package/dist/types/packages/desk/src/card/card.d.ts +103 -0
- package/dist/types/packages/desk/src/compose/ambient.d.ts +59 -0
- package/dist/types/packages/desk/src/compose/builder.d.ts +285 -0
- package/dist/types/packages/desk/src/compose/children.d.ts +3 -0
- package/dist/types/packages/desk/src/compose/index.d.ts +14 -0
- package/dist/types/packages/desk/src/compose/marks.d.ts +126 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +111 -0
- package/dist/types/packages/desk/src/compose/tap.d.ts +5 -0
- package/dist/types/packages/desk/src/docs.d.ts +23 -0
- package/dist/types/packages/desk/src/engine/budget.d.ts +38 -0
- package/dist/types/packages/desk/src/engine/device.d.ts +54 -0
- package/dist/types/packages/desk/src/engine/index.d.ts +5 -0
- package/dist/types/packages/desk/src/engine/pipeline.d.ts +36 -0
- package/dist/types/packages/desk/src/engine/rasters.d.ts +66 -0
- package/dist/types/packages/desk/src/engine/records.d.ts +56 -0
- package/dist/types/packages/desk/src/engine/shader.d.ts +22 -0
- package/dist/types/packages/desk/src/engine/struct.d.ts +39 -0
- package/dist/types/packages/desk/src/engine/target.d.ts +26 -0
- package/dist/types/packages/desk/src/gpu-ablation.d.ts +61 -0
- package/dist/types/packages/desk/src/gpu-memory.d.ts +54 -0
- package/dist/types/packages/desk/src/gpu-profiler.d.ts +141 -0
- package/dist/types/packages/desk/src/gpu-wrap.d.ts +8 -0
- package/dist/types/packages/desk/src/ground.d.ts +388 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +132 -0
- package/dist/types/packages/desk/src/hold/shaders.d.ts +9 -0
- package/dist/types/packages/desk/src/host/editor.d.ts +18 -0
- package/dist/types/packages/desk/src/host/index.d.ts +9 -0
- package/dist/types/packages/desk/src/host/ink.d.ts +18 -0
- package/dist/types/packages/desk/src/host/layer.d.ts +430 -0
- package/dist/types/packages/desk/src/host/picture.d.ts +2 -0
- package/dist/types/packages/desk/src/host/surface.d.ts +5 -0
- package/dist/types/packages/desk/src/index.d.ts +13 -0
- package/dist/types/packages/desk/src/kind.d.ts +187 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +429 -0
- package/dist/types/packages/desk/src/kit/arrays.d.ts +88 -0
- package/dist/types/packages/desk/src/kit/blobs.d.ts +40 -0
- package/dist/types/packages/desk/src/kit/book.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/editor.d.ts +103 -0
- package/dist/types/packages/desk/src/kit/eye.d.ts +37 -0
- package/dist/types/packages/desk/src/kit/hold.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/index.d.ts +26 -0
- package/dist/types/packages/desk/src/kit/inside.d.ts +116 -0
- package/dist/types/packages/desk/src/kit/layer.d.ts +159 -0
- package/dist/types/packages/desk/src/kit/light.d.ts +3 -0
- package/dist/types/packages/desk/src/kit/mesh.d.ts +29 -0
- package/dist/types/packages/desk/src/kit/mips.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/nav.d.ts +2 -0
- package/dist/types/packages/desk/src/kit/paper-tex.d.ts +5 -0
- package/dist/types/packages/desk/src/kit/physics.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/place.d.ts +44 -0
- package/dist/types/packages/desk/src/kit/print.d.ts +30 -0
- package/dist/types/packages/desk/src/kit/raster.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/sdf.d.ts +1 -0
- package/dist/types/packages/desk/src/kit/seeds.d.ts +11 -0
- package/dist/types/packages/desk/src/kit/services.d.ts +34 -0
- package/dist/types/packages/desk/src/kit/springs.d.ts +12 -0
- package/dist/types/packages/desk/src/kit/strokes.d.ts +93 -0
- package/dist/types/packages/desk/src/kit/text.d.ts +142 -0
- package/dist/types/packages/desk/src/kit/uniform.d.ts +8 -0
- package/dist/types/packages/desk/src/kit/view.d.ts +39 -0
- package/dist/types/packages/desk/src/kit/wgsl.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/line.d.ts +15 -0
- package/dist/types/packages/desk/src/lattice/lod.d.ts +52 -0
- package/dist/types/packages/desk/src/lattice/ruler.d.ts +88 -0
- package/dist/types/packages/desk/src/marks/assemble.d.ts +65 -0
- package/dist/types/packages/desk/src/marks/ease.d.ts +4 -0
- package/dist/types/packages/desk/src/marks/laser.d.ts +41 -0
- package/dist/types/packages/desk/src/marks/layout.d.ts +167 -0
- package/dist/types/packages/desk/src/marks/pass.d.ts +59 -0
- package/dist/types/packages/desk/src/marks/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/mat/grid.d.ts +50 -0
- package/dist/types/packages/desk/src/mat/lamp.d.ts +14 -0
- package/dist/types/packages/desk/src/mat/layout.d.ts +144 -0
- package/dist/types/packages/desk/src/mat/mat-pass.d.ts +83 -0
- package/dist/types/packages/desk/src/mat/night.d.ts +95 -0
- package/dist/types/packages/desk/src/mat/projector.d.ts +39 -0
- package/dist/types/packages/desk/src/mat/shaders.d.ts +17 -0
- package/dist/types/packages/desk/src/mat/tilt.d.ts +14 -0
- package/dist/types/packages/desk/src/nav/flight.d.ts +186 -0
- package/dist/types/packages/desk/src/nav/portal.d.ts +95 -0
- package/dist/types/packages/desk/src/object.d.ts +46 -0
- package/dist/types/packages/desk/src/pass-instrument.d.ts +89 -0
- package/dist/types/packages/desk/src/shaders.d.ts +12 -0
- package/dist/types/packages/desk/src/shaders.gen.d.ts +16 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +475 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +113 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +46 -0
- package/dist/types/packages/desk/src/tray/index.d.ts +4 -0
- package/dist/types/packages/desk/src/tray/lattice.d.ts +71 -0
- package/dist/types/packages/desk/src/tray/layout.d.ts +7 -0
- package/dist/types/packages/desk/src/tray/look.d.ts +29 -0
- package/dist/types/packages/desk/src/tray/pass.d.ts +96 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +199 -0
- package/dist/types/packages/devtools/src/attach.d.ts +22 -8
- package/dist/types/packages/devtools/src/dock.d.ts +18 -14
- package/dist/types/packages/devtools/src/gpu-panel.d.ts +105 -0
- package/dist/types/packages/devtools/src/index.d.ts +5 -4
- package/dist/types/packages/dom/src/desk-host.d.ts +91 -0
- package/dist/types/packages/dom/src/host.d.ts +13 -14
- package/dist/types/packages/dom/src/index.d.ts +12 -10
- package/dist/types/packages/dom/src/loop.d.ts +18 -1
- package/dist/types/packages/dom/src/pointer-adapter.d.ts +5 -29
- package/dist/types/packages/dom/src/widget-focus.d.ts +17 -13
- package/dist/types/packages/ice/src/desk-engine.d.ts +2 -0
- package/dist/types/packages/ice/src/desk-kit.d.ts +6 -0
- package/dist/types/packages/ice/src/desk-objects.d.ts +5 -0
- package/dist/types/packages/ice/src/desk.d.ts +5 -0
- package/dist/types/packages/kernel/src/atlas-pack.d.ts +157 -0
- package/dist/types/packages/kernel/src/bezier.d.ts +0 -15
- package/dist/types/packages/kernel/src/coords.d.ts +0 -39
- package/dist/types/packages/kernel/src/index.d.ts +2 -2
- package/dist/types/packages/kernel/src/nav-flight.d.ts +6 -0
- package/dist/types/packages/kernel/src/tray.d.ts +155 -0
- package/dist/types/packages/objects/src/board/board-pass.d.ts +180 -0
- package/dist/types/packages/objects/src/board/board-pen.d.ts +36 -0
- package/dist/types/packages/objects/src/board/board.d.ts +104 -0
- package/dist/types/packages/objects/src/board/data.d.ts +31 -0
- package/dist/types/packages/objects/src/board/history.d.ts +33 -0
- package/dist/types/packages/objects/src/board/kind.d.ts +208 -0
- package/dist/types/packages/objects/src/board/layout.d.ts +102 -0
- package/dist/types/packages/objects/src/board/object.d.ts +7 -0
- package/dist/types/packages/objects/src/board/pen.d.ts +71 -0
- package/dist/types/packages/objects/src/board/shaders.d.ts +36 -0
- package/dist/types/packages/objects/src/board/stroke.d.ts +99 -0
- package/dist/types/packages/objects/src/board/theme.d.ts +150 -0
- package/dist/types/packages/objects/src/calendar/data.d.ts +97 -0
- package/dist/types/packages/objects/src/calendar/events.d.ts +58 -0
- package/dist/types/packages/objects/src/calendar/hand.d.ts +53 -0
- package/dist/types/packages/objects/src/calendar/host/input.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/host/print.d.ts +9 -0
- package/dist/types/packages/objects/src/calendar/kind.d.ts +297 -0
- package/dist/types/packages/objects/src/calendar/law.d.ts +151 -0
- package/dist/types/packages/objects/src/calendar/layout.d.ts +47 -0
- package/dist/types/packages/objects/src/calendar/month.d.ts +75 -0
- package/dist/types/packages/objects/src/calendar/object.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/pad.d.ts +42 -0
- package/dist/types/packages/objects/src/calendar/pass.d.ts +229 -0
- package/dist/types/packages/objects/src/calendar/print.d.ts +87 -0
- package/dist/types/packages/objects/src/calendar/printing.d.ts +80 -0
- package/dist/types/packages/objects/src/calendar/roll.d.ts +45 -0
- package/dist/types/packages/objects/src/calendar/shaders.d.ts +12 -0
- package/dist/types/packages/objects/src/calendar/sheet.d.ts +43 -0
- package/dist/types/packages/objects/src/calendar/tiles.d.ts +67 -0
- package/dist/types/packages/objects/src/calendar/turn.d.ts +73 -0
- package/dist/types/packages/objects/src/calendar/writing.d.ts +42 -0
- package/dist/types/packages/objects/src/index.d.ts +22 -0
- package/dist/types/packages/objects/src/kinds.d.ts +24 -0
- package/dist/types/packages/objects/src/minimat/inside.d.ts +17 -0
- package/dist/types/packages/objects/src/minimat/kind.d.ts +51 -0
- package/dist/types/packages/objects/src/minimat/layout.d.ts +83 -0
- package/dist/types/packages/objects/src/minimat/minimat.d.ts +179 -0
- package/dist/types/packages/objects/src/minimat/object.d.ts +8 -0
- package/dist/types/packages/objects/src/minimat/pass.d.ts +61 -0
- package/dist/types/packages/objects/src/minimat/shaders.d.ts +10 -0
- package/dist/types/packages/objects/src/minimat/theme.d.ts +98 -0
- package/dist/types/packages/objects/src/notebook/ink.d.ts +70 -0
- package/dist/types/packages/objects/src/notebook/kind.d.ts +236 -0
- package/dist/types/packages/objects/src/notebook/law.d.ts +129 -0
- package/dist/types/packages/objects/src/notebook/layout.d.ts +46 -0
- package/dist/types/packages/objects/src/notebook/leaf.d.ts +44 -0
- package/dist/types/packages/objects/src/notebook/mesh.d.ts +20 -0
- package/dist/types/packages/objects/src/notebook/motion.d.ts +107 -0
- package/dist/types/packages/objects/src/notebook/object.d.ts +8 -0
- package/dist/types/packages/objects/src/notebook/pages.d.ts +56 -0
- package/dist/types/packages/objects/src/notebook/pass.d.ts +197 -0
- package/dist/types/packages/objects/src/notebook/pick.d.ts +30 -0
- package/dist/types/packages/objects/src/notebook/raster.d.ts +28 -0
- package/dist/types/packages/objects/src/notebook/shaders.d.ts +11 -0
- package/dist/types/packages/objects/src/notebook/shape.d.ts +155 -0
- package/dist/types/packages/objects/src/notebook/theme.d.ts +76 -0
- package/dist/types/packages/objects/src/palette.d.ts +577 -0
- package/dist/types/packages/objects/src/paper/host/body.d.ts +30 -0
- package/dist/types/packages/objects/src/paper/kind.d.ts +81 -0
- package/dist/types/packages/objects/src/paper/layout.d.ts +73 -0
- package/dist/types/packages/objects/src/paper/object.d.ts +31 -0
- package/dist/types/packages/objects/src/paper/pages.d.ts +43 -0
- package/dist/types/packages/objects/src/paper/paper-pass.d.ts +86 -0
- package/dist/types/packages/objects/src/paper/paper.d.ts +117 -0
- package/dist/types/packages/objects/src/paper/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/paper/theme.d.ts +58 -0
- package/dist/types/packages/objects/src/paper/typing.d.ts +51 -0
- package/dist/types/packages/objects/src/paper/writing.d.ts +161 -0
- package/dist/types/packages/objects/src/photo/carry.d.ts +33 -0
- package/dist/types/packages/objects/src/photo/kind.d.ts +136 -0
- package/dist/types/packages/objects/src/photo/layout.d.ts +39 -0
- package/dist/types/packages/objects/src/photo/object.d.ts +5 -0
- package/dist/types/packages/objects/src/photo/photo-pass.d.ts +104 -0
- package/dist/types/packages/objects/src/photo/photo.d.ts +262 -0
- package/dist/types/packages/objects/src/photo/pictures.d.ts +152 -0
- package/dist/types/packages/objects/src/photo/sample.d.ts +9 -0
- package/dist/types/packages/objects/src/photo/shaders.d.ts +18 -0
- package/dist/types/packages/objects/src/preset.d.ts +44 -0
- package/dist/types/packages/objects/src/shaders.d.ts +3 -0
- package/dist/types/packages/objects/src/shaders.gen.d.ts +21 -0
- package/dist/types/packages/react/src/canvas-hooks.d.ts +12 -0
- package/dist/types/packages/react/src/desk.d.ts +56 -0
- package/dist/types/packages/react/src/engine-context.d.ts +2 -2
- package/dist/types/packages/react/src/frame-preview-boundary.d.ts +19 -0
- package/dist/types/packages/react/src/hooks.d.ts +9 -14
- package/dist/types/packages/react/src/index.d.ts +16 -9
- package/dist/types/packages/react/src/keymap.d.ts +21 -2
- package/dist/types/packages/react/src/selection-menu.d.ts +171 -0
- package/dist/types/packages/react/src/tray-bar.d.ts +124 -0
- package/package.json +64 -31
- package/dist/chunk-2TNVB2ON.js +0 -1163
- package/dist/chunk-2TNVB2ON.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/chunk-Q665T4L7.js +0 -681
- package/dist/chunk-Q665T4L7.js.map +0 -1
- package/dist/chunk-VGVDJZSP.js.map +0 -1
- package/dist/ground.js +0 -1108
- package/dist/ground.js.map +0 -1
- package/dist/r3f.js +0 -1644
- package/dist/r3f.js.map +0 -1
- package/dist/types/packages/core/src/input/measure-queue.d.ts +0 -30
- package/dist/types/packages/core/src/settings/ground-config.d.ts +0 -101
- package/dist/types/packages/core/src/systems/measure-ingest.d.ts +0 -26
- package/dist/types/packages/devtools/src/gl-panel.d.ts +0 -69
- package/dist/types/packages/dom/src/measure-adapter.d.ts +0 -31
- package/dist/types/packages/dom/src/measure-wiring.d.ts +0 -49
- package/dist/types/packages/dom/src/planes.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/chrome.d.ts +0 -33
- package/dist/types/packages/dom/src/reflectors/dom-widgets.d.ts +0 -59
- package/dist/types/packages/dom/src/reflectors/graybox.d.ts +0 -31
- package/dist/types/packages/dom/src/reflectors/plane-transform.d.ts +0 -38
- package/dist/types/packages/ground/src/index.d.ts +0 -69
- package/dist/types/packages/ground/src/layer.d.ts +0 -40
- package/dist/types/packages/ground/src/pass.d.ts +0 -41
- package/dist/types/packages/ground/src/passes/grid-contract.d.ts +0 -28
- package/dist/types/packages/ground/src/passes/grid-magnet-pass.d.ts +0 -2
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -10
- package/dist/types/packages/ground/src/passes/guides-collect.d.ts +0 -14
- package/dist/types/packages/ground/src/passes/guides.d.ts +0 -3
- package/dist/types/packages/ground/src/passes/magnet-collect.d.ts +0 -63
- package/dist/types/packages/ground/src/passes/soup-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/soup-mesh.d.ts +0 -8
- package/dist/types/packages/ground/src/passes/wires-collect.d.ts +0 -35
- package/dist/types/packages/ground/src/passes/wires.d.ts +0 -10
- package/dist/types/packages/ground/src/poles.d.ts +0 -47
- package/dist/types/packages/ground/src/renderer.d.ts +0 -15
- package/dist/types/packages/ice/src/ground.d.ts +0 -1
- package/dist/types/packages/ice/src/r3f.d.ts +0 -1
- package/dist/types/packages/kernel/src/eviction.d.ts +0 -23
- package/dist/types/packages/kernel/src/zoom-bands.d.ts +0 -19
- package/dist/types/packages/r3f/src/bridge.d.ts +0 -129
- package/dist/types/packages/r3f/src/composite-material.d.ts +0 -26
- package/dist/types/packages/r3f/src/compositor-pass.d.ts +0 -105
- package/dist/types/packages/r3f/src/dev-write-trap.d.ts +0 -30
- package/dist/types/packages/r3f/src/gl-root.d.ts +0 -96
- package/dist/types/packages/r3f/src/gl-router.d.ts +0 -70
- package/dist/types/packages/r3f/src/index.d.ts +0 -17
- package/dist/types/packages/r3f/src/island-state.d.ts +0 -112
- package/dist/types/packages/r3f/src/island.d.ts +0 -13
- package/dist/types/packages/r3f/src/pool.d.ts +0 -56
- package/dist/types/packages/r3f/src/preview-capture.d.ts +0 -19
- package/dist/types/packages/r3f/src/resource-registry.d.ts +0 -30
- package/dist/types/packages/r3f/src/self-sustain.d.ts +0 -39
- package/dist/types/packages/r3f/src/use-island-frame.d.ts +0 -39
- package/dist/types/packages/react/src/infinite-canvas.d.ts +0 -140
- package/dist/types/packages/react/src/preview-snapshots.d.ts +0 -17
- package/dist/types/packages/react/src/widget-preview.d.ts +0 -14
- package/dist/types/packages/react/src/widget-root.d.ts +0 -33
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Component, type Entity, type World } from "../../../core/src/index";
|
|
2
|
+
import type { Prints } from "./kind";
|
|
3
|
+
import { type TypingDocs } from "../../../desk/src/index";
|
|
4
|
+
export interface PhotoCarryOptions {
|
|
5
|
+
readonly world: World;
|
|
6
|
+
/** The document a rest commits into — the facade's `engine.docs`. */
|
|
7
|
+
readonly docs: TypingDocs;
|
|
8
|
+
/** The print's props cell (its `angle`) — the object hands its own (D-D7-A.3); absent, a rest commits no turn. */
|
|
9
|
+
readonly props?: Component | undefined;
|
|
10
|
+
/** The photo kind's state on this desk (undefined before it is made). */
|
|
11
|
+
readonly prints: () => Prints | undefined;
|
|
12
|
+
/** Is this entity a print (the desk's builder knows each entity's kind). */
|
|
13
|
+
readonly isPrint: (e: Entity) => boolean;
|
|
14
|
+
/** Where a rest's transaction runs: out of the frame (a microtask) unless a test says. */
|
|
15
|
+
readonly defer?: (fn: () => void) => void;
|
|
16
|
+
/** A press on a TAPED print became a drag (the recognizer Active): not carried — told once a gesture, so the desk's marks give it (D4a). */
|
|
17
|
+
readonly refused?: (e: Entity) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface PhotoCarry {
|
|
20
|
+
/** Nothing to follow (D7 #14): no print in a hand, no press on the desk, no rest owed by the kind. */
|
|
21
|
+
idle(): boolean;
|
|
22
|
+
/** Once a frame, before the kinds' clocks: the hands onto the bodies, and last frame's rests into their transactions. */
|
|
23
|
+
follow(now: number): void;
|
|
24
|
+
/** The prints in a hand now. */
|
|
25
|
+
held(): readonly Entity[];
|
|
26
|
+
/** Carries cancelled since creation (a rig's witness). */
|
|
27
|
+
cancels(): number;
|
|
28
|
+
/** Transactions committed since creation (a rig's witness). */
|
|
29
|
+
commits(): number;
|
|
30
|
+
}
|
|
31
|
+
/** The lab's wheel: a wheel unit turns a held print by this many radians (lab/photo.ts). */
|
|
32
|
+
export declare const TWIST_PER_WHEEL = 0.0035;
|
|
33
|
+
export declare function createPhotoCarry(opts: PhotoCarryOptions): PhotoCarry;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { Entity } from "../../../core/src/index";
|
|
2
|
+
import { type KindExtra, type KindPass, type KindProgram, type SlotContext, type KindHost, type KindLocal, type ObjectContext, type ObjectKind, type ObjectRect } from "../../../desk/src/index";
|
|
3
|
+
import { type MarkFrame, type MatPass, type ShaderText } from "../../../desk/src/kit/index";
|
|
4
|
+
import { type PhotoBody, type PhotoGeometry, type PhotoLaw } from "./photo";
|
|
5
|
+
import { type Picture, type PhotoInstance, PhotoPass } from "./photo-pass";
|
|
6
|
+
import type { PictureStats } from "./pictures";
|
|
7
|
+
/** The print's kind name — its key in the registry and in every slot's `objects`. */
|
|
8
|
+
export declare const PHOTO_KIND = "photo";
|
|
9
|
+
export declare class PhotoKind implements KindPass<PhotoInstance> {
|
|
10
|
+
/** The photo pass itself: a host's door to the pictures (`picture`, `pictureFrom`, `dropPicture`) and the print's law (`law`). */
|
|
11
|
+
readonly pass: PhotoPass;
|
|
12
|
+
constructor(pass: PhotoPass);
|
|
13
|
+
spawn(mat: MatPass): PhotoKind;
|
|
14
|
+
tune(root: KindPass<PhotoInstance>): void;
|
|
15
|
+
/** The pass's own `prepare`, argument for argument: the slot's camera, grid, clocks, the objects' presence, the light, the lamp — and the records' keys (D6). */
|
|
16
|
+
prepare(_encoder: GPUCommandEncoder, s: SlotContext, records: readonly PhotoInstance[], extra?: KindExtra): number;
|
|
17
|
+
dropped(): number;
|
|
18
|
+
/** Records [first, end) — indices into the prints `prepare` was handed, each drawn with its picture. */
|
|
19
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
20
|
+
records(): import("../../../desk/src/index").RecordStoreStats;
|
|
21
|
+
cardResources(): {
|
|
22
|
+
readonly version: number;
|
|
23
|
+
readonly resources: readonly (GPUBuffer | GPUTextureView | GPUSampler)[];
|
|
24
|
+
};
|
|
25
|
+
cardSlot(index: number): number;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
}
|
|
28
|
+
/** The print's program for a host's shader text: its pass made on the root's mat. */
|
|
29
|
+
export declare function photoProgram(text: ShaderText): KindProgram<PhotoInstance>;
|
|
30
|
+
/** The print's silhouette for the desk's marks (D4a): the sheet's own axes on the desk plane (its height's parallax aside), its corner. */
|
|
31
|
+
export declare function photoFrame(G: PhotoGeometry): MarkFrame;
|
|
32
|
+
/** A print's extent on the desk, world units: its picture's aspect at the law's long side (the lab's `addPicture`); 3:2 without one. */
|
|
33
|
+
export declare const printExtent: (width: number, height: number, long?: number) => {
|
|
34
|
+
readonly w: number;
|
|
35
|
+
readonly h: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* How far a print's drawing reaches past its rect, world units: the leave's height (1.6 × the lift) and the held droop cast
|
|
39
|
+
* along the lamp's capped slope and blurred, and the local eye's scale of a sheet at that height about its far corner.
|
|
40
|
+
*/
|
|
41
|
+
export declare function photoReach(law?: PhotoLaw): number;
|
|
42
|
+
/** A print's pose as a still pins it (a FLUX pin, never a Grab — D-D2a-world.5): its height, slope, bend, anchor and the hand holding it. */
|
|
43
|
+
export interface PhotoPose {
|
|
44
|
+
readonly h?: number;
|
|
45
|
+
readonly sx?: number;
|
|
46
|
+
readonly sy?: number;
|
|
47
|
+
readonly bend?: number;
|
|
48
|
+
readonly ax?: number;
|
|
49
|
+
readonly ay?: number;
|
|
50
|
+
readonly hold?: {
|
|
51
|
+
readonly gx: number;
|
|
52
|
+
readonly gy: number;
|
|
53
|
+
readonly px: number;
|
|
54
|
+
readonly py: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** A print that came to rest where its facts are not — ONE transaction's worth for the carry: its centre, world units, and its turn (the wheel twists a carried print, D3t-a). */
|
|
58
|
+
export interface PrintRest {
|
|
59
|
+
readonly entity: Entity;
|
|
60
|
+
readonly x: number;
|
|
61
|
+
readonly y: number;
|
|
62
|
+
readonly angle: number;
|
|
63
|
+
}
|
|
64
|
+
/** A flick's witness: the body as the hand let it go, and every step the desk took with it since (the law replays them). */
|
|
65
|
+
export interface FlickWitness {
|
|
66
|
+
readonly body: PhotoBody;
|
|
67
|
+
readonly dts: number[];
|
|
68
|
+
landed: {
|
|
69
|
+
readonly x: number;
|
|
70
|
+
readonly y: number;
|
|
71
|
+
} | null;
|
|
72
|
+
}
|
|
73
|
+
/** The photo kind's own state on one desk: the prints' bodies, their pictures, the carry's door. */
|
|
74
|
+
export interface Prints extends KindLocal {
|
|
75
|
+
/** When the kind is next live (K7a — `KindLocal.due`, declared: the six built-ins all say). */
|
|
76
|
+
due(now: number): number;
|
|
77
|
+
/** The hand takes print `e` at a world point (the carry); a body at rest is lifted off its facts. */
|
|
78
|
+
hold(e: Entity, wx: number, wy: number, t: number): void;
|
|
79
|
+
/** The hand moved (world, t seconds) — the grab point follows it exactly. */
|
|
80
|
+
move(e: Entity, wx: number, wy: number, t: number): void;
|
|
81
|
+
/** The hand let go: the flick from the last 70 ms, capped; the body glides from here. */
|
|
82
|
+
drop(e: Entity, t: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* The carry was CANCELLED (Esc — D3t-a): the hand lets go and the print flies back to where it began — its facts, its turn —
|
|
85
|
+
* in `PRINT_RETURN_MS` on the island ease, landing there; nothing is committed.
|
|
86
|
+
*/
|
|
87
|
+
cancel(e: Entity, t: number): void;
|
|
88
|
+
/** The wheel turns a carried print about the finger (PHOTO.md), radians; a print in the air takes it as spin. */
|
|
89
|
+
twist(e: Entity, da: number): void;
|
|
90
|
+
/** The print is drawn LIFTED — in a hand, in the air, flying home, its rest not yet in the facts (the builder paints it on top). */
|
|
91
|
+
lifted(e: Entity): boolean;
|
|
92
|
+
/** Prints that came to rest away from their facts since the last ask — the carry commits each in ONE transaction. */
|
|
93
|
+
rests(): PrintRest[];
|
|
94
|
+
/** How many rests wait to be asked for (D7 #14: the carry never idles over one). */
|
|
95
|
+
owed(): number;
|
|
96
|
+
/** The carry committed `e`'s rest (or could not): the body leads until the facts show it (or a second runs out). */
|
|
97
|
+
settle(e: Entity, committed: boolean): void;
|
|
98
|
+
/** A still's pose on `e` (undefined unpins). */
|
|
99
|
+
pin(e: Entity, pose: PhotoPose | undefined): void;
|
|
100
|
+
/** A print just laid by a paste or a drop arrives: it falls from `arrive` onto its place and fades in (PHOTO.md §3). */
|
|
101
|
+
arrive(e: Entity): void;
|
|
102
|
+
/** Fetch, decode and upload a blob's picture before a print names it (a scene's still); resolves once it is on the device. */
|
|
103
|
+
preload(hash: string, width: number, height: number): Promise<void>;
|
|
104
|
+
/** Print `e`'s body as it is now — a copy (a rig's witness); undefined for a print never met. */
|
|
105
|
+
body(e: Entity): PhotoBody | undefined;
|
|
106
|
+
/** The last flick of print `e` — a copy. */
|
|
107
|
+
flick(e: Entity): FlickWitness | undefined;
|
|
108
|
+
/** The pictures: on the device, on their way, missing from the store or undecodable — and where they are resident (K6a: thumbnails, details, slots). */
|
|
109
|
+
pictures(): {
|
|
110
|
+
readonly ready: number;
|
|
111
|
+
readonly loading: number;
|
|
112
|
+
readonly failed: number;
|
|
113
|
+
readonly resident?: PictureStats;
|
|
114
|
+
};
|
|
115
|
+
/** The world half's: the body to resolve for this frame (the facts at rest, the live body while it leads). */
|
|
116
|
+
bodyFor(ctx: ObjectContext, hx: number, hy: number): PhotoBody;
|
|
117
|
+
/** The world half's: the picture a print's `blob` names (null while it loads, or without one). */
|
|
118
|
+
pictureFor(e: Entity, hash: string, width: number, height: number): Picture | null;
|
|
119
|
+
}
|
|
120
|
+
/** A cancelled carry's flight home, ms (D3t-a) — the put-down's own length (design-015 §8: 440 ms home), on the hand's island ease. */
|
|
121
|
+
export declare const PRINT_RETURN_MS = 440;
|
|
122
|
+
/** The photo kind's `local()` on one desk. */
|
|
123
|
+
export declare function createPrints(host: KindHost, law?: PhotoLaw): Prints;
|
|
124
|
+
export interface PhotoKindOptions {
|
|
125
|
+
/** The host's shader text; the generated module unless a host says. */
|
|
126
|
+
readonly text?: ShaderText;
|
|
127
|
+
/** The print's numbers (photo.ts `PHOTO`) — the engine's unless a host tweaks them. */
|
|
128
|
+
readonly law?: PhotoLaw;
|
|
129
|
+
}
|
|
130
|
+
/** The print's kind, whole (kinds/world.ts `ObjectKind`): the program, and the world half on the photo lab's body. */
|
|
131
|
+
export declare function photoKind(opts?: PhotoKindOptions): ObjectKind<PhotoGeometry, PhotoInstance>;
|
|
132
|
+
/** The rect a print lies in at rest, for a host that places one by its centre: top-left and the f32 size the world stores. */
|
|
133
|
+
export declare function printRect(cx: number, cy: number, width: number, height: number, long?: number): ObjectRect & {
|
|
134
|
+
readonly x: number;
|
|
135
|
+
readonly y: number;
|
|
136
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PhotoGeometry, type PhotoLaw } from "./photo";
|
|
2
|
+
export declare const Photo: import("../../../desk/src/engine/index").StructDef<"eye" | "light" | "tier" | "n" | "bounds" | "centre" | "slope" | "bend" | "ex" | "ey" | "image">;
|
|
3
|
+
export declare const PhotoUniforms: import("../../../desk/src/engine/index").StructDef<"paper" | "night" | "gloss" | "penumbra" | "contact" | "shade">;
|
|
4
|
+
export declare const MAX_PHOTOS = 256;
|
|
5
|
+
/** A picture as a record names it: its texels and chain, where its thumbnail lies, and its detail's slot while a frame binds one (pictures.ts `Picture`). */
|
|
6
|
+
export interface PhotoPicture {
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly height: number;
|
|
9
|
+
readonly mips: number;
|
|
10
|
+
readonly layer: number;
|
|
11
|
+
readonly base: number;
|
|
12
|
+
readonly slot: number;
|
|
13
|
+
readonly detail: {
|
|
14
|
+
readonly base: number;
|
|
15
|
+
} | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function photoValues(G: PhotoGeometry, border: number, pic: PhotoPicture | null): {
|
|
18
|
+
centre: number[];
|
|
19
|
+
ex: number[];
|
|
20
|
+
ey: number[];
|
|
21
|
+
n: number[];
|
|
22
|
+
eye: number[];
|
|
23
|
+
bend: number[];
|
|
24
|
+
bounds: number[];
|
|
25
|
+
image: number[];
|
|
26
|
+
light: number[];
|
|
27
|
+
slope: number[];
|
|
28
|
+
tier: number[];
|
|
29
|
+
};
|
|
30
|
+
export declare function photoUniformValues(law?: PhotoLaw): {
|
|
31
|
+
shade: number[];
|
|
32
|
+
paper: number[];
|
|
33
|
+
penumbra: number[];
|
|
34
|
+
contact: number[];
|
|
35
|
+
gloss: number[];
|
|
36
|
+
night: number[];
|
|
37
|
+
};
|
|
38
|
+
/** The border's width in world units for a print of half extents `hx × hy`. */
|
|
39
|
+
export declare const borderOf: (hx: number, hy: number, law?: PhotoLaw) => number;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { type RasterBudget } from "../../../desk/src/index";
|
|
2
|
+
import { type FadeIn, type View, type MatConfig, type MatFrame, type SlotLight, type MatPass, type Presentation, type MatLight } from "../../../desk/src/kit/index";
|
|
3
|
+
import { type Picture, type PictureSource, type PictureStats } from "./pictures";
|
|
4
|
+
import { type PhotoGeometry, type PhotoLaw } from "./photo";
|
|
5
|
+
import type { PhotoShaders } from "./shaders";
|
|
6
|
+
/** The largest side a picture keeps on the device — a 6×4 print at zoom 5 on a 2× screen. */
|
|
7
|
+
export declare const PICTURE_MAX = 4096;
|
|
8
|
+
export type { Picture } from "./pictures";
|
|
9
|
+
/** One print for the pass: its resolved pose, its border's width, its picture. */
|
|
10
|
+
export interface PhotoInstance {
|
|
11
|
+
readonly geometry: PhotoGeometry;
|
|
12
|
+
readonly border: number;
|
|
13
|
+
readonly picture: Picture | null;
|
|
14
|
+
}
|
|
15
|
+
export declare class PhotoPass {
|
|
16
|
+
readonly name = "photo/prints";
|
|
17
|
+
private readonly knobs;
|
|
18
|
+
/** The prints' PERSISTENT records (engine/records.ts, design-015 §4.3; D6): a slot per print while drawn, written when it changed. */
|
|
19
|
+
private readonly store;
|
|
20
|
+
/** The records the last prepare turned away at the pass's cap — not drawn; the ground reports them (`GroundStats.dropped`, D7). */
|
|
21
|
+
dropped: number;
|
|
22
|
+
private readonly knobBuf;
|
|
23
|
+
/** What the GPU holds of the knobs: they are written only when they change (K4a — a standing value costs a frame nothing). */
|
|
24
|
+
private readonly knobsSent;
|
|
25
|
+
private group;
|
|
26
|
+
private bound;
|
|
27
|
+
private boundStore;
|
|
28
|
+
/** This frame's prints, in the order `prepare` was handed them — what `drawRange` counts in. */
|
|
29
|
+
private count;
|
|
30
|
+
/** This frame's slot is lit from elsewhere: it draws with the second pipeline. */
|
|
31
|
+
private litElsewhere;
|
|
32
|
+
/** The print's numbers (photo.ts `PHOTO`) — a host tunes the root's copy; every slot takes it (`tune`). */
|
|
33
|
+
law: PhotoLaw;
|
|
34
|
+
private readonly device;
|
|
35
|
+
private readonly shared;
|
|
36
|
+
private readonly mat;
|
|
37
|
+
private constructor();
|
|
38
|
+
/** The root's pass, on the root's mat (its silhouette and noise). */
|
|
39
|
+
static create(device: GPUDevice, format: GPUTextureFormat, src: PhotoShaders, mat: MatPass): Promise<PhotoPass>;
|
|
40
|
+
/** A second slot on the same pipeline, samplers and pictures, reading ITS mat's silhouette and noise — a mini mat's inside, a flight's departed desk. */
|
|
41
|
+
spawn(mat: MatPass): PhotoPass;
|
|
42
|
+
/** Take the root's law — what every spawned slot does each frame. */
|
|
43
|
+
tune(from: PhotoPass): void;
|
|
44
|
+
private rebind;
|
|
45
|
+
/**
|
|
46
|
+
* A picture from raw sRGB rgba8 bytes (row 0 = top, straight alpha) — what a Node host or a test hands in. A picture is
|
|
47
|
+
* the PASS's resource, shared by every slot: a print's record names it by this handle (`PhotoInstance.picture`), and it
|
|
48
|
+
* lives until the host drops it (`dropPicture`). The bytes are kept (by reference) to make a detail from; null when the
|
|
49
|
+
* thumbnail array holds no more pictures (the device's layers — the print draws its paper alone).
|
|
50
|
+
*/
|
|
51
|
+
picture(bytes: Uint8Array<ArrayBuffer>, width: number, height: number): Picture | null;
|
|
52
|
+
/**
|
|
53
|
+
* A picture from a decoded image (a pasted or dropped file, an `<img>`, a canvas) — the browser's path; `again` decodes it
|
|
54
|
+
* afresh for a print large on screen (its detail) — without it the picture keeps its thumbnail alone.
|
|
55
|
+
*/
|
|
56
|
+
pictureFrom(source: ImageBitmap | HTMLCanvasElement | OffscreenCanvas | HTMLImageElement, width: number, height: number, again?: PictureSource): Picture | null;
|
|
57
|
+
/** A picture no print names any more: its layer given back, its detail destroyed. */
|
|
58
|
+
dropPicture(p: Picture): void;
|
|
59
|
+
/**
|
|
60
|
+
* THE RESIDENCY's frame boundary (pictures.ts `step` — the kind's tick, before the build): details bound, fetched, cut or let
|
|
61
|
+
* go for what the last frame's prints asked. True when a print's tier moved (the desk must draw again).
|
|
62
|
+
*/
|
|
63
|
+
residency(): boolean;
|
|
64
|
+
/** The last frame's asks still unanswered (K7a): the next tick owes them a `residency` step — a detail fetched, a slot freed. */
|
|
65
|
+
get residencyOwed(): boolean;
|
|
66
|
+
/** The pictures under the desk's budget (the kind's host lends it) — and its ask of what stays. */
|
|
67
|
+
budget(budget: RasterBudget | undefined): void;
|
|
68
|
+
keeps(key: string): boolean;
|
|
69
|
+
/** A detail landed or was evicted (async): `wake` asks the desk for a frame. */
|
|
70
|
+
set onPictures(wake: () => void);
|
|
71
|
+
/** The pictures' counters (a rig's witness): thumbnails, details, slots, bytes. */
|
|
72
|
+
get pictureStats(): PictureStats;
|
|
73
|
+
/**
|
|
74
|
+
* Upload this frame's prints in paint order (first = lowest) and the mat's block for this slot's camera,
|
|
75
|
+
* its light (`light` the Sun or the Moon, `lit` the lamp it is seen by — MINIMAT.md §4): the dapple falls
|
|
76
|
+
* on the prints. Returns the count that will draw.
|
|
77
|
+
*/
|
|
78
|
+
prepare(view: View & {
|
|
79
|
+
readonly dpr: number;
|
|
80
|
+
}, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame | undefined, prints: readonly PhotoInstance[], present?: Presentation, light?: MatLight, lit?: SlotLight, keys?: readonly number[], hand?: boolean): number;
|
|
81
|
+
/** The store's counters (a rig's witness): records written, bytes, draw-list writes, slots in use. */
|
|
82
|
+
get records(): import("../../../desk/src/index").RecordStoreStats;
|
|
83
|
+
/** K7b: record `index` of the last prepare drawn by the flat-card pipeline — its slot in the store — or −1: a detail is bound, the pass draws it. */
|
|
84
|
+
cardSlot(index: number): number;
|
|
85
|
+
private cards;
|
|
86
|
+
/** K7b: this slot's resources for the print's card material (shaders.ts `photoCard`), in its bindings' order — made again when the store or the thumbnails grew. */
|
|
87
|
+
cardResources(): {
|
|
88
|
+
readonly version: number;
|
|
89
|
+
readonly resources: readonly (GPUBuffer | GPUTextureView | GPUSampler)[];
|
|
90
|
+
};
|
|
91
|
+
private card;
|
|
92
|
+
private cardOver;
|
|
93
|
+
get drawn(): number;
|
|
94
|
+
/** Every print prepared this frame, into a pass the caller opened: `drawRange` over the whole list. */
|
|
95
|
+
draw(pass: GPURenderPassEncoder): void;
|
|
96
|
+
/**
|
|
97
|
+
* The prints `prepare` was handed at [first, end) — indices into ITS list, as the ground's runs count a kind's records —
|
|
98
|
+
* as ONE instanced draw (K6a, K-L4): the slot's group and the pictures' bound once, on the pipeline for the slot's light,
|
|
99
|
+
* each print an instance whose record says where its pixels are. An empty range records nothing, not even the pipeline.
|
|
100
|
+
*/
|
|
101
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
102
|
+
/** This slot's buffers; the pictures go with the last slot standing (a host's pictures are the host's to drop until then). */
|
|
103
|
+
dispose(): void;
|
|
104
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { type RGB } from "../../../desk/src/index";
|
|
2
|
+
import { type Lamp } from "../../../desk/src/kit/index";
|
|
3
|
+
/**
|
|
4
|
+
* The desk's ONE light: the mat's gobo projector as a lamp over the desk (paper.ts `lampOf` —
|
|
5
|
+
* world (1930, −826), 994 up), the same the notes and the notebooks are lit and shadowed by.
|
|
6
|
+
* Per print, the direction toward it from the print, and the shadow's ground slope away from
|
|
7
|
+
* it, capped at `PHYSICS.shadow.slopeMax` (a print far from the lamp keeps a finite shadow).
|
|
8
|
+
*/
|
|
9
|
+
export declare const LAMP: Lamp;
|
|
10
|
+
/**
|
|
11
|
+
* The shadow's two terms: the PENUMBRA is the note's (kit/physics.ts `PHYSICS.shadow`: σ at contact, alpha
|
|
12
|
+
* resting, the slope's cap — one physics for every sheet on the desk; its growth and held alpha below) — and a
|
|
13
|
+
* tight CONTACT term at the base that fades as the sheet rises off the mat (gone by `reach`), as
|
|
14
|
+
* the notebook's slab has (the tree-shadow design system's `--lift-1`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const DESK_SHADOW: {
|
|
17
|
+
readonly penumbra: {
|
|
18
|
+
readonly sigma0: 2.2;
|
|
19
|
+
readonly sigmaPerHeight: 0.36;
|
|
20
|
+
readonly alpha: 0.36;
|
|
21
|
+
readonly alphaHeld: 0.42;
|
|
22
|
+
readonly slopeMax: 2.2;
|
|
23
|
+
};
|
|
24
|
+
readonly contact: {
|
|
25
|
+
readonly alpha: 0.22;
|
|
26
|
+
readonly sigma: 1.1;
|
|
27
|
+
readonly reach: 2.5;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/** The colour a shadow casts ON the mat — theme.ts `MAT.cast` (the tree-shadow design system's `--cast-rgb`, "the world's darkest value"). */
|
|
31
|
+
export declare const CAST: RGB;
|
|
32
|
+
declare const PHOTO_SPEC: {
|
|
33
|
+
/** The print's long side — a 6×4 at the note's scale. */
|
|
34
|
+
readonly long: 400;
|
|
35
|
+
/** The white border, as a fraction of the short side (a classic bordered print). 0 = borderless. */
|
|
36
|
+
readonly border: 0.05;
|
|
37
|
+
/** The die-cut corner. */
|
|
38
|
+
readonly radius: 2.5;
|
|
39
|
+
/** The paper under the emulsion: a resin-coated white, a touch warm (sRGB), and its fibre ±/255. */
|
|
40
|
+
readonly paper: RGB;
|
|
41
|
+
readonly grain: number;
|
|
42
|
+
/** The local eye's height over the desk: at h the sheet reads eye/(eye − h) larger. */
|
|
43
|
+
readonly eye: 720;
|
|
44
|
+
/** How high a held sheet rides, and how far a hovered one rises (the edge lifting under the finger). */
|
|
45
|
+
readonly lift: 24;
|
|
46
|
+
readonly hover: 2.2;
|
|
47
|
+
/** Where a pasted print starts its fall from. */
|
|
48
|
+
readonly arrive: 70;
|
|
49
|
+
/** The height spring: rising under the hand, falling to the mat (Hz, ζ), and the landing's bounce (restitution; below this speed it just settles). */
|
|
50
|
+
readonly rise: {
|
|
51
|
+
readonly hz: 5.5;
|
|
52
|
+
readonly zeta: 0.82;
|
|
53
|
+
};
|
|
54
|
+
readonly fall: {
|
|
55
|
+
readonly hz: 3.6;
|
|
56
|
+
readonly zeta: 0.5;
|
|
57
|
+
readonly restitution: 0.18;
|
|
58
|
+
readonly settle: 30;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The tilt (the sheet's slope): toward the fingers while held (the far edge hangs lowest — degrees at
|
|
62
|
+
* the far corner), with the air while it moves (the leading edge rides up — degrees per 1000 u/s),
|
|
63
|
+
* never past `max`; a spring (Hz, ζ) so it wobbles once when the hand stops.
|
|
64
|
+
*/
|
|
65
|
+
readonly tilt: {
|
|
66
|
+
readonly grab: 3;
|
|
67
|
+
readonly motion: 5;
|
|
68
|
+
readonly max: 12;
|
|
69
|
+
readonly hz: 3.2;
|
|
70
|
+
readonly zeta: 0.42;
|
|
71
|
+
};
|
|
72
|
+
/** The bend: a held sheet droops away from the fingers (units at the far corner); a resting print keeps a faint curl along its long side. */
|
|
73
|
+
readonly bend: {
|
|
74
|
+
readonly held: 5;
|
|
75
|
+
readonly rest: 0.9;
|
|
76
|
+
readonly rate: 9;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The swing about the grab point: `drag` = the air's pull on the sheet's centre (the centre trails the
|
|
80
|
+
* motion), `inertia` = the share of the hand's acceleration the sheet feels (it swings when the hand
|
|
81
|
+
* jerks or stops), `damp` = rotational damping per second. OFF (James, 2026-09-24: "do not make them
|
|
82
|
+
* rotate") — a carried print keeps its turn; only the wheel turns it. The machinery stays for the panel.
|
|
83
|
+
*/
|
|
84
|
+
readonly swing: {
|
|
85
|
+
readonly drag: 0;
|
|
86
|
+
readonly inertia: 0;
|
|
87
|
+
readonly damp: 2.2;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Sliding: in the air a glide with `air` drag per second; on the mat the cutting mat's grip — a
|
|
91
|
+
* constant deceleration (u/s²) plus a viscous share per second; the same for the turn (rad/s², /s).
|
|
92
|
+
*/
|
|
93
|
+
readonly slide: {
|
|
94
|
+
readonly air: 0.9;
|
|
95
|
+
readonly grip: 2400;
|
|
96
|
+
readonly viscous: 5;
|
|
97
|
+
readonly spinGrip: 7;
|
|
98
|
+
readonly spinViscous: 4;
|
|
99
|
+
};
|
|
100
|
+
/** A flick's velocity is the hand's over this window (s), capped at this speed (u/s). */
|
|
101
|
+
readonly throw: {
|
|
102
|
+
readonly window: 0.07;
|
|
103
|
+
readonly max: 4200;
|
|
104
|
+
};
|
|
105
|
+
/** The shadow's two terms (`DESK_SHADOW`). */
|
|
106
|
+
readonly shadow: {
|
|
107
|
+
readonly penumbra: {
|
|
108
|
+
readonly sigma0: 2.2;
|
|
109
|
+
readonly sigmaPerHeight: 0.36;
|
|
110
|
+
readonly alpha: 0.36;
|
|
111
|
+
readonly alphaHeld: 0.42;
|
|
112
|
+
readonly slopeMax: 2.2;
|
|
113
|
+
};
|
|
114
|
+
readonly contact: {
|
|
115
|
+
readonly alpha: 0.22;
|
|
116
|
+
readonly sigma: 1.1;
|
|
117
|
+
readonly reach: 2.5;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/** The gloss: the lamp's highlight (strength, shininess), and the room's sheen off the coating (strength). */
|
|
121
|
+
readonly gloss: {
|
|
122
|
+
readonly spec: 0.2;
|
|
123
|
+
readonly shininess: 42;
|
|
124
|
+
readonly sheen: 0.5;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* By night (PHOTO.md §4a): the print is lit by the Moon at the mat's night law — `level` of its day
|
|
128
|
+
* luminance in the Moon's light (MAT.md: the moonlit sage shows at ½ the sunlit) — the palm's shade
|
|
129
|
+
* deepening to the sky's fill; its paper seen as the mat is (the rods' blue), its picture foveally
|
|
130
|
+
* (`keep` 1 = cones alone, white-balanced: the picture's hue exactly).
|
|
131
|
+
*/
|
|
132
|
+
readonly night: {
|
|
133
|
+
readonly level: 0.5;
|
|
134
|
+
readonly keep: 1;
|
|
135
|
+
};
|
|
136
|
+
/** Going away (delete): the sheet lifts and fades over this long (s). */
|
|
137
|
+
readonly leave: 0.28;
|
|
138
|
+
};
|
|
139
|
+
/** The law with its literals widened — what a host tunes (a copy: `structuredClone(PHOTO)`). */
|
|
140
|
+
type Widen<T> = T extends number ? number : T extends RGB ? RGB : {
|
|
141
|
+
-readonly [K in keyof T]: Widen<T[K]>;
|
|
142
|
+
};
|
|
143
|
+
export type PhotoLaw = Widen<typeof PHOTO_SPEC>;
|
|
144
|
+
/** The engine's numbers. Never written — a host tunes its own copy. */
|
|
145
|
+
export declare const PHOTO: PhotoLaw;
|
|
146
|
+
/** The unit direction toward the lamp from a point of the desk at height z (x right, y down, z up). */
|
|
147
|
+
export declare function lightAt(x: number, y: number, z?: number, lamp?: Lamp): readonly [number, number, number];
|
|
148
|
+
/** A cast shadow's offset on the mat per unit of height at a desk point — away from the lamp, capped. */
|
|
149
|
+
export declare function shadowSlope(x: number, y: number, lamp?: Lamp, max?: number): readonly [number, number];
|
|
150
|
+
export interface Hold {
|
|
151
|
+
/** The grab point in the sheet's own frame (unrotated, centre origin). */
|
|
152
|
+
gx: number;
|
|
153
|
+
gy: number;
|
|
154
|
+
/** The finger, world — where the grab point is, exactly. */
|
|
155
|
+
px: number;
|
|
156
|
+
py: number;
|
|
157
|
+
/** The finger's filtered velocity and acceleration (world/s, world/s²). */
|
|
158
|
+
vx: number;
|
|
159
|
+
vy: number;
|
|
160
|
+
ax: number;
|
|
161
|
+
ay: number;
|
|
162
|
+
/** Recent finger samples for the flick: [t, x, y]. */
|
|
163
|
+
trail: [number, number, number][];
|
|
164
|
+
}
|
|
165
|
+
export interface PhotoBody {
|
|
166
|
+
/** Centre on the mat plane, world. */
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
/** The turn in the plane, radians (positive = clockwise on screen). */
|
|
170
|
+
angle: number;
|
|
171
|
+
vx: number;
|
|
172
|
+
vy: number;
|
|
173
|
+
spin: number;
|
|
174
|
+
/** Height of the centre off the mat, and its rate. */
|
|
175
|
+
h: number;
|
|
176
|
+
vh: number;
|
|
177
|
+
/** The slope (dz/dx, dz/dy, world axes) and its rate. */
|
|
178
|
+
sx: number;
|
|
179
|
+
sy: number;
|
|
180
|
+
vsx: number;
|
|
181
|
+
vsy: number;
|
|
182
|
+
bend: number;
|
|
183
|
+
/** Half extents (world). */
|
|
184
|
+
readonly hx: number;
|
|
185
|
+
readonly hy: number;
|
|
186
|
+
/** The perspective's anchor in the sheet's frame — the grab point while held (so the finger's point never slides), kept after. */
|
|
187
|
+
ax: number;
|
|
188
|
+
ay: number;
|
|
189
|
+
hold: Hold | null;
|
|
190
|
+
hovered: boolean;
|
|
191
|
+
/** Presence: 1 here, falling to 0 as it leaves; `leaving` = on its way out. */
|
|
192
|
+
alpha: number;
|
|
193
|
+
leaving: boolean;
|
|
194
|
+
}
|
|
195
|
+
export declare function newBody(x: number, y: number, w: number, h: number, angle?: number, height?: number): PhotoBody;
|
|
196
|
+
/** The print's size for an image: the long side is `law.long`, the aspect is the picture's. */
|
|
197
|
+
export declare function printSize(imgW: number, imgH: number, long?: number): {
|
|
198
|
+
w: number;
|
|
199
|
+
h: number;
|
|
200
|
+
};
|
|
201
|
+
/** Take hold of the sheet at a world point (the finger), in its own frame. */
|
|
202
|
+
export declare function grab(b: PhotoBody, wx: number, wy: number, t: number): void;
|
|
203
|
+
/** The finger moved (world, at time t in seconds). */
|
|
204
|
+
export declare function moveHold(b: PhotoBody, wx: number, wy: number, t: number): void;
|
|
205
|
+
/** Let go at time t: the sheet leaves with the finger's recent velocity (and its own swing). */
|
|
206
|
+
export declare function release(b: PhotoBody, t: number, law?: PhotoLaw): void;
|
|
207
|
+
/** Turn a held sheet about the finger (the wheel), radians. */
|
|
208
|
+
export declare function twist(b: PhotoBody, da: number): void;
|
|
209
|
+
/** Is the sheet still moving (or still settling)? A host renders on demand while any is. */
|
|
210
|
+
export declare function restless(b: PhotoBody): boolean;
|
|
211
|
+
/** Advance the body by `dt` seconds (substepped at 240 Hz). */
|
|
212
|
+
export declare function stepPhoto(b: PhotoBody, dt0: number, law?: PhotoLaw): void;
|
|
213
|
+
/**
|
|
214
|
+
* No corner goes through the mat: the lowest point of the tilted, drooping sheet is the
|
|
215
|
+
* centre's height less the slope's fall to the far corner less the droop — when that is
|
|
216
|
+
* under 0 the slope gives (the far corner rests on the mat while the near one lifts, as a
|
|
217
|
+
* sheet lifted by its corner does) and its rate with it.
|
|
218
|
+
*/
|
|
219
|
+
export declare function clearMat(b: PhotoBody): void;
|
|
220
|
+
export type Vec3 = readonly [number, number, number];
|
|
221
|
+
export interface PhotoGeometry {
|
|
222
|
+
/** The sheet's centre in 3D (world units, z = height). */
|
|
223
|
+
readonly centre: Vec3;
|
|
224
|
+
/** The sheet's own axes in 3D (unit) and its normal. */
|
|
225
|
+
readonly ex: Vec3;
|
|
226
|
+
readonly ey: Vec3;
|
|
227
|
+
readonly n: Vec3;
|
|
228
|
+
readonly half: readonly [number, number];
|
|
229
|
+
readonly radius: number;
|
|
230
|
+
/** The local eye (world units): over the anchor, `law.eye` above the mat. */
|
|
231
|
+
readonly eye: Vec3;
|
|
232
|
+
/** The bend: the droop's amount and where it hangs from (the sheet's frame); the rest curl. Signed (droop, held). */
|
|
233
|
+
readonly droop: number;
|
|
234
|
+
readonly curl: number;
|
|
235
|
+
readonly grab: readonly [number, number];
|
|
236
|
+
readonly alpha: number;
|
|
237
|
+
/** Toward the lamp from the print (unit), the shadow's slope on the mat, the penumbra's alpha (resting → held). */
|
|
238
|
+
readonly light: Vec3;
|
|
239
|
+
readonly slope: readonly [number, number];
|
|
240
|
+
readonly shadowAlpha: number;
|
|
241
|
+
/** The world rect the pass's quad covers: the sheet as seen and its shadow. */
|
|
242
|
+
readonly bounds: {
|
|
243
|
+
readonly x0: number;
|
|
244
|
+
readonly y0: number;
|
|
245
|
+
readonly x1: number;
|
|
246
|
+
readonly y1: number;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/** The pose → what the pass draws and the hit-test reads. */
|
|
250
|
+
export declare function resolvePhoto(b: PhotoBody, law?: PhotoLaw, lamp?: Lamp): PhotoGeometry;
|
|
251
|
+
/** The sheet's own frame → a 3D point on its (flat) plane. */
|
|
252
|
+
export declare function pointAt(G: Pick<PhotoGeometry, "centre" | "ex" | "ey">, u: number, v: number): Vec3;
|
|
253
|
+
/** A 3D point as the local eye sees it on the desk plane (world units). */
|
|
254
|
+
export declare function project(eye: Vec3, P: Vec3): [number, number];
|
|
255
|
+
/** The bend's offset along the normal at a point of the sheet (photo.wgsl `photo_bend`). */
|
|
256
|
+
export declare function bendAt(G: Pick<PhotoGeometry, "half" | "droop" | "curl" | "grab">, u: number, v: number): number;
|
|
257
|
+
/** A desk point (world) → the point of the sheet the eye sees there, in the sheet's frame (photo.wgsl `photo_unproject`). */
|
|
258
|
+
export declare function unproject(G: PhotoGeometry, wx: number, wy: number): [number, number];
|
|
259
|
+
export declare function sdRoundBox(qx: number, qy: number, hx: number, hy: number, r: number): number;
|
|
260
|
+
/** Is the desk point on the sheet as drawn? */
|
|
261
|
+
export declare function hitPhoto(G: PhotoGeometry, wx: number, wy: number): boolean;
|
|
262
|
+
export {};
|