@vibecook/ice 0.10.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-5FQS7V2C.js → chunk-DYK6KNLG.js} +13303 -7485
- 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 +34 -13
- 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-5FQS7V2C.js.map +0 -1
- package/dist/chunk-JWRHAM7L.js +0 -1163
- package/dist/chunk-JWRHAM7L.js.map +0 -1
- package/dist/chunk-MFTMPJUF.js +0 -681
- package/dist/chunk-MFTMPJUF.js.map +0 -1
- package/dist/chunk-OR5FNVUE.js.map +0 -1
- package/dist/ground.js +0 -1213
- 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 -103
- 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-classic.d.ts +0 -30
- package/dist/types/packages/ground/src/passes/grid-magnet.d.ts +0 -31
- package/dist/types/packages/ground/src/passes/grid.d.ts +0 -28
- 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,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE HELD BAR'S TOOLS (design-015 §8; D3t-a) — what an object in hand offers beyond being held: the kind's
|
|
3
|
+
* `open.tools`, declared on its WIDGET TYPE (`defineWidget({ heldTools, heldTool })` — the desk's `defineObject`
|
|
4
|
+
* passes its kind's), so the one keymap and the one held bar reach them through the engine, never through a kind.
|
|
5
|
+
* Each tool is a glyph, a key and a KIND:
|
|
6
|
+
* - a `mode` makes itself the held object's ACTIVE tool — the runtime `HeldTool` on the object in hand, the user's
|
|
7
|
+
* fact, never in the document (the board's four markers and its eraser; a notebook's pens; a calendar's pen). A
|
|
8
|
+
* `toggle` mode chosen again while active hands back the mode before it (the board's eraser lays down for the
|
|
9
|
+
* marker it took over from);
|
|
10
|
+
* - an `action` runs its op once (`run`, handed a `HeldToolApi` — outside the tick, like every op): undo and redo
|
|
11
|
+
* (the DOCUMENT's history: a held object's history is the document's, design-015 §5.1), the board's wipe.
|
|
12
|
+
* Keys route only while an object is held (the keymap asks `matchHeldTool` before its own entries). A tool with no
|
|
13
|
+
* `kind` is DECLARED ONLY — the bar shows it dim and nothing routes to it (a kind whose tools are a later slice's).
|
|
14
|
+
*/
|
|
15
|
+
import type { Entity, World } from "@vibecook/strata-ecs";
|
|
16
|
+
import type { GuardedTx } from "../guards/guarded-tx";
|
|
17
|
+
/** What an action's op is handed: the object in hand, the document's history and ONE transaction on the document. */
|
|
18
|
+
export interface HeldToolApi {
|
|
19
|
+
readonly world: World;
|
|
20
|
+
/** The object in hand. */
|
|
21
|
+
readonly entity: Entity;
|
|
22
|
+
/** The document's history — the one ⌘Z walks (false: nothing to undo, or a read-only document). */
|
|
23
|
+
undo(): boolean;
|
|
24
|
+
redo(): boolean;
|
|
25
|
+
/** ONE transaction on the document (one undo step unless `undoable: false`); false — nothing written — on a read-only one. */
|
|
26
|
+
transact(fn: (tx: GuardedTx) => void, opts?: {
|
|
27
|
+
readonly undoable?: boolean;
|
|
28
|
+
}): boolean;
|
|
29
|
+
/** The held object's own props as the world holds them now. */
|
|
30
|
+
props(): Readonly<Record<string, unknown>>;
|
|
31
|
+
/** The held object's own props, validated, in ONE transaction (`ops.setWidgetProps`'s path — the board's tip, a calendar's month); false on a read-only document. */
|
|
32
|
+
setProps(props: Readonly<Record<string, unknown>>, opts?: {
|
|
33
|
+
readonly undoable?: boolean;
|
|
34
|
+
}): boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A held tool's GLYPH (design-016 §5 · K-L2, K8a): a NAME the bar draws (its set — `SELECTION_GLYPHS` in `@ice/react`, which an
|
|
38
|
+
* app may extend), or the tool's OWN drawing — SVG path data in the bar's 24-unit box, stroked 2 units in the bar's ink as the
|
|
39
|
+
* bar's own are, or filled (`fill`). A plugin kind in its own package, which draws no React, declares its drawing; a name the bar
|
|
40
|
+
* does not know is never drawn as another glyph (the bar marks it missing and says so).
|
|
41
|
+
*/
|
|
42
|
+
export type HeldGlyph = string | {
|
|
43
|
+
readonly path: string;
|
|
44
|
+
readonly fill?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** One tool of the held bar, as a kind declares it (its `open.tools`). */
|
|
47
|
+
export interface HeldToolDef {
|
|
48
|
+
/** Unique within the type: what `HeldTool.id` holds for a mode, what `ops.useHeldTool` names. */
|
|
49
|
+
readonly id: string;
|
|
50
|
+
/** Its name — the slot's accessible label and its tip. */
|
|
51
|
+
readonly label: string;
|
|
52
|
+
/** `mode` (the active tool) or `action` (an op, run once); absent = declared only (dim, inert). */
|
|
53
|
+
readonly kind?: "mode" | "action";
|
|
54
|
+
/** The keys that choose it while held: `KeyboardEvent.key` with `mod+` (⌘ or ctrl), `shift+`, `alt+` — "1", "e", "mod+z", "mod+Backspace". */
|
|
55
|
+
readonly keys?: readonly string[];
|
|
56
|
+
/** The key as the tip shows it ("1", "E", "⌘Z"). */
|
|
57
|
+
readonly hint?: string;
|
|
58
|
+
/** Its glyph (`HeldGlyph`, K8a): a name of the bar's set, or its own drawing (`{ path }`). */
|
|
59
|
+
readonly glyph?: HeldGlyph;
|
|
60
|
+
/** A mode chosen again while active hands the hand back the mode before it. */
|
|
61
|
+
readonly toggle?: boolean;
|
|
62
|
+
/** The cursor over the object's drawing surface (its `content` part) while this mode is active — "none" where the tool draws itself. */
|
|
63
|
+
readonly cursor?: string;
|
|
64
|
+
/** false: keys only — no slot in the bar (the board's tip, its wipe). */
|
|
65
|
+
readonly bar?: boolean;
|
|
66
|
+
/** An action's op. */
|
|
67
|
+
run?(api: HeldToolApi): void;
|
|
68
|
+
}
|
|
69
|
+
/** A key press as the keymap reads it: `KeyboardEvent.key`, ⌘-or-ctrl, ⇧, ⌥. */
|
|
70
|
+
export interface KeyChord {
|
|
71
|
+
readonly key: string;
|
|
72
|
+
readonly mod: boolean;
|
|
73
|
+
readonly shift: boolean;
|
|
74
|
+
readonly alt: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Does a tool's key spec name this chord? Every modifier must match exactly; the key compares case-blind (Caps Lock types "E"). */
|
|
77
|
+
export declare function keyMatches(spec: string, chord: KeyChord): boolean;
|
|
78
|
+
/** The live tool a chord chooses among `tools` — the first whose keys name it; a declared-only tool routes nothing. */
|
|
79
|
+
export declare function matchHeldTool(tools: readonly HeldToolDef[], chord: KeyChord): HeldToolDef | undefined;
|
|
80
|
+
/** A type's tools at definition time: unique ids, a known kind, an action with its op, well-formed keys. */
|
|
81
|
+
/** Is this a glyph a tool may declare — none, a non-empty name, or a drawing with non-empty path data (K8a)? */
|
|
82
|
+
export declare function isHeldGlyph(g: unknown): g is HeldGlyph | undefined;
|
|
83
|
+
export declare function validateHeldTools(type: string, tools: readonly HeldToolDef[]): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A KIND'S MENU ACTIONS (design-016 §5 · K-L2, K8a) — the acts a widget type offers in the selection menu for a selection of its
|
|
3
|
+
* objects, declared on its TYPE (`defineWidget({ menu })` — the desk's `defineObject` passes them through), so the one menu and
|
|
4
|
+
* an app's keys reach them through the engine (`ops.runMenuAction`), never through a kind: the menu shows an act when EVERY selected
|
|
5
|
+
* object's type declares it (a selection of that kind), and the op runs it on the selected objects whose types declare it — each
|
|
6
|
+
* type's own `run`, handed its own objects. Until K8a a kind's act (the mini mat's vinyl) was app code over a type name.
|
|
7
|
+
*/
|
|
8
|
+
import type { Entity, World } from "@vibecook/strata-ecs";
|
|
9
|
+
import type { GuardedTx } from "../guards/guarded-tx";
|
|
10
|
+
import { type HeldGlyph } from "./held-tools";
|
|
11
|
+
/** What an act's op is handed (outside the tick, like every op): its type's selected objects and ONE door each to write them. */
|
|
12
|
+
export interface MenuActionApi {
|
|
13
|
+
readonly world: World;
|
|
14
|
+
/** The selected objects of the declaring type, in selection order. */
|
|
15
|
+
readonly entities: readonly Entity[];
|
|
16
|
+
/** An object's own props as the world holds them now. */
|
|
17
|
+
props(entity: Entity): Readonly<Record<string, unknown>>;
|
|
18
|
+
/** An object's props, validated, in ONE transaction (`ops.setWidgetProps`'s path); false on a read-only document. */
|
|
19
|
+
setProps(entity: Entity, props: Readonly<Record<string, unknown>>, opts?: {
|
|
20
|
+
readonly undoable?: boolean;
|
|
21
|
+
}): boolean;
|
|
22
|
+
/** ONE transaction on the document (one undo step unless `undoable: false`); false — nothing written — on a read-only one. */
|
|
23
|
+
transact(fn: (tx: GuardedTx) => void, opts?: {
|
|
24
|
+
readonly undoable?: boolean;
|
|
25
|
+
}): boolean;
|
|
26
|
+
}
|
|
27
|
+
/** One act of the selection menu, as a type declares it. */
|
|
28
|
+
export interface MenuActionDef {
|
|
29
|
+
/** Unique within the type: what `ops.runMenuAction` names (and what an app's key names). */
|
|
30
|
+
readonly id: string;
|
|
31
|
+
/** Its name — the button's accessible label and its tip. */
|
|
32
|
+
readonly label: string;
|
|
33
|
+
/** Its glyph (`HeldGlyph`): a name of the bar's set, or its own drawing (`{ path }`). */
|
|
34
|
+
readonly glyph?: HeldGlyph;
|
|
35
|
+
/** The key that does the same, as the tip and More show it ("T") — the app binds it to `ops.runMenuAction`. */
|
|
36
|
+
readonly keys?: string;
|
|
37
|
+
run(api: MenuActionApi): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function validateMenuActions(type: string, acts: readonly MenuActionDef[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* The acts the selection menu shows for `entities`: those EVERY entity's type declares (by id; the first type's declaration names
|
|
42
|
+
* it), in the first type's order — none for an empty selection or an object of a type that declares none.
|
|
43
|
+
*/
|
|
44
|
+
export declare function menuActionsFor(entities: readonly Entity[], menuOf: (entity: Entity) => readonly MenuActionDef[]): readonly MenuActionDef[];
|
|
@@ -1,55 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (design-004 §2).
|
|
2
|
+
* The widget runtime: the CULL (design-004 §2, what survives of it at design-015 D5b).
|
|
4
3
|
*
|
|
5
|
-
* - `cullSystem` (derive): viewport test over equipped widgets'
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* "last tick seen visible" = the tick it stopped being visible).
|
|
22
|
-
* - The store implements the `useSyncExternalStore` contract: `subscribe` /
|
|
23
|
-
* `getSnapshot` with snapshot identity changing IFF membership or a hidden
|
|
24
|
-
* flag changed. Listener notification is deferred to post-notify (the
|
|
25
|
-
* engine flush reflector) — never from inside the tick.
|
|
4
|
+
* - `cullSystem` (derive): viewport test over equipped widgets' `Size`, overscan
|
|
5
|
+
* scaled by zoom; flips Visible/Culled CHANGE-ONLY. GATED (2026-07-15, the
|
|
6
|
+
* activeMembership playbook): a real `runIf` — camera/viewport window compare
|
|
7
|
+
* as the `extra` trigger (full pass; the window moved under everyone) ∨ a
|
|
8
|
+
* petition-7 collector on Position/Size + Active flips (delta pass —
|
|
9
|
+
* drags/spawns re-test only the journaled entities). Idle frames skip; camera
|
|
10
|
+
* frames stay O(active) by the widgetQ Active scope. `Visible`/`Culled` is the
|
|
11
|
+
* desk renderer's WORKING SET: the builder walks the visible objects and the
|
|
12
|
+
* pick source answers for them.
|
|
13
|
+
*
|
|
14
|
+
* GONE at design-015 D5b: the mount system, its keep-mounted LRU, the
|
|
15
|
+
* `useSyncExternalStore` snapshot, `retainForTransition` and the post-notify
|
|
16
|
+
* listener flush — every one of them existed so a DOM host or a GL island could
|
|
17
|
+
* stay mounted-but-hidden and be held across a nav crossfade. An object has no
|
|
18
|
+
* view to mount; the desk draws it from the world (design-015 §1). The
|
|
19
|
+
* facade's `runtime.store` went with them.
|
|
26
20
|
*/
|
|
27
|
-
import { type
|
|
21
|
+
import { type TickSystem, type World } from "@vibecook/strata-ecs";
|
|
28
22
|
import type { Engine } from "../engine/engine";
|
|
29
|
-
import type { MeasureQueue } from "../input/measure-queue";
|
|
30
|
-
export interface MountEntry {
|
|
31
|
-
readonly entity: Entity;
|
|
32
|
-
/** Culled-but-kept-mounted: host hides, React state survives. */
|
|
33
|
-
readonly hidden: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface WidgetMountStore {
|
|
36
|
-
subscribe(listener: () => void): () => void;
|
|
37
|
-
getSnapshot(): readonly MountEntry[];
|
|
38
|
-
}
|
|
39
23
|
export interface WidgetRuntime {
|
|
40
|
-
readonly store: WidgetMountStore;
|
|
41
24
|
readonly cullSystem: TickSystem;
|
|
42
|
-
readonly mountSystem: TickSystem;
|
|
43
|
-
/** Post-notify listener flush — install registers it as a reflector. */
|
|
44
|
-
flush(): void;
|
|
45
25
|
}
|
|
46
|
-
export declare function createWidgetRuntime(world: World
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/** Install cull + mount + the post-notify listener flush on an engine. */
|
|
50
|
-
export declare function installWidgetRuntime(engine: Engine, opts?: {
|
|
51
|
-
keepMounted?: number;
|
|
52
|
-
measureQueue?: MeasureQueue;
|
|
53
|
-
}): WidgetRuntime & {
|
|
26
|
+
export declare function createWidgetRuntime(world: World): WidgetRuntime;
|
|
27
|
+
/** Install membership → equip → cull → breakpoint on an engine. */
|
|
28
|
+
export declare function installWidgetRuntime(engine: Engine): WidgetRuntime & {
|
|
54
29
|
uninstall(): void;
|
|
55
30
|
};
|
|
@@ -45,7 +45,7 @@ export declare function attachSpawnParent(tx: {
|
|
|
45
45
|
* whole-group prop values). Shared by `spawnWidget` and the doc sink's
|
|
46
46
|
* create-intent execution (draw tool) so the two can never diverge.
|
|
47
47
|
*/
|
|
48
|
-
export declare function widgetSpawnInits(type: string, opts: SpawnWidgetOpts): {
|
|
48
|
+
export declare function widgetSpawnInits(type: string, opts: SpawnWidgetOpts, resolvedWidget?: WidgetType): {
|
|
49
49
|
prefab: import("../schema/prefab").Prefab;
|
|
50
50
|
overrides: ComponentInit[];
|
|
51
51
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The tile is square and rgba8: 128 × 128 × 4 = 65536 bytes. */
|
|
2
|
+
export declare const BLUE_NOISE_SIZE = 128;
|
|
3
|
+
/**
|
|
4
|
+
* The 128×128 rgba8 blue-noise tile the cutting mat samples, decoded once.
|
|
5
|
+
*
|
|
6
|
+
* Hand it to the pack's injection point — `matPass.setNoise(blueNoise())` — the
|
|
7
|
+
* same seam a lab feeds from a `?url` fetch. Decoding is lazy so a board that
|
|
8
|
+
* never registers the mat pays nothing for it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function blueNoise(): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type BindEntry } from "../engine/pipeline";
|
|
2
|
+
import { type ComposeOptions } from "../engine/shader";
|
|
3
|
+
import type { CardMaterial, KindPass, KindProgram, SlotContext } from "../kind";
|
|
4
|
+
import type { MatPass } from "../kit/view";
|
|
5
|
+
/** A card's slot in its kind's records: the low 24 bits; the high byte its material. */
|
|
6
|
+
export declare const CARD_SLOT_BITS = 24;
|
|
7
|
+
/** A kind composed into the card: its name (the ground's key), its material, and its program (the material's `shaders()`, asked once). */
|
|
8
|
+
export interface CardKind {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly material: CardMaterial;
|
|
11
|
+
readonly shaders: ComposeOptions;
|
|
12
|
+
}
|
|
13
|
+
/** What one card pipeline composes: its kinds by material index, and what it could not (a limit it would pass — they draw themselves). */
|
|
14
|
+
export interface CardPlan {
|
|
15
|
+
readonly kinds: readonly CardKind[];
|
|
16
|
+
readonly left: readonly {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly why: string;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
type Limits = Pick<GPUSupportedLimits, "maxSampledTexturesPerShaderStage" | "maxSamplersPerShaderStage" | "maxStorageBuffersPerShaderStage" | "maxUniformBuffersPerShaderStage" | "maxBindingsPerBindGroup">;
|
|
22
|
+
/** A binding's name from its WGSL (`var<uniform> paper_k: PaperUniforms` → `paper_k`); null when it declares none the card can read. */
|
|
23
|
+
export declare const bindingName: (wgsl: string) => string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The kinds one card pipeline composes, in registration order — a material kind is left out (and draws itself) when it is a
|
|
26
|
+
* composite (its objects are one target's), when adding it would pass one of the device's per-stage limits, or (K9 R3) when a
|
|
27
|
+
* name of its would collide with the card's own or an earlier kind's.
|
|
28
|
+
*/
|
|
29
|
+
export declare function planCards(programs: readonly KindProgram[], limits: Limits): CardPlan;
|
|
30
|
+
/** The card's own entry: its bindings, every material's, their `only` and card functions, and the dispatch on the card's material. */
|
|
31
|
+
export declare function cardEntry(kinds: readonly CardKind[]): string;
|
|
32
|
+
/** The card's program: every material's structs (by name) and modules (by label) once, in order, then the card's entry. */
|
|
33
|
+
export declare function cardShaders(kinds: readonly CardKind[]): ComposeOptions;
|
|
34
|
+
/** The layout: the card's own four, then every material's bindings in order. */
|
|
35
|
+
export declare function cardLayoutEntries(kinds: readonly CardKind[]): BindEntry[];
|
|
36
|
+
/** The pipelines every slot's card draws with (once per device). */
|
|
37
|
+
export interface CardShared {
|
|
38
|
+
/** The kinds composed, by material index. */
|
|
39
|
+
readonly kinds: readonly string[];
|
|
40
|
+
readonly material: ReadonlyMap<string, number>;
|
|
41
|
+
readonly layout: GPUBindGroupLayout;
|
|
42
|
+
readonly pipeline: GPURenderPipeline;
|
|
43
|
+
/** The same, for a slot lit from elsewhere (MINIMAT.md §4) — the materials' `LIT_ELSEWHERE`. */
|
|
44
|
+
readonly litPipeline: GPURenderPipeline;
|
|
45
|
+
/** What was left out, and why. */
|
|
46
|
+
readonly left: CardPlan["left"];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The card's pipelines for the registered programs; null when none declares a material the device can compose. A material the
|
|
50
|
+
* device REFUSES (K9 R3 — a plugin's WGSL error, a binding whose type its layout belies) takes only its own kind out of the card:
|
|
51
|
+
* each material is then compiled alone and the ones that fail are left with their error; if what remains still fails together (a
|
|
52
|
+
* collision the plan did not see), the last registered goes until the card compiles (a plugin registers after the built-ins).
|
|
53
|
+
* Every kind left out draws itself, as one past the device's limits does, and is said once (`console.error`, and `left`).
|
|
54
|
+
*/
|
|
55
|
+
export declare function createCardShared(device: GPUDevice, format: GPUTextureFormat, programs: readonly KindProgram[]): Promise<CardShared | null>;
|
|
56
|
+
/**
|
|
57
|
+
* One slot's card: its draw list (the ground pushes a card for every object a material kind's pass lets go, in the order its
|
|
58
|
+
* runs walk them) and the bind group over the slot's view block and mat and ITS kinds' resources — made again only when one of
|
|
59
|
+
* them was replaced. The list is uploaded only when it changed (a camera move over a settled desk writes nothing).
|
|
60
|
+
*/
|
|
61
|
+
export declare class CardPass {
|
|
62
|
+
readonly name = "card";
|
|
63
|
+
/** Off: the ground routes nothing here — every object is drawn by its kind's own pass (a witness's second draw, a rig's A/B). */
|
|
64
|
+
on: boolean;
|
|
65
|
+
private list;
|
|
66
|
+
private sent;
|
|
67
|
+
private n;
|
|
68
|
+
private sentN;
|
|
69
|
+
private buffer;
|
|
70
|
+
private group;
|
|
71
|
+
/** What the group was made over: the mat's assets, the list's buffer, and each material's version. */
|
|
72
|
+
private boundOver;
|
|
73
|
+
private litElsewhere;
|
|
74
|
+
/** Each object's card this frame (−1: none) — a slot's route, reused frame to frame (`route`). */
|
|
75
|
+
private routes;
|
|
76
|
+
private readonly device;
|
|
77
|
+
private readonly shared;
|
|
78
|
+
private readonly mat;
|
|
79
|
+
private readonly kinds;
|
|
80
|
+
private bufferVersion;
|
|
81
|
+
constructor(device: GPUDevice, shared: CardShared, mat: MatPass, kinds: ReadonlyMap<string, {
|
|
82
|
+
readonly pass: KindPass;
|
|
83
|
+
}>);
|
|
84
|
+
/** A slot's card on the same pipelines, over ITS mat and kinds. */
|
|
85
|
+
spawn(mat: MatPass, kinds: ReadonlyMap<string, {
|
|
86
|
+
readonly pass: KindPass;
|
|
87
|
+
}>): CardPass;
|
|
88
|
+
/** The material index of kind `name`, or undefined when the card does not draw it. */
|
|
89
|
+
materialOf(name: string): number | undefined;
|
|
90
|
+
/** A frame's list begins, and a route for `n` objects, every one −1 (drawn by its kind). */
|
|
91
|
+
begin(n: number): Int32Array;
|
|
92
|
+
/** A card for record `slot` of material `m`: its index in this frame's list (the ground's run counts it). */
|
|
93
|
+
push(m: number, slot: number): number;
|
|
94
|
+
/** The list uploaded when it changed, the group made again when anything under it moved, the pipeline for the slot's light. */
|
|
95
|
+
prepare(slot: SlotContext): number;
|
|
96
|
+
private rebind;
|
|
97
|
+
/** Cards [first, end) of this frame's list — interleaved objects of every material kind — as ONE instanced draw. */
|
|
98
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
99
|
+
/** The cards this frame. */
|
|
100
|
+
get count(): number;
|
|
101
|
+
dispose(): void;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type MatFrame } from "../mat/layout";
|
|
2
|
+
export type AmbientMode = "live" | "idle" | "still";
|
|
3
|
+
export interface AmbientOptions {
|
|
4
|
+
/** `idle` by default (design-015 D-D9). */
|
|
5
|
+
readonly mode?: AmbientMode;
|
|
6
|
+
/** How long after the last touch the wind keeps blowing, ms (20 000). */
|
|
7
|
+
readonly idleMs?: number;
|
|
8
|
+
/** How long the wind takes to ease to still once idle, ms (2 000). */
|
|
9
|
+
readonly settleMs?: number;
|
|
10
|
+
/** Seconds of gobo time per second at full speed (theme.ts `MAT_GRID.gobo.wind`). */
|
|
11
|
+
readonly wind?: number;
|
|
12
|
+
/** Radians of projector tilt per unit of smoothed pointer NDC (theme.ts `MAT_GRID.gobo.tilt`). */
|
|
13
|
+
readonly tilt?: number;
|
|
14
|
+
/** The OS asked for reduced motion: the mode is `still` whatever was set. */
|
|
15
|
+
readonly reducedMotion?: boolean;
|
|
16
|
+
/** The blue noise's re-roll (Math.random); a test's fake. */
|
|
17
|
+
readonly random?: () => number;
|
|
18
|
+
}
|
|
19
|
+
export type AmbientPhase = "live" | "easing" | "still" | "pinned";
|
|
20
|
+
export interface AmbientState {
|
|
21
|
+
readonly mode: AmbientMode;
|
|
22
|
+
readonly phase: AmbientPhase;
|
|
23
|
+
/** The wind's speed, 0 … 1 of full. */
|
|
24
|
+
readonly speed: number;
|
|
25
|
+
readonly reducedMotion: boolean;
|
|
26
|
+
readonly pinned: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A pinned still's clocks (a parity scene): whatever is absent keeps the engine's still values. */
|
|
29
|
+
export interface AmbientPin {
|
|
30
|
+
readonly time?: number;
|
|
31
|
+
readonly goboTime?: number;
|
|
32
|
+
readonly noise?: readonly [number, number];
|
|
33
|
+
}
|
|
34
|
+
export interface Ambient {
|
|
35
|
+
/** The pointer moved, a gesture or a flight ran: the wind (re)starts its `idleMs`. */
|
|
36
|
+
touch(now: number): void;
|
|
37
|
+
/** Advance the clocks by `dt` seconds at `now` ms, the tilt following `pointer` (NDC, or null before the pointer was seen); `live` = another frame is wanted. */
|
|
38
|
+
step(dt: number, now: number, pointer: readonly [number, number] | null): {
|
|
39
|
+
readonly frame: MatFrame;
|
|
40
|
+
readonly live: boolean;
|
|
41
|
+
};
|
|
42
|
+
/** The frame as the clocks stand, NOT advanced (the pinned one while pinned) — the desk behind the hand stands still (§8, D7). */
|
|
43
|
+
frame(): MatFrame;
|
|
44
|
+
/** Pin the clocks (a still) or unpin (`null`). Pinned, `step` returns the pinned frame and wants no frame. */
|
|
45
|
+
pin(frame: AmbientPin | null): void;
|
|
46
|
+
configure(opts: Pick<AmbientOptions, "mode" | "idleMs" | "settleMs" | "reducedMotion">): void;
|
|
47
|
+
state(): AmbientState;
|
|
48
|
+
/** The clocks as they stand (a rig's witness). */
|
|
49
|
+
clocks(): {
|
|
50
|
+
readonly time: number;
|
|
51
|
+
readonly goboTime: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export declare const AMBIENT_DEFAULTS: {
|
|
55
|
+
readonly mode: AmbientMode;
|
|
56
|
+
readonly idleMs: 20000;
|
|
57
|
+
readonly settleMs: 2000;
|
|
58
|
+
};
|
|
59
|
+
export declare function createAmbient(opts?: AmbientOptions): Ambient;
|