@weasel-js/core 1.9.3 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1106 -0
- package/README.md +7 -5
- package/dist/WeaselProvider.js +5 -7
- package/dist/WeaselProvider.js.map +1 -1
- package/dist/affordances/composeAffordanceLayer.js +91 -93
- package/dist/affordances/composeAffordanceLayer.js.map +1 -1
- package/dist/affordances/cornerResize.js +27 -18
- package/dist/affordances/cornerResize.js.map +1 -1
- package/dist/affordances/hitAffordanceRegions.js +65 -104
- package/dist/affordances/hitAffordanceRegions.js.map +1 -1
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotationHandle.js +22 -21
- package/dist/affordances/rotationHandle.js.map +1 -1
- package/dist/animation/behaviors/coast.js +21 -0
- package/dist/animation/behaviors/coast.js.map +1 -0
- package/dist/animation/behaviors/coastByWrite.js +107 -0
- package/dist/animation/behaviors/coastByWrite.js.map +1 -0
- package/dist/animation/behaviors/coastOnTargets.js +94 -0
- package/dist/animation/behaviors/coastOnTargets.js.map +1 -0
- package/dist/animation/behaviors/momentum.js +38 -88
- package/dist/animation/behaviors/momentum.js.map +1 -1
- package/dist/animation/clipTargets.js +12 -0
- package/dist/animation/clipTargets.js.map +1 -0
- package/dist/animation/index.js +15 -20
- package/dist/animation/poseHelpers.js +112 -33
- package/dist/animation/poseHelpers.js.map +1 -1
- package/dist/animation/poseTarget.js +115 -0
- package/dist/animation/poseTarget.js.map +1 -0
- package/dist/animation/reflow.js +113 -83
- package/dist/animation/reflow.js.map +1 -1
- package/dist/animation/rewind.js +66 -0
- package/dist/animation/rewind.js.map +1 -0
- package/dist/animation/rig/bindRig.js +85 -53
- package/dist/animation/rig/bindRig.js.map +1 -1
- package/dist/animation/rig/rigNode.js +93 -0
- package/dist/animation/rig/rigNode.js.map +1 -0
- package/dist/animation/rig/rigSeat.js +26 -0
- package/dist/animation/rig/rigSeat.js.map +1 -0
- package/dist/animation/rig/skinBinding.js +56 -0
- package/dist/animation/rig/skinBinding.js.map +1 -0
- package/dist/animation/rig/useRig.js +31 -16
- package/dist/animation/rig/useRig.js.map +1 -1
- package/dist/animation/wrappers/animateLifecycle.js +32 -24
- package/dist/animation/wrappers/animateLifecycle.js.map +1 -1
- package/dist/animation/wrappers/animateOnSetPose.js +31 -29
- package/dist/animation/wrappers/animateOnSetPose.js.map +1 -1
- package/dist/animation/wrappers/instantPose.js +13 -0
- package/dist/animation/wrappers/instantPose.js.map +1 -0
- package/dist/animation/writtenPoseTarget.js +33 -0
- package/dist/animation/writtenPoseTarget.js.map +1 -0
- package/dist/{autoPoseDescriptor-vCdt55xm.d.ts → autoPoseDescriptor-DHg5KqaJ.d.ts} +1 -1
- package/dist/barrel/canvas.js +31 -0
- package/dist/barrel/chrome.js +16 -0
- package/dist/barrel/input.js +18 -0
- package/dist/barrel/interactions.js +38 -0
- package/dist/barrel/paint.js +11 -0
- package/dist/barrel/paths.js +12 -0
- package/dist/barrel/renderer.js +14 -0
- package/dist/barrel/routing.js +57 -0
- package/dist/barrel/scene.js +37 -0
- package/dist/barrel/text.js +9 -0
- package/dist/barrel/viewport.js +42 -0
- package/dist/canvas/Canvas.js +280 -559
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +147 -167
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/CursorCoordsHud.js +53 -49
- package/dist/canvas/CursorCoordsHud.js.map +1 -1
- package/dist/canvas/DrawCanvas.js +40 -51
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/ModalityHud.js.map +1 -1
- package/dist/canvas/NodeShape.js +55 -374
- package/dist/canvas/NodeShape.js.map +1 -1
- package/dist/canvas/PickHud.js +50 -47
- package/dist/canvas/PickHud.js.map +1 -1
- package/dist/canvas/SceneCanvas/DevHuds.js +40 -0
- package/dist/canvas/SceneCanvas/DevHuds.js.map +1 -0
- package/dist/canvas/SceneCanvas/GestureDispatcherMounter.js +126 -0
- package/dist/canvas/SceneCanvas/GestureDispatcherMounter.js.map +1 -0
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +27 -31
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js +64 -0
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js.map +1 -0
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js +16 -0
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js.map +1 -0
- package/dist/canvas/SceneCanvas/coordTrace.js +46 -0
- package/dist/canvas/SceneCanvas/coordTrace.js.map +1 -0
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +138 -85
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +9 -8
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -1
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js.map +1 -1
- package/dist/canvas/SceneCanvas/features.js +74 -43
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/isDev.js +12 -0
- package/dist/canvas/SceneCanvas/isDev.js.map +1 -0
- package/dist/canvas/SceneCanvas/poseGeometry.js +31 -34
- package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -1
- package/dist/canvas/SceneCanvas/poseRegistrars.js +13 -0
- package/dist/canvas/SceneCanvas/poseRegistrars.js.map +1 -0
- package/dist/canvas/SceneCanvas/props.js +39 -0
- package/dist/canvas/SceneCanvas/props.js.map +1 -0
- package/dist/canvas/SceneCanvas/toolRegistry.js +23 -0
- package/dist/canvas/SceneCanvas/toolRegistry.js.map +1 -0
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js +6 -1
- package/dist/canvas/SceneCanvas/useActionsPropResolver.js.map +1 -1
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js +21 -62
- package/dist/canvas/SceneCanvas/useBuiltinShapeTools.js.map +1 -1
- package/dist/canvas/SceneCanvas/useBuiltinTools.js +21 -0
- package/dist/canvas/SceneCanvas/useBuiltinTools.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +38 -0
- package/dist/canvas/SceneCanvas/useCanvasCamera.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +20 -0
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasSelection.js +16 -0
- package/dist/canvas/SceneCanvas/useCanvasSelection.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasTools.js +67 -0
- package/dist/canvas/SceneCanvas/useCanvasTools.js.map +1 -0
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +29 -29
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useHeldModifiers.js +20 -0
- package/dist/canvas/SceneCanvas/useHeldModifiers.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js +26 -0
- package/dist/canvas/SceneCanvas/useNodeAtPoint.js.map +1 -0
- package/dist/canvas/SceneCanvas/useNodeKinds.js +26 -0
- package/dist/canvas/SceneCanvas/useNodeKinds.js.map +1 -0
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +48 -48
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js +47 -0
- package/dist/canvas/SceneCanvas/useSceneCanvasHandle.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js +66 -0
- package/dist/canvas/SceneCanvas/useSceneCanvasLayers.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSceneChrome.js +59 -0
- package/dist/canvas/SceneCanvas/useSceneChrome.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js +23 -0
- package/dist/canvas/SceneCanvas/useSceneRedrawSources.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +74 -78
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js +37 -0
- package/dist/canvas/SceneCanvas/useSceneSlotLayers.js.map +1 -0
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js +38 -0
- package/dist/canvas/SceneCanvas/useSelectionOverlayLayer.js.map +1 -0
- package/dist/canvas/SceneCanvas/useViewLayerGate.js +20 -0
- package/dist/canvas/SceneCanvas/useViewLayerGate.js.map +1 -0
- package/dist/canvas/SceneCanvas/useViewportActions.js +9 -1
- package/dist/canvas/SceneCanvas/useViewportActions.js.map +1 -1
- package/dist/canvas/SceneCanvas/worldPointAt.js +9 -0
- package/dist/canvas/SceneCanvas/worldPointAt.js.map +1 -0
- package/dist/canvas/SceneCanvas.js +311 -969
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +42 -46
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/adapterDerivedPath.js +26 -0
- package/dist/canvas/adapterDerivedPath.js.map +1 -0
- package/dist/canvas/affordanceAt.js +11 -1
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +111 -0
- package/dist/canvas/buildSceneLayer.js.map +1 -0
- package/dist/canvas/buildSceneTree.js +16 -19
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/canvasRenderer.js +67 -55
- package/dist/canvas/canvasRenderer.js.map +1 -1
- package/dist/canvas/colorOverrides.js.map +1 -1
- package/dist/canvas/defaultDrawOne.js +12 -12
- package/dist/canvas/defaultDrawOne.js.map +1 -1
- package/dist/canvas/deps/areaSelect.js +4 -4
- package/dist/canvas/deps/areaSelect.js.map +1 -1
- package/dist/canvas/deps/changes.js +13 -0
- package/dist/canvas/deps/changes.js.map +1 -0
- package/dist/canvas/deps/debug.js.map +1 -1
- package/dist/canvas/deps/editAnchors.js +38 -57
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/geometryProjection.js.map +1 -1
- package/dist/canvas/deps/hitTestArea.js +31 -26
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/insert.js +130 -91
- package/dist/canvas/deps/insert.js.map +1 -1
- package/dist/canvas/deps/lassoSelect.js +5 -5
- package/dist/canvas/deps/lassoSelect.js.map +1 -1
- package/dist/canvas/deps/poseDescriptor.js +1 -1
- package/dist/canvas/deps/poseDescriptor.js.map +1 -1
- package/dist/canvas/deps/resizePolicy.js.map +1 -1
- package/dist/canvas/deps/slice.js +26 -26
- package/dist/canvas/deps/slice.js.map +1 -1
- package/dist/canvas/deps/textEdit.js +6 -5
- package/dist/canvas/deps/textEdit.js.map +1 -1
- package/dist/canvas/deps/view.js.map +1 -1
- package/dist/canvas/derivedPath.js +47 -22
- package/dist/canvas/derivedPath.js.map +1 -1
- package/dist/canvas/drawEnvelope.js +8 -4
- package/dist/canvas/drawEnvelope.js.map +1 -1
- package/dist/canvas/getNodeAtPoint.js +4 -8
- package/dist/canvas/getNodeAtPoint.js.map +1 -1
- package/dist/canvas/hud.module.js +1 -1
- package/dist/canvas/hud.module.js.map +1 -1
- package/dist/canvas/insertPreviewExtent.js.map +1 -1
- package/dist/canvas/kitRequirements.js +2 -2
- package/dist/canvas/kitRequirements.js.map +1 -1
- package/dist/canvas/layerOrder.js +13 -6
- package/dist/canvas/layerOrder.js.map +1 -1
- package/dist/canvas/layerSlots.js +6 -1
- package/dist/canvas/layerSlots.js.map +1 -1
- package/dist/canvas/nodeShapes/derivedPainter.js +34 -0
- package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/imagePainter.js +87 -0
- package/dist/canvas/nodeShapes/imagePainter.js.map +1 -0
- package/dist/canvas/nodeShapes/memo.js +9 -0
- package/dist/canvas/nodeShapes/memo.js.map +1 -0
- package/dist/canvas/nodeShapes/nodePaint.js +68 -0
- package/dist/canvas/nodeShapes/nodePaint.js.map +1 -0
- package/dist/canvas/nodeShapes/pathPainter.js +39 -0
- package/dist/canvas/nodeShapes/pathPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/poseBox.js +20 -0
- package/dist/canvas/nodeShapes/poseBox.js.map +1 -0
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +38 -0
- package/dist/canvas/nodeShapes/rectFallbackPainter.js.map +1 -0
- package/dist/canvas/nodeShapes/shapePainter.js +72 -0
- package/dist/canvas/nodeShapes/shapePainter.js.map +1 -0
- package/dist/canvas/nodeShapes/textPainter.js +55 -0
- package/dist/canvas/nodeShapes/textPainter.js.map +1 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -1
- package/dist/canvas/paintCull.js +11 -14
- package/dist/canvas/paintCull.js.map +1 -1
- package/dist/{features/cursor → canvas}/paintedCursorLayer.js +2 -2
- package/dist/canvas/paintedCursorLayer.js.map +1 -0
- package/dist/canvas/pickWalk.js +59 -68
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/planeClips.js +18 -19
- package/dist/canvas/planeClips.js.map +1 -1
- package/dist/canvas/poseCascade.js +41 -0
- package/dist/canvas/poseCascade.js.map +1 -0
- package/dist/canvas/poseRotation.js +9 -23
- package/dist/canvas/poseRotation.js.map +1 -1
- package/dist/canvas/rasterReadback.js +22 -0
- package/dist/canvas/rasterReadback.js.map +1 -0
- package/dist/canvas/renderDebugSnapshot.js +11 -11
- package/dist/canvas/renderDebugSnapshot.js.map +1 -1
- package/dist/canvas/renderNeeds.js +3 -3
- package/dist/canvas/renderNeeds.js.map +1 -1
- package/dist/canvas/renderSceneToPixels.js +64 -81
- package/dist/canvas/renderSceneToPixels.js.map +1 -1
- package/dist/canvas/sceneAdapter.js +68 -214
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +112 -0
- package/dist/canvas/sceneClipboard.js.map +1 -0
- package/dist/canvas/sceneLayerPaint.js +4 -4
- package/dist/canvas/sceneLayerPaint.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +39 -39
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/slopsDebugLayer.js +4 -4
- package/dist/canvas/slopsDebugLayer.js.map +1 -1
- package/dist/canvas/surface.module.js +6 -0
- package/dist/canvas/surface.module.js.map +1 -0
- package/dist/canvas/surfaceBox.js +16 -0
- package/dist/canvas/surfaceBox.js.map +1 -0
- package/dist/canvas/useCanvasRenderer.js +26 -6
- package/dist/canvas/useCanvasRenderer.js.map +1 -1
- package/dist/canvas/useCanvasSurface.js +31 -0
- package/dist/canvas/useCanvasSurface.js.map +1 -0
- package/dist/canvas/useCanvasView.js +67 -0
- package/dist/canvas/useCanvasView.js.map +1 -0
- package/dist/canvas/useFrameLoop.js +39 -31
- package/dist/canvas/useFrameLoop.js.map +1 -1
- package/dist/canvas/useHostAnchor.js +35 -33
- package/dist/canvas/useHostAnchor.js.map +1 -1
- package/dist/canvas/useLateContentRedraw.js +8 -8
- package/dist/canvas/useLateContentRedraw.js.map +1 -1
- package/dist/canvas/useSceneLayerList.js +11 -0
- package/dist/canvas/useSceneLayerList.js.map +1 -0
- package/dist/canvas/useSurfaceInput.js +42 -0
- package/dist/canvas/useSurfaceInput.js.map +1 -0
- package/dist/canvas/useToolCursor.js +29 -0
- package/dist/canvas/useToolCursor.js.map +1 -0
- package/dist/canvas/useViewHelpers.js +46 -85
- package/dist/canvas/useViewHelpers.js.map +1 -1
- package/dist/canvas/viewInputs.js.map +1 -1
- package/dist/canvas/viewRegistry.js +25 -27
- package/dist/canvas/viewRegistry.js.map +1 -1
- package/dist/canvas/watchElementMove.js +43 -0
- package/dist/canvas/watchElementMove.js.map +1 -0
- package/dist/canvas/wrapNodeOutput.js.map +1 -1
- package/dist/clipboard.d.ts +16 -19
- package/dist/{types-B_9g6hMM.d.ts → clone-2a5hVbBd.d.ts} +123 -74
- package/dist/clone.d.ts +4 -7
- package/dist/clone.js +0 -2
- package/dist/core/device/index.js +5 -4
- package/dist/core/device/targets.js.map +1 -1
- package/dist/core/device/useDeviceProfile.js +38 -44
- package/dist/core/device/useDeviceProfile.js.map +1 -1
- package/dist/core/device/watchDevicePixelRatio.js +17 -0
- package/dist/core/device/watchDevicePixelRatio.js.map +1 -0
- package/dist/{interactions/actions/resize → core/geometry}/autoPoseDescriptor.js +8 -7
- package/dist/core/geometry/autoPoseDescriptor.js.map +1 -0
- package/dist/core/geometry/pathPoseDescriptor.js +88 -0
- package/dist/core/geometry/pathPoseDescriptor.js.map +1 -0
- package/dist/core/geometry/poseDescriptor.js +68 -19
- package/dist/core/geometry/poseDescriptor.js.map +1 -1
- package/dist/core/geometry/regionHit.js +31 -34
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/targetFrame.js +94 -0
- package/dist/core/geometry/targetFrame.js.map +1 -0
- package/dist/core/geometry/unionBounds.js +30 -29
- package/dist/core/geometry/unionBounds.js.map +1 -1
- package/dist/core/isPlainObject.js +2 -11
- package/dist/core/layers/backgroundFill.js +31 -0
- package/dist/core/layers/backgroundFill.js.map +1 -0
- package/dist/{features/groups → core/layers}/children.js +1 -1
- package/dist/core/layers/children.js.map +1 -0
- package/dist/core/layers/gateLayer.js +13 -0
- package/dist/core/layers/gateLayer.js.map +1 -0
- package/dist/core/layers/layerGroup.js +40 -0
- package/dist/core/layers/layerGroup.js.map +1 -0
- package/dist/core/layers/render.js +50 -76
- package/dist/core/layers/render.js.map +1 -1
- package/dist/core/ops/arrange.js +1 -0
- package/dist/core/ops/arrange.js.map +1 -1
- package/dist/core/ops/create.js +10 -5
- package/dist/core/ops/create.js.map +1 -1
- package/dist/core/ops/createHistory.js +9 -9
- package/dist/core/ops/createHistory.js.map +1 -1
- package/dist/core/ops/delete.js +12 -24
- package/dist/core/ops/delete.js.map +1 -1
- package/dist/core/ops/reorder/index.js +43 -40
- package/dist/core/ops/reorder/index.js.map +1 -1
- package/dist/core/ops/reorder/setChildOrder.js +34 -0
- package/dist/core/ops/reorder/setChildOrder.js.map +1 -0
- package/dist/core/paint/meshKind.js +16 -0
- package/dist/core/paint/meshKind.js.map +1 -0
- package/dist/{features/meshPaint/lazyKind.js → core/paint/meshKindLazy.js} +282 -105
- package/dist/core/paint/meshKindLazy.js.map +1 -0
- package/dist/core/paint/paintKindEntry.js +8 -0
- package/dist/core/paint/paintKindEntry.js.map +1 -0
- package/dist/core/paint/paintKinds.js +144 -0
- package/dist/core/paint/paintKinds.js.map +1 -0
- package/dist/core/paint/registerMesh.js +7 -0
- package/dist/core/paint/registerMesh.js.map +1 -0
- package/dist/core/scene/NodeProperties.js.map +1 -1
- package/dist/core/scene/NodeRouting.js.map +1 -1
- package/dist/core/scene/appliedLog.js +37 -0
- package/dist/core/scene/appliedLog.js.map +1 -0
- package/dist/core/scene/arrivalWindow.js +102 -0
- package/dist/core/scene/arrivalWindow.js.map +1 -0
- package/dist/core/scene/boundOps.js +40 -0
- package/dist/core/scene/boundOps.js.map +1 -0
- package/dist/core/scene/composeFrame.js +9 -6
- package/dist/core/scene/composeFrame.js.map +1 -1
- package/dist/{features/groups → core/scene}/composePose.js +18 -18
- package/dist/core/scene/composePose.js.map +1 -0
- package/dist/core/scene/depMemo.js +31 -6
- package/dist/core/scene/depMemo.js.map +1 -1
- package/dist/core/scene/derivedPath.js +19 -20
- package/dist/core/scene/derivedPath.js.map +1 -1
- package/dist/core/scene/editMode.js +26 -0
- package/dist/core/scene/editMode.js.map +1 -0
- package/dist/core/scene/effectivePose.js +38 -39
- package/dist/core/scene/effectivePose.js.map +1 -1
- package/dist/core/scene/fieldEdits.js +98 -0
- package/dist/core/scene/fieldEdits.js.map +1 -0
- package/dist/core/scene/historyFacade.js +130 -0
- package/dist/core/scene/historyFacade.js.map +1 -0
- package/dist/core/scene/historyForm.js +6 -0
- package/dist/core/scene/historyForm.js.map +1 -0
- package/dist/core/scene/kitOps.js +185 -0
- package/dist/core/scene/kitOps.js.map +1 -0
- package/dist/core/scene/kitRegistry.js.map +1 -1
- package/dist/core/scene/layerStack.js +131 -0
- package/dist/core/scene/layerStack.js.map +1 -0
- package/dist/core/scene/layoutPass.js +58 -59
- package/dist/core/scene/layoutPass.js.map +1 -1
- package/dist/core/scene/lockGuard.js +37 -0
- package/dist/core/scene/lockGuard.js.map +1 -0
- package/dist/{features/groups → core/scene}/nestedHit.js +3 -3
- package/dist/core/scene/nestedHit.js.map +1 -0
- package/dist/core/scene/nodeFnFields.js +10 -11
- package/dist/core/scene/nodeFnFields.js.map +1 -1
- package/dist/core/scene/nodeMemo.js +45 -19
- package/dist/core/scene/nodeMemo.js.map +1 -1
- package/dist/core/scene/nodeStore.js +127 -0
- package/dist/core/scene/nodeStore.js.map +1 -0
- package/dist/core/scene/notifier.js +37 -0
- package/dist/core/scene/notifier.js.map +1 -0
- package/dist/core/scene/opTable.js +50 -0
- package/dist/core/scene/opTable.js.map +1 -0
- package/dist/core/scene/outerOps.js +66 -0
- package/dist/core/scene/outerOps.js.map +1 -0
- package/dist/core/scene/poseFeed.js +38 -38
- package/dist/core/scene/poseFeed.js.map +1 -1
- package/dist/core/scene/poseHold.js +39 -0
- package/dist/core/scene/poseHold.js.map +1 -0
- package/dist/core/scene/poseOverrides.js +44 -40
- package/dist/core/scene/poseOverrides.js.map +1 -1
- package/dist/core/scene/poseSnapshot.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +3 -2
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/recorder.js +86 -0
- package/dist/core/scene/recorder.js.map +1 -0
- package/dist/core/scene/renderOrder.js +84 -0
- package/dist/core/scene/renderOrder.js.map +1 -0
- package/dist/core/scene/scene.js +80 -1266
- package/dist/core/scene/scene.js.map +1 -1
- package/dist/core/scene/sceneEdits.js +58 -0
- package/dist/core/scene/sceneEdits.js.map +1 -0
- package/dist/core/scene/sceneMutators.js +49 -0
- package/dist/core/scene/sceneMutators.js.map +1 -0
- package/dist/core/scene/scenePoseAdapter.js +16 -0
- package/dist/core/scene/scenePoseAdapter.js.map +1 -0
- package/dist/core/scene/sceneRecording.js +90 -0
- package/dist/core/scene/sceneRecording.js.map +1 -0
- package/dist/core/scene/sceneSelection.js +28 -0
- package/dist/core/scene/sceneSelection.js.map +1 -0
- package/dist/core/scene/sceneState.js +49 -0
- package/dist/core/scene/sceneState.js.map +1 -0
- package/dist/core/scene/serialization.js +71 -0
- package/dist/core/scene/serialization.js.map +1 -0
- package/dist/core/scene/staleReplay.js +51 -0
- package/dist/core/scene/staleReplay.js.map +1 -0
- package/dist/core/scene/statedFields.js +9 -0
- package/dist/core/scene/statedFields.js.map +1 -0
- package/dist/core/scene/treeEdits.js +127 -0
- package/dist/core/scene/treeEdits.js.map +1 -0
- package/dist/core/scene/treeOrder.js +13 -0
- package/dist/core/scene/treeOrder.js.map +1 -0
- package/dist/core/scene/treeReads.js +26 -0
- package/dist/core/scene/treeReads.js.map +1 -0
- package/dist/core/scene/types.js.map +1 -1
- package/dist/{features/groups → core/scene}/unionOfChildren.js +3 -3
- package/dist/core/scene/unionOfChildren.js.map +1 -0
- package/dist/core/scene/unitScopes.js +13 -0
- package/dist/core/scene/unitScopes.js.map +1 -0
- package/dist/core/scene/useScene.js.map +1 -1
- package/dist/core/selection/readOnlySelection.js +32 -0
- package/dist/core/selection/readOnlySelection.js.map +1 -0
- package/dist/core/selection/usePublishSceneSelection.js +26 -0
- package/dist/core/selection/usePublishSceneSelection.js.map +1 -0
- package/dist/core/selection/useSelection.js +34 -25
- package/dist/core/selection/useSelection.js.map +1 -1
- package/dist/core/shapeKinds.js.map +1 -1
- package/dist/core/stylus/stylus.js.map +1 -1
- package/dist/core/stylus/usePointerStylus.js.map +1 -1
- package/dist/core/usePaintKinds.js +1 -1
- package/dist/core/usePaintKinds.js.map +1 -1
- package/dist/core/viewport/clientToWorld.js.map +1 -1
- package/dist/core/viewport/fitViewToBounds.js.map +1 -1
- package/dist/core/viewport/parallax.js.map +1 -1
- package/dist/core/viewport/screenSlop.js +11 -11
- package/dist/core/viewport/screenSlop.js.map +1 -1
- package/dist/core/viewport/useCanvasSize.js.map +1 -1
- package/dist/core/viewport/useDecayLoop.js +8 -8
- package/dist/core/viewport/useDecayLoop.js.map +1 -1
- package/dist/core/viewport/useNodeOverlayFrame.js +84 -0
- package/dist/core/viewport/useNodeOverlayFrame.js.map +1 -0
- package/dist/core/viewport/useViewAnimation.js +102 -43
- package/dist/core/viewport/useViewAnimation.js.map +1 -1
- package/dist/core/viewport/view.js +9 -9
- package/dist/core/viewport/view.js.map +1 -1
- package/dist/core/viewport/wheelHandler.js.map +1 -1
- package/dist/core/viewport/zoomBounds.js +10 -8
- package/dist/core/viewport/zoomBounds.js.map +1 -1
- package/dist/{cornerHandles-BCrDp_mH.d.ts → cornerHandles-BEshc4z3.d.ts} +11 -24
- package/dist/debug/createDebugOverlayLayer.js +97 -97
- package/dist/debug/createDebugOverlayLayer.js.map +1 -1
- package/dist/debug/createDebugSink.js.map +1 -1
- package/dist/debug/flag.js +2 -41
- package/dist/debug/frameStats.js.map +1 -1
- package/dist/debug/useDebugSink.js +52 -0
- package/dist/debug/useDebugSink.js.map +1 -0
- package/dist/features/chrome-caps/buildChromeCtx.js.map +1 -1
- package/dist/features/chrome-caps/conditions.js.map +1 -1
- package/dist/features/chrome-caps/defaults.js.map +1 -1
- package/dist/features/chrome-caps/resolve.js.map +1 -1
- package/dist/features/chrome-caps/useChromeCaps.js +54 -0
- package/dist/features/chrome-caps/useChromeCaps.js.map +1 -0
- package/dist/features/chrome-caps/useHoverTracking.js +22 -17
- package/dist/features/chrome-caps/useHoverTracking.js.map +1 -1
- package/dist/features/ingestion/contentHandlers.js +28 -19
- package/dist/features/ingestion/contentHandlers.js.map +1 -1
- package/dist/features/ingestion/imageHandler.js +21 -24
- package/dist/features/ingestion/imageHandler.js.map +1 -1
- package/dist/features/ingestion/openFilePicker.js.map +1 -1
- package/dist/features/ingestion/placement.js +16 -0
- package/dist/features/ingestion/placement.js.map +1 -0
- package/dist/features/ingestion/registerKitHandlers.js +7 -7
- package/dist/features/ingestion/svgHandler.js +5 -0
- package/dist/features/ingestion/svgHandler.js.map +1 -1
- package/dist/features/ingestion/textHandler.js +28 -0
- package/dist/features/ingestion/textHandler.js.map +1 -0
- package/dist/features/ingestion/useCanvasIngestion.js +48 -0
- package/dist/features/ingestion/useCanvasIngestion.js.map +1 -0
- package/dist/features/ingestion/weaselJsonHandler.js +22 -14
- package/dist/features/ingestion/weaselJsonHandler.js.map +1 -1
- package/dist/features/longPress/longPressFeedback.js.map +1 -1
- package/dist/features/modes/modeLayers.js +7 -7
- package/dist/features/modes/modeLayers.js.map +1 -1
- package/dist/features/paths/editablePath.js +47 -0
- package/dist/features/paths/editablePath.js.map +1 -0
- package/dist/features/paths/index.js +9 -14
- package/dist/features/paths/pathEditState.js +41 -0
- package/dist/features/paths/pathEditState.js.map +1 -0
- package/dist/features/paths/pathEditingOverlayLayer.js +36 -38
- package/dist/features/paths/pathEditingOverlayLayer.js.map +1 -1
- package/dist/features/paths/pathLayer.js +3 -2
- package/dist/features/paths/pathLayer.js.map +1 -1
- package/dist/features/paths/penPreviewLayer.js +86 -88
- package/dist/features/paths/penPreviewLayer.js.map +1 -1
- package/dist/features/paths/usePathEdit.js +34 -0
- package/dist/features/paths/usePathEdit.js.map +1 -0
- package/dist/features/poseRun/usePoseRun.js +44 -52
- package/dist/features/poseRun/usePoseRun.js.map +1 -1
- package/dist/features/selection/overlay.js +171 -179
- package/dist/features/selection/overlay.js.map +1 -1
- package/dist/features/text/index.js +6 -0
- package/dist/features/text/textLayer.js +1 -1
- package/dist/features/text/textLayer.js.map +1 -1
- package/dist/features/text/useSceneTextEdit.js +100 -93
- package/dist/features/text/useSceneTextEdit.js.map +1 -1
- package/dist/features/viewports/viewportLayer.js +25 -36
- package/dist/features/viewports/viewportLayer.js.map +1 -1
- package/dist/index.d.ts +8473 -9141
- package/dist/index.js +269 -307
- package/dist/input/keyState.js +38 -39
- package/dist/input/keyState.js.map +1 -1
- package/dist/input/useKeyModifiers.js +11 -0
- package/dist/input/useKeyModifiers.js.map +1 -0
- package/dist/interactions/actions/actionShortcuts.js.map +1 -1
- package/dist/interactions/actions/{defaults/align.js → align/action.js} +18 -20
- package/dist/interactions/actions/align/action.js.map +1 -0
- package/dist/interactions/actions/align/align.js +20 -20
- package/dist/interactions/actions/align/align.js.map +1 -1
- package/dist/interactions/actions/booleans/action.js +65 -0
- package/dist/interactions/actions/booleans/action.js.map +1 -0
- package/dist/interactions/actions/booleans/booleans.js +69 -78
- package/dist/interactions/actions/booleans/booleans.js.map +1 -1
- package/dist/interactions/actions/booleans/operands.js +40 -0
- package/dist/interactions/actions/booleans/operands.js.map +1 -0
- package/dist/interactions/actions/booleans/pieces.js +45 -0
- package/dist/interactions/actions/booleans/pieces.js.map +1 -0
- package/dist/interactions/actions/booleans/placement.js +24 -0
- package/dist/interactions/actions/booleans/placement.js.map +1 -0
- package/dist/interactions/actions/booleans/useBooleans.js +11 -9
- package/dist/interactions/actions/booleans/useBooleans.js.map +1 -1
- package/dist/interactions/actions/booleans/useBooleansAdapter.js.map +1 -1
- package/dist/interactions/actions/{defaults/clipboard.js → clipboard/action.js} +31 -15
- package/dist/interactions/actions/clipboard/action.js.map +1 -0
- package/dist/interactions/actions/clipboard/clipboardOps.js +44 -42
- package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
- package/dist/interactions/actions/clipboard/materializePaste.js +10 -7
- package/dist/interactions/actions/clipboard/materializePaste.js.map +1 -1
- package/dist/interactions/actions/clipboard/wireFormat.js.map +1 -1
- package/dist/interactions/actions/clone/action.js +98 -0
- package/dist/interactions/actions/clone/action.js.map +1 -0
- package/dist/interactions/actions/clone/behaviors.js +52 -0
- package/dist/interactions/actions/clone/behaviors.js.map +1 -0
- package/dist/interactions/actions/defaultCommitAdapter.js +7 -32
- package/dist/interactions/actions/defaultCommitAdapter.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +60 -84
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/areaSelect.js +35 -38
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/cancelGesture.js.map +1 -1
- package/dist/interactions/actions/defaults/clearSelection.js.map +1 -1
- package/dist/interactions/actions/defaults/copySubtree.js +40 -0
- package/dist/interactions/actions/defaults/copySubtree.js.map +1 -0
- package/dist/interactions/actions/defaults/createPaintAction.js.map +1 -1
- package/dist/interactions/actions/defaults/delete.js.map +1 -1
- package/dist/interactions/actions/defaults/duplicate.js +13 -53
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/enterTextEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +40 -50
- package/dist/interactions/actions/defaults/group.js.map +1 -1
- package/dist/interactions/actions/defaults/icons/booleanIcons.js +24 -1
- package/dist/interactions/actions/defaults/icons/booleanIcons.js.map +1 -1
- package/dist/interactions/actions/defaults/icons/outlineIcons.js +39 -1
- package/dist/interactions/actions/defaults/icons/outlineIcons.js.map +1 -1
- package/dist/interactions/actions/defaults/ingest.js +44 -38
- package/dist/interactions/actions/defaults/ingest.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +11 -12
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
- package/dist/interactions/actions/defaults/nudge.js +40 -69
- package/dist/interactions/actions/defaults/nudge.js.map +1 -1
- package/dist/interactions/actions/defaults/nudgeSteps.js +37 -0
- package/dist/interactions/actions/defaults/nudgeSteps.js.map +1 -0
- package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -1
- package/dist/interactions/actions/defaults/reorder.js +2 -0
- package/dist/interactions/actions/defaults/reorder.js.map +1 -1
- package/dist/interactions/actions/defaults/requiresSelection.js.map +1 -1
- package/dist/interactions/actions/defaults/setFill.js +14 -8
- package/dist/interactions/actions/defaults/setFill.js.map +1 -1
- package/dist/interactions/actions/defaults/setFillOpacity.js +7 -4
- package/dist/interactions/actions/defaults/setFillOpacity.js.map +1 -1
- package/dist/interactions/actions/defaults/setStroke.js +12 -12
- package/dist/interactions/actions/defaults/setStroke.js.map +1 -1
- package/dist/interactions/actions/defaults/setStrokeOpacity.js +6 -6
- package/dist/interactions/actions/defaults/sliceOps.js +8 -10
- package/dist/interactions/actions/defaults/sliceOps.js.map +1 -1
- package/dist/interactions/actions/defaults/toolActivate.js.map +1 -1
- package/dist/interactions/actions/defaults/toolResetToDefault.js.map +1 -1
- package/dist/interactions/actions/defaults/viewportDragPan.js +37 -26
- package/dist/interactions/actions/defaults/viewportDragPan.js.map +1 -1
- package/dist/interactions/actions/defaults/viewportWheelPan.js.map +1 -1
- package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -1
- package/dist/interactions/actions/distribute/action.js +66 -0
- package/dist/interactions/actions/distribute/action.js.map +1 -0
- package/dist/interactions/actions/distribute/distribute.js +11 -11
- package/dist/interactions/actions/distribute/distribute.js.map +1 -1
- package/dist/interactions/actions/{defaults/editAnchors.js → edit-anchors/action.js} +7 -9
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/geometry.js +30 -27
- package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
- package/dist/interactions/actions/flip/action.js +124 -0
- package/dist/interactions/actions/flip/action.js.map +1 -0
- package/dist/interactions/actions/flip/helpers.js +30 -17
- package/dist/interactions/actions/flip/helpers.js.map +1 -1
- package/dist/interactions/actions/gestureFrames.js +18 -0
- package/dist/interactions/actions/gestureFrames.js.map +1 -0
- package/dist/interactions/actions/gestureLifecycle.js +47 -20
- package/dist/interactions/actions/gestureLifecycle.js.map +1 -1
- package/dist/interactions/actions/hitSelection.js +8 -0
- package/dist/interactions/actions/hitSelection.js.map +1 -0
- package/dist/interactions/actions/insert/action.js +72 -0
- package/dist/interactions/actions/insert/action.js.map +1 -0
- package/dist/interactions/actions/insert/commit.js +28 -0
- package/dist/interactions/actions/insert/commit.js.map +1 -0
- package/dist/interactions/actions/insert/extras.js +65 -0
- package/dist/interactions/actions/insert/extras.js.map +1 -0
- package/dist/interactions/actions/insert/frame.js +48 -0
- package/dist/interactions/actions/insert/frame.js.map +1 -0
- package/dist/interactions/actions/insert/geometry.js +35 -0
- package/dist/interactions/actions/insert/geometry.js.map +1 -0
- package/dist/interactions/actions/insert/rotateAction.js +21 -0
- package/dist/interactions/actions/insert/rotateAction.js.map +1 -0
- package/dist/interactions/actions/insert/session.js +59 -0
- package/dist/interactions/actions/insert/session.js.map +1 -0
- package/dist/interactions/actions/insert/shape.js +34 -0
- package/dist/interactions/actions/insert/shape.js.map +1 -0
- package/dist/interactions/actions/lasso-select/action.js +143 -0
- package/dist/interactions/actions/lasso-select/action.js.map +1 -0
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js +14 -18
- package/dist/interactions/actions/lasso-select/behaviors/selectFromLasso.js.map +1 -1
- package/dist/interactions/actions/move/action.js +87 -0
- package/dist/interactions/actions/move/action.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/layoutDrop.js +51 -0
- package/dist/interactions/actions/move/behaviors/layoutDrop.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js +15 -0
- package/dist/interactions/actions/move/behaviors/reparentOnDrop.js.map +1 -0
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js +5 -5
- package/dist/interactions/actions/move/behaviors/snapBackOrDelete.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +39 -27
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
- package/dist/interactions/actions/move/capture.js +99 -0
- package/dist/interactions/actions/move/capture.js.map +1 -0
- package/dist/interactions/actions/move/commit/index.js +41 -0
- package/dist/interactions/actions/move/commit/index.js.map +1 -0
- package/dist/interactions/actions/move/commit/layoutDrop.js +44 -0
- package/dist/interactions/actions/move/commit/layoutDrop.js.map +1 -0
- package/dist/interactions/actions/move/commit/layoutRelease.js +100 -0
- package/dist/interactions/actions/move/commit/layoutRelease.js.map +1 -0
- package/dist/interactions/actions/move/commit/rebase.js +18 -0
- package/dist/interactions/actions/move/commit/rebase.js.map +1 -0
- package/dist/interactions/actions/move/commit/reparent.js +65 -0
- package/dist/interactions/actions/move/commit/reparent.js.map +1 -0
- package/dist/interactions/actions/move/delta.js +51 -0
- package/dist/interactions/actions/move/delta.js.map +1 -0
- package/dist/interactions/actions/move/frame.js +59 -0
- package/dist/interactions/actions/move/frame.js.map +1 -0
- package/dist/interactions/actions/move/gestureAdapter.js +22 -30
- package/dist/interactions/actions/move/gestureAdapter.js.map +1 -1
- package/dist/interactions/actions/move/landedDescendants.js +33 -0
- package/dist/interactions/actions/move/landedDescendants.js.map +1 -0
- package/dist/interactions/actions/move/layout/container.js +94 -0
- package/dist/interactions/actions/move/layout/container.js.map +1 -0
- package/dist/interactions/actions/move/layout/dragged.js +58 -0
- package/dist/interactions/actions/move/layout/dragged.js.map +1 -0
- package/dist/interactions/actions/move/layout/dropPass.js +122 -0
- package/dist/interactions/actions/move/layout/dropPass.js.map +1 -0
- package/dist/interactions/actions/move/layout/exits.js +38 -0
- package/dist/interactions/actions/move/layout/exits.js.map +1 -0
- package/dist/interactions/actions/move/layout/glide.js +48 -0
- package/dist/interactions/actions/move/layout/glide.js.map +1 -0
- package/dist/interactions/actions/move/session.js +63 -0
- package/dist/interactions/actions/move/session.js.map +1 -0
- package/dist/interactions/actions/move/translate.js +61 -0
- package/dist/interactions/actions/move/translate.js.map +1 -0
- package/dist/interactions/actions/outlines/createOutlines.js +16 -63
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -1
- package/dist/interactions/actions/outlines/createOutlinesAction.js +51 -0
- package/dist/interactions/actions/outlines/createOutlinesAction.js.map +1 -0
- package/dist/interactions/actions/outlines/outlineStroke.js +72 -0
- package/dist/interactions/actions/outlines/outlineStroke.js.map +1 -0
- package/dist/interactions/actions/outlines/outlineStrokeAction.js +37 -0
- package/dist/interactions/actions/outlines/outlineStrokeAction.js.map +1 -0
- package/dist/interactions/actions/outlines/replaceWithPaths.js +54 -0
- package/dist/interactions/actions/outlines/replaceWithPaths.js.map +1 -0
- package/dist/interactions/actions/outlines/strokeRegion.js +27 -0
- package/dist/interactions/actions/outlines/strokeRegion.js.map +1 -0
- package/dist/interactions/actions/planeInput.js.map +1 -1
- package/dist/interactions/actions/pointerState.js +12 -0
- package/dist/interactions/actions/pointerState.js.map +1 -0
- package/dist/interactions/actions/poseDescriptorDep.js +16 -4
- package/dist/interactions/actions/poseDescriptorDep.js.map +1 -1
- package/dist/interactions/actions/poseFrame.js +25 -20
- package/dist/interactions/actions/poseFrame.js.map +1 -1
- package/dist/interactions/actions/resize/action.js +55 -0
- package/dist/interactions/actions/resize/action.js.map +1 -0
- package/dist/interactions/actions/resize/behaviors/lockAspect.js.map +1 -1
- package/dist/interactions/actions/resize/boxFrame.js +16 -0
- package/dist/interactions/actions/resize/boxFrame.js.map +1 -0
- package/dist/interactions/actions/resize/capture.js +85 -0
- package/dist/interactions/actions/resize/capture.js.map +1 -0
- package/dist/interactions/actions/resize/commit.js +69 -0
- package/dist/interactions/actions/resize/commit.js.map +1 -0
- package/dist/interactions/actions/resize/frame.js +74 -0
- package/dist/interactions/actions/resize/frame.js.map +1 -0
- package/dist/interactions/actions/resize/pointSnap.js +111 -0
- package/dist/interactions/actions/resize/pointSnap.js.map +1 -0
- package/dist/interactions/actions/resize/ruleBounds.js +9 -0
- package/dist/interactions/actions/resize/ruleBounds.js.map +1 -0
- package/dist/interactions/actions/resize/session.js +49 -0
- package/dist/interactions/actions/resize/session.js.map +1 -0
- package/dist/interactions/actions/resolveOverlays.js.map +1 -1
- package/dist/interactions/actions/resolvePreviews.js.map +1 -1
- package/dist/interactions/actions/rotate/action.js +56 -0
- package/dist/interactions/actions/rotate/action.js.map +1 -0
- package/dist/interactions/actions/rotate/behaviors/index.js +7 -0
- package/dist/interactions/actions/rotate/behaviors/index.js.map +1 -0
- package/dist/interactions/actions/rotate/behaviors/snapRotation.js +12 -0
- package/dist/interactions/actions/rotate/behaviors/snapRotation.js.map +1 -0
- package/dist/interactions/actions/rotate/commit.js +40 -0
- package/dist/interactions/actions/rotate/commit.js.map +1 -0
- package/dist/interactions/actions/rotate/frame.js +65 -0
- package/dist/interactions/actions/rotate/frame.js.map +1 -0
- package/dist/interactions/actions/rotate/handle.js +12 -12
- package/dist/interactions/actions/rotate/handle.js.map +1 -1
- package/dist/interactions/actions/rotate/session.js +92 -0
- package/dist/interactions/actions/rotate/session.js.map +1 -0
- package/dist/interactions/actions/selectionSubtree.js +69 -0
- package/dist/interactions/actions/selectionSubtree.js.map +1 -0
- package/dist/interactions/actions/spatialReference.js.map +1 -1
- package/dist/interactions/actions/useStandardActions.js +87 -78
- package/dist/interactions/actions/useStandardActions.js.map +1 -1
- package/dist/interactions/gestures/dragGesture/dragGesture.js +4 -7
- package/dist/interactions/gestures/dragGesture/dragGesture.js.map +1 -1
- package/dist/interactions/gestures/dragGesture/dragPointOf.js +23 -0
- package/dist/interactions/gestures/dragGesture/dragPointOf.js.map +1 -0
- package/dist/interactions/gestures/handleDrag/handleDrag.js +21 -26
- package/dist/interactions/gestures/handleDrag/handleDrag.js.map +1 -1
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +62 -41
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js.map +1 -1
- package/dist/interactions/gestures/shared/originProjection.js +1 -1
- package/dist/interactions/gestures/shared/originProjection.js.map +1 -1
- package/dist/interactions/gestures/shared/screenTolerance.js +8 -2
- package/dist/interactions/gestures/shared/screenTolerance.js.map +1 -1
- package/dist/interactions/gestures/shared/snap.js.map +1 -1
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js +8 -4
- package/dist/interactions/gestures/thresholdDrag/thresholdDrag.js.map +1 -1
- package/dist/layout/arrivals.js +20 -23
- package/dist/layout/arrivals.js.map +1 -1
- package/dist/math-CYUjoyyU.d.ts +33 -0
- package/dist/math.d.ts +5 -3
- package/dist/math.js +6 -6
- package/dist/mesh.d.ts +4 -268
- package/dist/mesh.js +3 -7
- package/dist/move.d.ts +14 -11
- package/dist/{originProjection-DEklpDc_.d.ts → originProjection-PPT88jZv.d.ts} +1 -1
- package/dist/patterns-builtin.d.ts +1 -118
- package/dist/patterns-builtin.js +2 -3
- package/dist/{poseDescriptor-D-OH-tu5.d.ts → poseDescriptor-Bqk-11Rl.d.ts} +26 -36
- package/dist/renderer.d.ts +1 -91
- package/dist/renderer.js +2 -18
- package/dist/resize.d.ts +10 -22
- package/dist/resize.js +6 -6
- package/dist/style.css +1 -1
- package/dist/test-hook/install.js +12 -6
- package/dist/test-hook/install.js.map +1 -1
- package/dist/test-hook/useTestHook.js +22 -0
- package/dist/test-hook/useTestHook.js.map +1 -0
- package/dist/test-seams-D0pyV3pR.d.ts +149 -0
- package/dist/test-seams.d.ts +4 -4
- package/dist/test-seams.js +2 -2
- package/dist/tools/builtin/bone/boneActions.js +130 -0
- package/dist/tools/builtin/bone/boneActions.js.map +1 -0
- package/dist/tools/builtin/bone/boneOverlay.js +58 -0
- package/dist/tools/builtin/bone/boneOverlay.js.map +1 -0
- package/dist/tools/builtin/bone/placedRig.js +24 -0
- package/dist/tools/builtin/bone/placedRig.js.map +1 -0
- package/dist/tools/builtin/bone/rigEditState.js +21 -0
- package/dist/tools/builtin/bone/rigEditState.js.map +1 -0
- package/dist/tools/builtin/bone/useBoneTool.js +98 -0
- package/dist/tools/builtin/bone/useBoneTool.js.map +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js +1 -0
- package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -1
- package/dist/tools/builtin/eyedropper/useEyedropperTool.js.map +1 -1
- package/dist/tools/builtin/hand/useHandTool.js +1 -0
- package/dist/tools/builtin/hand/useHandTool.js.map +1 -1
- package/dist/tools/builtin/image/useImageTool.js.map +1 -1
- package/dist/tools/builtin/lasso/useLassoTool.js +11 -11
- package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js +1 -0
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +198 -150
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/pencil/usePencilTool.js +1 -0
- package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -1
- package/dist/tools/builtin/pickTopMostHit.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +13 -8
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/rect/useRectTool.js +1 -0
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -1
- package/dist/tools/builtin/select/adapterPointQuery.js +36 -0
- package/dist/tools/builtin/select/adapterPointQuery.js.map +1 -0
- package/dist/tools/builtin/select/selectionContributions.js +25 -24
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +42 -67
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/shared/pointerFollower.js +17 -0
- package/dist/tools/builtin/shared/pointerFollower.js.map +1 -0
- package/dist/tools/builtin/slice/useSliceTool.js +72 -82
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +22 -16
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/builtin/text/useTextTool.js +9 -0
- package/dist/tools/builtin/text/useTextTool.js.map +1 -1
- package/dist/tools/builtin/weight/useWeightTool.js +77 -0
- package/dist/tools/builtin/weight/useWeightTool.js.map +1 -0
- package/dist/tools/builtin/weight/weightActions.js +112 -0
- package/dist/tools/builtin/weight/weightActions.js.map +1 -0
- package/dist/tools/builtin/weight/weightOverlay.js +61 -0
- package/dist/tools/builtin/weight/weightOverlay.js.map +1 -0
- package/dist/tools/overlayBinding.js.map +1 -1
- package/dist/tools/useKeybindings.js +12 -22
- package/dist/tools/useKeybindings.js.map +1 -1
- package/dist/{types-A37hYkeR.d.ts → types-CIKDwlsP.d.ts} +113 -169
- package/dist/util/color.js +3 -3
- package/dist/util/color.js.map +1 -1
- package/dist/util/paint.js +1 -1
- package/dist/util/paint.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +28 -21
- package/dist/animation/colorHelpers.js +0 -135
- package/dist/animation/colorHelpers.js.map +0 -1
- package/dist/animation/colorRegistry.js +0 -37
- package/dist/animation/colorRegistry.js.map +0 -1
- package/dist/animation/engine/axes.js +0 -36
- package/dist/animation/engine/axes.js.map +0 -1
- package/dist/animation/engine/codec.js +0 -170
- package/dist/animation/engine/codec.js.map +0 -1
- package/dist/animation/engine/integrator.js +0 -12
- package/dist/animation/engine/integrator.js.map +0 -1
- package/dist/animation/loop.js +0 -62
- package/dist/animation/loop.js.map +0 -1
- package/dist/animation/observe.js +0 -23
- package/dist/animation/observe.js.map +0 -1
- package/dist/animation/rig/blendPoses.js +0 -43
- package/dist/animation/rig/blendPoses.js.map +0 -1
- package/dist/animation/rig/mirrorPose.js +0 -19
- package/dist/animation/rig/mirrorPose.js.map +0 -1
- package/dist/animation/rig/resolveSkeleton.js +0 -33
- package/dist/animation/rig/resolveSkeleton.js.map +0 -1
- package/dist/animation/rig/solveIk.js +0 -103
- package/dist/animation/rig/solveIk.js.map +0 -1
- package/dist/animation/rig/types.js +0 -12
- package/dist/animation/rig/types.js.map +0 -1
- package/dist/animation/slew.js +0 -27
- package/dist/animation/slew.js.map +0 -1
- package/dist/animation/stagger.js +0 -138
- package/dist/animation/stagger.js.map +0 -1
- package/dist/animation/timeline/booking.js +0 -106
- package/dist/animation/timeline/booking.js.map +0 -1
- package/dist/animation/timeline/createTimeline.js +0 -116
- package/dist/animation/timeline/createTimeline.js.map +0 -1
- package/dist/animation/timeline/sampleTrack.js +0 -71
- package/dist/animation/timeline/sampleTrack.js.map +0 -1
- package/dist/animation/useAnimator.js +0 -378
- package/dist/animation/useAnimator.js.map +0 -1
- package/dist/builtins-C-VgUlWI.d.ts +0 -4514
- package/dist/canvas/MinimapCanvas.js +0 -139
- package/dist/canvas/MinimapCanvas.js.map +0 -1
- package/dist/canvas/deps/poseComposition.js +0 -11
- package/dist/canvas/deps/poseComposition.js.map +0 -1
- package/dist/canvas/minimapMath.js +0 -80
- package/dist/canvas/minimapMath.js.map +0 -1
- package/dist/canvas/toolPreview.js +0 -39
- package/dist/canvas/toolPreview.js.map +0 -1
- package/dist/core/adapters/arrayAdapter.js +0 -85
- package/dist/core/adapters/arrayAdapter.js.map +0 -1
- package/dist/core/adapters/useArrayAdapter.js +0 -13
- package/dist/core/adapters/useArrayAdapter.js.map +0 -1
- package/dist/core/fillInPoseFrame.js +0 -102
- package/dist/core/fillInPoseFrame.js.map +0 -1
- package/dist/core/geometry/poseRotation.js +0 -58
- package/dist/core/geometry/poseRotation.js.map +0 -1
- package/dist/core/gradient.js +0 -136
- package/dist/core/gradient.js.map +0 -1
- package/dist/core/isPlainObject.js.map +0 -1
- package/dist/core/markerInset.js +0 -24
- package/dist/core/markerInset.js.map +0 -1
- package/dist/core/mixed.js +0 -6
- package/dist/core/mixed.js.map +0 -1
- package/dist/core/paintKinds.js +0 -156
- package/dist/core/paintKinds.js.map +0 -1
- package/dist/core/strokeMarkerShapes.js +0 -139
- package/dist/core/strokeMarkerShapes.js.map +0 -1
- package/dist/core/strokeMarkers.js +0 -28
- package/dist/core/strokeMarkers.js.map +0 -1
- package/dist/core/viewport/meanScale.js +0 -8
- package/dist/core/viewport/meanScale.js.map +0 -1
- package/dist/core/viewport/pxExtent.js +0 -42
- package/dist/core/viewport/pxExtent.js.map +0 -1
- package/dist/debug/flag.js.map +0 -1
- package/dist/features/cursor/paintedCursorLayer.js.map +0 -1
- package/dist/features/focus/gateLayer.js +0 -14
- package/dist/features/focus/gateLayer.js.map +0 -1
- package/dist/features/focus/useCanvasFocus.js +0 -29
- package/dist/features/focus/useCanvasFocus.js.map +0 -1
- package/dist/features/groups/children.js.map +0 -1
- package/dist/features/groups/composePose.js.map +0 -1
- package/dist/features/groups/nestedHit.js.map +0 -1
- package/dist/features/groups/unionOfChildren.js.map +0 -1
- package/dist/features/images/imageCache.js +0 -94
- package/dist/features/images/imageCache.js.map +0 -1
- package/dist/features/ingestion/index.js +0 -8
- package/dist/features/meshPaint/bake.js +0 -79
- package/dist/features/meshPaint/bake.js.map +0 -1
- package/dist/features/meshPaint/bakeCache.js +0 -59
- package/dist/features/meshPaint/bakeCache.js.map +0 -1
- package/dist/features/meshPaint/handles.js +0 -86
- package/dist/features/meshPaint/handles.js.map +0 -1
- package/dist/features/meshPaint/lazyKind.js.map +0 -1
- package/dist/features/meshPaint/meshPaint.js +0 -236
- package/dist/features/meshPaint/meshPaint.js.map +0 -1
- package/dist/features/meshPaint/meshShader.js +0 -6
- package/dist/features/meshPaint/meshShader.js.map +0 -1
- package/dist/features/meshPaint/register.js +0 -7
- package/dist/features/meshPaint/register.js.map +0 -1
- package/dist/features/meshPaint/surface.js +0 -110
- package/dist/features/meshPaint/surface.js.map +0 -1
- package/dist/features/minimap/actions.js +0 -53
- package/dist/features/minimap/actions.js.map +0 -1
- package/dist/features/minimap/createMinimapContribution.js +0 -96
- package/dist/features/minimap/createMinimapContribution.js.map +0 -1
- package/dist/features/minimap/layers.js +0 -103
- package/dist/features/minimap/layers.js.map +0 -1
- package/dist/features/overlays/useNodeOverlayFrame.js +0 -103
- package/dist/features/overlays/useNodeOverlayFrame.js.map +0 -1
- package/dist/features/parallax/createParallaxLayer.js +0 -26
- package/dist/features/parallax/createParallaxLayer.js.map +0 -1
- package/dist/features/parallax/createParallaxPlane.js +0 -26
- package/dist/features/parallax/createParallaxPlane.js.map +0 -1
- package/dist/features/paths/anchorEdits.js +0 -156
- package/dist/features/paths/anchorEdits.js.map +0 -1
- package/dist/features/paths/anchors.js +0 -154
- package/dist/features/paths/anchors.js.map +0 -1
- package/dist/features/paths/booleans.js +0 -2
- package/dist/features/paths/markerCommands.js +0 -148
- package/dist/features/paths/markerCommands.js.map +0 -1
- package/dist/features/paths/markerSites.js +0 -59
- package/dist/features/paths/markerSites.js.map +0 -1
- package/dist/features/paths/markers.js +0 -95
- package/dist/features/paths/markers.js.map +0 -1
- package/dist/features/paths/nearestAnchor.js +0 -36
- package/dist/features/paths/nearestAnchor.js.map +0 -1
- package/dist/features/paths/pathInWorld.js +0 -41
- package/dist/features/paths/pathInWorld.js.map +0 -1
- package/dist/features/paths/poseDescriptor.js +0 -39
- package/dist/features/paths/poseDescriptor.js.map +0 -1
- package/dist/features/paths/tessellate/dash.js +0 -52
- package/dist/features/paths/tessellate/dash.js.map +0 -1
- package/dist/features/paths/tessellate/insets.js +0 -32
- package/dist/features/paths/tessellate/insets.js.map +0 -1
- package/dist/features/paths/tessellate/metric.js +0 -72
- package/dist/features/paths/tessellate/metric.js.map +0 -1
- package/dist/features/paths/tessellate/stroke.js +0 -170
- package/dist/features/paths/tessellate/stroke.js.map +0 -1
- package/dist/features/paths/tessellate/vertexWidths.js +0 -32
- package/dist/features/paths/tessellate/vertexWidths.js.map +0 -1
- package/dist/features/patterns/index.js +0 -23
- package/dist/features/patterns/index.js.map +0 -1
- package/dist/features/patterns/patterns-builtin.js +0 -38
- package/dist/features/patterns/patterns-builtin.js.map +0 -1
- package/dist/features/patterns/resolveSpec.js +0 -57
- package/dist/features/patterns/resolveSpec.js.map +0 -1
- package/dist/features/patterns/tileGeometry.js +0 -158
- package/dist/features/patterns/tileGeometry.js.map +0 -1
- package/dist/features/pointer/PointerContext.js +0 -45
- package/dist/features/pointer/PointerContext.js.map +0 -1
- package/dist/features/selection/SelectionContext.js +0 -46
- package/dist/features/selection/SelectionContext.js.map +0 -1
- package/dist/features/simulation/createSimulation.js +0 -61
- package/dist/features/simulation/createSimulation.js.map +0 -1
- package/dist/features/simulation/types.js +0 -6
- package/dist/features/simulation/types.js.map +0 -1
- package/dist/features/simulation/useSimulation.js +0 -74
- package/dist/features/simulation/useSimulation.js.map +0 -1
- package/dist/features/text/domRuns.js +0 -258
- package/dist/features/text/domRuns.js.map +0 -1
- package/dist/features/text/fitTextPose.js +0 -38
- package/dist/features/text/fitTextPose.js.map +0 -1
- package/dist/features/text/hitTest.js +0 -45
- package/dist/features/text/hitTest.js.map +0 -1
- package/dist/features/text/renderLabel.js +0 -14
- package/dist/features/text/renderLabel.js.map +0 -1
- package/dist/features/text/runs/effectiveRangeStyle.js +0 -66
- package/dist/features/text/runs/effectiveRangeStyle.js.map +0 -1
- package/dist/features/text/runs/flagRange.js +0 -53
- package/dist/features/text/runs/flagRange.js.map +0 -1
- package/dist/features/text/runs/rangeStyle.js +0 -135
- package/dist/features/text/runs/rangeStyle.js.map +0 -1
- package/dist/features/text/textCommand.js +0 -59
- package/dist/features/text/textCommand.js.map +0 -1
- package/dist/features/text/textToPath.js +0 -181
- package/dist/features/text/textToPath.js.map +0 -1
- package/dist/features/text/useTextEdit.js +0 -467
- package/dist/features/text/useTextEdit.js.map +0 -1
- package/dist/features/tiling/createTiledLayer.js +0 -63
- package/dist/features/tiling/createTiledLayer.js.map +0 -1
- package/dist/features/tiling/tiledProject.js +0 -14
- package/dist/features/tiling/tiledProject.js.map +0 -1
- package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js +0 -26
- package/dist/interactions/actions/clone/behaviors/cloneByAltDrag.js.map +0 -1
- package/dist/interactions/actions/defaults/align.js.map +0 -1
- package/dist/interactions/actions/defaults/booleans.js +0 -52
- package/dist/interactions/actions/defaults/booleans.js.map +0 -1
- package/dist/interactions/actions/defaults/clipboard.js.map +0 -1
- package/dist/interactions/actions/defaults/clone.js +0 -107
- package/dist/interactions/actions/defaults/clone.js.map +0 -1
- package/dist/interactions/actions/defaults/createOutlines.js +0 -47
- package/dist/interactions/actions/defaults/createOutlines.js.map +0 -1
- package/dist/interactions/actions/defaults/distribute.js +0 -66
- package/dist/interactions/actions/defaults/distribute.js.map +0 -1
- package/dist/interactions/actions/defaults/editAnchors.js.map +0 -1
- package/dist/interactions/actions/defaults/flip.js +0 -119
- package/dist/interactions/actions/defaults/flip.js.map +0 -1
- package/dist/interactions/actions/defaults/freshNodeId.js +0 -10
- package/dist/interactions/actions/defaults/freshNodeId.js.map +0 -1
- package/dist/interactions/actions/defaults/insert.js +0 -288
- package/dist/interactions/actions/defaults/insert.js.map +0 -1
- package/dist/interactions/actions/defaults/lassoSelect.js +0 -156
- package/dist/interactions/actions/defaults/lassoSelect.js.map +0 -1
- package/dist/interactions/actions/defaults/move.js +0 -760
- package/dist/interactions/actions/defaults/move.js.map +0 -1
- package/dist/interactions/actions/defaults/resize.js +0 -335
- package/dist/interactions/actions/defaults/resize.js.map +0 -1
- package/dist/interactions/actions/defaults/rotate.js +0 -184
- package/dist/interactions/actions/defaults/rotate.js.map +0 -1
- package/dist/interactions/actions/previewOverrides.js +0 -25
- package/dist/interactions/actions/previewOverrides.js.map +0 -1
- package/dist/interactions/actions/resize/autoPoseDescriptor.js.map +0 -1
- package/dist/math-Drrw4ewZ.d.ts +0 -160
- package/dist/registerProgram-BMZRDgrh.d.ts +0 -197
- package/dist/renderer/DrawCommand.js +0 -6
- package/dist/renderer/DrawCommand.js.map +0 -1
- package/dist/renderer/WeaselRenderer.js +0 -331
- package/dist/renderer/WeaselRenderer.js.map +0 -1
- package/dist/renderer/batchClip.js +0 -46
- package/dist/renderer/batchClip.js.map +0 -1
- package/dist/renderer/cache/GLImageCache.js +0 -64
- package/dist/renderer/cache/GLImageCache.js.map +0 -1
- package/dist/renderer/cache/GLMeshCache.js +0 -102
- package/dist/renderer/cache/GLMeshCache.js.map +0 -1
- package/dist/renderer/cache/GLTextureCache.js +0 -51
- package/dist/renderer/cache/GLTextureCache.js.map +0 -1
- package/dist/renderer/cache/GradientRampAtlas.js +0 -82
- package/dist/renderer/cache/GradientRampAtlas.js.map +0 -1
- package/dist/renderer/cache/cache.js +0 -13
- package/dist/renderer/cache/cache.js.map +0 -1
- package/dist/renderer/cache/markerCommandCache.js +0 -63
- package/dist/renderer/cache/markerCommandCache.js.map +0 -1
- package/dist/renderer/cache/outlineMeshCache.js +0 -15
- package/dist/renderer/cache/outlineMeshCache.js.map +0 -1
- package/dist/renderer/cache/outlineStrokeMeshCache.js +0 -36
- package/dist/renderer/cache/outlineStrokeMeshCache.js.map +0 -1
- package/dist/renderer/cache/strokeMeshCache.js +0 -55
- package/dist/renderer/cache/strokeMeshCache.js.map +0 -1
- package/dist/renderer/cullDrawCommands.js +0 -90
- package/dist/renderer/cullDrawCommands.js.map +0 -1
- package/dist/renderer/draw.js +0 -1135
- package/dist/renderer/draw.js.map +0 -1
- package/dist/renderer/drawBatch.js +0 -198
- package/dist/renderer/drawBatch.js.map +0 -1
- package/dist/renderer/effects/EffectTargets.js +0 -45
- package/dist/renderer/effects/EffectTargets.js.map +0 -1
- package/dist/renderer/effects/builtins.js +0 -31
- package/dist/renderer/effects/builtins.js.map +0 -1
- package/dist/renderer/effects/composite.js +0 -9
- package/dist/renderer/effects/composite.js.map +0 -1
- package/dist/renderer/effects/effectPrelude.js +0 -10
- package/dist/renderer/effects/effectPrelude.js.map +0 -1
- package/dist/renderer/effects/types.js +0 -10
- package/dist/renderer/effects/types.js.map +0 -1
- package/dist/renderer/glyphOutlineMesh.js +0 -67
- package/dist/renderer/glyphOutlineMesh.js.map +0 -1
- package/dist/renderer/index.js +0 -19
- package/dist/renderer/math/color.js +0 -341
- package/dist/renderer/math/color.js.map +0 -1
- package/dist/renderer/math/mat3.js +0 -76
- package/dist/renderer/math/mat3.js.map +0 -1
- package/dist/renderer/math/patternSpace.js +0 -22
- package/dist/renderer/math/patternSpace.js.map +0 -1
- package/dist/renderer/math/viewToMat3.js +0 -19
- package/dist/renderer/math/viewToMat3.js.map +0 -1
- package/dist/renderer/paintResources.js +0 -18
- package/dist/renderer/paintResources.js.map +0 -1
- package/dist/renderer/paintScratch.js +0 -37
- package/dist/renderer/paintScratch.js.map +0 -1
- package/dist/renderer/shaders/ShaderProgram.js +0 -74
- package/dist/renderer/shaders/ShaderProgram.js.map +0 -1
- package/dist/renderer/shaders/batchFill.js +0 -119
- package/dist/renderer/shaders/batchFill.js.map +0 -1
- package/dist/renderer/shaders/customPrelude.js +0 -34
- package/dist/renderer/shaders/customPrelude.js.map +0 -1
- package/dist/renderer/shaders/extractUniformNames.js +0 -184
- package/dist/renderer/shaders/extractUniformNames.js.map +0 -1
- package/dist/renderer/shaders/glyphPaint.js +0 -61
- package/dist/renderer/shaders/glyphPaint.js.map +0 -1
- package/dist/renderer/shaders/gradFill.js +0 -30
- package/dist/renderer/shaders/gradFill.js.map +0 -1
- package/dist/renderer/shaders/imageFill.js +0 -14
- package/dist/renderer/shaders/imageFill.js.map +0 -1
- package/dist/renderer/shaders/pathFill.js +0 -13
- package/dist/renderer/shaders/pathFill.js.map +0 -1
- package/dist/renderer/shaders/patternFill.js +0 -24
- package/dist/renderer/shaders/patternFill.js.map +0 -1
- package/dist/renderer/shaders/registerProgram.js +0 -18
- package/dist/renderer/shaders/registerProgram.js.map +0 -1
- package/dist/renderer/spriteSheet.js +0 -14
- package/dist/renderer/spriteSheet.js.map +0 -1
- package/dist/renderer/state/GroupState.js +0 -77
- package/dist/renderer/state/GroupState.js.map +0 -1
- package/dist/renderer/strokeLengths.js +0 -50
- package/dist/renderer/strokeLengths.js.map +0 -1
- package/dist/renderer/syntheticItalic.js +0 -6
- package/dist/renderer/syntheticItalic.js.map +0 -1
- package/dist/renderer/textures/registerTexture.js +0 -14
- package/dist/renderer/textures/registerTexture.js.map +0 -1
- package/dist/scheduling/useVisibleRaf.js +0 -69
- package/dist/scheduling/useVisibleRaf.js.map +0 -1
- package/dist/test-seams-CuIxe0xY.d.ts +0 -356
- package/dist/tools/prefs.js +0 -62
- package/dist/tools/prefs.js.map +0 -1
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
//#region ../paint/
|
|
2
|
-
|
|
1
|
+
//#region ../paint/src/hex.ts
|
|
2
|
+
const HEX = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
3
|
+
/**
|
|
4
|
+
* The kit's one hex color reader: `#rgb`, `#rgba`, `#rrggbb`, or `#rrggbbaa`,
|
|
5
|
+
* in any case, as four 0..255 channels with alpha last (255 when the color
|
|
6
|
+
* names none). `null` for anything else, a missing `#` included.
|
|
7
|
+
*/
|
|
8
|
+
function parseHexBytes(input) {
|
|
9
|
+
if (!HEX.test(input)) return null;
|
|
10
|
+
const digits = input.slice(1);
|
|
11
|
+
const long = digits.length <= 4 ? digits.replace(/./g, "$&$&") : digits;
|
|
12
|
+
const byte = (i) => Number.parseInt(long.slice(i, i + 2), 16);
|
|
13
|
+
return [
|
|
14
|
+
byte(0),
|
|
15
|
+
byte(2),
|
|
16
|
+
byte(4),
|
|
17
|
+
long.length === 8 ? byte(6) : 255
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../paint/src/colorSpaces.ts
|
|
22
|
+
const SRGB_TO_LINEAR = (() => {
|
|
3
23
|
const lut = /* @__PURE__ */ new Float64Array(256);
|
|
4
24
|
for (let i = 0; i < 256; i++) {
|
|
5
25
|
const c = i / 255;
|
|
@@ -13,13 +33,24 @@ function linearToSrgbByte(c) {
|
|
|
13
33
|
const v = c <= .0031308 ? c * 12.92 : 1.055 * Math.pow(c, 1 / 2.4) - .055;
|
|
14
34
|
return Math.round(v * 255);
|
|
15
35
|
}
|
|
16
|
-
|
|
36
|
+
/** 0..1 float channel to the 8-bit index the LUTs are cut for. Rounds and
|
|
37
|
+
* clamps; `& 0xff` would truncate, and wrap anything out of range. */
|
|
38
|
+
const f2u = (v) => Math.max(0, Math.min(255, Math.round(v * 255)));
|
|
39
|
+
/**
|
|
40
|
+
* Convert a 0..1 float sRGB triple to OKLab — the renderer's own color space,
|
|
41
|
+
* and what a caller holding a `resolveColor` result has. Rounds into the u8
|
|
42
|
+
* grid the way every other float→u8 crossing in this file does, rather than
|
|
43
|
+
* leaving each caller to pick a convention.
|
|
44
|
+
*/
|
|
17
45
|
function srgbFloatToOklab(r, g, b) {
|
|
18
46
|
return srgbU8ToOklab(f2u(r), f2u(g), f2u(b));
|
|
19
47
|
}
|
|
48
|
+
/** Convert an 8-bit sRGB triple to OKLab. Channels are indices into a 256-entry
|
|
49
|
+
* LUT: pass integers, or `srgbFloatToOklab` for 0..1 floats. */
|
|
20
50
|
function srgbU8ToOklab(r, g, b) {
|
|
21
51
|
return linearSrgbToOklab(SRGB_TO_LINEAR[r & 255], SRGB_TO_LINEAR[g & 255], SRGB_TO_LINEAR[b & 255]);
|
|
22
52
|
}
|
|
53
|
+
/** Linear-light sRGB (0..1 floats, unclamped) to OKLab. */
|
|
23
54
|
function linearSrgbToOklab(rl, gl, bl) {
|
|
24
55
|
const l = .4122214708 * rl + .5363325363 * gl + .0514459929 * bl;
|
|
25
56
|
const m = .2119034982 * rl + .6806995451 * gl + .1073969566 * bl;
|
|
@@ -33,6 +64,8 @@ function linearSrgbToOklab(rl, gl, bl) {
|
|
|
33
64
|
.0259040371 * lp + .7827717662 * mp - .808675766 * sp
|
|
34
65
|
];
|
|
35
66
|
}
|
|
67
|
+
/** OKLab to linear-light sRGB. Not gamut-clipped: out-of-gamut colors come
|
|
68
|
+
* back with channels outside 0..1. */
|
|
36
69
|
function oklabToLinearSrgb(L, A, B) {
|
|
37
70
|
const lp = L + .3963377774 * A + .2158037573 * B;
|
|
38
71
|
const mp = L - .1055613458 * A - .0638541728 * B;
|
|
@@ -71,6 +104,7 @@ function clipToGamut(L, A, B) {
|
|
|
71
104
|
bl
|
|
72
105
|
];
|
|
73
106
|
}
|
|
107
|
+
/** Convert OKLab back to an 8-bit sRGB triple, clamped into gamut. */
|
|
74
108
|
function oklabToSrgbU8(L, A, B) {
|
|
75
109
|
const [rl, gl, bl] = clipToGamut(L, A, B);
|
|
76
110
|
return [
|
|
@@ -79,6 +113,9 @@ function oklabToSrgbU8(L, A, B) {
|
|
|
79
113
|
linearToSrgbByte(bl)
|
|
80
114
|
];
|
|
81
115
|
}
|
|
116
|
+
/** Blend two 8-bit sRGB colors through OKLab. Perceptually even, and it does
|
|
117
|
+
* not pass through the muddy midpoints an sRGB blend produces between
|
|
118
|
+
* complementary hues. */
|
|
82
119
|
function lerpOklab(from, to, t) {
|
|
83
120
|
return [
|
|
84
121
|
from[0] + (to[0] - from[0]) * t,
|
|
@@ -86,6 +123,7 @@ function lerpOklab(from, to, t) {
|
|
|
86
123
|
from[2] + (to[2] - from[2]) * t
|
|
87
124
|
];
|
|
88
125
|
}
|
|
126
|
+
/** Convert OKLab (L, a, b) to OKLCh (L, C, h). h is in radians, range [-π, π]. */
|
|
89
127
|
function oklabToOklch(L, A, B) {
|
|
90
128
|
return [
|
|
91
129
|
L,
|
|
@@ -93,6 +131,7 @@ function oklabToOklch(L, A, B) {
|
|
|
93
131
|
Math.atan2(B, A)
|
|
94
132
|
];
|
|
95
133
|
}
|
|
134
|
+
/** Convert OKLCh (L, C, h) to OKLab (L, a, b). h is in radians. */
|
|
96
135
|
function oklchToOklab(L, C, h) {
|
|
97
136
|
return [
|
|
98
137
|
L,
|
|
@@ -100,6 +139,10 @@ function oklchToOklab(L, C, h) {
|
|
|
100
139
|
C * Math.sin(h)
|
|
101
140
|
];
|
|
102
141
|
}
|
|
142
|
+
/** Lerp OKLCh values with shortest-arc hue interpolation. Lightness and
|
|
143
|
+
* chroma lerp linearly. When chroma is near zero on either endpoint, hue
|
|
144
|
+
* is taken from the other endpoint (avoids hue snap-from-undefined).
|
|
145
|
+
* h inputs are in radians. */
|
|
103
146
|
function lerpOklch(from, to, t) {
|
|
104
147
|
const [L1, C1, h1Raw] = from;
|
|
105
148
|
const [L2, C2, h2Raw] = to;
|
|
@@ -116,7 +159,14 @@ function lerpOklch(from, to, t) {
|
|
|
116
159
|
h1 + dh * t
|
|
117
160
|
];
|
|
118
161
|
}
|
|
119
|
-
|
|
162
|
+
const u2f = (v) => v / 255;
|
|
163
|
+
/** Lerp a flat RGBA color array `from` toward `to`. Inputs are 0..1
|
|
164
|
+
* floats (the renderer's color space); outputs are 0..1 floats too.
|
|
165
|
+
* Alpha is always linearly lerped; RGB channels are lerped in the
|
|
166
|
+
* requested color space. OKLab / OKLCh paths bounce through u8 because
|
|
167
|
+
* the gamma-correction LUT and gamut-clip routines are byte-keyed —
|
|
168
|
+
* the round-trip is lossy at <1% per channel, well under the visible
|
|
169
|
+
* threshold for these animations. */
|
|
120
170
|
function lerpColorArray(from, to, t, space = "rgb") {
|
|
121
171
|
if (from.length !== to.length) throw new Error(`lerpColorArray: length mismatch (from=${from.length}, to=${to.length})`);
|
|
122
172
|
if (from.length % 4 !== 0) throw new Error(`lerpColorArray: length ${from.length} not divisible by 4`);
|
|
@@ -152,6 +202,7 @@ function lerpColorArray(from, to, t, space = "rgb") {
|
|
|
152
202
|
}
|
|
153
203
|
return out;
|
|
154
204
|
}
|
|
205
|
+
/** HSL to sRGB. Hue in degrees, saturation, lightness and output all 0..1. */
|
|
155
206
|
function hslToSrgb(h, s, l) {
|
|
156
207
|
if (s === 0) return [
|
|
157
208
|
l,
|
|
@@ -176,7 +227,7 @@ function hueToChannel(p, q, t) {
|
|
|
176
227
|
return p;
|
|
177
228
|
}
|
|
178
229
|
//#endregion
|
|
179
|
-
//#region src/
|
|
230
|
+
//#region ../paint/src/color.ts
|
|
180
231
|
/**
|
|
181
232
|
* Parse a CSS color string into [r, g, b, a] with 0..1 components.
|
|
182
233
|
*
|
|
@@ -225,12 +276,8 @@ function parseColorUncached(input) {
|
|
|
225
276
|
const RESOLVE_COLOR_CACHE_CAP = 1024;
|
|
226
277
|
const resolveColorCache = /* @__PURE__ */ new Map();
|
|
227
278
|
/** Cached `parseColor`. Use this from renderer hot paths (per-frame draw
|
|
228
|
-
* callbacks, gradient ramp builds)
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* Cache is keyed by input-string identity, capped at ~1024 entries, and
|
|
232
|
-
* cleared wholesale on overflow (no LRU tracking — simple is fine since
|
|
233
|
-
* the working set in any one app is typically much smaller than the cap). */
|
|
279
|
+
* callbacks, gradient ramp builds). The cache is capped at ~1024 entries and
|
|
280
|
+
* cleared wholesale on overflow. */
|
|
234
281
|
function resolveColor(input) {
|
|
235
282
|
const hit = resolveColorCache.get(input);
|
|
236
283
|
if (hit) return hit;
|
|
@@ -251,32 +298,14 @@ function rgbaToHex(rgba) {
|
|
|
251
298
|
return a >= 1 ? base : `${base}${f(a)}`;
|
|
252
299
|
}
|
|
253
300
|
function parseHex(s) {
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
if (hex.length === 4) return [
|
|
262
|
-
parseInt(hex[0] + hex[0], 16) / 255,
|
|
263
|
-
parseInt(hex[1] + hex[1], 16) / 255,
|
|
264
|
-
parseInt(hex[2] + hex[2], 16) / 255,
|
|
265
|
-
parseInt(hex[3] + hex[3], 16) / 255
|
|
266
|
-
];
|
|
267
|
-
if (hex.length === 6) return [
|
|
268
|
-
parseInt(hex.slice(0, 2), 16) / 255,
|
|
269
|
-
parseInt(hex.slice(2, 4), 16) / 255,
|
|
270
|
-
parseInt(hex.slice(4, 6), 16) / 255,
|
|
271
|
-
1
|
|
272
|
-
];
|
|
273
|
-
if (hex.length === 8) return [
|
|
274
|
-
parseInt(hex.slice(0, 2), 16) / 255,
|
|
275
|
-
parseInt(hex.slice(2, 4), 16) / 255,
|
|
276
|
-
parseInt(hex.slice(4, 6), 16) / 255,
|
|
277
|
-
parseInt(hex.slice(6, 8), 16) / 255
|
|
301
|
+
const bytes = parseHexBytes(s);
|
|
302
|
+
if (!bytes) throw new Error(`parseColor: invalid hex "${s}"`);
|
|
303
|
+
return [
|
|
304
|
+
bytes[0] / 255,
|
|
305
|
+
bytes[1] / 255,
|
|
306
|
+
bytes[2] / 255,
|
|
307
|
+
bytes[3] / 255
|
|
278
308
|
];
|
|
279
|
-
throw new Error(`parseColor: invalid hex "${s}"`);
|
|
280
309
|
}
|
|
281
310
|
/** Match `name( body )` and return the trimmed body, or null. */
|
|
282
311
|
function unwrapFn(s, name) {
|
|
@@ -362,7 +391,7 @@ function parseHslFunction(s) {
|
|
|
362
391
|
const sat = parsePercentOrNumber(channels.rgb[1]);
|
|
363
392
|
const lit = parsePercentOrNumber(channels.rgb[2]);
|
|
364
393
|
if (h === null || sat === null || lit === null) return null;
|
|
365
|
-
const [r, g, b] =
|
|
394
|
+
const [r, g, b] = hslToSrgb(h, sat, lit);
|
|
366
395
|
return [
|
|
367
396
|
r,
|
|
368
397
|
g,
|
|
@@ -390,13 +419,6 @@ function parsePercentOrNumber(tok) {
|
|
|
390
419
|
const n = Number(tok);
|
|
391
420
|
return Number.isFinite(n) ? clamp01(n) : null;
|
|
392
421
|
}
|
|
393
|
-
/**
|
|
394
|
-
* HSL → RGB, all components 0..1 except hue in degrees (0..360). paint's
|
|
395
|
-
* `hslToSrgb` under the name this file's callers use.
|
|
396
|
-
*
|
|
397
|
-
* @internal Not part of the public API; not re-exported from the barrel.
|
|
398
|
-
*/
|
|
399
|
-
const hslToRgb = hslToSrgb;
|
|
400
422
|
function clamp01(n) {
|
|
401
423
|
return n < 0 ? 0 : n > 1 ? 1 : n;
|
|
402
424
|
}
|
|
@@ -569,7 +591,158 @@ const NAMED_COLORS = (() => {
|
|
|
569
591
|
return out;
|
|
570
592
|
})();
|
|
571
593
|
//#endregion
|
|
572
|
-
//#region src/
|
|
594
|
+
//#region ../geom/src/mat3.ts
|
|
595
|
+
/**
|
|
596
|
+
* 2D affine transforms in canvas/DOMMatrix order: [a, b, c, d, e, f].
|
|
597
|
+
* x' = a·x + c·y + e
|
|
598
|
+
* y' = b·x + d·y + f
|
|
599
|
+
* Represented as a readonly 6-tuple (f64). The affine tier of the kernel.
|
|
600
|
+
*
|
|
601
|
+
* `glMat3.ts` beside this file holds the renderer's matrix: a 9-element
|
|
602
|
+
* column-major array (a full 3×3) laid out for `uniformMatrix3fv`. Its
|
|
603
|
+
* *logical element order* is identical to ours.
|
|
604
|
+
*/
|
|
605
|
+
/** Inverse, or null when the matrix is singular, non-finite, or too
|
|
606
|
+
* ill-conditioned to invert meaningfully at its own scale. */
|
|
607
|
+
function invert$1(m) {
|
|
608
|
+
const det = m[0] * m[3] - m[1] * m[2];
|
|
609
|
+
const norm2 = Math.max(m[0] * m[0] + m[1] * m[1], m[2] * m[2] + m[3] * m[3]);
|
|
610
|
+
if (!(Math.abs(det) > 1e-12 * norm2)) return null;
|
|
611
|
+
const id = 1 / det;
|
|
612
|
+
const a = m[3] * id;
|
|
613
|
+
const b = -m[1] * id;
|
|
614
|
+
const c = -m[2] * id;
|
|
615
|
+
const d = m[0] * id;
|
|
616
|
+
return [
|
|
617
|
+
a,
|
|
618
|
+
b,
|
|
619
|
+
c,
|
|
620
|
+
d,
|
|
621
|
+
-(m[4] * a + m[5] * c),
|
|
622
|
+
-(m[4] * b + m[5] * d)
|
|
623
|
+
];
|
|
624
|
+
}
|
|
625
|
+
//#endregion
|
|
626
|
+
//#region ../geom/src/glMat3.ts
|
|
627
|
+
/**
|
|
628
|
+
* 2D affine matrix utilities. Column-major 9 elements, matching
|
|
629
|
+
* `WebGL2RenderingContext.uniformMatrix3fv` element order so an upload needs
|
|
630
|
+
* no transpose flag.
|
|
631
|
+
*
|
|
632
|
+
* Layout (column-major):
|
|
633
|
+
* [m00, m10, 0,
|
|
634
|
+
* m01, m11, 0,
|
|
635
|
+
* tx, ty, 1]
|
|
636
|
+
*/
|
|
637
|
+
function create(a, b, c, d, tx, ty) {
|
|
638
|
+
return new Float64Array([
|
|
639
|
+
a,
|
|
640
|
+
b,
|
|
641
|
+
0,
|
|
642
|
+
c,
|
|
643
|
+
d,
|
|
644
|
+
0,
|
|
645
|
+
tx,
|
|
646
|
+
ty,
|
|
647
|
+
1
|
|
648
|
+
]);
|
|
649
|
+
}
|
|
650
|
+
function identity() {
|
|
651
|
+
return create(1, 0, 0, 1, 0, 0);
|
|
652
|
+
}
|
|
653
|
+
function multiply(out, m) {
|
|
654
|
+
const a = out[0], b = out[1];
|
|
655
|
+
const c = out[3], d = out[4];
|
|
656
|
+
const tx = out[6], ty = out[7];
|
|
657
|
+
const ma = m[0], mb = m[1];
|
|
658
|
+
const mc = m[3], md = m[4];
|
|
659
|
+
const mtx = m[6], mty = m[7];
|
|
660
|
+
return create(a * ma + c * mb, b * ma + d * mb, a * mc + c * md, b * mc + d * md, a * mtx + c * mty + tx, b * mtx + d * mty + ty);
|
|
661
|
+
}
|
|
662
|
+
/** `m · T(tx, ty)`: composes onto `m`, where `@weasel-js/geom`'s `translate`
|
|
663
|
+
* constructs a fresh matrix. */
|
|
664
|
+
function translated(m, tx, ty) {
|
|
665
|
+
return multiply(m, create(1, 0, 0, 1, tx, ty));
|
|
666
|
+
}
|
|
667
|
+
/** `m · S(sx, sy)`: composes onto `m`, where geom's `scale` constructs one. */
|
|
668
|
+
function scaled(m, sx, sy) {
|
|
669
|
+
return multiply(m, create(sx, 0, 0, sy, 0, 0));
|
|
670
|
+
}
|
|
671
|
+
/** This layout read as the kernel's 6-element affine. The two carry the same
|
|
672
|
+
* logical order, so the conversion is a repack and nothing else. */
|
|
673
|
+
function toAffine(m) {
|
|
674
|
+
return [
|
|
675
|
+
m[0],
|
|
676
|
+
m[1],
|
|
677
|
+
m[3],
|
|
678
|
+
m[4],
|
|
679
|
+
m[6],
|
|
680
|
+
m[7]
|
|
681
|
+
];
|
|
682
|
+
}
|
|
683
|
+
/** The kernel's affine in this layout. The inverse of {@link toAffine}. */
|
|
684
|
+
function fromAffine(a) {
|
|
685
|
+
return create(a[0], a[1], a[2], a[3], a[4], a[5]);
|
|
686
|
+
}
|
|
687
|
+
/** Inverse of an affine matrix, or `null` when `@weasel-js/geom`'s `invert`
|
|
688
|
+
* finds it singular — the same rule, read through this layout. */
|
|
689
|
+
function invert(m) {
|
|
690
|
+
const inv = invert$1(toAffine(m));
|
|
691
|
+
return inv && fromAffine(inv);
|
|
692
|
+
}
|
|
693
|
+
/** A float32 copy of `m`, for `uniformMatrix3fv` or a shader uniform value. */
|
|
694
|
+
function toUniform(m) {
|
|
695
|
+
return Float32Array.from(m);
|
|
696
|
+
}
|
|
697
|
+
function apply(m, x, y) {
|
|
698
|
+
const a = m[0], b = m[1];
|
|
699
|
+
const c = m[3], d = m[4];
|
|
700
|
+
const tx = m[6], ty = m[7];
|
|
701
|
+
return [a * x + c * y + tx, b * x + d * y + ty];
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Map screen pixel coords (0..width on X, 0..height on Y, top-left origin)
|
|
705
|
+
* into clip space (-1..1 on X, 1..-1 on Y — note Y flip so screen-down
|
|
706
|
+
* matches clip-down).
|
|
707
|
+
*/
|
|
708
|
+
function screenToClip(width, height) {
|
|
709
|
+
return create(2 / width, 0, 0, -2 / height, -1, 1);
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Uniform-equivalent scale factor: the square root of the absolute
|
|
713
|
+
* determinant of the linear part, i.e. the geometric mean of the two axis
|
|
714
|
+
* scales. Rotation-invariant. Under non-uniform scale it is between the two
|
|
715
|
+
* axes and exact on neither — the same compromise `meanScale` documents.
|
|
716
|
+
*/
|
|
717
|
+
function meanScaleOf(m) {
|
|
718
|
+
return Math.sqrt(Math.abs(m[0] * m[4] - m[1] * m[3]));
|
|
719
|
+
}
|
|
720
|
+
/** The least any direction is scaled by the linear part — its smaller singular
|
|
721
|
+
* value. What a screen length is worth in world units, at most. */
|
|
722
|
+
function minScaleOf(m) {
|
|
723
|
+
const sum = m[0] * m[0] + m[1] * m[1] + m[3] * m[3] + m[4] * m[4];
|
|
724
|
+
const det = m[0] * m[4] - m[1] * m[3];
|
|
725
|
+
return Math.sqrt(Math.max(0, (sum - Math.sqrt(Math.max(0, sum * sum - 4 * det * det))) / 2));
|
|
726
|
+
}
|
|
727
|
+
/** The renderer's 3x3 matrix operations, as one namespace. These work on the
|
|
728
|
+
* 9-element form the GL uniform upload wants — distinct from the 6-element
|
|
729
|
+
* affine `Mat3`, though the logical element order is the same. */
|
|
730
|
+
const mat3 = {
|
|
731
|
+
identity,
|
|
732
|
+
toAffine,
|
|
733
|
+
fromAffine,
|
|
734
|
+
multiply,
|
|
735
|
+
translated,
|
|
736
|
+
scaled,
|
|
737
|
+
invert,
|
|
738
|
+
toUniform,
|
|
739
|
+
apply,
|
|
740
|
+
screenToClip,
|
|
741
|
+
meanScaleOf,
|
|
742
|
+
minScaleOf
|
|
743
|
+
};
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region ../renderer/src/meshPaint/surface.ts
|
|
573
746
|
/** Corner `i` of the boundary walk. */
|
|
574
747
|
function patchCorner(patch, i) {
|
|
575
748
|
return patch.points[(i & 3) * 3];
|
|
@@ -692,9 +865,8 @@ function evalTensor(patch, u, v) {
|
|
|
692
865
|
y
|
|
693
866
|
};
|
|
694
867
|
}
|
|
695
|
-
/** Axis-aligned bounds of a patch, sampled on a grid
|
|
696
|
-
* bound a Bézier but not tightly
|
|
697
|
-
* sized from this — a loose box wastes texels on every side. */
|
|
868
|
+
/** Axis-aligned bounds of a patch, sampled on a grid: control points alone
|
|
869
|
+
* bound a Bézier but not tightly. */
|
|
698
870
|
function patchBounds(patch, steps = 8) {
|
|
699
871
|
let minX = Infinity;
|
|
700
872
|
let minY = Infinity;
|
|
@@ -745,20 +917,16 @@ function meshBounds(patches) {
|
|
|
745
917
|
};
|
|
746
918
|
}
|
|
747
919
|
/**
|
|
748
|
-
* Corner colors blended at `(u, v)` in `space`.
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
* has a midpoint between two colors and no meaningful four-way mix — OKLCh's
|
|
752
|
-
* hue in particular is an arc, which only two endpoints define.
|
|
920
|
+
* Corner colors blended at `(u, v)` in `space`. Three lerps rather than four
|
|
921
|
+
* weights, because a perceptual space has no meaningful four-way mix — OKLCh's
|
|
922
|
+
* hue is an arc, which only two endpoints define.
|
|
753
923
|
*/
|
|
754
924
|
function colorAt(corners, u, v, space) {
|
|
755
925
|
return lerpColorArray(lerpColorArray(corners[0], corners[1], u, space), lerpColorArray(corners[3], corners[2], u, space), v, space);
|
|
756
926
|
}
|
|
757
927
|
/**
|
|
758
|
-
* Rasterize `patches` into a square bitmap covering their union
|
|
759
|
-
*
|
|
760
|
-
* Returns `null` when no patch is drawable, which is the caller's cue to paint
|
|
761
|
-
* nothing rather than a blank square.
|
|
928
|
+
* Rasterize `patches` into a square bitmap covering their union, or `null`
|
|
929
|
+
* when no patch is drawable.
|
|
762
930
|
*/
|
|
763
931
|
function bakeMesh(patches, space = "rgb", size = 256) {
|
|
764
932
|
const box = meshBounds(patches);
|
|
@@ -806,11 +974,9 @@ function bakeMesh(patches, space = "rgb", size = 256) {
|
|
|
806
974
|
};
|
|
807
975
|
}
|
|
808
976
|
/**
|
|
809
|
-
* One triangle, barycentric, colors interpolated across it.
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* both — harmless here because both carry the same color there, and cheaper
|
|
813
|
-
* than a fill rule.
|
|
977
|
+
* One triangle, barycentric, colors interpolated across it. A pixel exactly on
|
|
978
|
+
* an edge two cells share is claimed by both — harmless, because both carry
|
|
979
|
+
* the same color there.
|
|
814
980
|
*/
|
|
815
981
|
function fillTriangle(pixels, size, a, b, c) {
|
|
816
982
|
const minX = Math.max(0, Math.floor(Math.min(a.at.x, b.at.x, c.at.x)));
|
|
@@ -929,23 +1095,17 @@ var MeshBakeCache = class {
|
|
|
929
1095
|
}
|
|
930
1096
|
};
|
|
931
1097
|
//#endregion
|
|
932
|
-
//#region src/
|
|
1098
|
+
//#region ../renderer/src/meshPaint/meshShader.ts
|
|
933
1099
|
/**
|
|
934
1100
|
* GLSL ES 3.0 sources for the mesh-gradient paint.
|
|
935
1101
|
*
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
* texture read of the baked mesh, with everything outside the bake's box
|
|
940
|
-
* transparent — a mesh covers the area its patches cover, not the whole shape
|
|
941
|
-
* it is filling, and a clamped read would otherwise smear its border colors
|
|
942
|
-
* across the rest.
|
|
1102
|
+
* Everything outside the bake's box is transparent: a mesh covers the area its
|
|
1103
|
+
* patches cover, not the whole shape it is filling, and a clamped read would
|
|
1104
|
+
* otherwise smear its border colors across the rest.
|
|
943
1105
|
*
|
|
944
1106
|
* `u_meshOrigin` / `u_meshSize` are the bake's box in paint space, and the
|
|
945
1107
|
* bake maps that box onto texel *centers*, which is the half-texel the uv
|
|
946
|
-
* rescale accounts for.
|
|
947
|
-
*
|
|
948
|
-
* Output convention §2: PREMULTIPLIED alpha.
|
|
1108
|
+
* rescale accounts for. Output is PREMULTIPLIED alpha.
|
|
949
1109
|
*/
|
|
950
1110
|
/** The id this program is registered under. */
|
|
951
1111
|
const MESH_PROGRAM_ID = "kit:mesh-gradient";
|
|
@@ -986,13 +1146,13 @@ void main() {
|
|
|
986
1146
|
}
|
|
987
1147
|
`;
|
|
988
1148
|
//#endregion
|
|
989
|
-
//#region src/
|
|
990
|
-
/** The kind's id, as `
|
|
1149
|
+
//#region ../renderer/src/meshPaint/meshPaint.ts
|
|
1150
|
+
/** The kind's id, as `Paint['fill']` carries it. */
|
|
991
1151
|
const MESH_GRADIENT_KIND = "mesh-gradient";
|
|
992
|
-
function asMesh(fill) {
|
|
1152
|
+
function asMesh$1(fill) {
|
|
993
1153
|
return fill;
|
|
994
1154
|
}
|
|
995
|
-
function asFill(mesh) {
|
|
1155
|
+
function asFill$1(mesh) {
|
|
996
1156
|
return mesh;
|
|
997
1157
|
}
|
|
998
1158
|
/**
|
|
@@ -1050,7 +1210,7 @@ function seedMeshPatch(color) {
|
|
|
1050
1210
|
});
|
|
1051
1211
|
}
|
|
1052
1212
|
return {
|
|
1053
|
-
|
|
1213
|
+
kind: MESH_GRADIENT_KIND,
|
|
1054
1214
|
patches: [{
|
|
1055
1215
|
points,
|
|
1056
1216
|
colors: [
|
|
@@ -1125,7 +1285,7 @@ function meshFromStops(stops) {
|
|
|
1125
1285
|
if (b.offset > a.offset) patches.push(bandPatch(a.offset, b.offset, a.color, b.color));
|
|
1126
1286
|
}
|
|
1127
1287
|
return {
|
|
1128
|
-
|
|
1288
|
+
kind: MESH_GRADIENT_KIND,
|
|
1129
1289
|
patches,
|
|
1130
1290
|
units: "bounds"
|
|
1131
1291
|
};
|
|
@@ -1159,12 +1319,15 @@ function mapPatches(mesh, move) {
|
|
|
1159
1319
|
points: patch.points.map(move)
|
|
1160
1320
|
}));
|
|
1161
1321
|
}
|
|
1322
|
+
/** The paint a pose-frame copy was made from. A copy is rebuilt whenever its
|
|
1323
|
+
* node's pose changes, and bakes the same texels as its source. */
|
|
1324
|
+
const BAKE_SOURCE = /* @__PURE__ */ new WeakMap();
|
|
1162
1325
|
const CACHES = /* @__PURE__ */ new WeakMap();
|
|
1163
1326
|
function cacheFor(ctx) {
|
|
1164
1327
|
let cache = CACHES.get(ctx.resources);
|
|
1165
1328
|
if (!cache) {
|
|
1166
1329
|
const gl = ctx.gl;
|
|
1167
|
-
const made = new MeshBakeCache((
|
|
1330
|
+
const made = new MeshBakeCache((texture) => gl.deleteTexture(texture));
|
|
1168
1331
|
ctx.resources.onRelease(() => {
|
|
1169
1332
|
made.clear();
|
|
1170
1333
|
CACHES.delete(ctx.resources);
|
|
@@ -1185,8 +1348,12 @@ function bakeFor(ctx, mesh) {
|
|
|
1185
1348
|
if (!box) return null;
|
|
1186
1349
|
const size = meshBakeSize(devicePixelsOf(ctx, mesh, box), ctx.maxTextureSize);
|
|
1187
1350
|
const cache = cacheFor(ctx);
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1351
|
+
const key = BAKE_SOURCE.get(mesh) ?? mesh;
|
|
1352
|
+
const hit = cache.get(key, size);
|
|
1353
|
+
if (hit) return {
|
|
1354
|
+
texture: hit,
|
|
1355
|
+
box
|
|
1356
|
+
};
|
|
1190
1357
|
const baked = bakeMesh(mesh.patches, mesh.interpolate ?? "rgb", size);
|
|
1191
1358
|
if (!baked) return null;
|
|
1192
1359
|
const gl = ctx.gl;
|
|
@@ -1199,15 +1366,14 @@ function bakeFor(ctx, mesh) {
|
|
|
1199
1366
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
1200
1367
|
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, baked.size, baked.size, 0, gl.RGBA, gl.UNSIGNED_BYTE, baked.pixels);
|
|
1201
1368
|
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
1202
|
-
|
|
1369
|
+
cache.set(key, size, texture);
|
|
1370
|
+
return {
|
|
1203
1371
|
texture,
|
|
1204
|
-
|
|
1372
|
+
box
|
|
1205
1373
|
};
|
|
1206
|
-
cache.set(mesh, size, entry);
|
|
1207
|
-
return entry;
|
|
1208
1374
|
}
|
|
1209
1375
|
function bindMesh(ctx, fill) {
|
|
1210
|
-
const mesh = asMesh(fill);
|
|
1376
|
+
const mesh = asMesh$1(fill);
|
|
1211
1377
|
if (!mesh.patches.some(isValidPatch)) return null;
|
|
1212
1378
|
const inverse = ctx.spaceInverse(mesh.units);
|
|
1213
1379
|
if (!inverse) return null;
|
|
@@ -1218,36 +1384,30 @@ function bindMesh(ctx, fill) {
|
|
|
1218
1384
|
const gl = ctx.gl;
|
|
1219
1385
|
gl.useProgram(program.handle);
|
|
1220
1386
|
ctx.setProjAndModel(program);
|
|
1221
|
-
gl.uniformMatrix3fv(program.uniform("u_worldInv"), false, inverse);
|
|
1387
|
+
gl.uniformMatrix3fv(program.uniform("u_worldInv"), false, mat3.toUniform(inverse));
|
|
1222
1388
|
gl.activeTexture(gl.TEXTURE0);
|
|
1223
1389
|
gl.bindTexture(gl.TEXTURE_2D, entry.texture);
|
|
1224
1390
|
gl.uniform1i(program.uniform("u_sampler"), 0);
|
|
1225
|
-
const { box } = entry
|
|
1391
|
+
const { box } = entry;
|
|
1226
1392
|
gl.uniform2f(program.uniform("u_meshOrigin"), box.x, box.y);
|
|
1227
1393
|
gl.uniform2f(program.uniform("u_meshSize"), box.width, box.height);
|
|
1228
1394
|
gl.uniform1f(program.uniform("u_opacity"), mesh.opacity ?? 1);
|
|
1229
1395
|
gl.uniform1f(program.uniform("u_alpha"), ctx.alpha);
|
|
1230
1396
|
return program;
|
|
1231
1397
|
}
|
|
1232
|
-
/** The kind's
|
|
1233
|
-
*
|
|
1234
|
-
const
|
|
1398
|
+
/** The kind's draw half, shader program included. Core adds the editor's
|
|
1399
|
+
* slots and registers the whole entry. */
|
|
1400
|
+
const meshDrawKind = {
|
|
1235
1401
|
id: MESH_GRADIENT_KIND,
|
|
1236
1402
|
programs: { [MESH_PROGRAM_ID]: {
|
|
1237
1403
|
vert: MESH_VERT_SRC,
|
|
1238
1404
|
frag: MESH_FRAG_SRC
|
|
1239
1405
|
} },
|
|
1240
|
-
label: "Mesh",
|
|
1241
|
-
icon: "paintMesh",
|
|
1242
|
-
seed: (color) => asFill(seedMeshPatch(color)),
|
|
1243
|
-
colorOf: (paint) => asMesh(paint).patches?.[0]?.colors?.[0],
|
|
1244
|
-
stopsOf: (paint) => meshStops(asMesh(paint)),
|
|
1245
|
-
fromStops: (stops) => asFill(meshFromStops(stops)),
|
|
1246
1406
|
bind: bindMesh,
|
|
1247
1407
|
inPoseFrame: (fill, box) => {
|
|
1248
|
-
const mesh = asMesh(fill);
|
|
1408
|
+
const mesh = asMesh$1(fill);
|
|
1249
1409
|
if (mesh.units !== "bounds") return fill;
|
|
1250
|
-
|
|
1410
|
+
const posed = asFill$1({
|
|
1251
1411
|
...mesh,
|
|
1252
1412
|
patches: mapPatches(mesh, (p) => ({
|
|
1253
1413
|
x: box.x + p.x * box.width,
|
|
@@ -1255,11 +1415,13 @@ const meshGradientKind = {
|
|
|
1255
1415
|
})),
|
|
1256
1416
|
units: "local"
|
|
1257
1417
|
});
|
|
1418
|
+
BAKE_SOURCE.set(posed, fill);
|
|
1419
|
+
return posed;
|
|
1258
1420
|
},
|
|
1259
1421
|
toBoundsFrame: (fill, box) => {
|
|
1260
|
-
const mesh = asMesh(fill);
|
|
1422
|
+
const mesh = asMesh$1(fill);
|
|
1261
1423
|
if (mesh.units === "bounds" || box.width === 0 || box.height === 0) return fill;
|
|
1262
|
-
return asFill({
|
|
1424
|
+
return asFill$1({
|
|
1263
1425
|
...mesh,
|
|
1264
1426
|
patches: mapPatches(mesh, (p) => ({
|
|
1265
1427
|
x: (p.x - box.x) / box.width,
|
|
@@ -1267,8 +1429,7 @@ const meshGradientKind = {
|
|
|
1267
1429
|
})),
|
|
1268
1430
|
units: "bounds"
|
|
1269
1431
|
});
|
|
1270
|
-
}
|
|
1271
|
-
toSvg: (id, fill) => meshGradientXml(id, asMesh(fill))
|
|
1432
|
+
}
|
|
1272
1433
|
};
|
|
1273
1434
|
/**
|
|
1274
1435
|
* The `<defs>` entry for a mesh paint, in weasel's own namespace.
|
|
@@ -1293,6 +1454,22 @@ function trim(n) {
|
|
|
1293
1454
|
return Number.isInteger(n) ? String(n) : String(Number(n.toFixed(4)));
|
|
1294
1455
|
}
|
|
1295
1456
|
//#endregion
|
|
1457
|
+
//#region src/core/paint/meshKind.ts
|
|
1458
|
+
const asMesh = (fill) => fill;
|
|
1459
|
+
const asFill = (mesh) => mesh;
|
|
1460
|
+
/** The `mesh-gradient` kind's registry entry. `./registerMesh` registers it;
|
|
1461
|
+
* the paint-kind registry loads it on demand otherwise. */
|
|
1462
|
+
const meshGradientKind = {
|
|
1463
|
+
...meshDrawKind,
|
|
1464
|
+
label: "Mesh",
|
|
1465
|
+
icon: "paintMesh",
|
|
1466
|
+
seed: (color) => asFill(seedMeshPatch(color)),
|
|
1467
|
+
colorOf: (paint) => asMesh(paint).patches?.[0]?.colors?.[0],
|
|
1468
|
+
stopsOf: (paint) => meshStops(asMesh(paint)),
|
|
1469
|
+
fromStops: (stops) => asFill(meshFromStops(stops)),
|
|
1470
|
+
toSvg: (id, fill) => meshGradientXml(id, asMesh(fill))
|
|
1471
|
+
};
|
|
1472
|
+
//#endregion
|
|
1296
1473
|
export { meshGradientKind };
|
|
1297
1474
|
|
|
1298
|
-
//# sourceMappingURL=
|
|
1475
|
+
//# sourceMappingURL=meshKindLazy.js.map
|