@antv/g 5.1.2 → 5.1.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AbstractRenderer.d.ts +38 -0
- package/dist/AbstractRenderer.d.ts.map +1 -0
- package/dist/Canvas.d.ts +150 -0
- package/dist/Canvas.d.ts.map +1 -0
- package/dist/DisplayObjectPool.d.ts +10 -0
- package/dist/DisplayObjectPool.d.ts.map +1 -0
- package/dist/__tests__/utils.d.ts +2 -0
- package/dist/__tests__/utils.d.ts.map +1 -0
- package/dist/camera/Camera.d.ts +328 -0
- package/dist/camera/Camera.d.ts.map +1 -0
- package/dist/camera/Landmark.d.ts +24 -0
- package/dist/camera/Landmark.d.ts.map +1 -0
- package/dist/camera/index.d.ts +3 -0
- package/dist/camera/index.d.ts.map +1 -0
- package/dist/canvas-module.d.ts +2 -0
- package/dist/canvas-module.d.ts.map +1 -0
- package/dist/components/Cullable.d.ts +15 -0
- package/dist/components/Cullable.d.ts.map +1 -0
- package/dist/components/Geometry.d.ts +13 -0
- package/dist/components/Geometry.d.ts.map +1 -0
- package/dist/components/Renderable.d.ts +25 -0
- package/dist/components/Renderable.d.ts.map +1 -0
- package/dist/components/Sortable.d.ts +21 -0
- package/dist/components/Sortable.d.ts.map +1 -0
- package/dist/components/Transform.d.ts +29 -0
- package/dist/components/Transform.d.ts.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/css/CSS.d.ts +89 -0
- package/dist/css/CSS.d.ts.map +1 -0
- package/dist/css/CSSProperty.d.ts +42 -0
- package/dist/css/CSSProperty.d.ts.map +1 -0
- package/dist/css/StyleValueRegistry.d.ts +124 -0
- package/dist/css/StyleValueRegistry.d.ts.map +1 -0
- package/dist/css/cssom/CSSColorValue.d.ts +24 -0
- package/dist/css/cssom/CSSColorValue.d.ts.map +1 -0
- package/dist/css/cssom/CSSGradientValue.d.ts +40 -0
- package/dist/css/cssom/CSSGradientValue.d.ts.map +1 -0
- package/dist/css/cssom/CSSKeywordValue.d.ts +16 -0
- package/dist/css/cssom/CSSKeywordValue.d.ts.map +1 -0
- package/dist/css/cssom/CSSMathOperator.d.ts +12 -0
- package/dist/css/cssom/CSSMathOperator.d.ts.map +1 -0
- package/dist/css/cssom/CSSNumericSumValue.d.ts +8 -0
- package/dist/css/cssom/CSSNumericSumValue.d.ts.map +1 -0
- package/dist/css/cssom/CSSNumericValue.d.ts +213 -0
- package/dist/css/cssom/CSSNumericValue.d.ts.map +1 -0
- package/dist/css/cssom/CSSRGB.d.ts +26 -0
- package/dist/css/cssom/CSSRGB.d.ts.map +1 -0
- package/dist/css/cssom/CSSStyleValue.d.ts +54 -0
- package/dist/css/cssom/CSSStyleValue.d.ts.map +1 -0
- package/dist/css/cssom/index.d.ts +18 -0
- package/dist/css/cssom/index.d.ts.map +1 -0
- package/dist/css/cssom/types.d.ts +87 -0
- package/dist/css/cssom/types.d.ts.map +1 -0
- package/dist/css/index.d.ts +12 -0
- package/dist/css/index.d.ts.map +1 -0
- package/dist/css/interfaces.d.ts +117 -0
- package/dist/css/interfaces.d.ts.map +1 -0
- package/dist/css/layout/FragmentResult.d.ts +33 -0
- package/dist/css/layout/FragmentResult.d.ts.map +1 -0
- package/dist/css/layout/LayoutChildren.d.ts +24 -0
- package/dist/css/layout/LayoutChildren.d.ts.map +1 -0
- package/dist/css/layout/LayoutContext.d.ts +36 -0
- package/dist/css/layout/LayoutContext.d.ts.map +1 -0
- package/dist/css/layout/LayoutDefinition.d.ts +21 -0
- package/dist/css/layout/LayoutDefinition.d.ts.map +1 -0
- package/dist/css/layout/LayoutEdges.d.ts +25 -0
- package/dist/css/layout/LayoutEdges.d.ts.map +1 -0
- package/dist/css/layout/LayoutEngine.d.ts +42 -0
- package/dist/css/layout/LayoutEngine.d.ts.map +1 -0
- package/dist/css/layout/LayoutFragment.d.ts +27 -0
- package/dist/css/layout/LayoutFragment.d.ts.map +1 -0
- package/dist/css/layout/LayoutObject.d.ts +47 -0
- package/dist/css/layout/LayoutObject.d.ts.map +1 -0
- package/dist/css/layout/LayoutRegistry.d.ts +17 -0
- package/dist/css/layout/LayoutRegistry.d.ts.map +1 -0
- package/dist/css/layout/LayoutWorkTask.d.ts +15 -0
- package/dist/css/layout/LayoutWorkTask.d.ts.map +1 -0
- package/dist/css/layout/index.d.ts +12 -0
- package/dist/css/layout/index.d.ts.map +1 -0
- package/dist/css/layout/types.d.ts +105 -0
- package/dist/css/layout/types.d.ts.map +1 -0
- package/dist/css/parser/color.d.ts +7 -0
- package/dist/css/parser/color.d.ts.map +1 -0
- package/dist/css/parser/dimension.d.ts +38 -0
- package/dist/css/parser/dimension.d.ts.map +1 -0
- package/dist/css/parser/filter.d.ts +8 -0
- package/dist/css/parser/filter.d.ts.map +1 -0
- package/dist/css/parser/index.d.ts +16 -0
- package/dist/css/parser/index.d.ts.map +1 -0
- package/dist/css/parser/numeric.d.ts +20 -0
- package/dist/css/parser/numeric.d.ts.map +1 -0
- package/dist/css/parser/path.d.ts +6 -0
- package/dist/css/parser/path.d.ts.map +1 -0
- package/dist/css/parser/points.d.ts +13 -0
- package/dist/css/parser/points.d.ts.map +1 -0
- package/dist/css/parser/transform-origin.d.ts +7 -0
- package/dist/css/parser/transform-origin.d.ts.map +1 -0
- package/dist/css/parser/transform.d.ts +14 -0
- package/dist/css/parser/transform.d.ts.map +1 -0
- package/dist/css/parser/types.d.ts +3 -0
- package/dist/css/parser/types.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyClipPath.d.ts +21 -0
- package/dist/css/properties/CSSPropertyClipPath.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyColor.d.ts +5 -0
- package/dist/css/properties/CSSPropertyColor.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyFilter.d.ts +4 -0
- package/dist/css/properties/CSSPropertyFilter.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts +7 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts +12 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts +22 -0
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts +7 -0
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +4 -0
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyOffsetPath.d.ts +4 -0
- package/dist/css/properties/CSSPropertyOffsetPath.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyOpacity.d.ts +7 -0
- package/dist/css/properties/CSSPropertyOpacity.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyPath.d.ts +4 -0
- package/dist/css/properties/CSSPropertyPath.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyPoints.d.ts +11 -0
- package/dist/css/properties/CSSPropertyPoints.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts +3 -0
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyText.d.ts +4 -0
- package/dist/css/properties/CSSPropertyText.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyTextTransform.d.ts +4 -0
- package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyTransform.d.ts +33 -0
- package/dist/css/properties/CSSPropertyTransform.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +9 -0
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyZIndex.d.ts +4 -0
- package/dist/css/properties/CSSPropertyZIndex.d.ts.map +1 -0
- package/dist/css/properties/index.d.ts +19 -0
- package/dist/css/properties/index.d.ts.map +1 -0
- package/dist/display-objects/Circle.d.ts +18 -0
- package/dist/display-objects/Circle.d.ts.map +1 -0
- package/dist/display-objects/CustomElement.d.ts +25 -0
- package/dist/display-objects/CustomElement.d.ts.map +1 -0
- package/dist/display-objects/DisplayObject.d.ts +275 -0
- package/dist/display-objects/DisplayObject.d.ts.map +1 -0
- package/dist/display-objects/Ellipse.d.ts +20 -0
- package/dist/display-objects/Ellipse.d.ts.map +1 -0
- package/dist/display-objects/Group.d.ts +30 -0
- package/dist/display-objects/Group.d.ts.map +1 -0
- package/dist/display-objects/HTML.d.ts +42 -0
- package/dist/display-objects/HTML.d.ts.map +1 -0
- package/dist/display-objects/Image.d.ts +24 -0
- package/dist/display-objects/Image.d.ts.map +1 -0
- package/dist/display-objects/Line.d.ts +31 -0
- package/dist/display-objects/Line.d.ts.map +1 -0
- package/dist/display-objects/Path.d.ts +49 -0
- package/dist/display-objects/Path.d.ts.map +1 -0
- package/dist/display-objects/Polygon.d.ts +17 -0
- package/dist/display-objects/Polygon.d.ts.map +1 -0
- package/dist/display-objects/Polyline.d.ts +22 -0
- package/dist/display-objects/Polyline.d.ts.map +1 -0
- package/dist/display-objects/Rect.d.ts +25 -0
- package/dist/display-objects/Rect.d.ts.map +1 -0
- package/dist/display-objects/Text.d.ts +92 -0
- package/dist/display-objects/Text.d.ts.map +1 -0
- package/dist/display-objects/index.d.ts +14 -0
- package/dist/display-objects/index.d.ts.map +1 -0
- package/dist/dom/Animation.d.ts +133 -0
- package/dist/dom/Animation.d.ts.map +1 -0
- package/dist/dom/AnimationEffectTiming.d.ts +59 -0
- package/dist/dom/AnimationEffectTiming.d.ts.map +1 -0
- package/dist/dom/AnimationEvent.d.ts +12 -0
- package/dist/dom/AnimationEvent.d.ts.map +1 -0
- package/dist/dom/AnimationTimeline.d.ts +41 -0
- package/dist/dom/AnimationTimeline.d.ts.map +1 -0
- package/dist/dom/CustomElementRegistry.d.ts +16 -0
- package/dist/dom/CustomElementRegistry.d.ts.map +1 -0
- package/dist/dom/CustomEvent.d.ts +17 -0
- package/dist/dom/CustomEvent.d.ts.map +1 -0
- package/dist/dom/Document.d.ts +73 -0
- package/dist/dom/Document.d.ts.map +1 -0
- package/dist/dom/Element.d.ts +188 -0
- package/dist/dom/Element.d.ts.map +1 -0
- package/dist/dom/EventTarget.d.ts +41 -0
- package/dist/dom/EventTarget.d.ts.map +1 -0
- package/dist/dom/FederatedEvent.d.ts +146 -0
- package/dist/dom/FederatedEvent.d.ts.map +1 -0
- package/dist/dom/FederatedMouseEvent.d.ts +53 -0
- package/dist/dom/FederatedMouseEvent.d.ts.map +1 -0
- package/dist/dom/FederatedPointerEvent.d.ts +76 -0
- package/dist/dom/FederatedPointerEvent.d.ts.map +1 -0
- package/dist/dom/FederatedWheelEvent.d.ts +21 -0
- package/dist/dom/FederatedWheelEvent.d.ts.map +1 -0
- package/dist/dom/KeyframeEffect.d.ts +48 -0
- package/dist/dom/KeyframeEffect.d.ts.map +1 -0
- package/dist/dom/KeyframeList.d.ts +3 -0
- package/dist/dom/KeyframeList.d.ts.map +1 -0
- package/dist/dom/MutationEvent.d.ts +16 -0
- package/dist/dom/MutationEvent.d.ts.map +1 -0
- package/dist/dom/MutationObserver.d.ts +37 -0
- package/dist/dom/MutationObserver.d.ts.map +1 -0
- package/dist/dom/MutationRecord.d.ts +15 -0
- package/dist/dom/MutationRecord.d.ts.map +1 -0
- package/dist/dom/Node.d.ts +139 -0
- package/dist/dom/Node.d.ts.map +1 -0
- package/dist/dom/index.d.ts +21 -0
- package/dist/dom/index.d.ts.map +1 -0
- package/dist/dom/interfaces.d.ts +373 -0
- package/dist/dom/interfaces.d.ts.map +1 -0
- package/dist/global-module.d.ts +2 -0
- package/dist/global-module.d.ts.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +19679 -0
- package/dist/index.js +19851 -0
- package/dist/index.umd.js +29159 -0
- package/dist/index.umd.min.js +14 -28
- package/dist/plugins/CullingPlugin.d.ts +18 -0
- package/dist/plugins/CullingPlugin.d.ts.map +1 -0
- package/dist/plugins/DirtyCheckPlugin.d.ts +11 -0
- package/dist/plugins/DirtyCheckPlugin.d.ts.map +1 -0
- package/dist/plugins/EventPlugin.d.ts +30 -0
- package/dist/plugins/EventPlugin.d.ts.map +1 -0
- package/dist/plugins/FrustumCullingStrategy.d.ts +22 -0
- package/dist/plugins/FrustumCullingStrategy.d.ts.map +1 -0
- package/dist/plugins/PrepareRendererPlugin.d.ts +8 -0
- package/dist/plugins/PrepareRendererPlugin.d.ts.map +1 -0
- package/dist/services/ContextService.d.ts +14 -0
- package/dist/services/ContextService.d.ts.map +1 -0
- package/dist/services/EventService.d.ts +72 -0
- package/dist/services/EventService.d.ts.map +1 -0
- package/dist/services/OffscreenCanvasCreator.d.ts +14 -0
- package/dist/services/OffscreenCanvasCreator.d.ts.map +1 -0
- package/dist/services/RenderingContext.d.ts +27 -0
- package/dist/services/RenderingContext.d.ts.map +1 -0
- package/dist/services/RenderingService.d.ts +103 -0
- package/dist/services/RenderingService.d.ts.map +1 -0
- package/dist/services/SceneGraphSelector.d.ts +24 -0
- package/dist/services/SceneGraphSelector.d.ts.map +1 -0
- package/dist/services/SceneGraphService.d.ts +154 -0
- package/dist/services/SceneGraphService.d.ts.map +1 -0
- package/dist/services/TextService.d.ts +37 -0
- package/dist/services/TextService.d.ts.map +1 -0
- package/dist/services/aabb/CircleUpdater.d.ts +9 -0
- package/dist/services/aabb/CircleUpdater.d.ts.map +1 -0
- package/dist/services/aabb/EllipseUpdater.d.ts +9 -0
- package/dist/services/aabb/EllipseUpdater.d.ts.map +1 -0
- package/dist/services/aabb/LineUpdater.d.ts +9 -0
- package/dist/services/aabb/LineUpdater.d.ts.map +1 -0
- package/dist/services/aabb/PathUpdater.d.ts +9 -0
- package/dist/services/aabb/PathUpdater.d.ts.map +1 -0
- package/dist/services/aabb/PolylineUpdater.d.ts +9 -0
- package/dist/services/aabb/PolylineUpdater.d.ts.map +1 -0
- package/dist/services/aabb/RectUpdater.d.ts +9 -0
- package/dist/services/aabb/RectUpdater.d.ts.map +1 -0
- package/dist/services/aabb/TextUpdater.d.ts +22 -0
- package/dist/services/aabb/TextUpdater.d.ts.map +1 -0
- package/dist/services/aabb/index.d.ts +9 -0
- package/dist/services/aabb/index.d.ts.map +1 -0
- package/dist/services/aabb/interfaces.d.ts +16 -0
- package/dist/services/aabb/interfaces.d.ts.map +1 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/shapes/AABB.d.ts +36 -0
- package/dist/shapes/AABB.d.ts.map +1 -0
- package/dist/shapes/BoundingSphere.d.ts +9 -0
- package/dist/shapes/BoundingSphere.d.ts.map +1 -0
- package/dist/shapes/Frustum.d.ts +17 -0
- package/dist/shapes/Frustum.d.ts.map +1 -0
- package/dist/shapes/Plane.d.ts +15 -0
- package/dist/shapes/Plane.d.ts.map +1 -0
- package/dist/shapes/Point.d.ts +12 -0
- package/dist/shapes/Point.d.ts.map +1 -0
- package/dist/shapes/Ray.d.ts +25 -0
- package/dist/shapes/Ray.d.ts.map +1 -0
- package/dist/shapes/Rectangle.d.ts +13 -0
- package/dist/shapes/Rectangle.d.ts.map +1 -0
- package/dist/shapes/index.d.ts +8 -0
- package/dist/shapes/index.d.ts.map +1 -0
- package/dist/types.d.ts +270 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/animation.d.ts +16 -0
- package/dist/utils/animation.d.ts.map +1 -0
- package/dist/utils/assert.d.ts +10 -0
- package/dist/utils/assert.d.ts.map +1 -0
- package/dist/utils/bezier-easing.d.ts +21 -0
- package/dist/utils/bezier-easing.d.ts.map +1 -0
- package/dist/utils/canvas.d.ts +7 -0
- package/dist/utils/canvas.d.ts.map +1 -0
- package/dist/utils/custom-easing.d.ts +16 -0
- package/dist/utils/custom-easing.d.ts.map +1 -0
- package/dist/utils/deferred.d.ts +44 -0
- package/dist/utils/deferred.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +3 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/event.d.ts +36 -0
- package/dist/utils/event.d.ts.map +1 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/interpolation.d.ts +5 -0
- package/dist/utils/interpolation.d.ts.map +1 -0
- package/dist/utils/math.d.ts +30 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/path.d.ts +16 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/string.d.ts +3 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/package.json +27 -33
- package/es/AbstractRenderer.d.ts +0 -37
- package/es/AbstractRenderer.js +0 -62
- package/es/Canvas.d.ts +0 -149
- package/es/Canvas.js +0 -518
- package/es/DisplayObjectPool.d.ts +0 -7
- package/es/DisplayObjectPool.js +0 -27
- package/es/camera/Camera.d.ts +0 -327
- package/es/camera/Camera.js +0 -1154
- package/es/camera/Landmark.d.ts +0 -23
- package/es/camera/Landmark.js +0 -1
- package/es/camera/index.d.ts +0 -2
- package/es/camera/index.js +0 -2
- package/es/canvas-module.d.ts +0 -1
- package/es/canvas-module.js +0 -25
- package/es/components/Cullable.d.ts +0 -14
- package/es/components/Cullable.js +0 -28
- package/es/components/Geometry.d.ts +0 -12
- package/es/components/Geometry.js +0 -10
- package/es/components/Renderable.d.ts +0 -24
- package/es/components/Renderable.js +0 -18
- package/es/components/Sortable.d.ts +0 -20
- package/es/components/Sortable.js +0 -20
- package/es/components/Transform.d.ts +0 -28
- package/es/components/Transform.js +0 -64
- package/es/components/index.d.ts +0 -5
- package/es/components/index.js +0 -5
- package/es/css/CSS.d.ts +0 -87
- package/es/css/CSS.js +0 -121
- package/es/css/CSSProperty.d.ts +0 -41
- package/es/css/CSSProperty.js +0 -1
- package/es/css/StyleValueRegistry.d.ts +0 -92
- package/es/css/StyleValueRegistry.js +0 -882
- package/es/css/cssom/CSSColorValue.d.ts +0 -23
- package/es/css/cssom/CSSColorValue.js +0 -43
- package/es/css/cssom/CSSGradientValue.d.ts +0 -39
- package/es/css/cssom/CSSGradientValue.js +0 -54
- package/es/css/cssom/CSSImageValue.d.ts +0 -1
- package/es/css/cssom/CSSImageValue.js +0 -0
- package/es/css/cssom/CSSKeywordValue.d.ts +0 -15
- package/es/css/cssom/CSSKeywordValue.js +0 -37
- package/es/css/cssom/CSSMathOperator.d.ts +0 -11
- package/es/css/cssom/CSSMathOperator.js +0 -32
- package/es/css/cssom/CSSNumericSumValue.d.ts +0 -7
- package/es/css/cssom/CSSNumericSumValue.js +0 -1
- package/es/css/cssom/CSSNumericValue.d.ts +0 -212
- package/es/css/cssom/CSSNumericValue.js +0 -1661
- package/es/css/cssom/CSSRGB.d.ts +0 -25
- package/es/css/cssom/CSSRGB.js +0 -48
- package/es/css/cssom/CSSStyleValue.d.ts +0 -53
- package/es/css/cssom/CSSStyleValue.js +0 -625
- package/es/css/cssom/CSSTransformComponent.d.ts +0 -22
- package/es/css/cssom/CSSTransformComponent.js +0 -32
- package/es/css/cssom/CSSTransformValue.d.ts +0 -30
- package/es/css/cssom/CSSTransformValue.js +0 -48
- package/es/css/cssom/CSSTranslate.d.ts +0 -15
- package/es/css/cssom/CSSTranslate.js +0 -44
- package/es/css/cssom/index.d.ts +0 -19
- package/es/css/cssom/index.js +0 -19
- package/es/css/cssom/types.d.ts +0 -86
- package/es/css/cssom/types.js +0 -119
- package/es/css/index.d.ts +0 -11
- package/es/css/index.js +0 -11
- package/es/css/interfaces.d.ts +0 -116
- package/es/css/interfaces.js +0 -77
- package/es/css/layout/FragmentResult.d.ts +0 -32
- package/es/css/layout/FragmentResult.js +0 -32
- package/es/css/layout/LayoutChildren.d.ts +0 -23
- package/es/css/layout/LayoutChildren.js +0 -55
- package/es/css/layout/LayoutContext.d.ts +0 -35
- package/es/css/layout/LayoutContext.js +0 -35
- package/es/css/layout/LayoutDefinition.d.ts +0 -20
- package/es/css/layout/LayoutDefinition.js +0 -9
- package/es/css/layout/LayoutEdges.d.ts +0 -24
- package/es/css/layout/LayoutEdges.js +0 -41
- package/es/css/layout/LayoutEngine.d.ts +0 -41
- package/es/css/layout/LayoutEngine.js +0 -332
- package/es/css/layout/LayoutFragment.d.ts +0 -26
- package/es/css/layout/LayoutFragment.js +0 -28
- package/es/css/layout/LayoutObject.d.ts +0 -46
- package/es/css/layout/LayoutObject.js +0 -172
- package/es/css/layout/LayoutRegistry.d.ts +0 -16
- package/es/css/layout/LayoutRegistry.js +0 -78
- package/es/css/layout/LayoutWorkTask.d.ts +0 -14
- package/es/css/layout/LayoutWorkTask.js +0 -1
- package/es/css/layout/index.d.ts +0 -11
- package/es/css/layout/index.js +0 -11
- package/es/css/layout/types.d.ts +0 -104
- package/es/css/layout/types.js +0 -66
- package/es/css/parser/color.d.ts +0 -6
- package/es/css/parser/color.js +0 -241
- package/es/css/parser/dimension.d.ts +0 -37
- package/es/css/parser/dimension.js +0 -149
- package/es/css/parser/filter.d.ts +0 -7
- package/es/css/parser/filter.js +0 -43
- package/es/css/parser/index.d.ts +0 -15
- package/es/css/parser/index.js +0 -15
- package/es/css/parser/numeric.d.ts +0 -19
- package/es/css/parser/numeric.js +0 -62
- package/es/css/parser/path.d.ts +0 -5
- package/es/css/parser/path.js +0 -207
- package/es/css/parser/points.d.ts +0 -12
- package/es/css/parser/points.js +0 -58
- package/es/css/parser/transform-origin.d.ts +0 -6
- package/es/css/parser/transform-origin.js +0 -45
- package/es/css/parser/transform.d.ts +0 -13
- package/es/css/parser/transform.js +0 -289
- package/es/css/parser/types.d.ts +0 -2
- package/es/css/parser/types.js +0 -1
- package/es/css/properties/CSSPropertyClipPath.d.ts +0 -22
- package/es/css/properties/CSSPropertyClipPath.js +0 -56
- package/es/css/properties/CSSPropertyColor.d.ts +0 -14
- package/es/css/properties/CSSPropertyColor.js +0 -30
- package/es/css/properties/CSSPropertyFilter.d.ts +0 -6
- package/es/css/properties/CSSPropertyFilter.js +0 -16
- package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +0 -20
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +0 -95
- package/es/css/properties/CSSPropertyLengthOrPercentage12.d.ts +0 -15
- package/es/css/properties/CSSPropertyLengthOrPercentage12.js +0 -38
- package/es/css/properties/CSSPropertyLengthOrPercentage14.d.ts +0 -25
- package/es/css/properties/CSSPropertyLengthOrPercentage14.js +0 -42
- package/es/css/properties/CSSPropertyLocalPosition.d.ts +0 -13
- package/es/css/properties/CSSPropertyLocalPosition.js +0 -85
- package/es/css/properties/CSSPropertyOffsetDistance.d.ts +0 -9
- package/es/css/properties/CSSPropertyOffsetDistance.js +0 -34
- package/es/css/properties/CSSPropertyOffsetPath.d.ts +0 -5
- package/es/css/properties/CSSPropertyOffsetPath.js +0 -31
- package/es/css/properties/CSSPropertyOpacity.d.ts +0 -10
- package/es/css/properties/CSSPropertyOpacity.js +0 -20
- package/es/css/properties/CSSPropertyPath.d.ts +0 -27
- package/es/css/properties/CSSPropertyPath.js +0 -58
- package/es/css/properties/CSSPropertyPoints.d.ts +0 -18
- package/es/css/properties/CSSPropertyPoints.js +0 -30
- package/es/css/properties/CSSPropertyShadowBlur.d.ts +0 -4
- package/es/css/properties/CSSPropertyShadowBlur.js +0 -22
- package/es/css/properties/CSSPropertyText.d.ts +0 -7
- package/es/css/properties/CSSPropertyText.js +0 -30
- package/es/css/properties/CSSPropertyTextTransform.d.ts +0 -5
- package/es/css/properties/CSSPropertyTextTransform.js +0 -29
- package/es/css/properties/CSSPropertyTransform.d.ts +0 -38
- package/es/css/properties/CSSPropertyTransform.js +0 -128
- package/es/css/properties/CSSPropertyTransformOrigin.d.ts +0 -11
- package/es/css/properties/CSSPropertyTransformOrigin.js +0 -21
- package/es/css/properties/CSSPropertyVisibility.d.ts +0 -13
- package/es/css/properties/CSSPropertyVisibility.js +0 -24
- package/es/css/properties/CSSPropertyZIndex.d.ts +0 -8
- package/es/css/properties/CSSPropertyZIndex.js +0 -33
- package/es/css/properties/index.d.ts +0 -18
- package/es/css/properties/index.js +0 -18
- package/es/display-objects/Circle.d.ts +0 -17
- package/es/display-objects/Circle.js +0 -34
- package/es/display-objects/CustomElement.d.ts +0 -26
- package/es/display-objects/CustomElement.js +0 -102
- package/es/display-objects/DisplayObject.d.ts +0 -274
- package/es/display-objects/DisplayObject.js +0 -887
- package/es/display-objects/Ellipse.d.ts +0 -19
- package/es/display-objects/Ellipse.js +0 -35
- package/es/display-objects/Group.d.ts +0 -29
- package/es/display-objects/Group.js +0 -42
- package/es/display-objects/HTML.d.ts +0 -41
- package/es/display-objects/HTML.js +0 -100
- package/es/display-objects/Image.d.ts +0 -23
- package/es/display-objects/Image.js +0 -34
- package/es/display-objects/Line.d.ts +0 -30
- package/es/display-objects/Line.js +0 -63
- package/es/display-objects/Path.d.ts +0 -48
- package/es/display-objects/Path.js +0 -131
- package/es/display-objects/Polygon.d.ts +0 -16
- package/es/display-objects/Polygon.js +0 -31
- package/es/display-objects/Polyline.d.ts +0 -21
- package/es/display-objects/Polyline.js +0 -74
- package/es/display-objects/Rect.d.ts +0 -24
- package/es/display-objects/Rect.js +0 -34
- package/es/display-objects/Text.d.ts +0 -91
- package/es/display-objects/Text.js +0 -118
- package/es/display-objects/index.d.ts +0 -13
- package/es/display-objects/index.js +0 -13
- package/es/dom/Animation.d.ts +0 -132
- package/es/dom/Animation.js +0 -503
- package/es/dom/AnimationEffectTiming.d.ts +0 -58
- package/es/dom/AnimationEffectTiming.js +0 -68
- package/es/dom/AnimationEvent.d.ts +0 -11
- package/es/dom/AnimationEvent.js +0 -34
- package/es/dom/AnimationTimeline.d.ts +0 -40
- package/es/dom/AnimationTimeline.js +0 -217
- package/es/dom/CustomElementRegistry.d.ts +0 -15
- package/es/dom/CustomElementRegistry.js +0 -42
- package/es/dom/CustomEvent.d.ts +0 -16
- package/es/dom/CustomEvent.js +0 -35
- package/es/dom/Document.d.ts +0 -72
- package/es/dom/Document.js +0 -316
- package/es/dom/Element.d.ts +0 -187
- package/es/dom/Element.js +0 -604
- package/es/dom/EventTarget.d.ts +0 -40
- package/es/dom/EventTarget.js +0 -157
- package/es/dom/FederatedEvent.d.ts +0 -145
- package/es/dom/FederatedEvent.js +0 -222
- package/es/dom/FederatedMouseEvent.d.ts +0 -52
- package/es/dom/FederatedMouseEvent.js +0 -124
- package/es/dom/FederatedPointerEvent.d.ts +0 -75
- package/es/dom/FederatedPointerEvent.js +0 -61
- package/es/dom/FederatedTouchEvent.d.ts +0 -15
- package/es/dom/FederatedTouchEvent.js +0 -19
- package/es/dom/FederatedWheelEvent.d.ts +0 -20
- package/es/dom/FederatedWheelEvent.js +0 -27
- package/es/dom/KeyframeEffect.d.ts +0 -47
- package/es/dom/KeyframeEffect.js +0 -174
- package/es/dom/KeyframeList.d.ts +0 -2
- package/es/dom/KeyframeList.js +0 -176
- package/es/dom/MutationEvent.d.ts +0 -15
- package/es/dom/MutationEvent.js +0 -29
- package/es/dom/MutationObserver.d.ts +0 -36
- package/es/dom/MutationObserver.js +0 -416
- package/es/dom/MutationRecord.d.ts +0 -14
- package/es/dom/MutationRecord.js +0 -31
- package/es/dom/Node.d.ts +0 -138
- package/es/dom/Node.js +0 -387
- package/es/dom/index.d.ts +0 -20
- package/es/dom/index.js +0 -20
- package/es/dom/interfaces.d.ts +0 -372
- package/es/dom/interfaces.js +0 -56
- package/es/global-module.d.ts +0 -1
- package/es/global-module.js +0 -155
- package/es/index.d.ts +0 -18
- package/es/index.js +0 -21
- package/es/plugins/CullingPlugin.d.ts +0 -17
- package/es/plugins/CullingPlugin.js +0 -58
- package/es/plugins/DirtyCheckPlugin.d.ts +0 -10
- package/es/plugins/DirtyCheckPlugin.js +0 -55
- package/es/plugins/EventPlugin.d.ts +0 -30
- package/es/plugins/EventPlugin.js +0 -374
- package/es/plugins/FrustumCullingStrategy.d.ts +0 -21
- package/es/plugins/FrustumCullingStrategy.js +0 -108
- package/es/plugins/PrepareRendererPlugin.d.ts +0 -7
- package/es/plugins/PrepareRendererPlugin.js +0 -79
- package/es/services/ContextService.d.ts +0 -13
- package/es/services/ContextService.js +0 -5
- package/es/services/EventService.d.ts +0 -73
- package/es/services/EventService.js +0 -1238
- package/es/services/OffscreenCanvasCreator.d.ts +0 -13
- package/es/services/OffscreenCanvasCreator.js +0 -58
- package/es/services/RenderingContext.d.ts +0 -26
- package/es/services/RenderingContext.js +0 -14
- package/es/services/RenderingService.d.ts +0 -102
- package/es/services/RenderingService.js +0 -231
- package/es/services/SceneGraphSelector.d.ts +0 -23
- package/es/services/SceneGraphSelector.js +0 -100
- package/es/services/SceneGraphService.d.ts +0 -153
- package/es/services/SceneGraphService.js +0 -819
- package/es/services/TextService.d.ts +0 -36
- package/es/services/TextService.js +0 -350
- package/es/services/aabb/CircleUpdater.d.ts +0 -8
- package/es/services/aabb/CircleUpdater.js +0 -30
- package/es/services/aabb/EllipseUpdater.d.ts +0 -8
- package/es/services/aabb/EllipseUpdater.js +0 -31
- package/es/services/aabb/LineUpdater.d.ts +0 -8
- package/es/services/aabb/LineUpdater.js +0 -37
- package/es/services/aabb/PathUpdater.d.ts +0 -8
- package/es/services/aabb/PathUpdater.js +0 -168
- package/es/services/aabb/PolylineUpdater.d.ts +0 -8
- package/es/services/aabb/PolylineUpdater.js +0 -46
- package/es/services/aabb/RectUpdater.d.ts +0 -8
- package/es/services/aabb/RectUpdater.js +0 -72
- package/es/services/aabb/TextUpdater.d.ts +0 -21
- package/es/services/aabb/TextUpdater.js +0 -136
- package/es/services/aabb/index.d.ts +0 -8
- package/es/services/aabb/index.js +0 -8
- package/es/services/aabb/interfaces.d.ts +0 -15
- package/es/services/aabb/interfaces.js +0 -3
- package/es/services/index.d.ts +0 -10
- package/es/services/index.js +0 -10
- package/es/shapes/AABB.d.ts +0 -35
- package/es/shapes/AABB.js +0 -230
- package/es/shapes/BoundingSphere.d.ts +0 -8
- package/es/shapes/BoundingSphere.js +0 -31
- package/es/shapes/Frustum.d.ts +0 -16
- package/es/shapes/Frustum.js +0 -79
- package/es/shapes/Plane.d.ts +0 -14
- package/es/shapes/Plane.js +0 -42
- package/es/shapes/Point.d.ts +0 -11
- package/es/shapes/Point.js +0 -31
- package/es/shapes/Ray.d.ts +0 -24
- package/es/shapes/Ray.js +0 -138
- package/es/shapes/Rectangle.d.ts +0 -12
- package/es/shapes/Rectangle.js +0 -20
- package/es/shapes/index.d.ts +0 -7
- package/es/shapes/index.js +0 -7
- package/es/types.d.ts +0 -289
- package/es/types.js +0 -54
- package/es/utils/animation.d.ts +0 -15
- package/es/utils/animation.js +0 -251
- package/es/utils/assert.d.ts +0 -9
- package/es/utils/assert.js +0 -33
- package/es/utils/bezier-easing.d.ts +0 -20
- package/es/utils/bezier-easing.js +0 -90
- package/es/utils/canvas.d.ts +0 -6
- package/es/utils/canvas.js +0 -18
- package/es/utils/custom-easing.d.ts +0 -64
- package/es/utils/custom-easing.js +0 -317
- package/es/utils/deferred.d.ts +0 -43
- package/es/utils/deferred.js +0 -117
- package/es/utils/dom.d.ts +0 -2
- package/es/utils/dom.js +0 -8
- package/es/utils/event.d.ts +0 -45
- package/es/utils/event.js +0 -9
- package/es/utils/index.d.ts +0 -10
- package/es/utils/index.js +0 -10
- package/es/utils/interpolation.d.ts +0 -4
- package/es/utils/interpolation.js +0 -212
- package/es/utils/math.d.ts +0 -29
- package/es/utils/math.js +0 -236
- package/es/utils/path.d.ts +0 -15
- package/es/utils/path.js +0 -387
- package/es/utils/string.d.ts +0 -2
- package/es/utils/string.js +0 -17
- package/es/utils/text.d.ts +0 -2
- package/es/utils/text.js +0 -29
- package/lib/AbstractRenderer.d.ts +0 -37
- package/lib/AbstractRenderer.js +0 -69
- package/lib/Canvas.d.ts +0 -149
- package/lib/Canvas.js +0 -540
- package/lib/DisplayObjectPool.d.ts +0 -7
- package/lib/DisplayObjectPool.js +0 -35
- package/lib/camera/Camera.d.ts +0 -327
- package/lib/camera/Camera.js +0 -1232
- package/lib/camera/Landmark.d.ts +0 -23
- package/lib/camera/Landmark.js +0 -5
- package/lib/camera/index.d.ts +0 -2
- package/lib/camera/index.js +0 -31
- package/lib/canvas-module.d.ts +0 -1
- package/lib/canvas-module.js +0 -41
- package/lib/components/Cullable.d.ts +0 -14
- package/lib/components/Cullable.js +0 -36
- package/lib/components/Geometry.d.ts +0 -12
- package/lib/components/Geometry.js +0 -17
- package/lib/components/Renderable.d.ts +0 -24
- package/lib/components/Renderable.js +0 -25
- package/lib/components/Sortable.d.ts +0 -20
- package/lib/components/Sortable.js +0 -27
- package/lib/components/Transform.d.ts +0 -28
- package/lib/components/Transform.js +0 -71
- package/lib/components/index.d.ts +0 -5
- package/lib/components/index.js +0 -70
- package/lib/css/CSS.d.ts +0 -87
- package/lib/css/CSS.js +0 -135
- package/lib/css/CSSProperty.d.ts +0 -41
- package/lib/css/CSSProperty.js +0 -5
- package/lib/css/StyleValueRegistry.d.ts +0 -92
- package/lib/css/StyleValueRegistry.js +0 -909
- package/lib/css/cssom/CSSColorValue.d.ts +0 -23
- package/lib/css/cssom/CSSColorValue.js +0 -51
- package/lib/css/cssom/CSSGradientValue.d.ts +0 -39
- package/lib/css/cssom/CSSGradientValue.js +0 -64
- package/lib/css/cssom/CSSImageValue.d.ts +0 -1
- package/lib/css/cssom/CSSImageValue.js +0 -1
- package/lib/css/cssom/CSSKeywordValue.d.ts +0 -15
- package/lib/css/cssom/CSSKeywordValue.js +0 -45
- package/lib/css/cssom/CSSMathOperator.d.ts +0 -11
- package/lib/css/cssom/CSSMathOperator.js +0 -40
- package/lib/css/cssom/CSSNumericSumValue.d.ts +0 -7
- package/lib/css/cssom/CSSNumericSumValue.js +0 -5
- package/lib/css/cssom/CSSNumericValue.d.ts +0 -212
- package/lib/css/cssom/CSSNumericValue.js +0 -1685
- package/lib/css/cssom/CSSRGB.d.ts +0 -25
- package/lib/css/cssom/CSSRGB.js +0 -56
- package/lib/css/cssom/CSSStyleValue.d.ts +0 -53
- package/lib/css/cssom/CSSStyleValue.js +0 -634
- package/lib/css/cssom/CSSTransformComponent.d.ts +0 -22
- package/lib/css/cssom/CSSTransformComponent.js +0 -39
- package/lib/css/cssom/CSSTransformValue.d.ts +0 -30
- package/lib/css/cssom/CSSTransformValue.js +0 -56
- package/lib/css/cssom/CSSTranslate.d.ts +0 -15
- package/lib/css/cssom/CSSTranslate.js +0 -53
- package/lib/css/cssom/index.d.ts +0 -19
- package/lib/css/cssom/index.js +0 -148
- package/lib/css/cssom/types.d.ts +0 -86
- package/lib/css/cssom/types.js +0 -130
- package/lib/css/index.d.ts +0 -11
- package/lib/css/index.js +0 -109
- package/lib/css/interfaces.d.ts +0 -116
- package/lib/css/interfaces.js +0 -87
- package/lib/css/layout/FragmentResult.d.ts +0 -32
- package/lib/css/layout/FragmentResult.js +0 -51
- package/lib/css/layout/LayoutChildren.d.ts +0 -23
- package/lib/css/layout/LayoutChildren.js +0 -72
- package/lib/css/layout/LayoutContext.d.ts +0 -35
- package/lib/css/layout/LayoutContext.js +0 -49
- package/lib/css/layout/LayoutDefinition.d.ts +0 -20
- package/lib/css/layout/LayoutDefinition.js +0 -16
- package/lib/css/layout/LayoutEdges.d.ts +0 -24
- package/lib/css/layout/LayoutEdges.js +0 -56
- package/lib/css/layout/LayoutEngine.d.ts +0 -41
- package/lib/css/layout/LayoutEngine.js +0 -345
- package/lib/css/layout/LayoutFragment.d.ts +0 -26
- package/lib/css/layout/LayoutFragment.js +0 -44
- package/lib/css/layout/LayoutObject.d.ts +0 -46
- package/lib/css/layout/LayoutObject.js +0 -182
- package/lib/css/layout/LayoutRegistry.d.ts +0 -16
- package/lib/css/layout/LayoutRegistry.js +0 -87
- package/lib/css/layout/LayoutWorkTask.d.ts +0 -14
- package/lib/css/layout/LayoutWorkTask.js +0 -5
- package/lib/css/layout/index.d.ts +0 -11
- package/lib/css/layout/index.js +0 -148
- package/lib/css/layout/types.d.ts +0 -104
- package/lib/css/layout/types.js +0 -74
- package/lib/css/parser/color.d.ts +0 -6
- package/lib/css/parser/color.js +0 -260
- package/lib/css/parser/dimension.d.ts +0 -37
- package/lib/css/parser/dimension.js +0 -175
- package/lib/css/parser/filter.d.ts +0 -7
- package/lib/css/parser/filter.js +0 -56
- package/lib/css/parser/index.d.ts +0 -15
- package/lib/css/parser/index.js +0 -122
- package/lib/css/parser/numeric.d.ts +0 -19
- package/lib/css/parser/numeric.js +0 -81
- package/lib/css/parser/path.d.ts +0 -5
- package/lib/css/parser/path.js +0 -221
- package/lib/css/parser/points.d.ts +0 -12
- package/lib/css/parser/points.js +0 -69
- package/lib/css/parser/transform-origin.d.ts +0 -6
- package/lib/css/parser/transform-origin.js +0 -54
- package/lib/css/parser/transform.d.ts +0 -13
- package/lib/css/parser/transform.js +0 -303
- package/lib/css/parser/types.d.ts +0 -2
- package/lib/css/parser/types.js +0 -5
- package/lib/css/properties/CSSPropertyClipPath.d.ts +0 -22
- package/lib/css/properties/CSSPropertyClipPath.js +0 -66
- package/lib/css/properties/CSSPropertyColor.d.ts +0 -14
- package/lib/css/properties/CSSPropertyColor.js +0 -40
- package/lib/css/properties/CSSPropertyFilter.d.ts +0 -6
- package/lib/css/properties/CSSPropertyFilter.js +0 -25
- package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +0 -20
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +0 -105
- package/lib/css/properties/CSSPropertyLengthOrPercentage12.d.ts +0 -15
- package/lib/css/properties/CSSPropertyLengthOrPercentage12.js +0 -48
- package/lib/css/properties/CSSPropertyLengthOrPercentage14.d.ts +0 -25
- package/lib/css/properties/CSSPropertyLengthOrPercentage14.js +0 -52
- package/lib/css/properties/CSSPropertyLocalPosition.d.ts +0 -13
- package/lib/css/properties/CSSPropertyLocalPosition.js +0 -96
- package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +0 -9
- package/lib/css/properties/CSSPropertyOffsetDistance.js +0 -44
- package/lib/css/properties/CSSPropertyOffsetPath.d.ts +0 -5
- package/lib/css/properties/CSSPropertyOffsetPath.js +0 -39
- package/lib/css/properties/CSSPropertyOpacity.d.ts +0 -10
- package/lib/css/properties/CSSPropertyOpacity.js +0 -29
- package/lib/css/properties/CSSPropertyPath.d.ts +0 -27
- package/lib/css/properties/CSSPropertyPath.js +0 -70
- package/lib/css/properties/CSSPropertyPoints.d.ts +0 -18
- package/lib/css/properties/CSSPropertyPoints.js +0 -40
- package/lib/css/properties/CSSPropertyShadowBlur.d.ts +0 -4
- package/lib/css/properties/CSSPropertyShadowBlur.js +0 -32
- package/lib/css/properties/CSSPropertyText.d.ts +0 -7
- package/lib/css/properties/CSSPropertyText.js +0 -39
- package/lib/css/properties/CSSPropertyTextTransform.d.ts +0 -5
- package/lib/css/properties/CSSPropertyTextTransform.js +0 -38
- package/lib/css/properties/CSSPropertyTransform.d.ts +0 -38
- package/lib/css/properties/CSSPropertyTransform.js +0 -138
- package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +0 -11
- package/lib/css/properties/CSSPropertyTransformOrigin.js +0 -30
- package/lib/css/properties/CSSPropertyVisibility.d.ts +0 -13
- package/lib/css/properties/CSSPropertyVisibility.js +0 -32
- package/lib/css/properties/CSSPropertyZIndex.d.ts +0 -8
- package/lib/css/properties/CSSPropertyZIndex.js +0 -42
- package/lib/css/properties/index.d.ts +0 -18
- package/lib/css/properties/index.js +0 -239
- package/lib/display-objects/Circle.d.ts +0 -17
- package/lib/display-objects/Circle.js +0 -42
- package/lib/display-objects/CustomElement.d.ts +0 -26
- package/lib/display-objects/CustomElement.js +0 -109
- package/lib/display-objects/DisplayObject.d.ts +0 -274
- package/lib/display-objects/DisplayObject.js +0 -910
- package/lib/display-objects/Ellipse.d.ts +0 -19
- package/lib/display-objects/Ellipse.js +0 -43
- package/lib/display-objects/Group.d.ts +0 -29
- package/lib/display-objects/Group.js +0 -50
- package/lib/display-objects/HTML.d.ts +0 -41
- package/lib/display-objects/HTML.js +0 -111
- package/lib/display-objects/Image.d.ts +0 -23
- package/lib/display-objects/Image.js +0 -42
- package/lib/display-objects/Line.d.ts +0 -30
- package/lib/display-objects/Line.js +0 -75
- package/lib/display-objects/Path.d.ts +0 -48
- package/lib/display-objects/Path.js +0 -142
- package/lib/display-objects/Polygon.d.ts +0 -16
- package/lib/display-objects/Polygon.js +0 -39
- package/lib/display-objects/Polyline.d.ts +0 -21
- package/lib/display-objects/Polyline.js +0 -84
- package/lib/display-objects/Rect.d.ts +0 -24
- package/lib/display-objects/Rect.js +0 -42
- package/lib/display-objects/Text.d.ts +0 -91
- package/lib/display-objects/Text.js +0 -126
- package/lib/display-objects/index.d.ts +0 -13
- package/lib/display-objects/index.js +0 -174
- package/lib/dom/Animation.d.ts +0 -132
- package/lib/dom/Animation.js +0 -511
- package/lib/dom/AnimationEffectTiming.d.ts +0 -58
- package/lib/dom/AnimationEffectTiming.js +0 -75
- package/lib/dom/AnimationEvent.d.ts +0 -11
- package/lib/dom/AnimationEvent.js +0 -42
- package/lib/dom/AnimationTimeline.d.ts +0 -40
- package/lib/dom/AnimationTimeline.js +0 -228
- package/lib/dom/CustomElementRegistry.d.ts +0 -15
- package/lib/dom/CustomElementRegistry.js +0 -50
- package/lib/dom/CustomEvent.d.ts +0 -16
- package/lib/dom/CustomEvent.js +0 -42
- package/lib/dom/Document.d.ts +0 -72
- package/lib/dom/Document.js +0 -329
- package/lib/dom/Element.d.ts +0 -187
- package/lib/dom/Element.js +0 -619
- package/lib/dom/EventTarget.d.ts +0 -40
- package/lib/dom/EventTarget.js +0 -171
- package/lib/dom/FederatedEvent.d.ts +0 -145
- package/lib/dom/FederatedEvent.js +0 -229
- package/lib/dom/FederatedMouseEvent.d.ts +0 -52
- package/lib/dom/FederatedMouseEvent.js +0 -133
- package/lib/dom/FederatedPointerEvent.d.ts +0 -75
- package/lib/dom/FederatedPointerEvent.js +0 -69
- package/lib/dom/FederatedTouchEvent.d.ts +0 -15
- package/lib/dom/FederatedTouchEvent.js +0 -27
- package/lib/dom/FederatedWheelEvent.d.ts +0 -20
- package/lib/dom/FederatedWheelEvent.js +0 -35
- package/lib/dom/KeyframeEffect.d.ts +0 -47
- package/lib/dom/KeyframeEffect.js +0 -192
- package/lib/dom/KeyframeList.d.ts +0 -2
- package/lib/dom/KeyframeList.js +0 -183
- package/lib/dom/MutationEvent.d.ts +0 -15
- package/lib/dom/MutationEvent.js +0 -37
- package/lib/dom/MutationObserver.d.ts +0 -36
- package/lib/dom/MutationObserver.js +0 -426
- package/lib/dom/MutationRecord.d.ts +0 -14
- package/lib/dom/MutationRecord.js +0 -38
- package/lib/dom/Node.d.ts +0 -138
- package/lib/dom/Node.js +0 -397
- package/lib/dom/index.d.ts +0 -20
- package/lib/dom/index.js +0 -265
- package/lib/dom/interfaces.d.ts +0 -372
- package/lib/dom/interfaces.js +0 -64
- package/lib/global-module.d.ts +0 -1
- package/lib/global-module.js +0 -170
- package/lib/index.d.ts +0 -18
- package/lib/index.js +0 -198
- package/lib/plugins/CullingPlugin.d.ts +0 -17
- package/lib/plugins/CullingPlugin.js +0 -69
- package/lib/plugins/DirtyCheckPlugin.d.ts +0 -10
- package/lib/plugins/DirtyCheckPlugin.js +0 -63
- package/lib/plugins/EventPlugin.d.ts +0 -30
- package/lib/plugins/EventPlugin.js +0 -382
- package/lib/plugins/FrustumCullingStrategy.d.ts +0 -21
- package/lib/plugins/FrustumCullingStrategy.js +0 -121
- package/lib/plugins/PrepareRendererPlugin.d.ts +0 -7
- package/lib/plugins/PrepareRendererPlugin.js +0 -87
- package/lib/services/ContextService.d.ts +0 -13
- package/lib/services/ContextService.js +0 -15
- package/lib/services/EventService.d.ts +0 -73
- package/lib/services/EventService.js +0 -1263
- package/lib/services/OffscreenCanvasCreator.d.ts +0 -13
- package/lib/services/OffscreenCanvasCreator.js +0 -66
- package/lib/services/RenderingContext.d.ts +0 -26
- package/lib/services/RenderingContext.js +0 -24
- package/lib/services/RenderingService.d.ts +0 -102
- package/lib/services/RenderingService.js +0 -244
- package/lib/services/SceneGraphSelector.d.ts +0 -23
- package/lib/services/SceneGraphSelector.js +0 -114
- package/lib/services/SceneGraphService.d.ts +0 -153
- package/lib/services/SceneGraphService.js +0 -875
- package/lib/services/TextService.d.ts +0 -36
- package/lib/services/TextService.js +0 -359
- package/lib/services/aabb/CircleUpdater.d.ts +0 -8
- package/lib/services/aabb/CircleUpdater.js +0 -40
- package/lib/services/aabb/EllipseUpdater.d.ts +0 -8
- package/lib/services/aabb/EllipseUpdater.js +0 -41
- package/lib/services/aabb/LineUpdater.d.ts +0 -8
- package/lib/services/aabb/LineUpdater.js +0 -47
- package/lib/services/aabb/PathUpdater.d.ts +0 -8
- package/lib/services/aabb/PathUpdater.js +0 -179
- package/lib/services/aabb/PolylineUpdater.d.ts +0 -8
- package/lib/services/aabb/PolylineUpdater.js +0 -56
- package/lib/services/aabb/RectUpdater.d.ts +0 -8
- package/lib/services/aabb/RectUpdater.js +0 -84
- package/lib/services/aabb/TextUpdater.d.ts +0 -21
- package/lib/services/aabb/TextUpdater.js +0 -149
- package/lib/services/aabb/index.d.ts +0 -8
- package/lib/services/aabb/index.js +0 -84
- package/lib/services/aabb/interfaces.d.ts +0 -15
- package/lib/services/aabb/interfaces.js +0 -16
- package/lib/services/index.d.ts +0 -10
- package/lib/services/index.js +0 -122
- package/lib/shapes/AABB.d.ts +0 -35
- package/lib/shapes/AABB.js +0 -248
- package/lib/shapes/BoundingSphere.d.ts +0 -8
- package/lib/shapes/BoundingSphere.js +0 -41
- package/lib/shapes/Frustum.d.ts +0 -16
- package/lib/shapes/Frustum.js +0 -96
- package/lib/shapes/Plane.d.ts +0 -14
- package/lib/shapes/Plane.js +0 -51
- package/lib/shapes/Point.d.ts +0 -11
- package/lib/shapes/Point.js +0 -38
- package/lib/shapes/Ray.d.ts +0 -24
- package/lib/shapes/Ray.js +0 -169
- package/lib/shapes/Rectangle.d.ts +0 -12
- package/lib/shapes/Rectangle.js +0 -27
- package/lib/shapes/index.d.ts +0 -7
- package/lib/shapes/index.js +0 -96
- package/lib/types.d.ts +0 -289
- package/lib/types.js +0 -69
- package/lib/utils/animation.d.ts +0 -15
- package/lib/utils/animation.js +0 -275
- package/lib/utils/assert.d.ts +0 -9
- package/lib/utils/assert.js +0 -56
- package/lib/utils/bezier-easing.d.ts +0 -20
- package/lib/utils/bezier-easing.js +0 -128
- package/lib/utils/canvas.d.ts +0 -6
- package/lib/utils/canvas.js +0 -27
- package/lib/utils/custom-easing.d.ts +0 -64
- package/lib/utils/custom-easing.js +0 -392
- package/lib/utils/deferred.d.ts +0 -43
- package/lib/utils/deferred.js +0 -131
- package/lib/utils/dom.d.ts +0 -2
- package/lib/utils/dom.js +0 -17
- package/lib/utils/event.d.ts +0 -45
- package/lib/utils/event.js +0 -17
- package/lib/utils/index.d.ts +0 -10
- package/lib/utils/index.js +0 -135
- package/lib/utils/interpolation.d.ts +0 -4
- package/lib/utils/interpolation.js +0 -229
- package/lib/utils/math.d.ts +0 -29
- package/lib/utils/math.js +0 -273
- package/lib/utils/path.d.ts +0 -15
- package/lib/utils/path.js +0 -409
- package/lib/utils/string.d.ts +0 -2
- package/lib/utils/string.js +0 -27
- package/lib/utils/text.d.ts +0 -2
- package/lib/utils/text.js +0 -39
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/// <reference types="offscreencanvas" />
|
|
2
|
-
import type { ParsedTextStyleProps } from '../display-objects';
|
|
3
|
-
import { Rectangle } from '../shapes';
|
|
4
|
-
export interface TextMetrics {
|
|
5
|
-
font: string;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
lines: string[];
|
|
9
|
-
lineWidths: number[];
|
|
10
|
-
lineHeight: number;
|
|
11
|
-
maxLineWidth: number;
|
|
12
|
-
fontProperties: IFontMetrics;
|
|
13
|
-
lineMetrics: Rectangle[];
|
|
14
|
-
}
|
|
15
|
-
interface IFontMetrics {
|
|
16
|
-
ascent: number;
|
|
17
|
-
descent: number;
|
|
18
|
-
fontSize: number;
|
|
19
|
-
}
|
|
20
|
-
export declare class TextService {
|
|
21
|
-
private cache;
|
|
22
|
-
private offscreenCanvas;
|
|
23
|
-
measureFont(font: string, offscreenCanvas: HTMLCanvasElement | OffscreenCanvas): IFontMetrics;
|
|
24
|
-
measureText(text: string, parsedStyle: ParsedTextStyleProps, offscreenCanvas: HTMLCanvasElement | OffscreenCanvas): TextMetrics;
|
|
25
|
-
private wordWrap;
|
|
26
|
-
private isBreakingSpace;
|
|
27
|
-
private isNewline;
|
|
28
|
-
private trimToBreakable;
|
|
29
|
-
private shouldBreakByKinsokuShorui;
|
|
30
|
-
private trimByKinsokuShorui;
|
|
31
|
-
private canBreakInLastChar;
|
|
32
|
-
private sumTextWidthByCache;
|
|
33
|
-
private findBreakableIndex;
|
|
34
|
-
private getFromCache;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TextService = void 0;
|
|
7
|
-
|
|
8
|
-
var _tslib = require("tslib");
|
|
9
|
-
|
|
10
|
-
var _manaSyringe = require("mana-syringe");
|
|
11
|
-
|
|
12
|
-
var _utils = require("../utils");
|
|
13
|
-
|
|
14
|
-
var _shapes = require("../shapes");
|
|
15
|
-
|
|
16
|
-
var _OffscreenCanvasCreator = require("./OffscreenCanvasCreator");
|
|
17
|
-
|
|
18
|
-
var TEXT_METRICS = {
|
|
19
|
-
MetricsString: '|ÉqÅ',
|
|
20
|
-
BaselineSymbol: 'M',
|
|
21
|
-
BaselineMultiplier: 1.4,
|
|
22
|
-
HeightMultiplier: 2,
|
|
23
|
-
Newlines: [0x000a, 0x000d // carriage return
|
|
24
|
-
],
|
|
25
|
-
BreakingSpaces: [0x0009, 0x0020, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2008, 0x2009, 0x200a, 0x205f, 0x3000 // ideographic space
|
|
26
|
-
]
|
|
27
|
-
};
|
|
28
|
-
var LATIN_REGEX = /[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/; // Line breaking rules in CJK (Kinsoku Shori)
|
|
29
|
-
// Refer from https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages
|
|
30
|
-
|
|
31
|
-
var regexCannotStartZhCn = /[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/;
|
|
32
|
-
var regexCannotEndZhCn = /[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/;
|
|
33
|
-
var regexCannotStartZhTw = /[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/;
|
|
34
|
-
var regexCannotEndZhTw = /[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/;
|
|
35
|
-
var regexCannotStartJaJp = /[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/;
|
|
36
|
-
var regexCannotEndJaJp = /[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/;
|
|
37
|
-
var regexCannotStartKoKr = /[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/;
|
|
38
|
-
var regexCannotEndKoKr = /[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/;
|
|
39
|
-
var regexCannotStart = new RegExp("".concat(regexCannotStartZhCn.source, "|").concat(regexCannotStartZhTw.source, "|").concat(regexCannotStartJaJp.source, "|").concat(regexCannotStartKoKr.source));
|
|
40
|
-
var regexCannotEnd = new RegExp("".concat(regexCannotEndZhCn.source, "|").concat(regexCannotEndZhTw.source, "|").concat(regexCannotEndJaJp.source, "|").concat(regexCannotEndKoKr.source));
|
|
41
|
-
|
|
42
|
-
var TextService =
|
|
43
|
-
/** @class */
|
|
44
|
-
function () {
|
|
45
|
-
function TextService() {
|
|
46
|
-
var _this = this;
|
|
47
|
-
|
|
48
|
-
this.cache = {};
|
|
49
|
-
|
|
50
|
-
this.shouldBreakByKinsokuShorui = function (char, nextChar) {
|
|
51
|
-
if (_this.isBreakingSpace(nextChar)) return false;
|
|
52
|
-
|
|
53
|
-
if (char) {
|
|
54
|
-
// Line breaking rules in CJK (Kinsoku Shori)
|
|
55
|
-
if (regexCannotEnd.exec(nextChar) || regexCannotStart.exec(char)) {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return false;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
this.trimByKinsokuShorui = function (prev) {
|
|
64
|
-
var next = (0, _tslib.__spreadArray)([], (0, _tslib.__read)(prev), false);
|
|
65
|
-
var prevLine = next[next.length - 2];
|
|
66
|
-
|
|
67
|
-
if (!prevLine) {
|
|
68
|
-
return prev;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
var lastChar = prevLine[prevLine.length - 1];
|
|
72
|
-
next[next.length - 2] = prevLine.slice(0, -1);
|
|
73
|
-
next[next.length - 1] = lastChar + next[next.length - 1];
|
|
74
|
-
return next;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
TextService.prototype.measureFont = function (font, offscreenCanvas) {
|
|
79
|
-
// as this method is used for preparing assets, don't recalculate things if we don't need to
|
|
80
|
-
if (this.cache[font]) {
|
|
81
|
-
return this.cache[font];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var properties = {
|
|
85
|
-
ascent: 0,
|
|
86
|
-
descent: 0,
|
|
87
|
-
fontSize: 0
|
|
88
|
-
};
|
|
89
|
-
var canvas = this.offscreenCanvas.getOrCreateCanvas(offscreenCanvas);
|
|
90
|
-
var context = this.offscreenCanvas.getOrCreateContext(offscreenCanvas);
|
|
91
|
-
context.font = font;
|
|
92
|
-
var metricsString = TEXT_METRICS.MetricsString + TEXT_METRICS.BaselineSymbol;
|
|
93
|
-
var width = Math.ceil(context.measureText(metricsString).width);
|
|
94
|
-
var baseline = Math.ceil(context.measureText(TEXT_METRICS.BaselineSymbol).width);
|
|
95
|
-
var height = TEXT_METRICS.HeightMultiplier * baseline;
|
|
96
|
-
baseline = baseline * TEXT_METRICS.BaselineMultiplier | 0; // @ts-ignore
|
|
97
|
-
|
|
98
|
-
canvas.width = width; // @ts-ignore
|
|
99
|
-
|
|
100
|
-
canvas.height = height;
|
|
101
|
-
context.fillStyle = '#f00';
|
|
102
|
-
context.fillRect(0, 0, width, height);
|
|
103
|
-
context.font = font;
|
|
104
|
-
context.textBaseline = 'alphabetic';
|
|
105
|
-
context.fillStyle = '#000';
|
|
106
|
-
context.fillText(metricsString, 0, baseline);
|
|
107
|
-
var imagedata = context.getImageData(0, 0, width || 1, height || 1).data;
|
|
108
|
-
var pixels = imagedata.length;
|
|
109
|
-
var line = width * 4;
|
|
110
|
-
var i = 0;
|
|
111
|
-
var idx = 0;
|
|
112
|
-
var stop = false; // ascent. scan from top to bottom until we find a non red pixel
|
|
113
|
-
|
|
114
|
-
for (i = 0; i < baseline; ++i) {
|
|
115
|
-
for (var j = 0; j < line; j += 4) {
|
|
116
|
-
if (imagedata[idx + j] !== 255) {
|
|
117
|
-
stop = true;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (!stop) {
|
|
123
|
-
idx += line;
|
|
124
|
-
} else {
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
properties.ascent = baseline - i;
|
|
130
|
-
idx = pixels - line;
|
|
131
|
-
stop = false; // descent. scan from bottom to top until we find a non red pixel
|
|
132
|
-
|
|
133
|
-
for (i = height; i > baseline; --i) {
|
|
134
|
-
for (var j = 0; j < line; j += 4) {
|
|
135
|
-
if (imagedata[idx + j] !== 255) {
|
|
136
|
-
stop = true;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (!stop) {
|
|
142
|
-
idx -= line;
|
|
143
|
-
} else {
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
properties.descent = i - baseline;
|
|
149
|
-
properties.fontSize = properties.ascent + properties.descent;
|
|
150
|
-
this.cache[font] = properties;
|
|
151
|
-
return properties;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
TextService.prototype.measureText = function (text, parsedStyle, offscreenCanvas) {
|
|
155
|
-
var fontSize = parsedStyle.fontSize,
|
|
156
|
-
wordWrap = parsedStyle.wordWrap,
|
|
157
|
-
_a = parsedStyle.lineHeight,
|
|
158
|
-
strokeHeight = _a === void 0 ? 0 : _a,
|
|
159
|
-
lineWidth = parsedStyle.lineWidth,
|
|
160
|
-
textBaseline = parsedStyle.textBaseline,
|
|
161
|
-
textAlign = parsedStyle.textAlign,
|
|
162
|
-
_b = parsedStyle.letterSpacing,
|
|
163
|
-
letterSpacing = _b === void 0 ? 0 : _b,
|
|
164
|
-
// dropShadow = 0,
|
|
165
|
-
// dropShadowDistance = 0,
|
|
166
|
-
_c = parsedStyle.leading,
|
|
167
|
-
// dropShadow = 0,
|
|
168
|
-
// dropShadowDistance = 0,
|
|
169
|
-
leading = _c === void 0 ? 0 : _c;
|
|
170
|
-
var font = (0, _utils.toFontString)(parsedStyle);
|
|
171
|
-
var fontProperties = this.measureFont(font, offscreenCanvas); // fallback in case UA disallow canvas data extraction
|
|
172
|
-
// (toDataURI, getImageData functions)
|
|
173
|
-
|
|
174
|
-
if (fontProperties.fontSize === 0) {
|
|
175
|
-
fontProperties.fontSize = fontSize.value;
|
|
176
|
-
fontProperties.ascent = fontSize.value;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
var context = this.offscreenCanvas.getOrCreateContext(offscreenCanvas);
|
|
180
|
-
context.font = font;
|
|
181
|
-
var outputText = wordWrap ? this.wordWrap(text, parsedStyle, offscreenCanvas) : text;
|
|
182
|
-
var lines = outputText.split(/(?:\r\n|\r|\n)/);
|
|
183
|
-
var lineWidths = new Array(lines.length);
|
|
184
|
-
var maxLineWidth = 0;
|
|
185
|
-
|
|
186
|
-
for (var i = 0; i < lines.length; i++) {
|
|
187
|
-
var lineWidth_1 = context.measureText(lines[i]).width + (lines[i].length - 1) * letterSpacing;
|
|
188
|
-
lineWidths[i] = lineWidth_1;
|
|
189
|
-
maxLineWidth = Math.max(maxLineWidth, lineWidth_1);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
var width = maxLineWidth + lineWidth.value; // if (dropShadow) {
|
|
193
|
-
// width += dropShadowDistance;
|
|
194
|
-
// }
|
|
195
|
-
|
|
196
|
-
var lineHeight = strokeHeight || fontProperties.fontSize + lineWidth.value;
|
|
197
|
-
var height = Math.max(lineHeight, fontProperties.fontSize + lineWidth.value) + (lines.length - 1) * (lineHeight + leading); // if (dropShadow) {
|
|
198
|
-
// height += dropShadowDistance;
|
|
199
|
-
// }
|
|
200
|
-
|
|
201
|
-
lineHeight += leading; // handle vertical text baseline
|
|
202
|
-
|
|
203
|
-
var offsetY = 0;
|
|
204
|
-
|
|
205
|
-
if (textBaseline.value === 'middle') {
|
|
206
|
-
offsetY = -height / 2;
|
|
207
|
-
} else if (textBaseline.value === 'bottom' || textBaseline.value === 'alphabetic' || textBaseline.value === 'ideographic') {
|
|
208
|
-
offsetY = -height;
|
|
209
|
-
} else if (textBaseline.value === 'top' || textBaseline.value === 'hanging') {
|
|
210
|
-
offsetY = 0;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return {
|
|
214
|
-
font: font,
|
|
215
|
-
width: width,
|
|
216
|
-
height: height,
|
|
217
|
-
lines: lines,
|
|
218
|
-
lineWidths: lineWidths,
|
|
219
|
-
lineHeight: lineHeight,
|
|
220
|
-
maxLineWidth: maxLineWidth,
|
|
221
|
-
fontProperties: fontProperties,
|
|
222
|
-
lineMetrics: lineWidths.map(function (width, i) {
|
|
223
|
-
var offsetX = 0; // handle horizontal text align
|
|
224
|
-
|
|
225
|
-
if (textAlign.value === 'center') {
|
|
226
|
-
offsetX -= width / 2;
|
|
227
|
-
} else if (textAlign.value === 'right' || textAlign.value === 'end') {
|
|
228
|
-
offsetX -= width;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return new _shapes.Rectangle(offsetX - lineWidth.value / 2, offsetY + i * lineHeight, width + lineWidth.value, lineHeight);
|
|
232
|
-
})
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
TextService.prototype.wordWrap = function (text, _a, offscreenCanvas) {
|
|
237
|
-
var _this = this;
|
|
238
|
-
|
|
239
|
-
var _b = _a.wordWrapWidth,
|
|
240
|
-
wordWrapWidth = _b === void 0 ? 0 : _b,
|
|
241
|
-
_c = _a.letterSpacing,
|
|
242
|
-
letterSpacing = _c === void 0 ? 0 : _c;
|
|
243
|
-
var context = this.offscreenCanvas.getOrCreateContext(offscreenCanvas);
|
|
244
|
-
var maxWidth = wordWrapWidth + letterSpacing;
|
|
245
|
-
var lines = [];
|
|
246
|
-
var currentIndex = 0;
|
|
247
|
-
var currentWidth = 0;
|
|
248
|
-
var cache = {};
|
|
249
|
-
|
|
250
|
-
var calcWidth = function calcWidth(char) {
|
|
251
|
-
return _this.getFromCache(char, letterSpacing, cache, context);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
Array.from(text).forEach(function (char, i) {
|
|
255
|
-
var prevChar = text[i - 1];
|
|
256
|
-
var nextChar = text[i + 1];
|
|
257
|
-
var width = calcWidth(char);
|
|
258
|
-
|
|
259
|
-
if (_this.isNewline(char)) {
|
|
260
|
-
currentIndex++;
|
|
261
|
-
currentWidth = 0;
|
|
262
|
-
lines[currentIndex] = '';
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
if (currentWidth > 0 && currentWidth + width > maxWidth) {
|
|
267
|
-
currentIndex++;
|
|
268
|
-
currentWidth = 0;
|
|
269
|
-
lines[currentIndex] = '';
|
|
270
|
-
|
|
271
|
-
if (_this.isBreakingSpace(char)) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
if (!_this.canBreakInLastChar(char)) {
|
|
276
|
-
lines = _this.trimToBreakable(lines);
|
|
277
|
-
currentWidth = _this.sumTextWidthByCache(lines[currentIndex] || '', cache);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
if (_this.shouldBreakByKinsokuShorui(char, nextChar)) {
|
|
281
|
-
lines = _this.trimByKinsokuShorui(lines);
|
|
282
|
-
currentWidth += calcWidth(prevChar || '');
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
currentWidth += width;
|
|
287
|
-
lines[currentIndex] = (lines[currentIndex] || '') + char;
|
|
288
|
-
});
|
|
289
|
-
return lines.join('\n');
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
TextService.prototype.isBreakingSpace = function (char) {
|
|
293
|
-
if (typeof char !== 'string') {
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return TEXT_METRICS.BreakingSpaces.indexOf(char.charCodeAt(0)) >= 0;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
TextService.prototype.isNewline = function (char) {
|
|
301
|
-
if (typeof char !== 'string') {
|
|
302
|
-
return false;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return TEXT_METRICS.Newlines.indexOf(char.charCodeAt(0)) >= 0;
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
TextService.prototype.trimToBreakable = function (prev) {
|
|
309
|
-
var next = (0, _tslib.__spreadArray)([], (0, _tslib.__read)(prev), false);
|
|
310
|
-
var prevLine = next[next.length - 2];
|
|
311
|
-
var index = this.findBreakableIndex(prevLine);
|
|
312
|
-
if (index === -1 || !prevLine) return next;
|
|
313
|
-
var trimmedChar = prevLine.slice(index, index + 1);
|
|
314
|
-
var isTrimmedWithSpace = this.isBreakingSpace(trimmedChar);
|
|
315
|
-
var trimFrom = index + 1;
|
|
316
|
-
var trimTo = index + (isTrimmedWithSpace ? 0 : 1);
|
|
317
|
-
next[next.length - 1] += prevLine.slice(trimFrom, prevLine.length);
|
|
318
|
-
next[next.length - 2] = prevLine.slice(0, trimTo);
|
|
319
|
-
return next;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
TextService.prototype.canBreakInLastChar = function (char) {
|
|
323
|
-
if (char && LATIN_REGEX.test(char)) return false;
|
|
324
|
-
return true;
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
TextService.prototype.sumTextWidthByCache = function (text, cache) {
|
|
328
|
-
return text.split('').reduce(function (sum, c) {
|
|
329
|
-
if (!cache[c]) throw Error('cannot count the word without cache');
|
|
330
|
-
return sum + cache[c];
|
|
331
|
-
}, 0);
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
TextService.prototype.findBreakableIndex = function (line) {
|
|
335
|
-
for (var i = line.length - 1; i >= 0; i--) {
|
|
336
|
-
if (!LATIN_REGEX.test(line[i])) return i;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
return -1;
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
TextService.prototype.getFromCache = function (key, letterSpacing, cache, context) {
|
|
343
|
-
var width = cache[key];
|
|
344
|
-
|
|
345
|
-
if (typeof width !== 'number') {
|
|
346
|
-
var spacing = key.length * letterSpacing;
|
|
347
|
-
width = context.measureText(key).width + spacing;
|
|
348
|
-
cache[key] = width;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
return width;
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_OffscreenCanvasCreator.OffscreenCanvasCreator), (0, _tslib.__metadata)("design:type", _OffscreenCanvasCreator.OffscreenCanvasCreator)], TextService.prototype, "offscreenCanvas", void 0);
|
|
355
|
-
TextService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], TextService);
|
|
356
|
-
return TextService;
|
|
357
|
-
}();
|
|
358
|
-
|
|
359
|
-
exports.TextService = TextService;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GeometryAABBUpdater } from './interfaces';
|
|
2
|
-
import type { Circle, ParsedCircleStyleProps } from '../../display-objects/Circle';
|
|
3
|
-
export declare class CircleUpdater implements GeometryAABBUpdater<ParsedCircleStyleProps> {
|
|
4
|
-
update(parsedStyle: ParsedCircleStyleProps, object: Circle): {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CircleUpdater = void 0;
|
|
7
|
-
|
|
8
|
-
var _tslib = require("tslib");
|
|
9
|
-
|
|
10
|
-
var _manaSyringe = require("mana-syringe");
|
|
11
|
-
|
|
12
|
-
var _interfaces = require("./interfaces");
|
|
13
|
-
|
|
14
|
-
var _types = require("../../types");
|
|
15
|
-
|
|
16
|
-
var CircleUpdater =
|
|
17
|
-
/** @class */
|
|
18
|
-
function () {
|
|
19
|
-
function CircleUpdater() {}
|
|
20
|
-
|
|
21
|
-
CircleUpdater.prototype.update = function (parsedStyle, object) {
|
|
22
|
-
var r = parsedStyle.r;
|
|
23
|
-
var width = r.value * 2;
|
|
24
|
-
var height = r.value * 2;
|
|
25
|
-
return {
|
|
26
|
-
width: width,
|
|
27
|
-
height: height
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
CircleUpdater = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
32
|
-
token: {
|
|
33
|
-
token: _interfaces.GeometryAABBUpdater,
|
|
34
|
-
named: _types.Shape.CIRCLE
|
|
35
|
-
}
|
|
36
|
-
})], CircleUpdater);
|
|
37
|
-
return CircleUpdater;
|
|
38
|
-
}();
|
|
39
|
-
|
|
40
|
-
exports.CircleUpdater = CircleUpdater;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GeometryAABBUpdater } from './interfaces';
|
|
2
|
-
import type { Ellipse, ParsedEllipseStyleProps } from '../../display-objects/Ellipse';
|
|
3
|
-
export declare class EllipseUpdater implements GeometryAABBUpdater<ParsedEllipseStyleProps> {
|
|
4
|
-
update(parsedStyle: ParsedEllipseStyleProps, object: Ellipse): {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EllipseUpdater = void 0;
|
|
7
|
-
|
|
8
|
-
var _tslib = require("tslib");
|
|
9
|
-
|
|
10
|
-
var _manaSyringe = require("mana-syringe");
|
|
11
|
-
|
|
12
|
-
var _interfaces = require("./interfaces");
|
|
13
|
-
|
|
14
|
-
var _types = require("../../types");
|
|
15
|
-
|
|
16
|
-
var EllipseUpdater =
|
|
17
|
-
/** @class */
|
|
18
|
-
function () {
|
|
19
|
-
function EllipseUpdater() {}
|
|
20
|
-
|
|
21
|
-
EllipseUpdater.prototype.update = function (parsedStyle, object) {
|
|
22
|
-
var rx = parsedStyle.rx,
|
|
23
|
-
ry = parsedStyle.ry;
|
|
24
|
-
var width = rx.value * 2;
|
|
25
|
-
var height = ry.value * 2;
|
|
26
|
-
return {
|
|
27
|
-
width: width,
|
|
28
|
-
height: height
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
EllipseUpdater = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
33
|
-
token: {
|
|
34
|
-
token: _interfaces.GeometryAABBUpdater,
|
|
35
|
-
named: _types.Shape.ELLIPSE
|
|
36
|
-
}
|
|
37
|
-
})], EllipseUpdater);
|
|
38
|
-
return EllipseUpdater;
|
|
39
|
-
}();
|
|
40
|
-
|
|
41
|
-
exports.EllipseUpdater = EllipseUpdater;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GeometryAABBUpdater } from './interfaces';
|
|
2
|
-
import type { ParsedLineStyleProps } from '../../display-objects/Line';
|
|
3
|
-
export declare class LineUpdater implements GeometryAABBUpdater<ParsedLineStyleProps> {
|
|
4
|
-
update(parsedStyle: ParsedLineStyleProps): {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LineUpdater = void 0;
|
|
7
|
-
|
|
8
|
-
var _tslib = require("tslib");
|
|
9
|
-
|
|
10
|
-
var _manaSyringe = require("mana-syringe");
|
|
11
|
-
|
|
12
|
-
var _interfaces = require("./interfaces");
|
|
13
|
-
|
|
14
|
-
var _types = require("../../types");
|
|
15
|
-
|
|
16
|
-
var LineUpdater =
|
|
17
|
-
/** @class */
|
|
18
|
-
function () {
|
|
19
|
-
function LineUpdater() {}
|
|
20
|
-
|
|
21
|
-
LineUpdater.prototype.update = function (parsedStyle) {
|
|
22
|
-
var x1 = parsedStyle.x1,
|
|
23
|
-
y1 = parsedStyle.y1,
|
|
24
|
-
x2 = parsedStyle.x2,
|
|
25
|
-
y2 = parsedStyle.y2;
|
|
26
|
-
var minX = Math.min(x1.value, x2.value);
|
|
27
|
-
var maxX = Math.max(x1.value, x2.value);
|
|
28
|
-
var minY = Math.min(y1.value, y2.value);
|
|
29
|
-
var maxY = Math.max(y1.value, y2.value);
|
|
30
|
-
var width = maxX - minX;
|
|
31
|
-
var height = maxY - minY;
|
|
32
|
-
return {
|
|
33
|
-
width: width,
|
|
34
|
-
height: height
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
LineUpdater = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
39
|
-
token: {
|
|
40
|
-
token: _interfaces.GeometryAABBUpdater,
|
|
41
|
-
named: _types.Shape.LINE
|
|
42
|
-
}
|
|
43
|
-
})], LineUpdater);
|
|
44
|
-
return LineUpdater;
|
|
45
|
-
}();
|
|
46
|
-
|
|
47
|
-
exports.LineUpdater = LineUpdater;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GeometryAABBUpdater } from './interfaces';
|
|
2
|
-
import type { ParsedPathStyleProps } from '../../display-objects';
|
|
3
|
-
export declare class PathUpdater implements GeometryAABBUpdater<ParsedPathStyleProps> {
|
|
4
|
-
update(parsedStyle: ParsedPathStyleProps): {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
}
|