@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,88 @@
|
|
|
1
|
+
/** The level of a `w × h` chain whose both sides first fit `side` (0 when the whole chain does). */
|
|
2
|
+
export declare function tailBase(w: number, h: number, side: number): number;
|
|
3
|
+
/** Bytes of `levels` of a chain from `w × h` at `texel` bytes a texel. */
|
|
4
|
+
export declare function chainBytes(w: number, h: number, levels: number, texel?: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* THE LAYER ALLOCATOR: an array's layers handed out lowest first and taken back; `take` says the capacity the array must hold
|
|
7
|
+
* for the layer it hands out (doubling, from `first`, to the device's `max`) — null when it holds no more. K9 R2: `shrunk` says
|
|
8
|
+
* the capacity the layers in use let the array fall back to — halves, and nothing at all when none is in use.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Layers {
|
|
11
|
+
readonly first: number;
|
|
12
|
+
readonly max: number;
|
|
13
|
+
private free;
|
|
14
|
+
private next;
|
|
15
|
+
capacity: number;
|
|
16
|
+
constructor(first?: number, max?: number);
|
|
17
|
+
take(): {
|
|
18
|
+
readonly layer: number;
|
|
19
|
+
readonly capacity: number;
|
|
20
|
+
} | null;
|
|
21
|
+
give(layer: number): void;
|
|
22
|
+
get used(): number;
|
|
23
|
+
/** The highest layer in use (−1 when none): what a smaller array must still hold. */
|
|
24
|
+
get highest(): number;
|
|
25
|
+
/**
|
|
26
|
+
* The capacity an array holding these layers may shrink to (K9 R2): halved while fewer than a QUARTER of it is in use and the
|
|
27
|
+
* highest layer in use fits the half — down to `first`; 0 when none is in use; the current capacity when it cannot shrink.
|
|
28
|
+
*/
|
|
29
|
+
shrunk(): number;
|
|
30
|
+
/** The allocator's word after the array was remade at `capacity` (from `shrunk()`): the layers past it are forgotten. */
|
|
31
|
+
shrinkTo(capacity: number): void;
|
|
32
|
+
}
|
|
33
|
+
/** The plain format an `-srgb` one is viewed as for a copy (the bytes pass unchanged); a plain format is its own. */
|
|
34
|
+
export declare const plainFormat: (f: GPUTextureFormat) => GPUTextureFormat;
|
|
35
|
+
export interface LayerArrayOptions {
|
|
36
|
+
/** The label every array is made with (`photo/thumbnails`) — the memory ledger's row. */
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly format: GPUTextureFormat;
|
|
39
|
+
/** The layers' side, texels (square); every layer holds its full mip chain. */
|
|
40
|
+
readonly side: number;
|
|
41
|
+
/** Layers at the first growth (then doubling). */
|
|
42
|
+
readonly first?: number;
|
|
43
|
+
}
|
|
44
|
+
/** One kind's array of layers on one device: its texture (null before the first layer), the allocator, the fill. */
|
|
45
|
+
export declare class LayerArray {
|
|
46
|
+
readonly side: number;
|
|
47
|
+
readonly mips: number;
|
|
48
|
+
readonly format: GPUTextureFormat;
|
|
49
|
+
private readonly device;
|
|
50
|
+
private readonly label;
|
|
51
|
+
private readonly layers;
|
|
52
|
+
private tex;
|
|
53
|
+
/** The texture's layers (kept here: a fake device's texture has no count of its own). */
|
|
54
|
+
private cap;
|
|
55
|
+
/** Bumped whenever the texture is remade (a bind group holding its view must be made again). */
|
|
56
|
+
version: number;
|
|
57
|
+
/** The fill's pipeline, made on the first fill — labelled with the array's own name, so the profiler counts its passes as the kind's. */
|
|
58
|
+
private fillPipe;
|
|
59
|
+
constructor(device: GPUDevice, opts: LayerArrayOptions);
|
|
60
|
+
/** The array (null before its first layer). */
|
|
61
|
+
get texture(): GPUTexture | null;
|
|
62
|
+
/** Layers in use; the array's capacity. */
|
|
63
|
+
get used(): number;
|
|
64
|
+
get capacity(): number;
|
|
65
|
+
/** What the array weighs on the device, every layer of its capacity with its chain (the GPU ledger's row). */
|
|
66
|
+
get bytes(): number;
|
|
67
|
+
/** What the layers IN USE weigh (K9 R2: the budget's resident charge — the capacity's slack is the ledger's to show, bounded by `give`'s shrink). */
|
|
68
|
+
get usedBytes(): number;
|
|
69
|
+
/** A layer for a new object (the array grown — its old layers copied — when it must be); null when the device holds no more. */
|
|
70
|
+
take(): number | null;
|
|
71
|
+
/**
|
|
72
|
+
* A layer given back — and the array SHRUNK when fewer than a quarter of its layers are in use and the ones in use fit the
|
|
73
|
+
* half (K9 R2: an array never shrank before, so its charge survived a document switch): remade at half, its low layers copied;
|
|
74
|
+
* let go entirely when none is in use. The version moves as on a growth — a holder rebinds its view.
|
|
75
|
+
*/
|
|
76
|
+
give(layer: number): void;
|
|
77
|
+
/**
|
|
78
|
+
* Layer `layer`'s every level from `src`'s chain: level `base + m` at the origin, its edge carried to the layer's; a level past
|
|
79
|
+
* the chain's end takes its last. `src` must allow the plain view of its format (`viewFormats`) when that format is `-srgb`.
|
|
80
|
+
*/
|
|
81
|
+
fill(src: GPUTexture, srcMips: number, layer: number, base: number, encoder?: GPUCommandEncoder): void;
|
|
82
|
+
/** A `2d-array` view of the whole array — or of `blank` (a 1 × 1 × 1 stand-in the caller keeps) before its first layer. */
|
|
83
|
+
view(blank: GPUTexture): GPUTextureView;
|
|
84
|
+
destroy(): void;
|
|
85
|
+
/** The array made again at `capacity` layers — the old one's layers copied, as many as both hold — and the old destroyed. */
|
|
86
|
+
private remake;
|
|
87
|
+
private pipeline;
|
|
88
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ServiceKey } from "./services";
|
|
2
|
+
/** A blob as the store holds it: its bytes and its media type (`image/png`, `RGBA_TYPE`, …). */
|
|
3
|
+
export interface StoredBlob {
|
|
4
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
5
|
+
readonly type: string;
|
|
6
|
+
}
|
|
7
|
+
/** The app's content-addressed byte store (D-D12): the desk names a blob by its hash; keeping the bytes is the app's. */
|
|
8
|
+
export interface BlobStore {
|
|
9
|
+
/** Keep `bytes` (idempotent by content); resolves to their hash — the name a print's `blob` prop carries. */
|
|
10
|
+
put(bytes: Uint8Array<ArrayBuffer>, type: string): Promise<string>;
|
|
11
|
+
/** The blob under a hash, or undefined when the store has none (a peer's picture not arrived yet, a hash from another desk). */
|
|
12
|
+
get(hash: string): Promise<StoredBlob | undefined>;
|
|
13
|
+
}
|
|
14
|
+
/** A picture ready for the pass: raw RGBA rows, or a source the device copies from (a browser's `ImageBitmap`) — closed once uploaded. */
|
|
15
|
+
export type DecodedPicture = {
|
|
16
|
+
readonly kind: "rgba";
|
|
17
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
18
|
+
readonly width: number;
|
|
19
|
+
readonly height: number;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: "source";
|
|
22
|
+
readonly source: unknown;
|
|
23
|
+
readonly width: number;
|
|
24
|
+
readonly height: number;
|
|
25
|
+
close?(): void;
|
|
26
|
+
};
|
|
27
|
+
/** The host's decoder for an encoded blob, scaled so its long side is at most `max` texels; undefined when it cannot. */
|
|
28
|
+
export type PictureDecoder = (blob: StoredBlob, max: number) => Promise<DecodedPicture | undefined>;
|
|
29
|
+
/** The app's byte store as a desk SERVICE (K8a, kit/services.ts — `deskLayer({ blobs })` lends it): `host.use?.(BLOB_STORE)`. */
|
|
30
|
+
export declare const BLOB_STORE: ServiceKey<BlobStore>;
|
|
31
|
+
/** The host's picture decoder as a desk SERVICE (K8a — the layer lends `decodePicture` in a browser): `host.use?.(PICTURE_DECODER)`. */
|
|
32
|
+
export declare const PICTURE_DECODER: ServiceKey<PictureDecoder>;
|
|
33
|
+
/** Raw RGBA8 rows, row-major, no header — the one media type the desk decodes itself (its size is the print's `width` × `height`). */
|
|
34
|
+
export declare const RGBA_TYPE = "image/x-ice-rgba";
|
|
35
|
+
/** The name a blob goes by: SHA-256 over its bytes, lowercase hex. */
|
|
36
|
+
export declare function hashBytes(bytes: Uint8Array<ArrayBuffer>): Promise<string>;
|
|
37
|
+
/** The reference store: every blob in a Map, for the life of the page. */
|
|
38
|
+
export declare function createMemoryBlobStore(): BlobStore & {
|
|
39
|
+
size(): number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const NbUniforms: import("../engine").StructDef<"view" | "eye" | "light" | "shadow" | "shadow2" | "paper" | "rule" | "cloth" | "castCol" | "select" | "ruleInk" | "ring">;
|
|
2
|
+
export declare const NbBook: import("../engine").StructDef<"size" | "light" | "model" | "inv" | "lamp" | "sh" | "page" | "open" | "look" | "foot" | "recv" | "inkPage" | "inkLayer" | "col0" | "col1" | "col2" | "col3" | "col4" | "col5" | "col6" | "col7">;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Entity } from "../../../core/src/index";
|
|
2
|
+
/**
|
|
3
|
+
* Where the textarea stands while lent (container px): its box's top-left and size BEFORE any turn, the size its text is laid
|
|
4
|
+
* at, and — for a turned part (a note stuck at its tilt) — the turn about the box's centre, the padding, the line height and
|
|
5
|
+
* whether lines wrap. Absent: unturned, no padding, one line the box's height, no wrap (a day's line).
|
|
6
|
+
*/
|
|
7
|
+
export interface EditorPlace {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
readonly w: number;
|
|
11
|
+
readonly h: number;
|
|
12
|
+
readonly fontPx: number;
|
|
13
|
+
/** The turn about the box's centre, radians — the editor is placed translate · rotate · translate (never a scale, never a matrix). */
|
|
14
|
+
readonly angle?: number;
|
|
15
|
+
/** The text's inset from the box's edges, px. */
|
|
16
|
+
readonly pad?: number;
|
|
17
|
+
/** The line height, px (default: the box's height — one line). */
|
|
18
|
+
readonly lineHeight?: number;
|
|
19
|
+
/** Lines wrap (a note's body) or run on (a day's line — default). */
|
|
20
|
+
readonly wrap?: boolean;
|
|
21
|
+
/** The face the platform lays the text in (the caret's arrows by line): the editor's own (the desk's hand) unless the part says. */
|
|
22
|
+
readonly font?: {
|
|
23
|
+
readonly family: string;
|
|
24
|
+
readonly weight: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A LEASE on the ONE editor (D3t-c; K8a — any kind's): while lent, the textarea's value, keys, caret and blur are the lease's, and
|
|
29
|
+
* it says where the textarea stands; another lease, a blur, `release`, `live()` answering false or the editor's `dispose` (the desk
|
|
30
|
+
* unmounted — petition I25) ends it (`ended`).
|
|
31
|
+
*/
|
|
32
|
+
export interface EditorLease {
|
|
33
|
+
/** The TEXT PART this lease writes — its kind's declared `TextPart.part` ("note.body", "calendar.line"): what `lease()` names. */
|
|
34
|
+
readonly part?: string;
|
|
35
|
+
/** The textarea's accessible name while lent ("write on the note"). */
|
|
36
|
+
readonly label?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The value the textarea holds — asked when the lease begins and each frame after, so a write the world made between sessions
|
|
39
|
+
* (a peer's, an undo) reaches the platform's field; `null`: keep the field's own (a session is open — the field is the truth).
|
|
40
|
+
*/
|
|
41
|
+
value(): string | null;
|
|
42
|
+
/** The platform's value after an input event. */
|
|
43
|
+
input(value: string): void;
|
|
44
|
+
/** A key the lease takes: true — handled (the editor prevents its default, so the keymap stands down). */
|
|
45
|
+
keydown(ev: KeyboardEvent): boolean;
|
|
46
|
+
/** The caret moved (a selection change, a tap, a value the world moved): its index. */
|
|
47
|
+
caret(index: number): void;
|
|
48
|
+
/** Where the textarea stands — null keeps it where it was. */
|
|
49
|
+
place(): EditorPlace | null;
|
|
50
|
+
/** 1 s without input (never mid-IME): a session's end; the focus stays. */
|
|
51
|
+
idle(): void;
|
|
52
|
+
/** The lease is over (a blur, another lease, `release`, `live()` false). */
|
|
53
|
+
ended(): void;
|
|
54
|
+
/** Asked each frame while lent, before the value: false lets the lease go (its object was deleted, or left the frame by a nav cut). */
|
|
55
|
+
live?(): boolean;
|
|
56
|
+
}
|
|
57
|
+
/** THE ONE EDITOR (the desk's service since K8a — `DeskLayerHandle.editor()`, `ObjectDomHost.editor`): lent, never owned by a kind. */
|
|
58
|
+
export interface DeskEditor {
|
|
59
|
+
readonly element: HTMLTextAreaElement;
|
|
60
|
+
/** Lend the editor (D3t-c): a lease holding it ends first; the textarea takes focus, its value the lease's, the caret at `caret` (the end by default). */
|
|
61
|
+
lend(lease: EditorLease, caret?: number): void;
|
|
62
|
+
/** End the lease (only `lease`'s, when named). */
|
|
63
|
+
release(lease?: EditorLease): void;
|
|
64
|
+
/** The lease holding the editor, if any. */
|
|
65
|
+
lease(): EditorLease | undefined;
|
|
66
|
+
/** End whatever lease holds it (the editor hidden, the focus given back). */
|
|
67
|
+
blur(): void;
|
|
68
|
+
/** After each draw: the lease's `live` and value asked, the textarea placed where the lease says. */
|
|
69
|
+
follow(): void;
|
|
70
|
+
/** Where the editor's box stands on screen (container px): its centre, size and turn — null while hidden. */
|
|
71
|
+
placement(): {
|
|
72
|
+
readonly cx: number;
|
|
73
|
+
readonly cy: number;
|
|
74
|
+
readonly w: number;
|
|
75
|
+
readonly h: number;
|
|
76
|
+
readonly angle: number;
|
|
77
|
+
} | null;
|
|
78
|
+
/** The editor goes with its desk: a lease still held ends first (`ended` — a typing session commits), then the textarea leaves. */
|
|
79
|
+
dispose(): void;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A TAP the desk read on its container (DOM-at-event-time, design-007 §2 — a press and release within the drag slop, the primary
|
|
83
|
+
* button, no modifier): its world point and the object the pointer EXACTLY hit — the interaction stack's own answer. `found`
|
|
84
|
+
* false: the pointer is gone (a touch lifted before the click) and a part may look for itself; `hit` undefined with `found`: the
|
|
85
|
+
* pointer hit nothing, or an object is in hand (a tap in hand is the hand's).
|
|
86
|
+
*/
|
|
87
|
+
export interface TextTap {
|
|
88
|
+
readonly wx: number;
|
|
89
|
+
readonly wy: number;
|
|
90
|
+
readonly found: boolean;
|
|
91
|
+
readonly hit: Entity | undefined;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A kind's TEXT PART (K8a — declared with its object, `defineObject({ host: { text } })`): a part of its objects that takes the
|
|
95
|
+
* ONE editor. `part` names it ("note.body"); a part with `tap` is routed every TAP by the desk — it answers the lease the tap
|
|
96
|
+
* takes (the editor is lent to it, the caret where the tap put it) or undefined (not its object; refused). A part without `tap`
|
|
97
|
+
* is leased by its kind's own DOM half at event time (the desk calendar's day line: a day selected).
|
|
98
|
+
*/
|
|
99
|
+
export interface TextPart {
|
|
100
|
+
readonly part: string;
|
|
101
|
+
tap?(t: TextTap): {
|
|
102
|
+
readonly lease: EditorLease;
|
|
103
|
+
readonly caret?: number;
|
|
104
|
+
} | undefined;
|
|
105
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CameraState, Viewport } from "./nav";
|
|
2
|
+
export interface DeskEye {
|
|
3
|
+
/** The eye's foot on the desk: the view's centre, world units. */
|
|
4
|
+
readonly ex: number;
|
|
5
|
+
readonly ey: number;
|
|
6
|
+
/** How far up it stands, world units. */
|
|
7
|
+
readonly h: number;
|
|
8
|
+
readonly zoom: number;
|
|
9
|
+
/** The viewport, CSS px. */
|
|
10
|
+
readonly vw: number;
|
|
11
|
+
readonly vh: number;
|
|
12
|
+
}
|
|
13
|
+
/** The eye for a camera: over the view's centre, `k` view-diagonals up, never nearer than `min`. */
|
|
14
|
+
export declare function eyeOf(cam: CameraState, vp: Viewport, law: {
|
|
15
|
+
readonly k: number;
|
|
16
|
+
readonly min: number;
|
|
17
|
+
}): DeskEye;
|
|
18
|
+
/** A world point (z up) → CSS px on the screen. */
|
|
19
|
+
export declare function project(e: DeskEye, x: number, y: number, z: number): readonly [number, number];
|
|
20
|
+
/** CSS px → the desk point under it (z = 0): the ortho camera's own inverse. */
|
|
21
|
+
export declare function deskAt(e: DeskEye, sx: number, sy: number): readonly [number, number];
|
|
22
|
+
/** The world point at height z that lands on the desk point (dx, dy) — along the eye's ray. */
|
|
23
|
+
export declare function unproject(e: DeskEye, dx: number, dy: number, z: number): readonly [number, number];
|
|
24
|
+
/** The eye's ray through a desk point: origin (the eye) and direction (toward the desk point, unnormalised). */
|
|
25
|
+
export declare function rayThrough(e: DeskEye, dx: number, dy: number): {
|
|
26
|
+
readonly o: readonly [number, number, number];
|
|
27
|
+
readonly d: readonly [number, number, number];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The clip-space numbers the shader's `nb_clip` reads: x, y are 2·zoom·(p − E)/viewport (y up),
|
|
31
|
+
* w = (H − z)/H, and z is a perspective depth over distances from the eye in [near, far] —
|
|
32
|
+
* `near` above the tallest thing a book can reach, `far` just under the desk.
|
|
33
|
+
*/
|
|
34
|
+
export declare function eyeValues(e: DeskEye, reach?: number): {
|
|
35
|
+
eye: [number, number, number, number];
|
|
36
|
+
view: [number, number, number, number];
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { carryOf, HOLD, type HoldReserves, readingTarget } from "../hold/pose";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from "./arrays";
|
|
2
|
+
export * from "./blobs";
|
|
3
|
+
export * from "./book";
|
|
4
|
+
export * from "./editor";
|
|
5
|
+
export * from "./eye";
|
|
6
|
+
export * from "./hold";
|
|
7
|
+
export * from "./inside";
|
|
8
|
+
export * from "./layer";
|
|
9
|
+
export * from "./light";
|
|
10
|
+
export * from "./mesh";
|
|
11
|
+
export * from "./mips";
|
|
12
|
+
export * from "./nav";
|
|
13
|
+
export * from "./paper-tex";
|
|
14
|
+
export * from "./physics";
|
|
15
|
+
export * from "./place";
|
|
16
|
+
export * from "./print";
|
|
17
|
+
export * from "./raster";
|
|
18
|
+
export * from "./sdf";
|
|
19
|
+
export * from "./seeds";
|
|
20
|
+
export * from "./services";
|
|
21
|
+
export * from "./springs";
|
|
22
|
+
export * from "./strokes";
|
|
23
|
+
export * from "./text";
|
|
24
|
+
export * from "./uniform";
|
|
25
|
+
export * from "./view";
|
|
26
|
+
export * from "./wgsl";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Box } from "../lattice/lod";
|
|
2
|
+
import type { SlotLight } from "../mat/layout";
|
|
3
|
+
import { type CameraState, type FitBand, type Flight, type PortalAffine, type Rect, type Viewport } from "../nav/flight";
|
|
4
|
+
import { type PortalClip, type Presentation } from "../nav/portal";
|
|
5
|
+
import type { RGB } from "../theme";
|
|
6
|
+
/** A container's inside under the host camera (MINIMAT.md §3–§5): what `insideView` answers — ALWAYS, past the gate or not. */
|
|
7
|
+
export interface InsideView {
|
|
8
|
+
/** The embedding: inside → host (`host = o + inside · s`) — the flight's own. */
|
|
9
|
+
readonly M: PortalAffine;
|
|
10
|
+
/** The inside's arrival camera — what its lattice is DRESSED for (PORTAL.md §9). */
|
|
11
|
+
readonly arrival: CameraState;
|
|
12
|
+
/** The camera the inside renders under at the host's camera: the enter flight's c0 at the cut. */
|
|
13
|
+
readonly cam: CameraState;
|
|
14
|
+
/** The face on screen: the live inside's clip. */
|
|
15
|
+
readonly clip: PortalClip;
|
|
16
|
+
/** The gate's answer (0..1): the live inside's presence — 0 = the face is the far LOD alone. */
|
|
17
|
+
readonly presence: number;
|
|
18
|
+
/** The live inside's box on the attachment. */
|
|
19
|
+
readonly box: Box;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The FINISH a container's face draws a child's chip in (K8a — open: until K8a a chip was a `ChipKind`, `"paper" | "mat"`, the two
|
|
23
|
+
* built-ins' own names, so no plugin kind could have one): a name among the container's `FaceLaw.finishes` — the mini mat draws
|
|
24
|
+
* `"paper"` (a sheet in the chip's colour, its writing greeked) and `"vinyl"` (grained, its frame line at `margin`) — and a plugin
|
|
25
|
+
* container draws its own. A chip names one, or several in preference order; the first the container draws wins, and a chip the
|
|
26
|
+
* container draws none of is not drawn (the builder counts it: `BuildWork.unchipped`) — never a finish it did not ask for.
|
|
27
|
+
*/
|
|
28
|
+
export type ChipFinish = string;
|
|
29
|
+
/** The two finishes the kit names — a chip's shared vocabulary (a note's `paper`, a mini mat's `vinyl`); a container may draw more. */
|
|
30
|
+
export declare const PAPER_FINISH: ChipFinish;
|
|
31
|
+
export declare const VINYL_FINISH: ChipFinish;
|
|
32
|
+
/** One child as the face's far LOD draws it, in the CHILD's frame (the inside's world). */
|
|
33
|
+
export interface ChildShape {
|
|
34
|
+
/** Its finish (`ChipFinish`) — or finishes, in preference order; the builder hands the container the one it draws. */
|
|
35
|
+
readonly finish: ChipFinish | readonly ChipFinish[];
|
|
36
|
+
readonly cx: number;
|
|
37
|
+
readonly cy: number;
|
|
38
|
+
/** Half extents, the tilt (radians), the corner radius — the child's own. */
|
|
39
|
+
readonly hx: number;
|
|
40
|
+
readonly hy: number;
|
|
41
|
+
readonly angle: number;
|
|
42
|
+
readonly radius: number;
|
|
43
|
+
/** Its colour: the paper's, or the vinyl's. */
|
|
44
|
+
readonly colour: RGB;
|
|
45
|
+
/** How far it stands off the face, child units — what its contact shadow is cast from. */
|
|
46
|
+
readonly height: number;
|
|
47
|
+
/** A note's writing, GREEKED: the pen's colour, the text's left edge and em (note units from the sheet's top-left), and each line's baseline and width. */
|
|
48
|
+
readonly writing?: {
|
|
49
|
+
readonly ink: RGB;
|
|
50
|
+
readonly x0: number;
|
|
51
|
+
readonly em: number;
|
|
52
|
+
readonly lines: readonly {
|
|
53
|
+
readonly y: number;
|
|
54
|
+
readonly width: number;
|
|
55
|
+
}[];
|
|
56
|
+
} | undefined;
|
|
57
|
+
/** A mini mat's printed border, child units. */
|
|
58
|
+
readonly margin?: number | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A CONTAINER kind's FACE LAW (K8a — the container's own, declared on its kind as `ObjectKind.faceLaw`; until K8a `FACE_RADIUS` and
|
|
62
|
+
* `FACE_CHIPS_MAX` were the kit's, the mini mat's numbers imposed on every container): the corner its face clips its inside by (the
|
|
63
|
+
* live inside, the far LOD, a flight through it — `clipOf(face, radius, cam)`), the most chips its face draws, and the chip finishes
|
|
64
|
+
* it draws them in. Absent on a kind with a `face`: square, and no chips.
|
|
65
|
+
*/
|
|
66
|
+
export interface FaceLaw {
|
|
67
|
+
readonly radius: number;
|
|
68
|
+
readonly chips: number;
|
|
69
|
+
readonly finishes: readonly ChipFinish[];
|
|
70
|
+
}
|
|
71
|
+
/** The finish a container draws a chip in: the chip's first that the container draws, or undefined — none (the chip is not drawn). */
|
|
72
|
+
export declare function finishOf(finish: ChipFinish | readonly ChipFinish[], drawn: readonly ChipFinish[]): ChipFinish | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* The same view from a FACE rect and its corner alone (D2b; the corner the container's own since K8a — `FaceLaw.radius`): what a
|
|
75
|
+
* kind's `face(geometry)` hands the builder, so any container kind's inside is built by the one law — the mini mat's `faceClip` is
|
|
76
|
+
* `clipOf(faceOf(G), its radius, cam)`, so the numbers are its `insideView`'s to the bit.
|
|
77
|
+
*/
|
|
78
|
+
export declare function insideViewOfFace(K: Rect, radius: number, content: Rect | null, cam: CameraState, vp: Viewport, fit?: FitBand, gate?: readonly [number, number]): InsideView | null;
|
|
79
|
+
/** The live inside's presentation at rest: through its face, its mat whole, its objects at the gate's answer (MINIMAT.md §5). */
|
|
80
|
+
export declare const insidePresent: (view: InsideView) => Presentation;
|
|
81
|
+
/**
|
|
82
|
+
* The presentations of a flight through a mini mat's face: `flightOpacity` as ever, and — on an
|
|
83
|
+
* ENTER — the arriving desk's objects at the gate's answer for the face as it is this frame, so
|
|
84
|
+
* a mini mat entered from its far LOD grows through the gate on the way in and its chips give way
|
|
85
|
+
* to its objects as it does (the arriving desk's mat is whole from the cut: the same lattice as
|
|
86
|
+
* the face's, by the same lamp). An exit keeps its objects whole and lands on whatever the face
|
|
87
|
+
* shows at the landing (the old landing fade). A frozen flight is a dissolve.
|
|
88
|
+
*/
|
|
89
|
+
/** What the flight helpers read of a flight: its kind, its progress, whether it is frozen — the prototype's `Flight` or core's `NavTransition` alike. */
|
|
90
|
+
export type FlightState = Pick<Flight, "kind" | "p" | "frozen">;
|
|
91
|
+
export declare function flightPresent(f: FlightState, clip: PortalClip | undefined, gate?: readonly [number, number]): {
|
|
92
|
+
readonly incoming: Presentation;
|
|
93
|
+
readonly outgoing: Presentation;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* When a flight hands the lamp over, as progress windows. ENTER hands it over once the departed
|
|
97
|
+
* desk starts to go (flightOpacity: it holds to 0.3) — until then the frame IS the rest frame
|
|
98
|
+
* under the departed camera; an EXIT hands it back in its first half — from then on the frame IS
|
|
99
|
+
* the rest frame under the flying camera, the inside lit as a mini mat's inside is.
|
|
100
|
+
*/
|
|
101
|
+
export declare const HANDOVER: {
|
|
102
|
+
readonly enter: readonly [0.3, 1];
|
|
103
|
+
readonly exit: readonly [0, 0.5];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* The LAMPS a flight hands between the two desks (MINIMAT.md §4). At rest a mini mat's inside is
|
|
107
|
+
* lit by the desk the mini mat lies on; a desk the camera is on, by its own lamp. ENTER: the
|
|
108
|
+
* arriving desk starts under the departed desk's lamp (`outCam` — at the cut, the portal's own
|
|
109
|
+
* light, bit for bit) and ends under its own. EXIT: the departed desk starts under its own and
|
|
110
|
+
* ends under the arriving desk's — the lamp its mini mat's inside is lit by at rest. A frozen
|
|
111
|
+
* flight is two whole desks under their own lamps.
|
|
112
|
+
*/
|
|
113
|
+
export declare function flightLights(f: FlightState, cam: CameraState, outCam: CameraState): {
|
|
114
|
+
readonly incoming?: SlotLight;
|
|
115
|
+
readonly outgoing?: SlotLight;
|
|
116
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { KindPass, RenderTarget, SlotContext } from "../kind";
|
|
2
|
+
import type { View } from "../lattice/lod";
|
|
3
|
+
import type { MatPass } from "./view";
|
|
4
|
+
import type { ComposeOptions } from "../engine/shader";
|
|
5
|
+
import type { ShaderText } from "../shaders";
|
|
6
|
+
/** The composite's entry: a resolved, premultiplied layer laid over what the ground drew (the layered kinds share it). */
|
|
7
|
+
export declare const LAYER_COMPOSITE_FILE = "kit/composite.wgsl";
|
|
8
|
+
/**
|
|
9
|
+
* The program that lays a layer — its entry, from the host's shader text, after the kit's view block and portal chain: the layer is
|
|
10
|
+
* laid through the slot's chain (design-018 §4), so a layered object keeps the kit's contract as one — the tray's feather included.
|
|
11
|
+
*/
|
|
12
|
+
export declare function layerComposite(text: ShaderText): ComposeOptions;
|
|
13
|
+
/** The composite's bindings (every layered kind's): the resolved layer, its box's origin, and the slot's view block (its chain). */
|
|
14
|
+
export declare function layerCompositeLayout(device: GPUDevice, label: string): GPUBindGroupLayout;
|
|
15
|
+
/** A device-px rect: x, y, width, height. */
|
|
16
|
+
export type Rect4 = readonly [number, number, number, number];
|
|
17
|
+
/**
|
|
18
|
+
* The attachment a slot's view names, device px: what every host sizes its canvas to — `surface().fit`, the reflector's
|
|
19
|
+
* `attach.resize`, the oracle's target — `max(1, round(css · dpr))`. A layer is made at this size, so its texel is the pixel.
|
|
20
|
+
*/
|
|
21
|
+
export declare const attachmentOf: (v: View & {
|
|
22
|
+
readonly dpr: number;
|
|
23
|
+
}) => {
|
|
24
|
+
readonly w: number;
|
|
25
|
+
readonly h: number;
|
|
26
|
+
};
|
|
27
|
+
/** Two device-px rects intersected; a width or height of 0 when they do not meet. */
|
|
28
|
+
export declare function clip(a: Rect4, b: Rect4): Rect4;
|
|
29
|
+
/** What a layered kind asks of its pass: the layer recorded into an encoder, laid by one draw, its screen box. */
|
|
30
|
+
export interface LayerPass {
|
|
31
|
+
layer(encoder: GPUCommandEncoder, size: {
|
|
32
|
+
readonly w: number;
|
|
33
|
+
readonly h: number;
|
|
34
|
+
}, dpr: number): boolean;
|
|
35
|
+
composite(pass: GPURenderPassEncoder, scissor?: Rect4 | null): void;
|
|
36
|
+
readonly screenBox: Rect4 | null;
|
|
37
|
+
/** The render target the next prepare is for (D7 — `SlotContext.target`): a pass keeps the held desk copy's state apart. */
|
|
38
|
+
use?(target: RenderTarget): void;
|
|
39
|
+
/** The hold is over: the copy's state given back. */
|
|
40
|
+
endHold?(): void;
|
|
41
|
+
/** The records its last prepare turned away at its cap (D7). */
|
|
42
|
+
readonly dropped?: number;
|
|
43
|
+
/** K6a (D-K6a.3): its frame layer's targets are made (at the first object drawn)… */
|
|
44
|
+
readonly layerMade?: boolean;
|
|
45
|
+
/** …was one of its objects drawn within `ms` (and when last: `performance.now()`'s ms — the release's due, K7a)… */
|
|
46
|
+
drawnWithin?(ms: number): boolean;
|
|
47
|
+
readonly lastDrawn?: number;
|
|
48
|
+
/** …and let them go (made again at the next object drawn). */
|
|
49
|
+
releaseLayer?(): void;
|
|
50
|
+
dispose(): void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The part of a layered kind that is the same for both: ROOT ONLY — a spawned slot's pass holds nothing and draws nothing (its
|
|
54
|
+
* `pass` is null; D-D18: a notebook or a pad is never drawn in a mini mat's inside or a flight's departed desk) — the layer recorded
|
|
55
|
+
* after its pass prepared, and laid ONCE over the whole range the ground hands it (a kind registered with `composite: true`: the
|
|
56
|
+
* ground draws it as one run after the rest of its stratum).
|
|
57
|
+
*/
|
|
58
|
+
export declare abstract class LayeredKind<R, P extends LayerPass> implements KindPass<R> {
|
|
59
|
+
/** The root slot's pass — the host's door to its own API (the ink, the tiles, the law); null in a spawned slot (root only). */
|
|
60
|
+
readonly pass: P | null;
|
|
61
|
+
/** The slot's scissor this frame, device px — the layer is laid inside it and it is given back after (null: nothing to lay). */
|
|
62
|
+
private within;
|
|
63
|
+
/** How many records `prepare` was handed: the whole range the layer lays. */
|
|
64
|
+
private handed;
|
|
65
|
+
constructor(pass: P | null);
|
|
66
|
+
abstract spawn(mat: MatPass): KindPass<R>;
|
|
67
|
+
/** The pass's own prepare for this slot (its records, eye and look); returns the count that will draw. */
|
|
68
|
+
protected abstract prepareOwn(pass: P, s: SlotContext, records: readonly R[]): number;
|
|
69
|
+
prepare(encoder: GPUCommandEncoder, s: SlotContext, records: readonly R[]): number;
|
|
70
|
+
/** The layer over the frame: once, for the whole range [0, count) — one draw lays every object; a part of it cannot be drawn from one layer. */
|
|
71
|
+
drawRange(pass: GPURenderPassEncoder, first: number, end: number): void;
|
|
72
|
+
endHold(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Let this slot's layer go when none of its objects was drawn within `ms` (D-K6a.3 for a slot the host keeps beyond the root — the
|
|
75
|
+
* tray's specimen, K5a; the ROOT's layer goes by its kind's own tick). Made again at the next object drawn.
|
|
76
|
+
*/
|
|
77
|
+
idle(ms: number): void;
|
|
78
|
+
/** When `idle(ms)` next lets the layer go — its last object drawn + `ms` (K7a: the host's registered TIME wake); ∞ with none. */
|
|
79
|
+
idleAt(ms: number): number;
|
|
80
|
+
dropped(): number;
|
|
81
|
+
dispose(): void;
|
|
82
|
+
}
|
|
83
|
+
/** A box's targets grow and shrink by this many device px a side, so a pan's jitter never makes them again (K7a). */
|
|
84
|
+
export declare const BOX_STEP = 256;
|
|
85
|
+
/**
|
|
86
|
+
* A layered kind's TARGETS AT ITS SCREEN BOX (K7a — design-016 §6): the 4× colour and depth and their resolve sized to the box
|
|
87
|
+
* its objects cover on the attachment (rounded up to BOX_STEP, at most the attachment), never the canvas — a notebook's layer at
|
|
88
|
+
* 2400 × 1600 was 136 MB for a book a tenth of the screen. The layer is drawn through a viewport shifted by the box's ORIGIN over
|
|
89
|
+
* the whole attachment, so the pixel grid is the attachment's (a fragment lands on the pixel it always did, the target's texel
|
|
90
|
+
* `pixel − origin`); the composite reads the texel at its pixel less the origin (its uniform, binding 1 beside the layer). What a
|
|
91
|
+
* fragment samples BY its position adds `origin` back (the passes carry it in their knobs). The rasteriser is not exactly
|
|
92
|
+
* translation-invariant in floating point: a handful of edge samples and 1-LSB interpolants move against a canvas-sized layer
|
|
93
|
+
* (D-K7a.4 — 13 golden scenes re-blessed).
|
|
94
|
+
*/
|
|
95
|
+
export declare class BoxTargets {
|
|
96
|
+
private readonly device;
|
|
97
|
+
private readonly label;
|
|
98
|
+
private readonly layoutComp;
|
|
99
|
+
private readonly samples;
|
|
100
|
+
private readonly view;
|
|
101
|
+
msaa: GPUTexture | null;
|
|
102
|
+
depth: GPUTexture | null;
|
|
103
|
+
resolve: GPUTexture | null;
|
|
104
|
+
compGroup: GPUBindGroup | null;
|
|
105
|
+
/** The box's top-left on the attachment, device px (the layer's texel 0, 0). */
|
|
106
|
+
readonly origin: [number, number];
|
|
107
|
+
/** The targets' size as made, device px (0 × 0: none). */
|
|
108
|
+
readonly size: {
|
|
109
|
+
w: number;
|
|
110
|
+
h: number;
|
|
111
|
+
};
|
|
112
|
+
private originBuf;
|
|
113
|
+
private readonly sent;
|
|
114
|
+
private readonly next;
|
|
115
|
+
/** What the layer the targets hold was drawn from — its pass's signature at the draw (K7a); NaN: nothing drawn since made. */
|
|
116
|
+
private readonly drawnFrom;
|
|
117
|
+
/** …and the content it read, by value (the knobs, the records, the view block), with each copy's length. */
|
|
118
|
+
private readonly drawnBytes;
|
|
119
|
+
private readonly drawnLen;
|
|
120
|
+
/** `view`: the slot's view block (`MatPass.view`) — the composite lays the layer through its portal chain (`layerCompositeLayout`). */
|
|
121
|
+
constructor(device: GPUDevice, label: string, layoutComp: GPUBindGroupLayout, samples: number, view: GPUBuffer);
|
|
122
|
+
/** The targets are made (a layer holds device memory). */
|
|
123
|
+
get made(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Fit the targets to `box` [x0, y0, x1, y1] (device px) on an `attach` of its size: made when none are or the box outgrew them,
|
|
126
|
+
* made smaller when they are more than four times its area — never larger than the attachment; the origin written for the
|
|
127
|
+
* composite when it moved.
|
|
128
|
+
*/
|
|
129
|
+
fit(box: readonly [number, number, number, number], attach: {
|
|
130
|
+
readonly w: number;
|
|
131
|
+
readonly h: number;
|
|
132
|
+
}): void;
|
|
133
|
+
/**
|
|
134
|
+
* Begin the layer's pass into the fitted targets: cleared, the viewport the whole `attach` shifted by the origin, the scissor the
|
|
135
|
+
* box — `box` [x0, y0, x1, y1] as fitted.
|
|
136
|
+
*/
|
|
137
|
+
begin(encoder: GPUCommandEncoder, label: string, attach: {
|
|
138
|
+
readonly w: number;
|
|
139
|
+
readonly h: number;
|
|
140
|
+
}, box: readonly [number, number, number, number]): GPURenderPassEncoder;
|
|
141
|
+
/**
|
|
142
|
+
* The layer the targets hold was drawn from exactly `sig` and `bytes` (K7a — every input of its draw the same since: the pass's
|
|
143
|
+
* numbers — its resources' generation, what it lists, the box — and the CONTENT the draw read, compared by value: this target's
|
|
144
|
+
* knobs and records as prepared, the slot's view block. By content, not by version: a held frame's desk copy writes the shared
|
|
145
|
+
* buffers between two of the hand's frames, and the hand's layer is still what they held): it may be laid again undrawn.
|
|
146
|
+
*/
|
|
147
|
+
holds(sig: ArrayLike<number>, bytes: readonly Uint8Array[]): boolean;
|
|
148
|
+
/** The layer was drawn from `sig` and `bytes` (copied; the copies grow once and are reused). */
|
|
149
|
+
drew(sig: ArrayLike<number>, bytes: readonly Uint8Array[]): void;
|
|
150
|
+
/** The targets let go, the origin's uniform with them (the next `fit` makes them again). */
|
|
151
|
+
release(): void;
|
|
152
|
+
dispose(): void;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* How long a layered kind's frame targets (its 4× layer, its resolve; the notebook's shadow maps) stand with none of its objects
|
|
156
|
+
* drawn before the kind lets them go (K6a, design-016 §6 — made again at the next one drawn): render targets at the canvas's size,
|
|
157
|
+
* never a cache the raster budget holds (D-K6a.3).
|
|
158
|
+
*/
|
|
159
|
+
export declare const LAYER_IDLE_MS = 5000;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const VERTEX_FLOATS = 16;
|
|
2
|
+
export declare const VERTEX_BYTES: number;
|
|
3
|
+
/** Flags: a face seen from both sides (a sheet in the air, the spine). */
|
|
4
|
+
export declare const FLAG_TWO_SIDED = 1;
|
|
5
|
+
/** A growable vertex + index writer. */
|
|
6
|
+
export declare class MeshWriter {
|
|
7
|
+
v: Float32Array;
|
|
8
|
+
ix: Uint32Array;
|
|
9
|
+
nv: number;
|
|
10
|
+
ni: number;
|
|
11
|
+
readonly min: [number, number, number];
|
|
12
|
+
readonly max: [number, number, number];
|
|
13
|
+
constructor(vcap?: number, icap?: number);
|
|
14
|
+
reset(): void;
|
|
15
|
+
vert(px: number, py: number, pz: number, nx: number, ny: number, nz: number, u: number, v: number, mat: number, page: number, flags: number, ao: number, sx: number, sy: number, e0?: number, e1?: number): number;
|
|
16
|
+
tri(a: number, b: number, c: number): void;
|
|
17
|
+
quad(a: number, b: number, c: number, d: number): void;
|
|
18
|
+
/** A grid's quads: `cols` × `rows` vertices laid out row-major from `first`. */
|
|
19
|
+
gridQuads(first: number, cols: number, rows: number): void;
|
|
20
|
+
}
|
|
21
|
+
/** A built mesh: views onto the writer's arrays (copy before the next build) and the local bounds. */
|
|
22
|
+
export interface BuiltMesh {
|
|
23
|
+
readonly vertices: Float32Array;
|
|
24
|
+
readonly indices: Uint32Array;
|
|
25
|
+
readonly vcount: number;
|
|
26
|
+
readonly icount: number;
|
|
27
|
+
readonly min: readonly [number, number, number];
|
|
28
|
+
readonly max: readonly [number, number, number];
|
|
29
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { arrivalCamera, type CameraState, FIT, type FitBand, type Flight, flightOpacity, type NavKind, outgoingCamera, type PortalAffine, portalAffine, type Rect, type Viewport, visibleRect } from "../nav/flight";
|
|
2
|
+
export { boxOfPortal, clipOf, PORTAL_GATE, type PortalClip, portalPresence, type Presentation } from "../nav/portal";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PAPER_TEX = 256;
|
|
2
|
+
/** How much of the tooth's slope one step of B/A encodes (the decode multiplies back). */
|
|
3
|
+
export declare const TOOTH_SCALE = 48;
|
|
4
|
+
/** The texture's bytes (deterministic: the same page everywhere, every run). */
|
|
5
|
+
export declare function paperTexture(seed?: number): Uint8Array<ArrayBuffer>;
|