@weasel-js/core 1.9.4 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +918 -0
- package/README.md +38 -3
- package/dist/WeaselProvider.js +5 -7
- package/dist/WeaselProvider.js.map +1 -1
- package/dist/affordances/composeAffordanceLayer.js +92 -84
- package/dist/affordances/composeAffordanceLayer.js.map +1 -1
- package/dist/affordances/cornerResize.js +3 -2
- package/dist/affordances/cornerResize.js.map +1 -1
- package/dist/affordances/hitAffordanceRegions.js +71 -101
- package/dist/affordances/hitAffordanceRegions.js.map +1 -1
- package/dist/affordances/pathAnchors.js +50 -28
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotateCursor.js +12 -0
- package/dist/affordances/rotateCursor.js.map +1 -0
- package/dist/affordances/rotationHandle.js +44 -46
- 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 +48 -136
- 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 +99 -0
- package/dist/animation/rig/rigNode.js.map +1 -0
- package/dist/animation/rig/rigSeat.js +59 -0
- package/dist/animation/rig/rigSeat.js.map +1 -0
- package/dist/animation/rig/skinBinding.js +64 -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 +8 -7
- package/dist/animation/wrappers/animateLifecycle.js.map +1 -1
- package/dist/animation/wrappers/animateOnSetPose.js +31 -31
- package/dist/animation/wrappers/animateOnSetPose.js.map +1 -1
- package/dist/animation/wrappers/instantPose.js.map +1 -1
- package/dist/animation/writtenPoseTarget.js +33 -0
- package/dist/animation/writtenPoseTarget.js.map +1 -0
- package/dist/autoPoseDescriptor-DHg5KqaJ.d.ts +27 -0
- package/dist/barrel/canvas.js +32 -0
- package/dist/barrel/chrome.js +10 -10
- package/dist/barrel/input.js +16 -17
- package/dist/barrel/interactions.js +34 -37
- package/dist/barrel/paint.js +11 -18
- package/dist/barrel/paths.js +13 -19
- package/dist/barrel/renderer.js +14 -20
- package/dist/barrel/routing.js +54 -47
- package/dist/barrel/scene.js +37 -0
- package/dist/barrel/text.js +9 -18
- package/dist/barrel/viewport.js +44 -51
- package/dist/canvas/Canvas.js +270 -475
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +168 -190
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/CursorCoordsHud.js +24 -25
- package/dist/canvas/CursorCoordsHud.js.map +1 -1
- package/dist/canvas/DrawCanvas.js +39 -56
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/ModalityHud.js.map +1 -1
- package/dist/canvas/NodeShape.js +28 -29
- package/dist/canvas/NodeShape.js.map +1 -1
- 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 +66 -107
- package/dist/canvas/SceneCanvas/GestureDispatcherMounter.js.map +1 -1
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +33 -36
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js +38 -50
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js.map +1 -1
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js +3 -3
- package/dist/canvas/SceneCanvas/ToolKeybindingsMounter.js.map +1 -1
- package/dist/canvas/SceneCanvas/coordTrace.js +37 -1
- package/dist/canvas/SceneCanvas/coordTrace.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +319 -270
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeRouting.js.map +1 -1
- package/dist/canvas/SceneCanvas/dispatcherGestureBounds.js.map +1 -1
- package/dist/canvas/SceneCanvas/features.js +71 -62
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +97 -0
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js.map +1 -0
- package/dist/canvas/SceneCanvas/isDev.js.map +1 -1
- package/dist/canvas/SceneCanvas/poseGeometry.js +33 -37
- package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -1
- package/dist/canvas/SceneCanvas/props.js +15 -14
- package/dist/canvas/SceneCanvas/props.js.map +1 -1
- package/dist/canvas/SceneCanvas/scenePointQuery.js +50 -0
- package/dist/canvas/SceneCanvas/scenePointQuery.js.map +1 -0
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +52 -0
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.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/useActionTunings.js +17 -0
- package/dist/canvas/SceneCanvas/useActionTunings.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.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 +46 -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 +49 -113
- 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 +51 -41
- 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 +65 -101
- 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 +8 -0
- package/dist/canvas/SceneCanvas/worldPointAt.js.map +1 -0
- package/dist/canvas/SceneCanvas.js +301 -708
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +41 -47
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +40 -0
- package/dist/canvas/SurfaceCanvas.js.map +1 -0
- package/dist/canvas/adapterDerivedPath.js +26 -0
- package/dist/canvas/adapterDerivedPath.js.map +1 -0
- package/dist/canvas/adapterPickSource.js +34 -0
- package/dist/canvas/adapterPickSource.js.map +1 -0
- package/dist/canvas/affordanceAt.js +12 -2
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js +81 -61
- package/dist/canvas/buildSceneLayer.js.map +1 -1
- package/dist/canvas/buildSceneTree.js +56 -34
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/canvasRenderer.js +40 -44
- package/dist/canvas/canvasRenderer.js.map +1 -1
- package/dist/canvas/colorOverrides.js.map +1 -1
- package/dist/canvas/copiesAbove.js +27 -0
- package/dist/canvas/copiesAbove.js.map +1 -0
- package/dist/canvas/defaultDrawOne.js +25 -24
- 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/debug.js.map +1 -1
- package/dist/canvas/deps/editAnchors.js +47 -71
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/geometryProjection.js.map +1 -1
- package/dist/canvas/deps/hitTestArea.js +45 -25
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/insert.js +149 -104
- 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/layout.js +9 -15
- package/dist/canvas/deps/layout.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 +44 -45
- package/dist/canvas/deps/slice.js.map +1 -1
- package/dist/canvas/deps/textEdit.js +8 -8
- package/dist/canvas/deps/textEdit.js.map +1 -1
- package/dist/canvas/deps/view.js.map +1 -1
- package/dist/canvas/derivedPath.js +69 -43
- 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 +2 -6
- package/dist/canvas/getNodeAtPoint.js.map +1 -1
- package/dist/canvas/hud.module.js.map +1 -1
- package/dist/canvas/insertPreviewExtent.js +33 -31
- package/dist/canvas/insertPreviewExtent.js.map +1 -1
- 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 +12 -12
- package/dist/canvas/nodeShapes/derivedPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/imagePainter.js +10 -10
- package/dist/canvas/nodeShapes/imagePainter.js.map +1 -1
- package/dist/canvas/nodeShapes/memo.js.map +1 -1
- package/dist/canvas/nodeShapes/nodePaint.js +34 -23
- package/dist/canvas/nodeShapes/nodePaint.js.map +1 -1
- package/dist/canvas/nodeShapes/pathPainter.js +23 -22
- package/dist/canvas/nodeShapes/pathPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/poseBox.js +6 -6
- package/dist/canvas/nodeShapes/poseBox.js.map +1 -1
- package/dist/canvas/nodeShapes/rectFallbackPainter.js +8 -8
- package/dist/canvas/nodeShapes/rectFallbackPainter.js.map +1 -1
- package/dist/canvas/nodeShapes/shapePainter.js +16 -16
- package/dist/canvas/nodeShapes/shapePainter.js.map +1 -1
- package/dist/canvas/nodeShapes/textPainter.js +1 -1
- package/dist/canvas/nodeShapes/textPainter.js.map +1 -1
- package/dist/canvas/overChildren.js +29 -0
- package/dist/canvas/overChildren.js.map +1 -0
- package/dist/canvas/overlayRoleStrokes.js.map +1 -1
- package/dist/canvas/paintCull.js +6 -8
- 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/pickReach.js +23 -0
- package/dist/canvas/pickReach.js.map +1 -0
- package/dist/canvas/pickWalk.js +43 -70
- 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 +1 -3
- 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 +12 -12
- 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 -83
- package/dist/canvas/renderSceneToPixels.js.map +1 -1
- package/dist/canvas/sceneAdapter.js +59 -144
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneClipboard.js +1 -1
- package/dist/canvas/sceneClipboard.js.map +1 -1
- package/dist/canvas/sceneLayerPaint.js +4 -4
- package/dist/canvas/sceneLayerPaint.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +10 -9
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +37 -42
- 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/useCanvasRenderer.js +23 -11
- 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 +51 -44
- package/dist/canvas/useCanvasView.js.map +1 -1
- package/dist/canvas/useFrameLoop.js +11 -12
- 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/useSceneAdapter.js +22 -0
- package/dist/canvas/useSceneAdapter.js.map +1 -0
- package/dist/canvas/useSceneLayerList.js +4 -14
- package/dist/canvas/useSceneLayerList.js.map +1 -1
- package/dist/canvas/useSurfaceInput.js +39 -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 +40 -34
- 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 +7 -2
- package/dist/canvas/wrapNodeOutput.js.map +1 -1
- package/dist/clipboard.d.ts +7 -14
- package/dist/{types-B4iJRHC3.d.ts → clone-C0eADtS0.d.ts} +129 -84
- package/dist/clone.d.ts +4 -8
- package/dist/clone.js +0 -2
- package/dist/core/device/targets.js.map +1 -1
- package/dist/core/device/useDeviceProfile.js +13 -13
- package/dist/core/device/useDeviceProfile.js.map +1 -1
- 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 +102 -29
- package/dist/core/geometry/poseDescriptor.js.map +1 -1
- package/dist/core/geometry/regionHit.js +35 -37
- 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 +4 -5
- package/dist/core/geometry/unionBounds.js.map +1 -1
- 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 +2 -4
- package/dist/core/layers/children.js.map +1 -0
- package/dist/{features/focus → core/layers}/gateLayer.js +2 -2
- 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/create.js +2 -2
- 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 +19 -23
- package/dist/core/ops/delete.js.map +1 -1
- package/dist/core/ops/reorder/index.js +3 -7
- package/dist/core/ops/reorder/index.js.map +1 -1
- package/dist/core/ops/reorder/setChildOrder.js +2 -4
- package/dist/core/ops/reorder/setChildOrder.js.map +1 -1
- package/dist/core/ops/reparent.js +0 -1
- package/dist/core/ops/reparent.js.map +1 -1
- package/dist/core/ops/slot.js +3 -6
- package/dist/core/ops/slot.js.map +1 -1
- package/dist/core/pages/fitViewToPage.js +15 -0
- package/dist/core/pages/fitViewToPage.js.map +1 -0
- package/dist/core/pages/pages.js +65 -0
- package/dist/core/pages/pages.js.map +1 -0
- package/dist/core/pages/pagesLayer.js +27 -0
- package/dist/core/pages/pagesLayer.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} +104 -93
- 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/arrivalWindow.js +65 -64
- package/dist/core/scene/arrivalWindow.js.map +1 -1
- 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/core/scene/composePose.js +105 -0
- 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 +42 -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 +122 -70
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/historyForm.js +6 -0
- package/dist/core/scene/historyForm.js.map +1 -0
- package/dist/core/scene/kitOps.js +83 -71
- package/dist/core/scene/kitOps.js.map +1 -1
- package/dist/core/scene/kitRegistry.js.map +1 -1
- package/dist/core/scene/layerStack.js +105 -12
- package/dist/core/scene/layerStack.js.map +1 -1
- package/dist/core/scene/layoutPass.js +58 -59
- package/dist/core/scene/layoutPass.js.map +1 -1
- 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 +16 -9
- package/dist/core/scene/nodeFnFields.js.map +1 -1
- package/dist/core/scene/nodeMemo.js.map +1 -1
- package/dist/core/scene/nodeStore.js +72 -71
- package/dist/core/scene/nodeStore.js.map +1 -1
- 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 +67 -0
- package/dist/core/scene/outerOps.js.map +1 -0
- package/dist/core/scene/poseHold.js +39 -0
- package/dist/core/scene/poseHold.js.map +1 -0
- package/dist/core/scene/poseOverrides.js +44 -36
- package/dist/core/scene/poseOverrides.js.map +1 -1
- package/dist/core/scene/poseSnapshot.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +4 -3
- 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.map +1 -1
- package/dist/core/scene/scene.js +81 -690
- 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 +91 -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 +8 -5
- package/dist/core/scene/serialization.js.map +1 -1
- 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/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 +31 -33
- 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 +113 -53
- package/dist/core/viewport/useViewAnimation.js.map +1 -1
- package/dist/core/viewport/view.js +14 -11
- package/dist/core/viewport/view.js.map +1 -1
- package/dist/core/viewport/wheelHandler.js.map +1 -1
- package/dist/core/viewport/zoomAt.js +11 -2
- package/dist/core/viewport/zoomAt.js.map +1 -1
- package/dist/{cornerHandles-CtCb8a3G.d.ts → cornerHandles-BSKbyuvQ.d.ts} +11 -24
- package/dist/debug/createDebugOverlayLayer.js +100 -100
- package/dist/debug/createDebugOverlayLayer.js.map +1 -1
- package/dist/debug/createDebugSink.js.map +1 -1
- 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.map +1 -1
- package/dist/features/ingestion/contentHandlers.js +25 -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/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 +5 -0
- 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 +63 -0
- package/dist/features/paths/editablePath.js.map +1 -0
- package/dist/features/paths/index.js +9 -16
- 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/shapeGenerator.js +89 -0
- package/dist/features/paths/shapeGenerator.js.map +1 -0
- package/dist/features/paths/usePathEdit.js +34 -0
- package/dist/features/paths/usePathEdit.js.map +1 -0
- package/dist/features/poseRun/usePoseRun.js +44 -57
- package/dist/features/poseRun/usePoseRun.js.map +1 -1
- package/dist/features/selection/overlay.js +170 -178
- 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 +119 -88
- package/dist/features/text/useSceneTextEdit.js.map +1 -1
- package/dist/features/viewports/viewResolver.js +28 -24
- package/dist/features/viewports/viewResolver.js.map +1 -1
- package/dist/features/viewports/viewportLayer.js +25 -36
- package/dist/features/viewports/viewportLayer.js.map +1 -1
- package/dist/icons/SliceIcon.js +24 -0
- package/dist/icons/SliceIcon.js.map +1 -0
- package/dist/index.d.ts +5200 -8777
- package/dist/index.js +284 -320
- package/dist/input/keyState.js +14 -14
- package/dist/interactions/actions/actionShortcuts.js.map +1 -1
- package/dist/interactions/actions/{defaults/align.js → align/action.js} +15 -16
- package/dist/interactions/actions/align/action.js.map +1 -0
- package/dist/interactions/actions/align/align.js +24 -24
- 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 +74 -83
- 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} +19 -19
- package/dist/interactions/actions/clipboard/action.js.map +1 -0
- package/dist/interactions/actions/clipboard/clipboardOps.js +15 -15
- package/dist/interactions/actions/clipboard/clipboardOps.js.map +1 -1
- package/dist/interactions/actions/clipboard/wireFormat.js.map +1 -1
- package/dist/interactions/actions/clone/action.js +103 -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 +10 -37
- package/dist/interactions/actions/defaultCommitAdapter.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +69 -74
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorHandles.js +42 -0
- package/dist/interactions/actions/defaults/anchorHandles.js.map +1 -0
- package/dist/interactions/actions/defaults/anchorJoin.js +92 -0
- package/dist/interactions/actions/defaults/anchorJoin.js.map +1 -0
- package/dist/interactions/actions/defaults/areaSelect.js.map +1 -1
- package/dist/interactions/actions/defaults/bendSegment.js +46 -0
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -0
- 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 +1 -1
- package/dist/interactions/actions/defaults/copySubtree.js.map +1 -1
- 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 +36 -21
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/enterPathEdit.js +19 -7
- package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/enterTextEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/group.js +35 -40
- package/dist/interactions/actions/defaults/group.js.map +1 -1
- package/dist/interactions/actions/defaults/icons/anchorIcons.js +75 -0
- package/dist/interactions/actions/defaults/icons/anchorIcons.js.map +1 -0
- 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/editIcons.js +35 -8
- package/dist/interactions/actions/defaults/icons/editIcons.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 +19 -15
- package/dist/interactions/actions/defaults/ingest.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +18 -34
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
- package/dist/interactions/actions/defaults/nudge.js +43 -39
- package/dist/interactions/actions/defaults/nudge.js.map +1 -1
- package/dist/interactions/actions/defaults/pinchZoom.js +29 -29
- package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -1
- package/dist/interactions/actions/defaults/requiresSelection.js.map +1 -1
- package/dist/interactions/actions/defaults/segmentUnder.js +22 -0
- package/dist/interactions/actions/defaults/segmentUnder.js.map +1 -0
- package/dist/interactions/actions/defaults/setFill.js +9 -3
- package/dist/interactions/actions/defaults/setFill.js.map +1 -1
- package/dist/interactions/actions/defaults/setFillOpacity.js +4 -1
- package/dist/interactions/actions/defaults/setFillOpacity.js.map +1 -1
- package/dist/interactions/actions/defaults/setStroke.js.map +1 -1
- package/dist/interactions/actions/defaults/sliceOps.js +20 -22
- 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 +1 -1
- 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 +82 -79
- package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -1
- package/dist/interactions/actions/{defaults/distribute.js → distribute/action.js} +18 -19
- package/dist/interactions/actions/distribute/action.js.map +1 -0
- package/dist/interactions/actions/distribute/distribute.js +15 -15
- package/dist/interactions/actions/distribute/distribute.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/action.js +101 -0
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/geometry.js +2 -4
- package/dist/interactions/actions/edit-anchors/geometry.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/preview.js +26 -0
- package/dist/interactions/actions/edit-anchors/preview.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/symmetry.js +11 -0
- package/dist/interactions/actions/edit-anchors/symmetry.js.map +1 -0
- 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 +1 -1
- package/dist/interactions/actions/flip/helpers.js.map +1 -1
- package/dist/interactions/actions/geometryProjection.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/insert/action.js +79 -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 +55 -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/repositionAction.js +31 -0
- package/dist/interactions/actions/insert/repositionAction.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/move/action.js +91 -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/snapToContainer.js +35 -28
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
- package/dist/interactions/actions/move/capture.js +108 -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 +47 -0
- package/dist/interactions/actions/move/frame.js.map +1 -0
- package/dist/interactions/actions/move/gestureAdapter.js +15 -40
- package/dist/interactions/actions/move/gestureAdapter.js.map +1 -1
- package/dist/interactions/actions/move/landedDescendants.js +8 -8
- 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 +17 -64
- 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/pathCommands/cutJoin.js +102 -0
- package/dist/interactions/actions/pathCommands/cutJoin.js.map +1 -0
- package/dist/interactions/actions/pathCommands/livePathEdit.js +64 -0
- package/dist/interactions/actions/pathCommands/livePathEdit.js.map +1 -0
- package/dist/interactions/actions/pathCommands/pathNodes.js +99 -0
- package/dist/interactions/actions/pathCommands/pathNodes.js.map +1 -0
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +42 -0
- package/dist/interactions/actions/pathCommands/simplifyOffset.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 +1 -1
- package/dist/interactions/actions/poseDescriptorDep.js.map +1 -1
- package/dist/interactions/actions/poseFrame.js +26 -26
- package/dist/interactions/actions/poseFrame.js.map +1 -1
- package/dist/interactions/actions/resize/action.js +66 -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 +88 -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/replay.js +47 -0
- package/dist/interactions/actions/resize/replay.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 +63 -0
- package/dist/interactions/actions/resize/session.js.map +1 -0
- package/dist/interactions/actions/resolveOverlays.js +2 -1
- 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 +71 -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/replay.js +22 -0
- package/dist/interactions/actions/rotate/replay.js.map +1 -0
- package/dist/interactions/actions/rotate/session.js +102 -0
- package/dist/interactions/actions/rotate/session.js.map +1 -0
- package/dist/interactions/actions/spatialReference.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +63 -0
- package/dist/interactions/actions/transform-again/action.js.map +1 -0
- package/dist/interactions/actions/transform-again/memory.js +35 -0
- package/dist/interactions/actions/transform-again/memory.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +84 -61
- package/dist/interactions/actions/useStandardActions.js.map +1 -1
- package/dist/interactions/gestures/pointerDrag/pointerDrag.js +61 -42
- 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/math-CYUjoyyU.d.ts +33 -0
- package/dist/math.d.ts +5 -2
- package/dist/math.js +6 -6
- package/dist/mesh.d.ts +4 -268
- package/dist/mesh.js +3 -7
- package/dist/move.d.ts +6 -4
- package/dist/{originProjection-gHnOup4e.d.ts → originProjection-CoNVpITV.d.ts} +1 -1
- package/dist/patterns-builtin.d.ts +1 -118
- package/dist/patterns-builtin.js +2 -3
- package/dist/poseDescriptor-Bqk-11Rl.d.ts +73 -0
- package/dist/renderer.d.ts +1 -92
- package/dist/renderer.js +2 -19
- package/dist/resize.d.ts +11 -22
- package/dist/resize.js +1 -1
- package/dist/style.css +1 -1
- 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 +16 -15
- 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.map +1 -1
- package/dist/tools/builtin/image/useImageTool.js.map +1 -1
- package/dist/tools/builtin/lasso/useLassoTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js +16 -15
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +162 -164
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/pencil/usePencilTool.js.map +1 -1
- package/dist/tools/builtin/pickTopMostHit.js +11 -14
- package/dist/tools/builtin/pickTopMostHit.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +17 -15
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/rect/useRectTool.js +15 -14
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -1
- package/dist/tools/builtin/select/adapterPointQuery.js +40 -0
- package/dist/tools/builtin/select/adapterPointQuery.js.map +1 -0
- package/dist/tools/builtin/select/selectionContributions.js +5 -5
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +44 -71
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/shared/pointerFollower.js.map +1 -1
- package/dist/tools/builtin/slice/useSliceTool.js +69 -72
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +18 -16
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/builtin/text/useTextTool.js +10 -2
- 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 +20 -14
- package/dist/tools/useKeybindings.js.map +1 -1
- package/dist/{types-k-5Oqh-U.d.ts → types-DBbbCy0i.d.ts} +103 -176
- package/dist/util/paint.js +1 -1
- package/dist/util/paint.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +26 -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 -60
- 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 -146
- package/dist/animation/stagger.js.map +0 -1
- package/dist/animation/timeline/booking.js +0 -114
- package/dist/animation/timeline/booking.js.map +0 -1
- package/dist/animation/timeline/createTimeline.js +0 -125
- package/dist/animation/timeline/createTimeline.js.map +0 -1
- package/dist/animation/timeline/sampleTrack.js +0 -79
- package/dist/animation/timeline/sampleTrack.js.map +0 -1
- package/dist/animation/useAnimator.js +0 -388
- package/dist/animation/useAnimator.js.map +0 -1
- package/dist/autoPoseDescriptor-Ct7yqivU.d.ts +0 -108
- package/dist/builtins-DPcdghtB.d.ts +0 -1223
- package/dist/canvas/MinimapCanvas.js +0 -140
- 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 -82
- 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 -94
- 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/poseFrame.js +0 -44
- package/dist/core/geometry/poseFrame.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/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/scene/pickability.js +0 -6
- package/dist/core/scene/pickability.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/features/cursor/paintedCursorLayer.js.map +0 -1
- 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 +0 -67
- 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 -104
- 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 -239
- 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 -85
- 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 -22
- package/dist/features/parallax/createParallaxPlane.js.map +0 -1
- package/dist/features/paths/anchorEdits.js +0 -167
- package/dist/features/paths/anchorEdits.js.map +0 -1
- package/dist/features/paths/anchors.js +0 -159
- package/dist/features/paths/anchors.js.map +0 -1
- package/dist/features/paths/booleans.js +0 -2
- package/dist/features/paths/markerCommands.js +0 -149
- 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/strokeToPath.js +0 -40
- package/dist/features/paths/strokeToPath.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/commandPaint.js +0 -18
- package/dist/features/patterns/commandPaint.js.map +0 -1
- package/dist/features/patterns/index.js +0 -11
- 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/rasterizeTile.js +0 -17
- package/dist/features/patterns/rasterizeTile.js.map +0 -1
- package/dist/features/patterns/resolveSpec.js +0 -65
- 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 -51
- 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/domOffsets.js +0 -82
- package/dist/features/text/domOffsets.js.map +0 -1
- package/dist/features/text/domRuns.js +0 -230
- 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 -48
- package/dist/features/text/hitTest.js.map +0 -1
- package/dist/features/text/isTextData.js +0 -8
- package/dist/features/text/isTextData.js.map +0 -1
- package/dist/features/text/overlayDirection.js +0 -15
- package/dist/features/text/overlayDirection.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 -133
- package/dist/features/text/runs/rangeStyle.js.map +0 -1
- package/dist/features/text/textCommand.js +0 -60
- 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 -491
- package/dist/features/text/useTextEdit.js.map +0 -1
- package/dist/features/tiling/createTiledLayer.js +0 -65
- 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 -91
- 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.map +0 -1
- package/dist/interactions/actions/defaults/editAnchors.js +0 -100
- package/dist/interactions/actions/defaults/editAnchors.js.map +0 -1
- package/dist/interactions/actions/defaults/flip.js +0 -125
- package/dist/interactions/actions/defaults/flip.js.map +0 -1
- package/dist/interactions/actions/defaults/insert.js +0 -287
- package/dist/interactions/actions/defaults/insert.js.map +0 -1
- package/dist/interactions/actions/defaults/lassoSelect.js +0 -153
- package/dist/interactions/actions/defaults/lassoSelect.js.map +0 -1
- package/dist/interactions/actions/defaults/move.js +0 -778
- package/dist/interactions/actions/defaults/move.js.map +0 -1
- package/dist/interactions/actions/defaults/resize.js +0 -341
- package/dist/interactions/actions/defaults/resize.js.map +0 -1
- package/dist/interactions/actions/defaults/rotate.js +0 -185
- 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/layout/arrivals.js +0 -36
- package/dist/layout/arrivals.js.map +0 -1
- package/dist/math-J-ACHyEg.d.ts +0 -159
- package/dist/registerProgram-T9S_PfAX.d.ts +0 -208
- package/dist/renderer/DrawCommand.js +0 -6
- package/dist/renderer/DrawCommand.js.map +0 -1
- package/dist/renderer/WeaselRenderer.js +0 -333
- 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 -74
- 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 -68
- 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/batch.js +0 -133
- package/dist/renderer/draw/batch.js.map +0 -1
- package/dist/renderer/draw/clip.js +0 -89
- package/dist/renderer/draw/clip.js.map +0 -1
- package/dist/renderer/draw/customShader.js +0 -230
- package/dist/renderer/draw/customShader.js.map +0 -1
- package/dist/renderer/draw/drawTriangles.js +0 -8
- package/dist/renderer/draw/drawTriangles.js.map +0 -1
- package/dist/renderer/draw/effects.js +0 -28
- package/dist/renderer/draw/effects.js.map +0 -1
- package/dist/renderer/draw/flushBatch.js +0 -35
- package/dist/renderer/draw/flushBatch.js.map +0 -1
- package/dist/renderer/draw/gradient.js +0 -90
- package/dist/renderer/draw/gradient.js.map +0 -1
- package/dist/renderer/draw/image.js +0 -38
- package/dist/renderer/draw/image.js.map +0 -1
- package/dist/renderer/draw/mesh.js +0 -16
- package/dist/renderer/draw/mesh.js.map +0 -1
- package/dist/renderer/draw/paintBind.js +0 -70
- package/dist/renderer/draw/paintBind.js.map +0 -1
- package/dist/renderer/draw/pathPaint.js +0 -142
- package/dist/renderer/draw/pathPaint.js.map +0 -1
- package/dist/renderer/draw/scratchPass.js +0 -83
- package/dist/renderer/draw/scratchPass.js.map +0 -1
- package/dist/renderer/draw/stencil.js +0 -28
- package/dist/renderer/draw/stencil.js.map +0 -1
- package/dist/renderer/draw/text.js +0 -167
- package/dist/renderer/draw/text.js.map +0 -1
- package/dist/renderer/draw/uniforms.js +0 -77
- package/dist/renderer/draw/uniforms.js.map +0 -1
- package/dist/renderer/draw.js +0 -79
- 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 -48
- 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 -11
- 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 -20
- package/dist/renderer/math/color.js +0 -321
- package/dist/renderer/math/color.js.map +0 -1
- package/dist/renderer/math/mat3.js +0 -80
- 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 -31
- package/dist/renderer/shaders/gradFill.js.map +0 -1
- package/dist/renderer/shaders/pathFill.js +0 -14
- package/dist/renderer/shaders/pathFill.js.map +0 -1
- package/dist/renderer/shaders/patternFill.js +0 -25
- 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 -34
- 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-DM2B87-g.d.ts +0 -356
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { Mat3 } from '@weasel-js/geom';
|
|
2
|
-
import { Reflection } from '@weasel-js/registry';
|
|
3
|
-
import { TextureHandle } from '@weasel-js/paint';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 2D affine matrix utilities. Column-major 9 elements, matching
|
|
7
|
-
* `WebGL2RenderingContext.uniformMatrix3fv` element order so an upload needs
|
|
8
|
-
* no transpose flag.
|
|
9
|
-
*
|
|
10
|
-
* Layout (column-major):
|
|
11
|
-
* [m00, m10, 0,
|
|
12
|
-
* m01, m11, 0,
|
|
13
|
-
* tx, ty, 1]
|
|
14
|
-
*
|
|
15
|
-
* `apply(m, x, y)` returns `[m * (x, y, 1)] = [m00*x + m01*y + tx,
|
|
16
|
-
* m10*x + m11*y + ty]`.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* A 2D affine transform as a column-major 9-element array, laid out as above.
|
|
21
|
-
*
|
|
22
|
-
* Every matrix the kit builds is a `Float64Array`: a view translation far
|
|
23
|
-
* from the origin at high zoom needs more than a float32's 24 bits to hold a
|
|
24
|
-
* fraction of a pixel. A `Float32Array` is accepted wherever one is read.
|
|
25
|
-
* `mat3.toUniform` makes the float32 copy a GL uniform upload wants.
|
|
26
|
-
*/
|
|
27
|
-
type GlMat3 = Float32Array | Float64Array;
|
|
28
|
-
declare function identity(): GlMat3;
|
|
29
|
-
declare function multiply(out: GlMat3, m: GlMat3): GlMat3;
|
|
30
|
-
/** `m · T(tx, ty)`: composes onto `m`, where `@weasel-js/geom`'s `translate`
|
|
31
|
-
* constructs a fresh matrix. */
|
|
32
|
-
declare function translated(m: GlMat3, tx: number, ty: number): GlMat3;
|
|
33
|
-
/** `m · S(sx, sy)`: composes onto `m`, where geom's `scale` constructs one. */
|
|
34
|
-
declare function scaled(m: GlMat3, sx: number, sy: number): GlMat3;
|
|
35
|
-
/** This layout read as the kernel's 6-element affine. The two carry the same
|
|
36
|
-
* logical order, so the conversion is a repack and nothing else — it exists
|
|
37
|
-
* so the repack has a name instead of appearing inline at each crossing. */
|
|
38
|
-
declare function toAffine(m: GlMat3): Mat3;
|
|
39
|
-
/** The kernel's affine in this layout. The inverse of {@link toAffine}, and
|
|
40
|
-
* what an `SvgGroupNode.transform` (also a kernel affine) becomes on its way
|
|
41
|
-
* to a `GroupDrawCommand`. */
|
|
42
|
-
declare function fromAffine(a: Mat3): GlMat3;
|
|
43
|
-
/** Inverse of an affine matrix, or `null` when `@weasel-js/geom`'s `invert`
|
|
44
|
-
* finds it singular — the same rule, read through this layout. */
|
|
45
|
-
declare function invert(m: GlMat3): GlMat3 | null;
|
|
46
|
-
/** A float32 copy of `m`, for `uniformMatrix3fv` or a shader uniform value. */
|
|
47
|
-
declare function toUniform(m: GlMat3): Float32Array;
|
|
48
|
-
declare function apply(m: GlMat3, x: number, y: number): [number, number];
|
|
49
|
-
/**
|
|
50
|
-
* Map screen pixel coords (0..width on X, 0..height on Y, top-left origin)
|
|
51
|
-
* into clip space (-1..1 on X, 1..-1 on Y — note Y flip so screen-down
|
|
52
|
-
* matches clip-down).
|
|
53
|
-
*/
|
|
54
|
-
declare function screenToClip(width: number, height: number): GlMat3;
|
|
55
|
-
/**
|
|
56
|
-
* Uniform-equivalent scale factor: the square root of the absolute
|
|
57
|
-
* determinant of the linear part, i.e. the geometric mean of the two axis
|
|
58
|
-
* scales. Rotation-invariant. Under non-uniform scale it is between the two
|
|
59
|
-
* axes and exact on neither — the same compromise `meanScale` documents.
|
|
60
|
-
*/
|
|
61
|
-
declare function meanScaleOf(m: GlMat3): number;
|
|
62
|
-
/** The least any direction is scaled by the linear part — its smaller singular
|
|
63
|
-
* value. What a screen length is worth in world units, at most. */
|
|
64
|
-
declare function minScaleOf(m: GlMat3): number;
|
|
65
|
-
/** The renderer's 3x3 matrix operations, as one namespace. These work on the
|
|
66
|
-
* 9-element form the GL uniform upload wants — distinct from
|
|
67
|
-
* `@weasel-js/geom`'s 6-element affine `GlMat3`, though the logical element
|
|
68
|
-
* order is the same. */
|
|
69
|
-
declare const mat3: {
|
|
70
|
-
identity: typeof identity;
|
|
71
|
-
toAffine: typeof toAffine;
|
|
72
|
-
fromAffine: typeof fromAffine;
|
|
73
|
-
multiply: typeof multiply;
|
|
74
|
-
translated: typeof translated;
|
|
75
|
-
scaled: typeof scaled;
|
|
76
|
-
invert: typeof invert;
|
|
77
|
-
toUniform: typeof toUniform;
|
|
78
|
-
apply: typeof apply;
|
|
79
|
-
screenToClip: typeof screenToClip;
|
|
80
|
-
meanScaleOf: typeof meanScaleOf;
|
|
81
|
-
minScaleOf: typeof minScaleOf;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Minimal compile/link/lookup wrapper for a GL program. Throws
|
|
86
|
-
* `ShaderCompileError` on compile or link failure with the GL info log
|
|
87
|
-
* embedded in the error message — never returns a half-initialized program.
|
|
88
|
-
*
|
|
89
|
-
* Designed so test code can stub `getShaderParameter` / `getProgramParameter`
|
|
90
|
-
* via the recorder Proxy without further special-casing.
|
|
91
|
-
*/
|
|
92
|
-
type Stage = 'vertex' | 'fragment' | 'link';
|
|
93
|
-
/** Thrown when a shader fails to compile or link, carrying which stage failed
|
|
94
|
-
* and the driver's log. */
|
|
95
|
-
declare class ShaderCompileError extends Error {
|
|
96
|
-
readonly stage: Stage;
|
|
97
|
-
readonly log: string;
|
|
98
|
-
constructor(stage: Stage, log: string);
|
|
99
|
-
}
|
|
100
|
-
/** An array uniform a program can be written as a whole: its element type as
|
|
101
|
-
* declared, its declared length, and the location of slot 0. */
|
|
102
|
-
interface UniformArray {
|
|
103
|
-
readonly type: string;
|
|
104
|
-
readonly size: number;
|
|
105
|
-
readonly location: WebGLUniformLocation;
|
|
106
|
-
}
|
|
107
|
-
/** A linked GL program with its uniform and attribute locations cached by name. */
|
|
108
|
-
declare class ShaderProgram {
|
|
109
|
-
private readonly gl;
|
|
110
|
-
readonly handle: WebGLProgram;
|
|
111
|
-
private readonly uniforms;
|
|
112
|
-
private readonly arrays;
|
|
113
|
-
private readonly attributes;
|
|
114
|
-
constructor(gl: WebGL2RenderingContext, vertSrc: string, fragSrc: string);
|
|
115
|
-
private compile;
|
|
116
|
-
lookupUniforms(names: readonly string[]): void;
|
|
117
|
-
/** Record each array's slot-0 location under its bare name. An array the
|
|
118
|
-
* driver optimized away has no location and is left out. */
|
|
119
|
-
lookupUniformArrays(decls: ReadonlyMap<string, {
|
|
120
|
-
type: string;
|
|
121
|
-
size: number;
|
|
122
|
-
}>): void;
|
|
123
|
-
lookupAttributes(names: readonly string[]): void;
|
|
124
|
-
uniform(name: string): WebGLUniformLocation | undefined;
|
|
125
|
-
uniformArray(name: string): UniformArray | undefined;
|
|
126
|
-
attribute(name: string): number | undefined;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* registerProgram — public API for registering custom shader programs.
|
|
131
|
-
*
|
|
132
|
-
* Stores raw GLSL source strings in a module-level registry. GL compilation
|
|
133
|
-
* happens on each WeaselRenderer via WeaselRenderer.registerProgram(), which
|
|
134
|
-
* calls getProgramSource() and compiles the result. This keeps registerProgram
|
|
135
|
-
* GL-context-agnostic — identical pattern to registerFont storing ImageBitmap.
|
|
136
|
-
*
|
|
137
|
-
* Module-level state = source strings only; compiled GL
|
|
138
|
-
* programs live on each renderer's programRegistry (Map<id, ShaderProgram>).
|
|
139
|
-
*
|
|
140
|
-
* Lifecycle: program sources live for the module lifetime. No unregister in v1.
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
/** Opaque handle to a compiled custom shader program. */
|
|
144
|
-
interface ShaderProgramHandle {
|
|
145
|
-
readonly id: string;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* A value for one uniform in `ShaderDrawCommand.uniforms`.
|
|
149
|
-
*
|
|
150
|
-
* | TS type | GL call |
|
|
151
|
-
* |-------------------------|--------------------------------------|
|
|
152
|
-
* | number | uniform1f |
|
|
153
|
-
* | [n, n] | uniform2fv |
|
|
154
|
-
* | [n, n, n] | uniform3fv |
|
|
155
|
-
* | [n, n, n, n] | uniform4fv |
|
|
156
|
-
* | Float32Array length 9 | uniformMatrix3fv (column-major) |
|
|
157
|
-
* | Float64Array | as the Float32Array of its values |
|
|
158
|
-
* | Float32Array length 16 | uniformMatrix4fv (column-major) |
|
|
159
|
-
* | TextureHandle | bind to next tex unit + uniform1i |
|
|
160
|
-
*
|
|
161
|
-
* **Array uniforms.** Keyed by an array's bare name (`u_ripples` for
|
|
162
|
-
* `uniform vec3 u_ripples[8]`), a flat `number[]`, `Float32Array`,
|
|
163
|
-
* `Int32Array` or `Uint32Array` fills the array from slot 0 in one
|
|
164
|
-
* `uniform*v` call chosen by the declared element type (`vec3` →
|
|
165
|
-
* `uniform3fv`, `ivec2` → `uniform2iv`, `mat4` → `uniformMatrix4fv`, …).
|
|
166
|
-
* Its length must be a whole number of elements and at most the declared
|
|
167
|
-
* size; a shorter value leaves the remaining slots as they were. Per-slot
|
|
168
|
-
* keys (`u_ripples[2]`) keep working and take the table above.
|
|
169
|
-
*/
|
|
170
|
-
type ShaderUniform = number | [number, number] | [number, number, number] | [number, number, number, number] | readonly number[] | Float32Array | Float64Array | Int32Array | Uint32Array | TextureHandle;
|
|
171
|
-
/** A registered program's GLSL source. An empty `vert` means the kit's default vertex shader. */
|
|
172
|
-
interface ProgramSource {
|
|
173
|
-
vert: string;
|
|
174
|
-
frag: string;
|
|
175
|
-
}
|
|
176
|
-
/** Every registered program's GLSL source, keyed by program id. */
|
|
177
|
-
declare const programSourceRegistry: Reflection<ProgramSource>;
|
|
178
|
-
/**
|
|
179
|
-
* Register a custom shader program by id.
|
|
180
|
-
*
|
|
181
|
-
* Pass an empty string for `vert` to use the kit's default vertex shader
|
|
182
|
-
* (recommended). The kit's vertex shader exposes `v_uv`, `v_screen`, and
|
|
183
|
-
* `v_world` varyings plus `u_bounds` and `u_view` uniforms.
|
|
184
|
-
*
|
|
185
|
-
* **IMPORTANT — Premultiplied alpha:**
|
|
186
|
-
* Your fragment shader MUST output premultiplied alpha:
|
|
187
|
-
* `outColor = vec4(rgb * a, a);` ← correct
|
|
188
|
-
* `outColor = vec4(rgb, a);` ← WRONG — over-brightens translucent regions
|
|
189
|
-
*
|
|
190
|
-
* The renderer uses `gl.blendFunc(ONE, ONE_MINUS_SRC_ALPHA)` to match.
|
|
191
|
-
* Opaque fragments (a=1) are unaffected; only fragments with a < 1 differ.
|
|
192
|
-
*
|
|
193
|
-
* **Re-registration behavior:**
|
|
194
|
-
* - Dev mode (`NODE_ENV !== 'production'`): calling with an existing id and new
|
|
195
|
-
* source replaces it (hot reload). Every renderer that compiled the old source
|
|
196
|
-
* recompiles on its next frame and deletes the program it replaces; a
|
|
197
|
-
* `<Canvas shaders>` naming the id repaints to show it. If the new source fails
|
|
198
|
-
* to compile, the renderer logs the error once and keeps drawing the old one.
|
|
199
|
-
* - Prod mode: calling with an existing id throws.
|
|
200
|
-
*
|
|
201
|
-
* Actual GL compilation and `ShaderCompileError` throwing happen in
|
|
202
|
-
* `WeaselRenderer.registerProgram()`, not here.
|
|
203
|
-
*
|
|
204
|
-
* @experimental API may break before v2.
|
|
205
|
-
*/
|
|
206
|
-
declare function registerProgram(id: string, vert: string, frag: string): ShaderProgramHandle;
|
|
207
|
-
|
|
208
|
-
export { type GlMat3 as G, type ProgramSource as P, ShaderCompileError as S, type ShaderProgramHandle as a, type ShaderUniform as b, ShaderProgram as c, mat3 as m, programSourceRegistry as p, registerProgram as r };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DrawCommand.js","names":["SPRITE_STRIDE"],"sources":["../../src/renderer/DrawCommand.ts"],"sourcesContent":["// Import the source types directly, NOT through the `@weasel-js/core` self-barrel.\n// `src/index.ts` reexports `renderer/index.ts`, which reexports this module — so a\n// barrel import here forms a DrawCommand.ts → index.ts → renderer/index.ts → DrawCommand.ts\n// cycle that makes the dts bundler split them into mutually-dependent chunks and warn.\nimport type { Path } from '@weasel-js/geom';\nimport type { CommandFill, CommandStroke } from '@weasel-js/paint';\nimport type { TextAlign, TextDirection, TextStyle } from '@weasel-js/text';\nimport type { ResolvedRun } from '@weasel-js/text';\nimport type { TextVerticalAlign } from '@weasel-js/text';\nimport type { GlMat3 } from './math/mat3';\nimport type { ShaderProgramHandle, ShaderUniform } from './shaders/registerProgram';\nimport type { Effect } from './effects/types';\n\n/**\n * Solid-fill paint variant (subset of the full `FillStyle` union from\n * `@weasel-js/core`). Kept for back-compat with step-1/2 consumers and\n * because some code reads `fill.color` directly. Through step 4, fills can\n * be any `FillStyle` variant — solid, pattern, or gradient.\n */\nexport interface SolidPaint {\n fill?: 'solid';\n /** Any CSS color string accepted by `parseColor`: hex, `rgb()`/`rgba()`, `hsl()`/`hsla()`, named, or `transparent`. */\n color: string;\n opacity?: number;\n}\n\n/** DrawCommand variants implemented through step 6. */\nexport type DrawCommand =\n | PathDrawCommand\n | GroupDrawCommand\n | TextDrawCommand\n | ImageDrawCommand\n | SpritesDrawCommand\n | ShaderDrawCommand;\n\n/** Draw a path, filled and/or stroked. The workhorse command: every shape the\n * kit draws that is not text, an image, or a custom shader is one of these. */\nexport interface PathDrawCommand {\n kind: 'path';\n path: Path;\n /** Solid, pattern, or gradient (linear/radial/conic), resolved for the\n * renderer: `commandFill` makes one from a node's `FillStyle`. */\n fill?: CommandFill;\n /** Stroke spec. Its `paint` takes what `fill` does. */\n stroke?: CommandStroke;\n /**\n * Optional flat RGBA-per-path-anchor color array (length =\n * `4 × countPathAnchors(path)`, floats in 0..1). The renderer\n * arc-length-interpolates these per-anchor colors across the\n * flattened/triangulated mesh between consecutive anchors using the\n * mesh's `anchorA` / `anchorB` / `anchorT` parameterization.\n *\n * **`fill` must also be set when using `vertexColors`.** The renderer\n * only enters the per-vertex shader path when the command has a fill\n * (the fill provides the opacity uniform; the vertex colors override\n * the fill's color). Pass any solid `fill` (e.g. `{ color: '#fff' }`)\n * as the placeholder; the per-vertex colors win in the shader.\n */\n vertexColors?: number[];\n}\n\n/** Draw a list of commands under a shared transform, opacity, color matrix\n * and clip. Groups nest, and their effects accumulate down the stack — this\n * is how a container node's transform reaches its descendants. */\nexport interface GroupDrawCommand {\n kind: 'group';\n transform?: GlMat3;\n alpha?: number;\n /**\n * Optional 4×5 color matrix (row-major, 20 numbers) — `out = M₄ₓ₄ * in + bias`.\n * Accumulated multiplicatively down the group stack. Defaults to identity.\n */\n colorMatrix?: number[];\n /** Optional clip path. When set, the renderer rasterizes this path into\n * the stencil buffer before drawing `children`; the children paint only\n * where the clip covers. Nested groups with clips intersect — a child\n * cannot escape an ancestor's clip. Max 7 nesting levels; the renderer\n * throws if exceeded. */\n clip?: Path;\n /**\n * Full-screen passes run over this group's own pixels, in order, before it\n * is composited into its parent.\n *\n * Unlike every other field here, this does not accumulate down the group\n * stack — it is a render-target boundary. The children draw into a buffer of\n * their own, each effect reads the previous one's output, and the result is\n * composited back under this group's `transform`, `alpha`, `colorMatrix` and\n * whatever clip encloses it. So a blur here blurs this group and nothing\n * around it, which is what a CSS `filter` on the canvas cannot do.\n *\n * An empty or absent list costs nothing: no buffer is allocated until a\n * group asks for one.\n */\n effects?: readonly Effect[];\n children: DrawCommand[];\n}\n\n/**\n * Text draw command. Renders one or more runs at (`x`, `y`) in screen\n * space, optionally word-wrapping at `maxWidth`. The renderer resolves\n * each run's `(fontFamily, fontWeight, fontStyle)` to an MSDF atlas via\n * `resolveFontVariant` and bucket-draws by atlas + color group.\n *\n * `style` carries node-level defaults (`lineHeight`, anti-alias width)\n * that don't belong on individual runs.\n */\nexport interface TextDrawCommand {\n kind: 'text';\n x: number;\n y: number;\n runs: ResolvedRun[];\n /** Wrap width. Absent never wraps. */\n maxWidth?: number;\n align?: TextAlign;\n /** What `start` / `end` resolve against, and the base direction of bidi\n * reordering — see `LayoutRunsOpts.direction`. Default `style`'s. */\n direction?: TextDirection | 'auto';\n /** Spread each wrapped line across `width` — see `LayoutRunsOpts.justify`.\n * `align` then sets only the lines it does not spread. Default `false`. */\n justify?: boolean;\n /** Box width `align` resolves within, from `x`. Default `maxWidth`; with\n * neither, `x` is the line's left edge, midpoint or right edge. */\n width?: number;\n style: TextStyle;\n /** Box height for vertical alignment. When set with `verticalAlign`,\n * the laid-out block shifts within `[y, y+height]`. */\n height?: number;\n /** Default 'top' — the legacy top-anchored behavior. */\n verticalAlign?: TextVerticalAlign;\n}\n\n/**\n * Image draw command — renders `image` at screen-space rect (x, y, w, h).\n * The image is stretched to fit; no tiling. Use a pattern FillStyle on a path\n * for tiling.\n */\nexport interface ImageDrawCommand {\n kind: 'image';\n image: ImageBitmap;\n x: number;\n y: number;\n w: number;\n h: number;\n opacity?: number;\n /** Magnification filter. `'linear'` (default) smooths; `'nearest'` shows\n * device pixels as hard squares — required by anything magnifying a\n * framebuffer readback, where blur destroys the point of the readback. */\n sampling?: 'linear' | 'nearest';\n /** Sub-rectangle of `image` to draw, in bitmap pixels from the top-left.\n * Omitted draws the whole bitmap. Not range-checked: a rect past the edge\n * samples outside [0..1], which CLAMP_TO_EDGE smears. With\n * `sampling: 'linear'` the filter reaches half a texel beyond `source`, so\n * atlas frames need a gutter (see `SpriteSheet.spacing`) or `'nearest'`. */\n source?: { x: number; y: number; w: number; h: number };\n /** Mirror the sampled region within the destination rect. The quad does not\n * move — a flipped draw covers exactly the pixels an unflipped one does. */\n flipX?: boolean;\n flipY?: boolean;\n}\n\n/** Floats per sprite in `SpritesDrawCommand.sprites`. */\nexport const SPRITE_STRIDE = 9;\n\n/**\n * Draw many quads sampling one bitmap — an atlas, a sprite sheet, a wall of\n * thumbnails. The same picture as a run of `ImageDrawCommand`s the renderer\n * would coalesce anyway, handed over already packed so it never walks a\n * command object per quad.\n *\n * Reach for it past a few thousand sprites. Below that a plain run of image\n * commands merges into the same single draw and reads better; the packed form\n * exists because at 20,000 the object walk is about half the frame.\n *\n * The sprites are one run: they share a texture, a filter, and whatever group\n * transform, alpha, color matrix and clip are live, exactly as a merged run of\n * image commands would. Anything varying per sprite is in the array.\n */\nexport interface SpritesDrawCommand {\n kind: 'sprites';\n image: ImageBitmap;\n /** Magnification filter for the whole run, as `ImageDrawCommand.sampling`. */\n sampling?: 'linear' | 'nearest';\n /**\n * `SPRITE_STRIDE` floats per sprite:\n * `dx, dy, dw, dh, sx, sy, sw, sh, opacity`.\n *\n * Destination is in the group's coordinates; source is in bitmap pixels,\n * like `ImageDrawCommand.source`. A negative `sw` or `sh` mirrors that axis\n * within the source rect, which is what `flipX` / `flipY` do. A trailing\n * partial sprite is ignored.\n */\n sprites: Float32Array;\n}\n\n/**\n * Custom shader draw command. The renderer generates a quad over `bounds`\n * and dispatches the consumer's fragment shader with the kit's vertex prelude.\n *\n * `uniforms` keys must match names declared in the consumer's fragment shader.\n * The kit automatically sets `u_bounds`, `u_view`, and `u_proj` — do not\n * declare those in `uniforms`.\n *\n * @experimental API may change before v2.\n */\nexport interface ShaderDrawCommand {\n kind: 'shader';\n program: ShaderProgramHandle;\n uniforms: Record<string, ShaderUniform>;\n /** Screen-space bounding rect in CSS pixels. */\n bounds: { x: number; y: number; w: number; h: number };\n}\n"],"mappings":";AAiKA,IAAaA,IAAgB"}
|
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { createPaintResources as e } from "./paintResources.js";
|
|
2
|
-
import { ShaderProgram as t } from "./shaders/ShaderProgram.js";
|
|
3
|
-
import { FRAG_SRC as n, PATH_FILL_ATTRIBUTES as r, PATH_FILL_UNIFORMS as i, PATH_FILL_VCOLOR_ATTRIBUTES as a, VCOLOR_FRAG_SRC as o, VCOLOR_VERT_SRC as s, VERT_SRC as c } from "./shaders/pathFill.js";
|
|
4
|
-
import { BATCH_FILL_ATTRIBUTES as l, BATCH_FILL_UNIFORMS as u, BATCH_FRAG_SRC as d, BATCH_VERT_SRC as f } from "./shaders/batchFill.js";
|
|
5
|
-
import { GRAD_FILL_ATTRIBUTES as p, GRAD_FILL_UNIFORMS as m, GRAD_FRAG_SRC as h, GRAD_VERT_SRC as g } from "./shaders/gradFill.js";
|
|
6
|
-
import { PATTERN_FILL_ATTRIBUTES as _, PATTERN_FILL_UNIFORMS as v, PATTERN_FRAG_SRC as y, PATTERN_VERT_SRC as b } from "./shaders/patternFill.js";
|
|
7
|
-
import { GLYPH_GRAD_FRAG_SRC as x, GLYPH_GRAD_UNIFORMS as S, GLYPH_PAINT_ATTRIBUTES as C, GLYPH_PAINT_VERT_SRC as w, GLYPH_PATTERN_FRAG_SRC as T, GLYPH_PATTERN_UNIFORMS as E, GLYPH_TEXTURE_FRAG_SRC as D, GLYPH_TEXTURE_UNIFORMS as ee } from "./shaders/glyphPaint.js";
|
|
8
|
-
import { PaintScratch as te } from "./paintScratch.js";
|
|
9
|
-
import { GLMeshCache as O } from "./cache/GLMeshCache.js";
|
|
10
|
-
import { GLTextureCache as k } from "./cache/GLTextureCache.js";
|
|
11
|
-
import { textureRegistry as A } from "./textures/registerTexture.js";
|
|
12
|
-
import { GLImageCache as j } from "./cache/GLImageCache.js";
|
|
13
|
-
import { GradientRampAtlas as M } from "./cache/GradientRampAtlas.js";
|
|
14
|
-
import { GroupState as N } from "./state/GroupState.js";
|
|
15
|
-
import { getProgramSource as P } from "./shaders/registerProgram.js";
|
|
16
|
-
import { flushBatch as F } from "./draw/flushBatch.js";
|
|
17
|
-
import { OUTLINE_MIN_SCREEN_PX as I } from "./draw/text.js";
|
|
18
|
-
import { dispatch as L } from "./draw.js";
|
|
19
|
-
import { DrawBatch as R } from "./drawBatch.js";
|
|
20
|
-
import { CUSTOM_ATTRIBUTES as z, CUSTOM_KIT_UNIFORMS as B, CUSTOM_VERT_SRC as V, QUAD_INDICES as H, QUAD_VERTICES as U } from "./shaders/customPrelude.js";
|
|
21
|
-
import { EffectTargets as W } from "./effects/EffectTargets.js";
|
|
22
|
-
import { extractUniformArrays as G, extractUniformNames as K } from "./shaders/extractUniformNames.js";
|
|
23
|
-
import { DEFAULT_BAKE_BUDGET as q, markAllFontsNotUploaded as J, resetBakeBudget as Y } from "@weasel-js/font";
|
|
24
|
-
//#region src/renderer/WeaselRenderer.ts
|
|
25
|
-
function X(e, t) {
|
|
26
|
-
return [
|
|
27
|
-
...B,
|
|
28
|
-
...K(e),
|
|
29
|
-
...K(t)
|
|
30
|
-
];
|
|
31
|
-
}
|
|
32
|
-
function Z(e, n) {
|
|
33
|
-
let r = n.vert === "" ? V : n.vert, i = new t(e, r, n.frag);
|
|
34
|
-
return i.lookupUniforms(X(r, n.frag)), i.lookupUniformArrays(new Map([...G(r), ...G(n.frag)])), i.lookupAttributes(z), i;
|
|
35
|
-
}
|
|
36
|
-
function Q() {
|
|
37
|
-
return typeof performance < "u" ? performance.now() : Date.now();
|
|
38
|
-
}
|
|
39
|
-
var ne = {
|
|
40
|
-
pattern: [T, E],
|
|
41
|
-
gradient: [x, S],
|
|
42
|
-
texture: [D, ee]
|
|
43
|
-
}, re = class {
|
|
44
|
-
gl;
|
|
45
|
-
stats = {
|
|
46
|
-
drawCalls: 0,
|
|
47
|
-
ms: 0,
|
|
48
|
-
spans: []
|
|
49
|
-
};
|
|
50
|
-
pathFill;
|
|
51
|
-
pathFillVColor;
|
|
52
|
-
batchFill;
|
|
53
|
-
gradFill;
|
|
54
|
-
patternFill;
|
|
55
|
-
glyphPaintPrograms = /* @__PURE__ */ new Map();
|
|
56
|
-
meshCache;
|
|
57
|
-
textureCache;
|
|
58
|
-
imageCache;
|
|
59
|
-
gradRamps;
|
|
60
|
-
programRegistry = /* @__PURE__ */ new Map();
|
|
61
|
-
programSources = /* @__PURE__ */ new Map();
|
|
62
|
-
quadVbo = null;
|
|
63
|
-
quadIbo = null;
|
|
64
|
-
drawBatch;
|
|
65
|
-
whiteTexture = null;
|
|
66
|
-
groupState = new N();
|
|
67
|
-
widthCss;
|
|
68
|
-
heightCss;
|
|
69
|
-
dpr;
|
|
70
|
-
canvas = null;
|
|
71
|
-
lossTarget = null;
|
|
72
|
-
target = null;
|
|
73
|
-
effectTargets;
|
|
74
|
-
paintScratch;
|
|
75
|
-
imageMinification;
|
|
76
|
-
flattenTolerance;
|
|
77
|
-
bakeBudget;
|
|
78
|
-
textOutlineMinScreenSize;
|
|
79
|
-
contextLost = !1;
|
|
80
|
-
boundOnLost = (e) => this.onContextLost(e);
|
|
81
|
-
boundOnRestored = () => this.onContextRestored();
|
|
82
|
-
disposed = !1;
|
|
83
|
-
paintResources = e();
|
|
84
|
-
constructor(e) {
|
|
85
|
-
if (!e.gl && !e.canvas) throw Error("WeaselRenderer requires either gl or canvas");
|
|
86
|
-
let x = e.gl ?? e.canvas.getContext("webgl2", { stencil: !0 });
|
|
87
|
-
if (!x) throw Error("WeaselRenderer: WebGL2 not available");
|
|
88
|
-
this.gl = x, this.effectTargets = new W(this.gl), this.paintScratch = new te(this.gl);
|
|
89
|
-
let S = typeof this.gl.getContextAttributes == "function" ? this.gl.getContextAttributes() : null;
|
|
90
|
-
if (S && S.stencil === !1) throw Error("WeaselRenderer: the supplied WebGL2 context has no stencil buffer. Create it with { stencil: true } — clips and even-odd fills need one.");
|
|
91
|
-
this.widthCss = e.width, this.heightCss = e.height, this.dpr = e.dpr, this.imageMinification = e.imageMinification ?? "linear", this.flattenTolerance = e.flattenTolerance, this.bakeBudget = e.bakeBudget ?? q, this.textOutlineMinScreenSize = e.textOutlineMinScreenSize ?? I, this.canvas = e.canvas ?? null, this.canvas && (this.canvas.width = Math.round(e.width * e.dpr), this.canvas.height = Math.round(e.height * e.dpr), this.canvas.style && (this.canvas.style.width = `${e.width}px`, this.canvas.style.height = `${e.height}px`));
|
|
92
|
-
let C = this.canvas ?? this.gl.canvas ?? null;
|
|
93
|
-
C && typeof C.addEventListener == "function" && (this.lossTarget = C, this.lossTarget.addEventListener("webglcontextlost", this.boundOnLost), this.lossTarget.addEventListener("webglcontextrestored", this.boundOnRestored)), this.applyGlState(), this.applyTarget(), this.pathFill = new t(this.gl, c, n), this.pathFill.lookupUniforms(i), this.pathFill.lookupAttributes(r), this.pathFillVColor = new t(this.gl, s, o), this.pathFillVColor.lookupUniforms(i), this.pathFillVColor.lookupAttributes(a), this.batchFill = new t(this.gl, f, d), this.batchFill.lookupUniforms(u), this.batchFill.lookupAttributes(l), this.gradFill = new t(this.gl, g, h), this.gradFill.lookupUniforms(m), this.gradFill.lookupAttributes(p), this.patternFill = new t(this.gl, b, y), this.patternFill.lookupUniforms(v), this.patternFill.lookupAttributes(_), this.meshCache = new O(this.gl), this.textureCache = new k(this.gl), this.imageCache = new j(this.gl, this.imageMinification), this.gradRamps = new M(this.gl), this.uploadQuadGeometry(), this.drawBatch = new R(this.gl, this.batchFill), this.whiteTexture = $(this.gl);
|
|
94
|
-
}
|
|
95
|
-
uploadQuadGeometry() {
|
|
96
|
-
let e = this.gl;
|
|
97
|
-
if (this.quadVbo = e.createBuffer(), this.quadIbo = e.createBuffer(), !this.quadVbo || !this.quadIbo) throw Error("WeaselRenderer: failed to create quad geometry buffers");
|
|
98
|
-
e.bindBuffer(e.ARRAY_BUFFER, this.quadVbo), e.bufferData(e.ARRAY_BUFFER, U, e.STATIC_DRAW), e.bindBuffer(e.ARRAY_BUFFER, null), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.quadIbo), e.bufferData(e.ELEMENT_ARRAY_BUFFER, H, e.STATIC_DRAW), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, null);
|
|
99
|
-
}
|
|
100
|
-
registerProgram(e) {
|
|
101
|
-
if (this.disposed) return;
|
|
102
|
-
let t = P(e.id);
|
|
103
|
-
if (!t) throw Error(`WeaselRenderer.registerProgram: program "${e.id}" not found in source registry. Call the module-level registerProgram() first.`);
|
|
104
|
-
this.installProgram(e.id, t, Z(this.gl, t));
|
|
105
|
-
}
|
|
106
|
-
installProgram(e, t, n) {
|
|
107
|
-
let r = this.programRegistry.get(e);
|
|
108
|
-
r && this.gl.deleteProgram(r.handle), this.programRegistry.set(e, n), this.programSources.set(e, t);
|
|
109
|
-
}
|
|
110
|
-
refreshPrograms() {
|
|
111
|
-
for (let [e, t] of this.programSources) {
|
|
112
|
-
let n = P(e);
|
|
113
|
-
if (n && n !== t) {
|
|
114
|
-
if (n.vert === t.vert && n.frag === t.frag) {
|
|
115
|
-
this.programSources.set(e, n);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
try {
|
|
119
|
-
this.installProgram(e, n, Z(this.gl, n));
|
|
120
|
-
} catch (t) {
|
|
121
|
-
this.programSources.set(e, n), console.error(`weasel: failed to recompile re-registered program "${e}"; still drawing the previous one:`, t);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
ensureProgram(e) {
|
|
127
|
-
let t = this.programRegistry.get(e);
|
|
128
|
-
if (t) return t;
|
|
129
|
-
if (this.disposed || !P(e)) return null;
|
|
130
|
-
try {
|
|
131
|
-
this.registerProgram({ id: e });
|
|
132
|
-
} catch (t) {
|
|
133
|
-
return console.error(`weasel: failed to compile paint program "${e}":`, t), null;
|
|
134
|
-
}
|
|
135
|
-
return this.programRegistry.get(e) ?? null;
|
|
136
|
-
}
|
|
137
|
-
glyphPaintProgram(e) {
|
|
138
|
-
let n = this.glyphPaintPrograms.get(e);
|
|
139
|
-
if (n) return n;
|
|
140
|
-
let [r, i] = ne[e], a = new t(this.gl, w, r);
|
|
141
|
-
return a.lookupUniforms(i), a.lookupAttributes(C), this.glyphPaintPrograms.set(e, a), a;
|
|
142
|
-
}
|
|
143
|
-
applyGlState() {
|
|
144
|
-
let e = this.gl;
|
|
145
|
-
e.enable(e.BLEND), e.blendFunc(e.ONE, e.ONE_MINUS_SRC_ALPHA), e.disable(e.DEPTH_TEST), e.disable(e.CULL_FACE), e.clearColor(0, 0, 0, 0), e.colorMask(!0, !0, !0, !0), e.bindVertexArray(null), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1);
|
|
146
|
-
}
|
|
147
|
-
deviceRect() {
|
|
148
|
-
let e = this.target?.origin.x ?? 0, t = this.target?.origin.y ?? 0, n = Math.round(e * this.dpr), r = Math.round(t * this.dpr);
|
|
149
|
-
return {
|
|
150
|
-
x: n,
|
|
151
|
-
y: r,
|
|
152
|
-
width: Math.round((e + this.widthCss) * this.dpr) - n,
|
|
153
|
-
height: Math.round((t + this.heightCss) * this.dpr) - r
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
applyTarget() {
|
|
157
|
-
let e = this.gl, { x: t, y: n, width: r, height: i } = this.deviceRect();
|
|
158
|
-
if (!this.target) {
|
|
159
|
-
e.disable(e.SCISSOR_TEST), e.viewport(0, 0, r, i);
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
let a = e.drawingBufferHeight - n - i;
|
|
163
|
-
e.viewport(t, a, r, i), e.scissor(t, a, r, i), e.enable(e.SCISSOR_TEST);
|
|
164
|
-
}
|
|
165
|
-
setTarget(e) {
|
|
166
|
-
this.target = e, this.applyTarget();
|
|
167
|
-
}
|
|
168
|
-
getTarget() {
|
|
169
|
-
return this.target;
|
|
170
|
-
}
|
|
171
|
-
isContextLost() {
|
|
172
|
-
return this.contextLost;
|
|
173
|
-
}
|
|
174
|
-
onContextLost(e) {
|
|
175
|
-
e.preventDefault(), this.contextLost = !0;
|
|
176
|
-
}
|
|
177
|
-
onContextRestored() {
|
|
178
|
-
this.contextLost = !1, this.applyGlState(), this.applyTarget(), this.effectTargets.releaseAll(), this.paintScratch.release(), this.paintResources.release(), this.paintResources = e(), this.pathFill = new t(this.gl, c, n), this.pathFill.lookupUniforms(i), this.pathFill.lookupAttributes(r), this.pathFillVColor = new t(this.gl, s, o), this.pathFillVColor.lookupUniforms(i), this.pathFillVColor.lookupAttributes(a), this.batchFill = new t(this.gl, f, d), this.batchFill.lookupUniforms(u), this.batchFill.lookupAttributes(l), this.gradFill = new t(this.gl, g, h), this.gradFill.lookupUniforms(m), this.gradFill.lookupAttributes(p), this.patternFill = new t(this.gl, b, y), this.patternFill.lookupUniforms(v), this.patternFill.lookupAttributes(_), this.glyphPaintPrograms.clear(), this.meshCache = new O(this.gl), this.textureCache = new k(this.gl), this.imageCache.abandon(), this.imageCache = new j(this.gl, this.imageMinification), this.gradRamps = new M(this.gl), J(), this.uploadQuadGeometry(), this.drawBatch = new R(this.gl, this.batchFill), this.whiteTexture = $(this.gl);
|
|
179
|
-
for (let e of this.programRegistry.keys()) {
|
|
180
|
-
let t = P(e);
|
|
181
|
-
if (t) try {
|
|
182
|
-
this.programRegistry.set(e, Z(this.gl, t)), this.programSources.set(e, t);
|
|
183
|
-
} catch (t) {
|
|
184
|
-
console.error(`weasel: failed to recompile program "${e}" after context restore:`, t);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
dispose() {
|
|
189
|
-
if (this.disposed) return;
|
|
190
|
-
this.disposed = !0;
|
|
191
|
-
let e = this.gl;
|
|
192
|
-
this.lossTarget && (this.lossTarget.removeEventListener("webglcontextlost", this.boundOnLost), this.lossTarget.removeEventListener("webglcontextrestored", this.boundOnRestored)), this.meshCache.dispose(), this.paintResources.release();
|
|
193
|
-
for (let t of [
|
|
194
|
-
this.pathFill,
|
|
195
|
-
this.pathFillVColor,
|
|
196
|
-
this.batchFill,
|
|
197
|
-
this.gradFill,
|
|
198
|
-
this.patternFill,
|
|
199
|
-
...this.glyphPaintPrograms.values()
|
|
200
|
-
]) e.deleteProgram(t.handle);
|
|
201
|
-
this.glyphPaintPrograms.clear();
|
|
202
|
-
for (let t of this.programRegistry.values()) e.deleteProgram(t.handle);
|
|
203
|
-
this.programRegistry.clear(), this.programSources.clear(), this.textureCache.free(), this.imageCache.dispose(), this.gradRamps.free(), this.quadVbo && e.deleteBuffer(this.quadVbo), this.quadIbo && e.deleteBuffer(this.quadIbo), this.drawBatch.dispose(), this.whiteTexture && e.deleteTexture(this.whiteTexture), this.whiteTexture = null, this.effectTargets.releaseAll(), this.paintScratch.release();
|
|
204
|
-
}
|
|
205
|
-
render(e, t, n) {
|
|
206
|
-
if (this.contextLost || this.disposed) return;
|
|
207
|
-
let r = Q(), i = { drawCalls: 0 }, a = [];
|
|
208
|
-
this.stats = {
|
|
209
|
-
drawCalls: 0,
|
|
210
|
-
ms: 0,
|
|
211
|
-
spans: a
|
|
212
|
-
};
|
|
213
|
-
let o = this.gl;
|
|
214
|
-
this.meshCache.drainPendingDeletes(), this.imageCache.drainPendingDeletes(), this.textureCache.sweep(A), this.refreshPrograms(), Y(this.bakeBudget), this.groupState.reset(), this.drawBatch.reset(), this.effectTargets.reclaim(), o.bindFramebuffer(o.FRAMEBUFFER, null), this.applyGlState(), this.applyTarget(), this.target?.clear !== !1 && (o.stencilMask(255), o.clear(o.COLOR_BUFFER_BIT | o.STENCIL_BUFFER_BIT));
|
|
215
|
-
let s = this.deviceRect(), c = {
|
|
216
|
-
gl: o,
|
|
217
|
-
pathFill: this.pathFill,
|
|
218
|
-
pathFillVColor: this.pathFillVColor,
|
|
219
|
-
batchFill: this.batchFill,
|
|
220
|
-
gradFill: this.gradFill,
|
|
221
|
-
patternFill: this.patternFill,
|
|
222
|
-
meshCache: this.meshCache,
|
|
223
|
-
textureCache: this.textureCache,
|
|
224
|
-
imageCache: this.imageCache,
|
|
225
|
-
gradRamps: this.gradRamps,
|
|
226
|
-
programRegistry: this.programRegistry,
|
|
227
|
-
ensureProgram: (e) => this.ensureProgram(e),
|
|
228
|
-
glyphPaintProgram: (e) => this.glyphPaintProgram(e),
|
|
229
|
-
quadVbo: this.quadVbo,
|
|
230
|
-
quadIbo: this.quadIbo,
|
|
231
|
-
drawBatch: this.drawBatch,
|
|
232
|
-
whiteTexture: this.whiteTexture,
|
|
233
|
-
state: this.groupState,
|
|
234
|
-
widthCss: this.widthCss,
|
|
235
|
-
heightCss: this.heightCss,
|
|
236
|
-
clipDepth: 0,
|
|
237
|
-
clipStack: [],
|
|
238
|
-
flattenTolerance: this.flattenTolerance,
|
|
239
|
-
textOutlineMinScreenSize: this.textOutlineMinScreenSize,
|
|
240
|
-
viewMatrix: t,
|
|
241
|
-
effectTargets: this.effectTargets,
|
|
242
|
-
paintScratch: this.paintScratch,
|
|
243
|
-
renderTarget: null,
|
|
244
|
-
deviceWidth: s.width,
|
|
245
|
-
deviceHeight: s.height,
|
|
246
|
-
restoreTargetRect: () => this.applyTarget(),
|
|
247
|
-
paintResources: this.paintResources,
|
|
248
|
-
stats: i
|
|
249
|
-
};
|
|
250
|
-
this.drawBatch.clip = null;
|
|
251
|
-
let l = n?.spans ?? [], u = 0;
|
|
252
|
-
for (let t = 0; t < l.length; t++) {
|
|
253
|
-
let n = l[t];
|
|
254
|
-
for (; u < n.start; u++) L(c, e[u]);
|
|
255
|
-
let r = i.drawCalls, o = Q();
|
|
256
|
-
for (; u < n.end; u++) L(c, e[u]);
|
|
257
|
-
t === l.length - 1 && u >= e.length && F(c), a.push({
|
|
258
|
-
id: n.id,
|
|
259
|
-
drawCalls: i.drawCalls - r,
|
|
260
|
-
ms: Q() - o
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
for (; u < e.length; u++) L(c, e[u]);
|
|
264
|
-
F(c), this.meshCache.freeTransient(), this.stats.drawCalls = i.drawCalls, this.stats.ms = Q() - r;
|
|
265
|
-
}
|
|
266
|
-
lastFrameStats() {
|
|
267
|
-
return this.stats;
|
|
268
|
-
}
|
|
269
|
-
setFlattenTolerance(e) {
|
|
270
|
-
this.flattenTolerance = e;
|
|
271
|
-
}
|
|
272
|
-
resize(e) {
|
|
273
|
-
this.widthCss = e.width, this.heightCss = e.height, this.dpr = e.dpr, this.canvas && (this.canvas.width = Math.round(e.width * e.dpr), this.canvas.height = Math.round(e.height * e.dpr), this.canvas.style && (this.canvas.style.width = `${e.width}px`, this.canvas.style.height = `${e.height}px`)), this.applyTarget();
|
|
274
|
-
}
|
|
275
|
-
_gl() {
|
|
276
|
-
return this.gl;
|
|
277
|
-
}
|
|
278
|
-
_pathFill() {
|
|
279
|
-
return this.pathFill;
|
|
280
|
-
}
|
|
281
|
-
_pathFillVColor() {
|
|
282
|
-
return this.pathFillVColor;
|
|
283
|
-
}
|
|
284
|
-
_drawBatch() {
|
|
285
|
-
return this.drawBatch;
|
|
286
|
-
}
|
|
287
|
-
_batchFill() {
|
|
288
|
-
return this.batchFill;
|
|
289
|
-
}
|
|
290
|
-
_gradFill() {
|
|
291
|
-
return this.gradFill;
|
|
292
|
-
}
|
|
293
|
-
_patternFill() {
|
|
294
|
-
return this.patternFill;
|
|
295
|
-
}
|
|
296
|
-
_meshCache() {
|
|
297
|
-
return this.meshCache;
|
|
298
|
-
}
|
|
299
|
-
_textureCache() {
|
|
300
|
-
return this.textureCache;
|
|
301
|
-
}
|
|
302
|
-
_imageCache() {
|
|
303
|
-
return this.imageCache;
|
|
304
|
-
}
|
|
305
|
-
_gradRamps() {
|
|
306
|
-
return this.gradRamps;
|
|
307
|
-
}
|
|
308
|
-
_groupState() {
|
|
309
|
-
return this.groupState;
|
|
310
|
-
}
|
|
311
|
-
_widthCss() {
|
|
312
|
-
return this.widthCss;
|
|
313
|
-
}
|
|
314
|
-
_heightCss() {
|
|
315
|
-
return this.heightCss;
|
|
316
|
-
}
|
|
317
|
-
_dpr() {
|
|
318
|
-
return this.dpr;
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
function $(e) {
|
|
322
|
-
let t = e.createTexture();
|
|
323
|
-
return t ? (e.bindTexture(e.TEXTURE_2D, t), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, new Uint8Array([
|
|
324
|
-
255,
|
|
325
|
-
255,
|
|
326
|
-
255,
|
|
327
|
-
255
|
|
328
|
-
])), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.bindTexture(e.TEXTURE_2D, null), t) : null;
|
|
329
|
-
}
|
|
330
|
-
//#endregion
|
|
331
|
-
export { re as WeaselRenderer };
|
|
332
|
-
|
|
333
|
-
//# sourceMappingURL=WeaselRenderer.js.map
|