@vibecook/ice 0.11.0 → 0.15.0-desk.1
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-AMMFQP2C.js +2444 -0
- package/dist/chunk-AMMFQP2C.js.map +1 -0
- package/dist/chunk-BKV4ZEU3.js +1 -0
- package/dist/chunk-BKV4ZEU3.js.map +1 -0
- package/dist/chunk-ENIFIUEP.js +155 -0
- package/dist/chunk-ENIFIUEP.js.map +1 -0
- package/dist/chunk-H3SKYJLK.js +8269 -0
- package/dist/chunk-H3SKYJLK.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-VGVDJZSP.js → chunk-PFJN3XN2.js} +13232 -7388
- package/dist/chunk-PFJN3XN2.js.map +1 -0
- package/dist/chunk-QXOCF56A.js +148 -0
- package/dist/chunk-QXOCF56A.js.map +1 -0
- package/dist/chunk-U4YMA4TJ.js +635 -0
- package/dist/chunk-U4YMA4TJ.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 +12734 -0
- package/dist/desk-objects.js.map +1 -0
- package/dist/desk.js +497 -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 +1047 -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 +36 -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 +73 -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 +53 -1
- package/dist/types/packages/core/src/systems/l2-arbitrate.d.ts +18 -4
- package/dist/types/packages/core/src/systems/l2-recognize.d.ts +3 -1
- 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-button.d.ts +25 -0
- package/dist/types/packages/core/src/systems/press-wheel.d.ts +11 -0
- package/dist/types/packages/core/src/systems/tray.d.ts +111 -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 +306 -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 +133 -0
- package/dist/types/packages/desk/src/compose/pick.d.ts +5 -0
- package/dist/types/packages/desk/src/compose/reflector.d.ts +120 -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 +43 -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/faults.d.ts +38 -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 +537 -0
- package/dist/types/packages/desk/src/hold/focus.d.ts +53 -0
- package/dist/types/packages/desk/src/hold/pose.d.ts +152 -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 +536 -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 +16 -0
- package/dist/types/packages/desk/src/kind.d.ts +189 -0
- package/dist/types/packages/desk/src/kinds/world.d.ts +447 -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 +105 -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/missing/layout.d.ts +27 -0
- package/dist/types/packages/desk/src/missing/object.d.ts +6 -0
- package/dist/types/packages/desk/src/missing/pass.d.ts +39 -0
- package/dist/types/packages/desk/src/missing/shaders.d.ts +7 -0
- package/dist/types/packages/desk/src/missing/slots.d.ts +8 -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 +17 -0
- package/dist/types/packages/desk/src/submit-instrument.d.ts +36 -0
- package/dist/types/packages/desk/src/theme.d.ts +497 -0
- package/dist/types/packages/desk/src/tray/carry.d.ts +99 -0
- package/dist/types/packages/desk/src/tray/drawer.d.ts +124 -0
- package/dist/types/packages/desk/src/tray/flux.d.ts +49 -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 +101 -0
- package/dist/types/packages/desk/src/tray/shaders.d.ts +10 -0
- package/dist/types/packages/desk/src/tray/specimens.d.ts +214 -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 +104 -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 +11 -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 +174 -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,83 @@
|
|
|
1
|
+
import type { FadeIn, View } from "../lattice/lod";
|
|
2
|
+
import type { Presentation } from "../nav/portal";
|
|
3
|
+
import { type GlyphAtlasMeta, type MatConfig, type MatFrame, type PlateName, type SlotLight } from "./layout";
|
|
4
|
+
import { type MatLight } from "./night";
|
|
5
|
+
import type { MatPass } from "../kit/view";
|
|
6
|
+
import type { MatShaders } from "./shaders";
|
|
7
|
+
export declare class CuttingMat implements MatPass {
|
|
8
|
+
readonly name = "mat/mat";
|
|
9
|
+
private readonly uniforms;
|
|
10
|
+
private readonly uniformBuf;
|
|
11
|
+
/** The wind target this slot samples: its plate's shared one, or its own (`own`) after a clash in one frame. */
|
|
12
|
+
private wind;
|
|
13
|
+
/** This slot's own wind target, made only when two keys meet on one plate in one frame. */
|
|
14
|
+
private own;
|
|
15
|
+
private windGroups;
|
|
16
|
+
private matGroup;
|
|
17
|
+
private bound;
|
|
18
|
+
private boundWind;
|
|
19
|
+
/** Turns over whenever this slot's bind groups are made again — a shared asset landed, or the slot samples another silhouette. */
|
|
20
|
+
private assets;
|
|
21
|
+
private windRuns;
|
|
22
|
+
/** The view block as last uploaded (K7a: uploaded only when its bytes moved; a layered kind compares a layer's view by it). */
|
|
23
|
+
private readonly sentView;
|
|
24
|
+
private viewSent;
|
|
25
|
+
private readonly device;
|
|
26
|
+
private readonly shared;
|
|
27
|
+
private constructor();
|
|
28
|
+
static create(device: GPUDevice, format: GPUTextureFormat, src: MatShaders): Promise<CuttingMat>;
|
|
29
|
+
/** A second slot on the same pipelines and plates — a flight's departed mat, a mini mat's inside. */
|
|
30
|
+
spawn(): CuttingMat;
|
|
31
|
+
/** Which assets a host has uploaded — stats, and the lab's boot line. Shared by every slot. */
|
|
32
|
+
get loaded(): {
|
|
33
|
+
readonly c: boolean;
|
|
34
|
+
readonly b: boolean;
|
|
35
|
+
readonly noise: boolean;
|
|
36
|
+
readonly glyphs: boolean;
|
|
37
|
+
};
|
|
38
|
+
/** What the pass knows about the glyph atlas it samples (RULER.md). */
|
|
39
|
+
get glyphs(): GlyphAtlasMeta;
|
|
40
|
+
/** This slot's animated silhouette — the wind target the mat samples; the paper pass (STICKY.md) samples the same, so a note takes the mat's dapple. */
|
|
41
|
+
get silhouette(): GPUTextureView;
|
|
42
|
+
/** The slot's ONE VIEW BLOCK (K4a, design-016 K-L3): the uniforms this mat writes once a frame, which every kind in the slot binds. */
|
|
43
|
+
get view(): GPUBuffer;
|
|
44
|
+
/** The glyph atlas as uploaded (a 1×1 empty cell until a host uploads one) — the mini mat pass prints with it. */
|
|
45
|
+
get glyphTexture(): GPUTexture;
|
|
46
|
+
/** The shared blue noise, as uploaded (a 1×1 grey until a host uploads the tile). */
|
|
47
|
+
get noiseTexture(): GPUTexture;
|
|
48
|
+
/** Bumped whenever a shared asset lands or the slot samples another silhouette — a pass that binds them rebinds on a change. */
|
|
49
|
+
get assetVersion(): number;
|
|
50
|
+
get viewBytes(): Uint8Array;
|
|
51
|
+
get silhouetteKey(): number;
|
|
52
|
+
/** A new frame (the ground's `prepareFrame`, before its slots prepare): a wind key drawn before it may be drawn over. */
|
|
53
|
+
newFrame(): void;
|
|
54
|
+
/** A plate's shared wind target, made on first use. */
|
|
55
|
+
private windOf;
|
|
56
|
+
private upload;
|
|
57
|
+
/** (Re)build this slot's bind groups against the shared assets' current version. */
|
|
58
|
+
private rebind;
|
|
59
|
+
/** A 512×512 rgba8 plate: R silhouette, G wind amp 1, B phase, A amps 2+3 (assets/gobo-*.rgba). Every slot samples it. */
|
|
60
|
+
setPlate(name: PlateName, bytes: Uint8Array<ArrayBuffer>): void;
|
|
61
|
+
/** The 128×128 rgba8 blue-noise tile (assets/blue-noise.rgba). Every slot samples it. */
|
|
62
|
+
setNoise(bytes: Uint8Array<ArrayBuffer>): void;
|
|
63
|
+
/**
|
|
64
|
+
* The glyph atlas (RULER.md): r8 coverage, `meta.width × meta.height` texels, the
|
|
65
|
+
* first `meta.count` glyphs of `GLYPHS` in a row of `meta.cellW` cells — at least the
|
|
66
|
+
* rulers' twelve; the capitals after them print a mini mat's name (MINIMAT.md §2).
|
|
67
|
+
* Every slot samples it (the mini mat pass too); a host re-uploads when the device's
|
|
68
|
+
* ratio or the text size changes.
|
|
69
|
+
*/
|
|
70
|
+
setGlyphs(bytes: Uint8Array<ArrayBuffer>, meta: GlyphAtlasMeta): void;
|
|
71
|
+
get windPasses(): number;
|
|
72
|
+
/**
|
|
73
|
+
* Upload the uniforms (under `light` — the theme's Sun or Moon, mat/night.ts — through the lamp `lit`
|
|
74
|
+
* says: the slot's own when absent, the host desk's for a mini mat's inside, MINIMAT.md §4); run the
|
|
75
|
+
* wind pass if the silhouette it holds is stale. Returns whether it ran.
|
|
76
|
+
*/
|
|
77
|
+
prepare(encoder: GPUCommandEncoder, view: View & {
|
|
78
|
+
readonly dpr: number;
|
|
79
|
+
}, fadeIn: FadeIn, cfg: MatConfig, frame: MatFrame, present?: Presentation, light?: MatLight, lit?: SlotLight): boolean;
|
|
80
|
+
draw(pass: GPURenderPassEncoder): void;
|
|
81
|
+
/** This slot's buffers; the shared plates go with the last slot standing. */
|
|
82
|
+
dispose(): void;
|
|
83
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { RGB } from "../theme";
|
|
2
|
+
/** What the mat is lit by — a theme's light. `night` 0 is the reference's day chain, bit for bit. */
|
|
3
|
+
export interface MatLight {
|
|
4
|
+
/** 0 = the day (the reference's chain, exactly) · 1 = the night · between: a cross-fade of the two on the display. */
|
|
5
|
+
readonly night: number;
|
|
6
|
+
/** The Moon's illuminance on the desk, lux — where on the mesopic ramp the eye sits. */
|
|
7
|
+
readonly lux: number;
|
|
8
|
+
/** Scene → display: the scale the adapted eye's report is drawn at. */
|
|
9
|
+
readonly exposure: number;
|
|
10
|
+
/** The rods' own noise, display units, peak to peak. */
|
|
11
|
+
readonly snow: number;
|
|
12
|
+
/** The Moon's colour as the (partly) adapted eye takes it — linear sRGB at Y = 1. */
|
|
13
|
+
readonly moon: RGB;
|
|
14
|
+
/** The sky's share of the light where the Moon is blocked. */
|
|
15
|
+
readonly fill: number;
|
|
16
|
+
/** The rods' signal drawn as a colour — linear sRGB at Y = 1. */
|
|
17
|
+
readonly rod: RGB;
|
|
18
|
+
/** The dark the eye adds to everything — linear sRGB. */
|
|
19
|
+
readonly eigengrau: RGB;
|
|
20
|
+
}
|
|
21
|
+
/** The day: the reference's chain, untouched — every night number inert. */
|
|
22
|
+
export declare const DAY_LIGHT: MatLight;
|
|
23
|
+
/** The night as the theme states it (theme.ts `NIGHT`). */
|
|
24
|
+
export interface NightSpec {
|
|
25
|
+
/** The Moon's colour temperature, K. */
|
|
26
|
+
readonly kelvin: number;
|
|
27
|
+
/** Its illuminance on the desk, lux. */
|
|
28
|
+
readonly lux: number;
|
|
29
|
+
/** The sky's share in the shadow. */
|
|
30
|
+
readonly fill: number;
|
|
31
|
+
/** The rods' hue: a spectral wavelength (470–500 nm) and how far from white toward it. */
|
|
32
|
+
readonly rodHue: {
|
|
33
|
+
readonly nm: number;
|
|
34
|
+
readonly purity: number;
|
|
35
|
+
};
|
|
36
|
+
/** Eigengrau, sRGB 0..1. */
|
|
37
|
+
readonly eigengrau: RGB;
|
|
38
|
+
/** The display luminance (linear, Eigengrau included) the moonlit ground is drawn at — the appearance's one scale. */
|
|
39
|
+
readonly litLuminance: number;
|
|
40
|
+
/** The rods' noise, display units peak to peak. */
|
|
41
|
+
readonly snow: number;
|
|
42
|
+
/** CIECAM02's surround factor F for the degree of adaptation: 1 average · 0.9 dim · 0.8 dark. */
|
|
43
|
+
readonly surround: number;
|
|
44
|
+
}
|
|
45
|
+
export declare const srgbToLinear: (c: number) => number;
|
|
46
|
+
export declare const linearToSrgb: (c: number) => number;
|
|
47
|
+
export declare const linear: (c: RGB) => RGB;
|
|
48
|
+
/** Photopic luminance Y of a linear sRGB colour. */
|
|
49
|
+
export declare const luminance: (c: RGB) => number;
|
|
50
|
+
/**
|
|
51
|
+
* Scotopic luminance V' from XYZ — Larson, Rushmeier & Piatko 1997's regression
|
|
52
|
+
* (the one the night-rendering literature uses: Jensen et al. 2000, Kirk & O'Brien 2011).
|
|
53
|
+
* The rods peak at 507 nm: greens and blues keep their brightness by night, reds die.
|
|
54
|
+
*/
|
|
55
|
+
export declare function scotopic(c: RGB): number;
|
|
56
|
+
/** The rods' signal, white = 1 — what the shader calls `rod`. */
|
|
57
|
+
export declare const rodSignal: (c: RGB) => number;
|
|
58
|
+
/** CIE 191:2010's mesopic adaptation coefficient (first order, seeded by the photopic luminance): 0 at 0.005 cd/m² (the rods alone), 1 at 5 (the cones alone). */
|
|
59
|
+
export declare const mesopicWeight: (L: number) => number;
|
|
60
|
+
/** CIECAM02's degree of chromatic adaptation at an adapting luminance (cd/m²): how much of the illuminant's colour the eye discounts. */
|
|
61
|
+
export declare const degreeOfAdaptation: (LA: number, F: number) => number;
|
|
62
|
+
/** The Planckian locus in CIE 1931 xy — Kang et al. 2002's fit, 1667–25000 K. */
|
|
63
|
+
export declare function planckianXY(T: number): readonly [number, number];
|
|
64
|
+
/** A chromaticity as linear sRGB at Y = 1. */
|
|
65
|
+
export declare const xyToLinear: (x: number, y: number) => RGB;
|
|
66
|
+
/** D65's chromaticity — sRGB's white. */
|
|
67
|
+
export declare const D65: readonly [number, number];
|
|
68
|
+
export declare function spectralXY(nm: number): readonly [number, number];
|
|
69
|
+
/** White pulled `purity` of the way toward a spectral hue, as linear sRGB at Y = 1. */
|
|
70
|
+
export declare function hueTint(nm: number, purity: number): RGB;
|
|
71
|
+
/**
|
|
72
|
+
* The reference's day chain writes the LINEARISED albedo to the swap chain as sRGB
|
|
73
|
+
* (README §4e), so what the display shows for a lit pixel is that value decoded once
|
|
74
|
+
* more: the day's displayed luminance of a ground colour.
|
|
75
|
+
*/
|
|
76
|
+
export declare const dayLuminance: (groundSrgb: RGB) => number;
|
|
77
|
+
/** The eye's report of a linear albedo under `light` at `shade` (1 lit · `fill` in full shadow) — linear, before Eigengrau and the exposure. */
|
|
78
|
+
export declare function nightReport(light: MatLight, albedoLinear: RGB, shade: number): RGB;
|
|
79
|
+
/** The shader's `night_mat` on the CPU: what the display shows (sRGB 0..1), the snow left out. */
|
|
80
|
+
export declare function nightAppearance(light: MatLight, albedoLinear: RGB, shade: number): RGB;
|
|
81
|
+
/** The theme's night, computed for a ground colour (sRGB 0..1): the light the mat pass reads. */
|
|
82
|
+
export declare function nightLight(spec: NightSpec, groundSrgb: RGB): MatLight;
|
|
83
|
+
/** The light's four vec4s, by name (MatUniforms). */
|
|
84
|
+
export declare function lightValues(l: MatLight): {
|
|
85
|
+
night: number[];
|
|
86
|
+
moon: number[];
|
|
87
|
+
rod: number[];
|
|
88
|
+
eigengrau: number[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* A light between two (design-015 §8, D4b — the reading light): the object in hand keeps its DAY light while the mat
|
|
92
|
+
* stays moonlit, the change riding the carry (`t` 0 = `a`, 1 = `b`); every field lerped, the colours channel-wise.
|
|
93
|
+
* `nightAppearance` is linear in each of them within a frame, so a lerp of the parameters is an honest in-between.
|
|
94
|
+
*/
|
|
95
|
+
export declare function mixLight(a: MatLight, b: MatLight, t: number): MatLight;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** 16 column-major floats — `Matrix4.elements`, and what WGSL's `mat4x4f` reads. */
|
|
2
|
+
export type Mat4 = Float32Array;
|
|
3
|
+
/** The sixteen cells as a tuple: the length is the type, so a literal index needs no guard (ICE's kernel casts bounded reads the same way). */
|
|
4
|
+
export type Mat4Cells = readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
|
|
5
|
+
export declare const cells: (m: Mat4) => Mat4Cells;
|
|
6
|
+
export type Vec3 = readonly [number, number, number];
|
|
7
|
+
export type Quat = readonly [number, number, number, number];
|
|
8
|
+
export interface ProjectorSpec {
|
|
9
|
+
/** World metres, y up — the desk scene's frame. */
|
|
10
|
+
readonly position: Vec3;
|
|
11
|
+
readonly quaternion: Quat;
|
|
12
|
+
readonly fovDeg: number;
|
|
13
|
+
readonly aspect: number;
|
|
14
|
+
readonly near: number;
|
|
15
|
+
readonly far: number;
|
|
16
|
+
}
|
|
17
|
+
/** three's `makePerspective`, WebGL coordinate system. */
|
|
18
|
+
export declare function perspective(fovDeg: number, aspect: number, near: number, far: number): Mat4;
|
|
19
|
+
/** Rotation matrix of a unit quaternion (three's `makeRotationFromQuaternion`). */
|
|
20
|
+
export declare function fromQuat(q: Quat): Mat4;
|
|
21
|
+
/** `a · b`, column-major. */
|
|
22
|
+
export declare function mul4(a: Mat4, b: Mat4): Mat4;
|
|
23
|
+
/** The inverse of `translate(p) · rotate(q)`: `Rᵀ · translate(−p)` — a camera's `matrixWorldInverse`. */
|
|
24
|
+
export declare function rigidInverse(position: Vec3, q: Quat): Mat4;
|
|
25
|
+
/** `projection · view` for a projector — the matrix a receiver multiplies its world position by. */
|
|
26
|
+
export declare function projectorMatrix(spec: ProjectorSpec): Mat4;
|
|
27
|
+
/** three's `Quaternion.setFromEuler`, order XYZ. */
|
|
28
|
+
export declare function quatFromEuler(x: number, y: number, z: number): Quat;
|
|
29
|
+
/** The reference's mouse tilt: `rotate(euler) · base`, the rotation applied in clip space. */
|
|
30
|
+
export declare function tilted(base: Mat4, ex: number, ey: number, ez: number): Mat4;
|
|
31
|
+
/** A world point through the matrix: NDC xyz and clip w (the linear depth of a perspective projector). */
|
|
32
|
+
export declare function project(m: Mat4, p: Vec3): {
|
|
33
|
+
ndc: [number, number, number];
|
|
34
|
+
w: number;
|
|
35
|
+
};
|
|
36
|
+
/** mat.wgsl `blur_ratio` — the reference's `getGoboBlurRatio`: linearise the WebGL NDC z, then a ramp between two depths. */
|
|
37
|
+
export declare function blurRatio(ndcZ: number, sharp: number, soft: number, near: number, far: number): number;
|
|
38
|
+
/** The hero desk's projector, as baked in the reference (research/tree-shadow/prototype/src/scenes.js). */
|
|
39
|
+
export declare const HERO_PROJECTOR: ProjectorSpec;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ShaderPart } from "../engine/shader";
|
|
2
|
+
export interface MatShaders {
|
|
3
|
+
readonly modules: readonly ShaderPart[];
|
|
4
|
+
readonly wind: ShaderPart;
|
|
5
|
+
readonly entry: ShaderPart;
|
|
6
|
+
}
|
|
7
|
+
export interface MatShaderText {
|
|
8
|
+
/** shaders/portal.wgsl — the portal clip every pass includes. */
|
|
9
|
+
readonly portal: string;
|
|
10
|
+
readonly mat: string;
|
|
11
|
+
/** shaders/mat/ruler.wgsl — the rulers' print (RULER.md). */
|
|
12
|
+
readonly ruler: string;
|
|
13
|
+
readonly wind: string;
|
|
14
|
+
readonly matPass: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const MAT_SHADER_FILES: Record<keyof MatShaderText, string>;
|
|
17
|
+
export declare function matShaders(t: MatShaderText): MatShaders;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SecondOrder {
|
|
2
|
+
readonly k1: number;
|
|
3
|
+
readonly k2: number;
|
|
4
|
+
readonly k3: number;
|
|
5
|
+
readonly w: number;
|
|
6
|
+
readonly z: number;
|
|
7
|
+
readonly d: number;
|
|
8
|
+
target: [number, number];
|
|
9
|
+
prevTarget: [number, number];
|
|
10
|
+
value: [number, number];
|
|
11
|
+
velocity: [number, number];
|
|
12
|
+
}
|
|
13
|
+
export declare function secondOrder(f?: number, z?: number, r?: number, value?: readonly [number, number]): SecondOrder;
|
|
14
|
+
export declare function stepSecondOrder(s: SecondOrder, dt: number): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ObjectRect } from "../kinds/world";
|
|
2
|
+
import { type GroundTheme, type RGB } from "../theme";
|
|
3
|
+
/** The face's record as the pass's WGSL reads it (shaders/missing/missing-pass.wgsl). */
|
|
4
|
+
export declare const MissingFace: import("../engine").StructDef<"rect" | "ink" | "shape" | "mix">;
|
|
5
|
+
/** What the missing face draws for one object: its box, its ink and its fade. `missing` brands it — the pass draws nothing else. */
|
|
6
|
+
export interface MissingRecord {
|
|
7
|
+
readonly missing: true;
|
|
8
|
+
readonly cx: number;
|
|
9
|
+
readonly cy: number;
|
|
10
|
+
readonly hx: number;
|
|
11
|
+
readonly hy: number;
|
|
12
|
+
readonly ink: RGB;
|
|
13
|
+
readonly fade: number;
|
|
14
|
+
}
|
|
15
|
+
/** Is this record the missing face's? (A kind's own record handed to its missing pass — the frame before a quarantine took — is not.) */
|
|
16
|
+
export declare const isMissingRecord: (r: unknown) => r is MissingRecord;
|
|
17
|
+
/** The face of an object whose box is `rect` (centred, world units) under `theme`, at `fade` (1 whole … 0 gone). */
|
|
18
|
+
export declare function missingFace(rect: ObjectRect, theme: Pick<GroundTheme, "name">, fade?: number): MissingRecord;
|
|
19
|
+
/** The record's values by field — a record that is not the face's packs as nothing (fade 0: the vertex stage collapses it). */
|
|
20
|
+
export declare function missingValues(r: unknown): {
|
|
21
|
+
rect: number[];
|
|
22
|
+
ink: number[];
|
|
23
|
+
mix: number[];
|
|
24
|
+
shape: number[];
|
|
25
|
+
};
|
|
26
|
+
/** The face's pick: the object itself (`content` — a tap selects it, a drag moves it) anywhere in its box; else a miss. */
|
|
27
|
+
export declare function missingHit(g: ObjectRect, wx: number, wy: number): "content" | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ObjectKind, ObjectRect } from "../kinds/world";
|
|
2
|
+
import { type MissingRecord } from "./layout";
|
|
3
|
+
/** The name an object whose type has no kind is drawn under (a kind may not take it — ground.ts). */
|
|
4
|
+
export declare const MISSING_KIND = "desk.missing";
|
|
5
|
+
/** The missing face's kind: its program (the ground's own — never registered) and its world half. */
|
|
6
|
+
export declare const MISSING_OBJECT: ObjectKind<ObjectRect, MissingRecord>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type RecordStoreStats } from "../engine/records";
|
|
2
|
+
import type { KindExtra, KindPass, SlotContext } from "../kind";
|
|
3
|
+
import type { MatPass } from "../kit/view";
|
|
4
|
+
import type { ShaderText } from "../shaders";
|
|
5
|
+
export declare class MissingPass implements KindPass<unknown> {
|
|
6
|
+
readonly name = "desk/missing";
|
|
7
|
+
private store;
|
|
8
|
+
private group;
|
|
9
|
+
private boundStore;
|
|
10
|
+
private boundAssets;
|
|
11
|
+
private count;
|
|
12
|
+
private readonly device;
|
|
13
|
+
private readonly shared;
|
|
14
|
+
private readonly mat;
|
|
15
|
+
private constructor();
|
|
16
|
+
/**
|
|
17
|
+
* The root's pass on `mat`, made NOW (no await — a quarantine asks for it mid-frame): its layout and its one pipeline (it is lit by
|
|
18
|
+
* nothing — the same in every slot). The desk's own WGSL, composed from the host's text; WebGPU compiles it before its first draw.
|
|
19
|
+
*/
|
|
20
|
+
static make(device: GPUDevice, format: GPUTextureFormat, mat: MatPass, text?: ShaderText): MissingPass;
|
|
21
|
+
/** A slot's own faces on the shared pipeline, through `mat`'s view block. */
|
|
22
|
+
spawn(mat: MatPass): MissingPass;
|
|
23
|
+
prepare(_encoder: GPUCommandEncoder, _slot: SlotContext, records: readonly unknown[], extra?: KindExtra): number;
|
|
24
|
+
private rebind;
|
|
25
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
26
|
+
/** The store's counters (a rig's witness) — nothing until the slot's first face. */
|
|
27
|
+
records(): RecordStoreStats;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
30
|
+
/** A desk's missing faces (petition I24): a slot's own on its mat, at its first ask — the pipeline made at the desk's first. */
|
|
31
|
+
export interface MissingFaces {
|
|
32
|
+
/** A slot's faces on `mat` (the desk's pipeline made now if this is the first). */
|
|
33
|
+
spawn(mat: MatPass): KindPass;
|
|
34
|
+
/** Has the desk made its pipeline (a face was ever asked for)? */
|
|
35
|
+
readonly made: boolean;
|
|
36
|
+
dispose(): void;
|
|
37
|
+
}
|
|
38
|
+
/** The missing faces of a desk on `device` — nothing made until the first `spawn` (then the pipeline, on the root's `mat`). */
|
|
39
|
+
export declare function missingFaces(device: GPUDevice, format: GPUTextureFormat, mat: MatPass, text?: ShaderText): MissingFaces;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComposeOptions } from "../engine/shader";
|
|
2
|
+
import { type ShaderText } from "../shaders";
|
|
3
|
+
export declare const MISSING_SHADER_FILES: {
|
|
4
|
+
readonly entry: "missing/missing-pass.wgsl";
|
|
5
|
+
};
|
|
6
|
+
/** The missing face's program for a host's shader text (default: the desk's generated module). */
|
|
7
|
+
export declare function missingShaders(text?: ShaderText): ComposeOptions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KindPass } from "../kind";
|
|
2
|
+
import type { SlotSet } from "../ground";
|
|
3
|
+
import type { MissingFaces } from "./pass";
|
|
4
|
+
/**
|
|
5
|
+
* Kind `name`'s entry in `s` becomes the desk's missing faces on the slot's mat (`faces` — the root's), under the kind's name and
|
|
6
|
+
* stratum. Returns the pass the entry held (the caller lets it go), or undefined when the slot holds no such kind, or the desk no faces.
|
|
7
|
+
*/
|
|
8
|
+
export declare function swapToMissing(s: SlotSet, name: string, faces: MissingFaces | undefined): KindPass | undefined;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
export interface CameraState {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
readonly zoom: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Rect {
|
|
7
|
+
readonly x: number;
|
|
8
|
+
readonly y: number;
|
|
9
|
+
readonly width: number;
|
|
10
|
+
readonly height: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Viewport {
|
|
13
|
+
readonly width: number;
|
|
14
|
+
readonly height: number;
|
|
15
|
+
}
|
|
16
|
+
/** Uniform scale + translate: `A(q) = o + q·s`. */
|
|
17
|
+
export interface PortalAffine {
|
|
18
|
+
readonly s: number;
|
|
19
|
+
readonly ox: number;
|
|
20
|
+
readonly oy: number;
|
|
21
|
+
}
|
|
22
|
+
/** The world rect a camera shows through a viewport. */
|
|
23
|
+
export declare function visibleRect(cam: CameraState, vpW: number, vpH: number): Rect;
|
|
24
|
+
/**
|
|
25
|
+
* The portal embedding: map `arrival` (the world rect the arrival camera will
|
|
26
|
+
* show, in the CHILD frame's coords) onto `portal` (the container's body rect,
|
|
27
|
+
* in the PARENT frame's coords). Aspect-FIT with centres aligned (design-006
|
|
28
|
+
* §8.3 — the container's chrome absorbs the letterbox; a mini mat's face shows
|
|
29
|
+
* the inside past the arrival on its longer side, MINIMAT.md §3).
|
|
30
|
+
*/
|
|
31
|
+
export declare function portalAffine(arrival: Rect, portal: Rect): PortalAffine;
|
|
32
|
+
export declare function invertAffine(a: PortalAffine): PortalAffine;
|
|
33
|
+
/** `(outer ∘ inner)(q) = outer(inner(q))` — for multi-level exit portals. */
|
|
34
|
+
export declare function composeAffine(outer: PortalAffine, inner: PortalAffine): PortalAffine;
|
|
35
|
+
/**
|
|
36
|
+
* Continuity solve: the camera `c0` (in the DESTINATION frame) under which
|
|
37
|
+
* departed-frame content mapped through `A` (departed → destination coords)
|
|
38
|
+
* renders EXACTLY as it did under `camPre` (in the departed frame) the instant
|
|
39
|
+
* before the cut. Zoom limits deliberately do NOT apply here — flight paths
|
|
40
|
+
* transit far outside the user-gesture band; only the ARRIVAL camera is
|
|
41
|
+
* clamped by the caller.
|
|
42
|
+
*/
|
|
43
|
+
export declare function solveFlightStart(A: PortalAffine, camPre: CameraState): CameraState;
|
|
44
|
+
/**
|
|
45
|
+
* Destination camera expressed in departed-frame coordinates. Rendering the
|
|
46
|
+
* outgoing ground with this camera is pixel-equivalent to first mapping its
|
|
47
|
+
* points through A and then rendering under `destination`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function outgoingCamera(A: PortalAffine, destination: CameraState): CameraState;
|
|
50
|
+
/** Zoom distance in octaves — the flight-length measure (design-006 §4/§5). */
|
|
51
|
+
export declare function flightOctaves(from: CameraState, to: CameraState): number;
|
|
52
|
+
/**
|
|
53
|
+
* Depth-cap a flight start (design-006 §5): beyond `maxOctaves`, clamp the
|
|
54
|
+
* start zoom to `capFactor ×` the arrival zoom (dive direction preserved),
|
|
55
|
+
* keeping the exact start's view CENTRE — the portal anchor — so the motion
|
|
56
|
+
* still comes from/goes to the right place. `capped: true` means the caller
|
|
57
|
+
* presents the flight as a crossfade (`flightOpacity` with `frozen`).
|
|
58
|
+
*/
|
|
59
|
+
export declare function capFlightStart(exact: CameraState, arrival: CameraState, vpW: number, vpH: number, maxOctaves: number, capFactor: number): {
|
|
60
|
+
c0: CameraState;
|
|
61
|
+
capped: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The flight path `c(p)`, p ∈ [0,1]: zoom log-lerped (constant perceived zoom
|
|
65
|
+
* velocity); view CENTRE linear in 1/zoom — exactly an anchored zoom whenever
|
|
66
|
+
* a fixed screen point exists between the endpoints, a graceful blend
|
|
67
|
+
* otherwise. Endpoints are exact: c(0) = c0, c(1) = c1.
|
|
68
|
+
*/
|
|
69
|
+
export declare function flightCamera(c0: CameraState, c1: CameraState, p: number, vpW: number, vpH: number): CameraState;
|
|
70
|
+
/**
|
|
71
|
+
* One step of the critically-damped progress spring toward 1, in CLOSED FORM:
|
|
72
|
+
* with u = 1 − p, the exact solution is `u(t) = (u₀ + Bt)·e^(−ωt)`,
|
|
73
|
+
* `B = −v₀ + ω·u₀`. Unconditionally stable at ANY dt. From rest (v = 0) the
|
|
74
|
+
* approach is monotonic: p never overshoots 1.
|
|
75
|
+
*/
|
|
76
|
+
export declare function springStep(p: number, v: number, omega: number, dtSec: number): {
|
|
77
|
+
p: number;
|
|
78
|
+
v: number;
|
|
79
|
+
};
|
|
80
|
+
/** Zoom-to-fit `content` with `pad` (world units), the zoom clamped into a band (kernel coords.ts). */
|
|
81
|
+
export declare function fitCamera(content: Rect, vpW: number, vpH: number, opts: {
|
|
82
|
+
pad: number;
|
|
83
|
+
minZoom: number;
|
|
84
|
+
maxZoom: number;
|
|
85
|
+
}): CameraState;
|
|
86
|
+
/** `@ice/core` NAV_TRANSITION_DEFAULTS — the response the product flies at. */
|
|
87
|
+
export declare const NAV: {
|
|
88
|
+
readonly responseMs: 420;
|
|
89
|
+
readonly exitResponseFactor: 0.8;
|
|
90
|
+
readonly durationPerOctave: 0.12;
|
|
91
|
+
readonly baseOctaves: 3.5;
|
|
92
|
+
readonly freezeOctaves: 4.2;
|
|
93
|
+
readonly capFactor: 10;
|
|
94
|
+
readonly settleP: 0.999;
|
|
95
|
+
readonly settleV: 0.02;
|
|
96
|
+
};
|
|
97
|
+
export type FlightTuning = {
|
|
98
|
+
readonly [K in keyof typeof NAV]: number;
|
|
99
|
+
};
|
|
100
|
+
/** `@ice/core` FIT_DEFAULTS — the NATURAL band an arrival is framed into (design-006, amended 2026-07-18). */
|
|
101
|
+
export declare const FIT: {
|
|
102
|
+
readonly pad: 80;
|
|
103
|
+
readonly minZoom: 0.5;
|
|
104
|
+
readonly maxZoom: 1;
|
|
105
|
+
};
|
|
106
|
+
export type FitBand = {
|
|
107
|
+
readonly [K in keyof typeof FIT]: number;
|
|
108
|
+
};
|
|
109
|
+
export type NavKind = "enter" | "exit";
|
|
110
|
+
/**
|
|
111
|
+
* The departing and arriving presentations' opacity at progress `p` — ICE
|
|
112
|
+
* core `opacityAt`, verbatim. Enter: the parent holds until p ≈ 0.3 and is
|
|
113
|
+
* gone by 0.75 (most of it has physically left the viewport by then). Exit:
|
|
114
|
+
* the inner frame holds to 0.85 and fades as it lands on the card face. A
|
|
115
|
+
* FROZEN (depth-capped) flight is a crossfade: out 0.05→0.45, in 0.3→0.7.
|
|
116
|
+
*/
|
|
117
|
+
export declare function flightOpacity(kind: NavKind, p: number, frozen: boolean): {
|
|
118
|
+
readonly outgoing: number;
|
|
119
|
+
readonly incoming: number;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* One in-flight transition — what ICE keeps in its `NavTransition` resource,
|
|
123
|
+
* minus the ECS. The host owns the clock: `stepFlight` each frame until
|
|
124
|
+
* `active` clears, `flightAt` for a pinned still.
|
|
125
|
+
*/
|
|
126
|
+
export interface Flight {
|
|
127
|
+
readonly kind: NavKind;
|
|
128
|
+
/** A: departed-frame coords → destination-frame coords. */
|
|
129
|
+
readonly affine: PortalAffine;
|
|
130
|
+
/** The departed frame's camera at the cut — what it renders under at p = 0, and throughout a frozen flight. */
|
|
131
|
+
readonly camPre: CameraState;
|
|
132
|
+
readonly c0: CameraState;
|
|
133
|
+
readonly c1: CameraState;
|
|
134
|
+
/** Depth-capped: present as a crossfade (`flightOpacity`). */
|
|
135
|
+
readonly frozen: boolean;
|
|
136
|
+
/** Response multiplier from octave distance, locked at start (§4). */
|
|
137
|
+
readonly durMul: number;
|
|
138
|
+
p: number;
|
|
139
|
+
v: number;
|
|
140
|
+
active: boolean;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Arm a flight from the already-cut world: `camPre` the departed frame's
|
|
144
|
+
* camera at the cut (the continuity solve gives c0 in destination coords),
|
|
145
|
+
* `c1` the clamped arrival. Applies the depth cap and the octave response.
|
|
146
|
+
* The host snaps its camera to `flight.c0`.
|
|
147
|
+
*/
|
|
148
|
+
export declare function startFlight(kind: NavKind, A: PortalAffine, camPre: CameraState, c1: CameraState, vp: Viewport, tune?: FlightTuning, exact?: CameraState): Flight;
|
|
149
|
+
/**
|
|
150
|
+
* The camera the DEPARTED frame renders under this frame. Riding the flight
|
|
151
|
+
* through the affine (`outgoingCamera`) — except at the cut itself, where it
|
|
152
|
+
* is the pre-cut camera bit for bit (the affine and its inverse round-trip to
|
|
153
|
+
* within an ulp, and at zoom 1 an ulp is the other side of a decade), and
|
|
154
|
+
* throughout a FROZEN flight, where the departed frame stays at its pre-cut
|
|
155
|
+
* appearance and fades (design-006 §5: the cap broke the geometry, so the
|
|
156
|
+
* story is a dissolve, not a portal).
|
|
157
|
+
*/
|
|
158
|
+
export declare function departedCamera(f: Flight, cam: CameraState): CameraState;
|
|
159
|
+
/** Advance the spring by `dtSec`; returns the camera for this frame. Lands EXACTLY on c1 and clears `active` at settle. */
|
|
160
|
+
export declare function stepFlight(f: Flight, dtSec: number, vp: Viewport, tune?: FlightTuning): CameraState;
|
|
161
|
+
/** The camera at progress `p` — a pinned still (the oracle's scenes, the harness's shots). The endpoints are c0 and c1 themselves, bit for bit. */
|
|
162
|
+
export declare function flightAt(f: Flight, p: number, vp: Viewport): CameraState;
|
|
163
|
+
/** The bounds of some rects, or null when there are none. */
|
|
164
|
+
export declare function boundsOf(rects: readonly Rect[]): Rect | null;
|
|
165
|
+
/**
|
|
166
|
+
* The DEFAULT framing for a frame (design-006 as amended): zoom-to-fit its
|
|
167
|
+
* content capped into the natural band; an empty frame arrives centred on
|
|
168
|
+
* its origin at zoom 1.
|
|
169
|
+
*/
|
|
170
|
+
export declare function arrivalCamera(content: Rect | null, vp: Viewport, fit?: FitBand): CameraState;
|
|
171
|
+
/** A flight that is already over — what a degenerate portal (no area) gets: the host snaps to the arrival, as ICE's rect-less link "degrades the whole jump to a snap — never half-fly". */
|
|
172
|
+
export declare function cutFlight(kind: NavKind, camPre: CameraState, c1: CameraState): Flight;
|
|
173
|
+
/**
|
|
174
|
+
* ENTER a container whose body rect is `K` (parent coords) holding `content`
|
|
175
|
+
* (child coords): the arrival is the child's default framing, the portal maps
|
|
176
|
+
* that arrival onto K, and the flight starts where the parent was. The host
|
|
177
|
+
* switches frames, snaps its camera to `flight.c0`, then steps.
|
|
178
|
+
*/
|
|
179
|
+
export declare function enterFlight(K: Rect, content: Rect | null, camPre: CameraState, vp: Viewport, tune?: FlightTuning, fit?: FitBand, exact?: CameraState): Flight;
|
|
180
|
+
/**
|
|
181
|
+
* EXIT to the parent: the portal is rebuilt from the container's CURRENT rect
|
|
182
|
+
* `K` and the inner frame's default framing (so arrival and preview agree),
|
|
183
|
+
* and the landing is the camera saved at entry. `camPre` is the inner camera
|
|
184
|
+
* at the cut.
|
|
185
|
+
*/
|
|
186
|
+
export declare function exitFlight(K: Rect, inner: Rect | null, camPre: CameraState, saved: CameraState, vp: Viewport, tune?: FlightTuning, fit?: FitBand): Flight;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { Box } from "../lattice/lod";
|
|
2
|
+
import type { CameraState, Rect, Viewport } from "./flight";
|
|
3
|
+
/**
|
|
4
|
+
* A rounded rect in screen CSS px: centre, half extents, corner radius — and a top FEATHER (design-018 §4): what the face shows
|
|
5
|
+
* fades in over this many CSS px below its top edge, a smoothstep in every pass's `portal_cover` (absent or 0: a hard edge). The
|
|
6
|
+
* pegboard tray's face carries one — its top the foot of the drawer's clear header (design-018 R4) — so its specimens dissolve into the
|
|
7
|
+
* board under the header instead of being cut.
|
|
8
|
+
*/
|
|
9
|
+
export interface PortalClip {
|
|
10
|
+
readonly cx: number;
|
|
11
|
+
readonly cy: number;
|
|
12
|
+
readonly hx: number;
|
|
13
|
+
readonly hy: number;
|
|
14
|
+
readonly r: number;
|
|
15
|
+
readonly feather?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The most faces a slot can be seen through, its own included — the length
|
|
19
|
+
* of every uniform block's `portals`/`clips` arrays; portal.wgsl's
|
|
20
|
+
* `PORTAL_CHAIN` is the same number (a mismatch fails to compile). Six holds
|
|
21
|
+
* a host's depth belt of four plus the flight's face.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PORTAL_CHAIN = 6;
|
|
24
|
+
/** The struct field type of a chain record (gpu/struct.ts). */
|
|
25
|
+
export declare const PORTAL_CHAIN_TYPE: "array<vec4f, 6>";
|
|
26
|
+
export interface Presentation {
|
|
27
|
+
/** Multiplies the slot's every alpha; 1 at rest. */
|
|
28
|
+
readonly opacity: number;
|
|
29
|
+
/**
|
|
30
|
+
* Multiplies its OBJECTS' alphas on top — not its mat (MINIMAT.md §5): a mini mat's live inside
|
|
31
|
+
* comes in over the face's own drawing with its mat whole at once (the same lattice, lit by the
|
|
32
|
+
* same lamp — nothing to see) and its objects fading in by the gate's answer, as the face's chips
|
|
33
|
+
* fade out over them. Absent = 1.
|
|
34
|
+
*/
|
|
35
|
+
readonly objects?: number;
|
|
36
|
+
/** The face this slot is seen through; absent = visible everywhere (the root). */
|
|
37
|
+
readonly portal?: PortalClip;
|
|
38
|
+
/**
|
|
39
|
+
* The faces the slot's PARENT is seen through, nearest first: a nested slot is
|
|
40
|
+
* visible only inside all of them. The ground fills this in from the tree
|
|
41
|
+
* (PORTAL.md §10); a host never needs to.
|
|
42
|
+
*/
|
|
43
|
+
readonly within?: readonly PortalClip[];
|
|
44
|
+
}
|
|
45
|
+
/** The chain a presentation clips to: its own face first, then every face above it. Empty = everywhere. */
|
|
46
|
+
export declare function chainOf(p: Presentation | undefined): PortalClip[];
|
|
47
|
+
/** The `portals` and `clips` records every uniform block carries: the chain in order, a zero `clips[i].y` ending it; `clips[i].z` the feather. */
|
|
48
|
+
export declare function portalValues(p: Presentation | undefined): {
|
|
49
|
+
portals: number[];
|
|
50
|
+
clips: number[];
|
|
51
|
+
};
|
|
52
|
+
/** A world rect (with a corner radius) as the portal it makes on screen under `cam`. */
|
|
53
|
+
export declare function clipOf(K: Rect, radius: number, cam: CameraState): PortalClip;
|
|
54
|
+
/**
|
|
55
|
+
* The slot's BOX for a portal (CSS px, inside the attachment; lod.ts `Box`):
|
|
56
|
+
* the portal's bounding box plus a CSS px for the AA ramp. What a nested
|
|
57
|
+
* slot instances, bakes and culls — its cost (PORTAL.md §2.3). The ground
|
|
58
|
+
* intersects it with the parent's box (§10).
|
|
59
|
+
*/
|
|
60
|
+
export declare function boxOfPortal(c: PortalClip, attach: {
|
|
61
|
+
readonly width: number;
|
|
62
|
+
readonly height: number;
|
|
63
|
+
}): Box;
|
|
64
|
+
/** The intersection of two boxes; empty (zero size) when they miss. */
|
|
65
|
+
export declare function intersectBox(a: Box, b: Box): Box;
|
|
66
|
+
/**
|
|
67
|
+
* The GATE (PORTAL.md §2.5, MINIMAT.md §5): a container's face shows its LIVE
|
|
68
|
+
* inside only when its short side on screen is at least `lo` CSS px, fading in
|
|
69
|
+
* fully by `hi` — the rung law applied to portals. Below it no slot exists and
|
|
70
|
+
* the mini mat draws its face itself (its far LOD); zoomed out, a desk of mini
|
|
71
|
+
* mats costs one instanced draw. The engine holds the numbers (theme.ts
|
|
72
|
+
* `PORTAL.gate`); the mini mat, the one container, takes them by name.
|
|
73
|
+
*/
|
|
74
|
+
export declare const PORTAL_GATE: readonly [number, number];
|
|
75
|
+
/** The pool's cap: at most this many faces carry a slot per frame, largest first (PORTAL.md Q-f). */
|
|
76
|
+
export declare const PORTAL_CAP = 16;
|
|
77
|
+
/** The slot's presence for a face on screen — its opacity; 0 = no slot. */
|
|
78
|
+
export declare const portalPresence: (c: PortalClip, gate?: readonly [number, number]) => number;
|
|
79
|
+
/**
|
|
80
|
+
* ZOOM-THROUGH (PORTAL.md §8, §9): does a face COVER the viewport — every corner of the
|
|
81
|
+
* viewport inside the face's rounded rect by at least `margin` CSS px (negative = may
|
|
82
|
+
* poke out by that much)? Entering when it does is a cut nobody can see: the whole view
|
|
83
|
+
* is already the inside; leaving when it no longer does shows the parent only where the
|
|
84
|
+
* face has left the view. The two margins make the dead band.
|
|
85
|
+
*/
|
|
86
|
+
export declare function faceCovers(c: PortalClip, vp: Viewport, margin: number): boolean;
|
|
87
|
+
/** The dead band: enter once the face covers the view by this much … */
|
|
88
|
+
export declare const THROUGH_IN = 2;
|
|
89
|
+
/** … leave once it fails to cover by this much. */
|
|
90
|
+
export declare const THROUGH_OUT = 6;
|
|
91
|
+
/** The scissor a presentation draws inside (device px): the chain's bounding boxes intersected, a device px of slack for the AA ramp; the attachment when there is no chain. */
|
|
92
|
+
export declare function scissorOf(p: Presentation | undefined, dpr: number, size: {
|
|
93
|
+
readonly w: number;
|
|
94
|
+
readonly h: number;
|
|
95
|
+
}): readonly [number, number, number, number];
|