@antv/g 5.0.22-alpha.1 → 5.0.22-alpha.4
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/es/AbstractRenderer.js +1 -3
- package/es/Canvas.d.ts +0 -3
- package/es/Canvas.js +1 -3
- package/es/DisplayObjectPool.js +1 -3
- package/es/camera/Camera.js +1 -3
- package/es/camera/Landmark.js +1 -3
- package/es/components/Cullable.js +1 -3
- package/es/components/Geometry.js +1 -3
- package/es/components/Renderable.js +1 -3
- package/es/components/Sortable.js +1 -3
- package/es/components/Transform.js +1 -3
- package/es/css/CSSProperty.d.ts +1 -1
- package/es/css/LayoutRegistry.js +1 -3
- package/es/css/StyleValueRegistry.d.ts +2 -1
- package/es/css/StyleValueRegistry.js +6 -7
- package/es/css/cssom/CSSColorValue.js +1 -3
- package/es/css/cssom/CSSGradientValue.js +6 -8
- package/es/css/cssom/CSSKeywordValue.js +1 -3
- package/es/css/cssom/CSSMathInvert.js +1 -3
- package/es/css/cssom/CSSMathMax.js +1 -3
- package/es/css/cssom/CSSMathMin.js +1 -3
- package/es/css/cssom/CSSMathNegate.js +1 -3
- package/es/css/cssom/CSSMathProduct.js +1 -3
- package/es/css/cssom/CSSMathSum.js +1 -3
- package/es/css/cssom/CSSMathValue.js +1 -3
- package/es/css/cssom/CSSMathVariadic.js +1 -3
- package/es/css/cssom/CSSNumericValue.js +1 -3
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +1 -3
- package/es/css/cssom/CSSRGB.js +2 -4
- package/es/css/cssom/CSSStyleValue.d.ts +1 -1
- package/es/css/cssom/CSSStyleValue.js +1 -3
- package/es/css/cssom/CSSTransformComponent.js +1 -3
- package/es/css/cssom/CSSTransformValue.js +1 -3
- package/es/css/cssom/CSSTranslate.js +1 -3
- package/es/css/cssom/CSSUnitValue.js +2 -4
- package/es/css/parser/color.js +1 -1
- package/es/css/parser/dimension.js +1 -1
- package/es/css/parser/transform-origin.d.ts +1 -1
- package/es/css/parser/transform-origin.js +2 -2
- package/es/css/parser/transform.d.ts +1 -1
- package/es/css/parser/transform.js +2 -2
- package/es/css/properties/CSSPropertyAnchor.js +1 -3
- package/es/css/properties/CSSPropertyClipPath.js +1 -3
- package/es/css/properties/CSSPropertyColor.js +1 -3
- package/es/css/properties/CSSPropertyFilter.js +1 -3
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/es/css/properties/CSSPropertyLineDash.js +1 -3
- package/es/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/es/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/es/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/es/css/properties/CSSPropertyOpacity.js +1 -3
- package/es/css/properties/CSSPropertyPath.js +1 -3
- package/es/css/properties/CSSPropertyPoints.js +1 -3
- package/es/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/es/css/properties/CSSPropertyText.js +2 -4
- package/es/css/properties/CSSPropertyTextTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/es/css/properties/CSSPropertyVisibility.js +1 -3
- package/es/css/properties/CSSPropertyZIndex.js +1 -3
- package/es/display-objects/Circle.js +1 -3
- package/es/display-objects/CustomElement.js +1 -3
- package/es/display-objects/DisplayObject.js +3 -6
- package/es/display-objects/Ellipse.js +1 -3
- package/es/display-objects/Group.js +1 -3
- package/es/display-objects/HTML.js +3 -6
- package/es/display-objects/Image.js +1 -3
- package/es/display-objects/Line.js +1 -3
- package/es/display-objects/Path.js +1 -3
- package/es/display-objects/Polygon.js +1 -3
- package/es/display-objects/Polyline.js +1 -3
- package/es/display-objects/Rect.js +1 -3
- package/es/display-objects/Text.js +3 -6
- package/es/dom/Animation.js +2 -4
- package/es/dom/AnimationEffectTiming.js +1 -3
- package/es/dom/AnimationEvent.js +1 -3
- package/es/dom/AnimationTimeline.js +1 -3
- package/es/dom/CustomElementRegistry.js +1 -3
- package/es/dom/CustomEvent.js +1 -3
- package/es/dom/Document.js +1 -3
- package/es/dom/Element.js +5 -7
- package/es/dom/EventTarget.js +3 -5
- package/es/dom/FederatedEvent.js +1 -3
- package/es/dom/FederatedMouseEvent.js +1 -3
- package/es/dom/FederatedPointerEvent.js +1 -3
- package/es/dom/FederatedWheelEvent.js +1 -3
- package/es/dom/KeyframeEffect.js +1 -3
- package/es/dom/KeyframeList.js +1 -1
- package/es/dom/MutationEvent.d.ts +1 -1
- package/es/dom/MutationEvent.js +1 -3
- package/es/dom/MutationObserver.d.ts +2 -1
- package/es/dom/MutationObserver.js +4 -11
- package/es/dom/MutationRecord.d.ts +1 -1
- package/es/dom/MutationRecord.js +1 -3
- package/es/dom/Node.js +3 -5
- package/es/dom/interfaces.d.ts +2 -1
- package/es/plugins/CullingPlugin.js +1 -3
- package/es/plugins/DirtyCheckPlugin.js +1 -3
- package/es/plugins/EventPlugin.js +1 -3
- package/es/plugins/FrustumCullingStrategy.js +2 -4
- package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
- package/es/plugins/PrepareRendererPlugin.js +1 -3
- package/es/services/EventService.js +3 -5
- package/es/services/OffscreenCanvasCreator.js +1 -3
- package/es/services/RenderingService.d.ts +2 -2
- package/es/services/RenderingService.js +1 -3
- package/es/services/SceneGraphSelector.js +1 -3
- package/es/services/SceneGraphService.js +1 -3
- package/es/services/TextService.d.ts +2 -2
- package/es/services/TextService.js +5 -6
- package/es/services/aabb/CircleUpdater.js +1 -3
- package/es/services/aabb/EllipseUpdater.js +1 -3
- package/es/services/aabb/LineUpdater.js +1 -3
- package/es/services/aabb/PathUpdater.js +1 -3
- package/es/services/aabb/PolylineUpdater.js +1 -3
- package/es/services/aabb/RectUpdater.js +1 -3
- package/es/services/aabb/TextUpdater.js +1 -3
- package/es/shapes/AABB.js +1 -3
- package/es/shapes/BoundingSphere.js +1 -3
- package/es/shapes/Frustum.js +1 -3
- package/es/shapes/Plane.js +1 -3
- package/es/shapes/Point.js +1 -3
- package/es/shapes/Ray.js +1 -3
- package/es/shapes/Rectangle.js +1 -3
- package/es/types.d.ts +1 -2
- package/es/utils/custom-easing.js +1 -1
- package/es/utils/path.d.ts +2 -2
- package/es/utils/path.js +3 -3
- package/es/utils/text.js +3 -3
- package/lib/AbstractRenderer.js +1 -3
- package/lib/Canvas.d.ts +0 -3
- package/lib/Canvas.js +2 -4
- package/lib/DisplayObjectPool.js +1 -3
- package/lib/camera/Camera.js +2 -4
- package/lib/camera/Landmark.js +1 -3
- package/lib/components/Cullable.js +2 -4
- package/lib/components/Geometry.js +1 -3
- package/lib/components/Renderable.js +1 -3
- package/lib/components/Sortable.js +1 -3
- package/lib/components/Transform.js +1 -3
- package/lib/css/CSSProperty.d.ts +1 -1
- package/lib/css/LayoutRegistry.js +1 -3
- package/lib/css/StyleValueRegistry.d.ts +2 -1
- package/lib/css/StyleValueRegistry.js +15 -11
- package/lib/css/cssom/CSSColorValue.js +1 -3
- package/lib/css/cssom/CSSGradientValue.js +7 -9
- package/lib/css/cssom/CSSKeywordValue.js +1 -3
- package/lib/css/cssom/CSSMathInvert.js +1 -3
- package/lib/css/cssom/CSSMathMax.js +1 -3
- package/lib/css/cssom/CSSMathMin.js +1 -3
- package/lib/css/cssom/CSSMathNegate.js +1 -3
- package/lib/css/cssom/CSSMathOperator.js +1 -1
- package/lib/css/cssom/CSSMathProduct.js +1 -3
- package/lib/css/cssom/CSSMathSum.js +1 -3
- package/lib/css/cssom/CSSMathValue.js +1 -3
- package/lib/css/cssom/CSSMathVariadic.js +2 -4
- package/lib/css/cssom/CSSNumericValue.js +1 -3
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +3 -5
- package/lib/css/cssom/CSSRGB.js +2 -4
- package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
- package/lib/css/cssom/CSSStyleValue.js +2 -4
- package/lib/css/cssom/CSSTransformComponent.js +2 -4
- package/lib/css/cssom/CSSTransformValue.js +1 -3
- package/lib/css/cssom/CSSTranslate.js +1 -3
- package/lib/css/cssom/CSSUnitValue.js +2 -4
- package/lib/css/cssom/types.js +1 -1
- package/lib/css/parser/color.js +3 -3
- package/lib/css/parser/dimension.js +6 -7
- package/lib/css/parser/numeric.js +3 -3
- package/lib/css/parser/path.js +1 -1
- package/lib/css/parser/transform-origin.d.ts +1 -1
- package/lib/css/parser/transform-origin.js +5 -3
- package/lib/css/parser/transform.d.ts +1 -1
- package/lib/css/parser/transform.js +11 -11
- package/lib/css/properties/CSSPropertyAnchor.js +1 -3
- package/lib/css/properties/CSSPropertyClipPath.js +1 -3
- package/lib/css/properties/CSSPropertyColor.js +1 -3
- package/lib/css/properties/CSSPropertyFilter.js +1 -3
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/lib/css/properties/CSSPropertyLineDash.js +1 -3
- package/lib/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/lib/css/properties/CSSPropertyOpacity.js +1 -3
- package/lib/css/properties/CSSPropertyPath.js +1 -3
- package/lib/css/properties/CSSPropertyPoints.js +1 -3
- package/lib/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/lib/css/properties/CSSPropertyText.js +2 -4
- package/lib/css/properties/CSSPropertyTextTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/lib/css/properties/CSSPropertyVisibility.js +1 -3
- package/lib/css/properties/CSSPropertyZIndex.js +1 -3
- package/lib/display-objects/Circle.js +1 -3
- package/lib/display-objects/CustomElement.js +1 -3
- package/lib/display-objects/DisplayObject.js +3 -6
- package/lib/display-objects/Ellipse.js +1 -3
- package/lib/display-objects/Group.js +1 -3
- package/lib/display-objects/HTML.js +4 -6
- package/lib/display-objects/Image.js +1 -3
- package/lib/display-objects/Line.js +1 -3
- package/lib/display-objects/Path.js +1 -3
- package/lib/display-objects/Polygon.js +1 -3
- package/lib/display-objects/Polyline.js +1 -3
- package/lib/display-objects/Rect.js +1 -3
- package/lib/display-objects/Text.js +4 -6
- package/lib/dom/Animation.js +2 -4
- package/lib/dom/AnimationEffectTiming.js +1 -3
- package/lib/dom/AnimationEvent.js +1 -3
- package/lib/dom/AnimationTimeline.js +2 -4
- package/lib/dom/CustomElementRegistry.js +1 -3
- package/lib/dom/CustomEvent.js +1 -3
- package/lib/dom/Document.js +1 -3
- package/lib/dom/Element.js +7 -9
- package/lib/dom/EventTarget.js +3 -5
- package/lib/dom/FederatedEvent.js +1 -3
- package/lib/dom/FederatedMouseEvent.js +1 -3
- package/lib/dom/FederatedPointerEvent.js +1 -3
- package/lib/dom/FederatedWheelEvent.js +1 -3
- package/lib/dom/KeyframeEffect.js +2 -4
- package/lib/dom/KeyframeList.js +1 -1
- package/lib/dom/MutationEvent.d.ts +1 -1
- package/lib/dom/MutationEvent.js +1 -3
- package/lib/dom/MutationObserver.d.ts +2 -1
- package/lib/dom/MutationObserver.js +15 -22
- package/lib/dom/MutationRecord.d.ts +1 -1
- package/lib/dom/MutationRecord.js +1 -3
- package/lib/dom/Node.js +6 -8
- package/lib/dom/interfaces.d.ts +2 -1
- package/lib/index.js +1 -1
- package/lib/plugins/CullingPlugin.js +2 -4
- package/lib/plugins/DirtyCheckPlugin.js +1 -3
- package/lib/plugins/EventPlugin.js +1 -3
- package/lib/plugins/FrustumCullingStrategy.js +3 -5
- package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
- package/lib/plugins/PrepareRendererPlugin.js +1 -3
- package/lib/services/EventService.js +3 -5
- package/lib/services/OffscreenCanvasCreator.js +1 -3
- package/lib/services/RenderingService.d.ts +2 -2
- package/lib/services/RenderingService.js +1 -3
- package/lib/services/SceneGraphSelector.js +2 -4
- package/lib/services/SceneGraphService.js +3 -5
- package/lib/services/TextService.d.ts +2 -2
- package/lib/services/TextService.js +8 -8
- package/lib/services/aabb/CircleUpdater.js +1 -3
- package/lib/services/aabb/EllipseUpdater.js +1 -3
- package/lib/services/aabb/LineUpdater.js +1 -3
- package/lib/services/aabb/PathUpdater.js +1 -3
- package/lib/services/aabb/PolylineUpdater.js +1 -3
- package/lib/services/aabb/RectUpdater.js +1 -3
- package/lib/services/aabb/TextUpdater.js +1 -3
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.js +1 -1
- package/lib/shapes/AABB.js +1 -3
- package/lib/shapes/BoundingSphere.js +1 -3
- package/lib/shapes/Frustum.js +2 -4
- package/lib/shapes/Plane.js +1 -3
- package/lib/shapes/Point.js +1 -3
- package/lib/shapes/Ray.js +1 -3
- package/lib/shapes/Rectangle.js +1 -3
- package/lib/types.d.ts +1 -2
- package/lib/types.js +1 -1
- package/lib/utils/animation.js +2 -3
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.js +2 -2
- package/lib/utils/math.js +9 -9
- package/lib/utils/path.d.ts +2 -2
- package/lib/utils/path.js +6 -6
- package/lib/utils/text.js +3 -3
- package/package.json +1 -1
- package/dist/index.umd.min.js +0 -30
|
@@ -24,34 +24,34 @@ Object.defineProperty(exports, "EllipseUpdater", {
|
|
|
24
24
|
return _EllipseUpdater.EllipseUpdater;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
Object.defineProperty(exports, "
|
|
27
|
+
Object.defineProperty(exports, "RectUpdater", {
|
|
28
28
|
enumerable: true,
|
|
29
29
|
get: function get() {
|
|
30
|
-
return
|
|
30
|
+
return _RectUpdater.RectUpdater;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
Object.defineProperty(exports, "
|
|
33
|
+
Object.defineProperty(exports, "TextUpdater", {
|
|
34
34
|
enumerable: true,
|
|
35
35
|
get: function get() {
|
|
36
|
-
return
|
|
36
|
+
return _TextUpdater.TextUpdater;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "LineUpdater", {
|
|
40
40
|
enumerable: true,
|
|
41
41
|
get: function get() {
|
|
42
|
-
return
|
|
42
|
+
return _LineUpdater.LineUpdater;
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
Object.defineProperty(exports, "
|
|
45
|
+
Object.defineProperty(exports, "PolylineUpdater", {
|
|
46
46
|
enumerable: true,
|
|
47
47
|
get: function get() {
|
|
48
|
-
return
|
|
48
|
+
return _PolylineUpdater.PolylineUpdater;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
Object.defineProperty(exports, "
|
|
51
|
+
Object.defineProperty(exports, "PathUpdater", {
|
|
52
52
|
enumerable: true,
|
|
53
53
|
get: function get() {
|
|
54
|
-
return
|
|
54
|
+
return _PathUpdater.PathUpdater;
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
|
package/lib/shapes/AABB.js
CHANGED
|
@@ -12,9 +12,7 @@ var _glMatrix = require("gl-matrix");
|
|
|
12
12
|
* 为了便于后续 Frustum Culling,通过查找表定义 p-vertex 和 n-vertex
|
|
13
13
|
* @see https://github.com/antvis/GWebGPUEngine/issues/3
|
|
14
14
|
*/
|
|
15
|
-
var AABB =
|
|
16
|
-
/** @class */
|
|
17
|
-
function () {
|
|
15
|
+
var AABB = function () {
|
|
18
16
|
function AABB(center, halfExtents) {
|
|
19
17
|
this.min = _glMatrix.vec3.create();
|
|
20
18
|
this.max = _glMatrix.vec3.create();
|
|
@@ -9,9 +9,7 @@ var _glMatrix = require("gl-matrix");
|
|
|
9
9
|
|
|
10
10
|
var tmpVecA = _glMatrix.vec3.create();
|
|
11
11
|
|
|
12
|
-
var BoundingSphere =
|
|
13
|
-
/** @class */
|
|
14
|
-
function () {
|
|
12
|
+
var BoundingSphere = function () {
|
|
15
13
|
function BoundingSphere(center, radius) {
|
|
16
14
|
this.center = center || _glMatrix.vec3.create();
|
|
17
15
|
this.radius = radius || 0.5;
|
package/lib/shapes/Frustum.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Frustum = exports.Mask = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -20,9 +20,7 @@ exports.Mask = Mask;
|
|
|
20
20
|
Mask[Mask["INDETERMINATE"] = 2147483647] = "INDETERMINATE";
|
|
21
21
|
})(Mask || (exports.Mask = Mask = {}));
|
|
22
22
|
|
|
23
|
-
var Frustum =
|
|
24
|
-
/** @class */
|
|
25
|
-
function () {
|
|
23
|
+
var Frustum = function () {
|
|
26
24
|
function Frustum(planes) {
|
|
27
25
|
this.planes = [];
|
|
28
26
|
|
package/lib/shapes/Plane.js
CHANGED
|
@@ -7,9 +7,7 @@ exports.Plane = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _glMatrix = require("gl-matrix");
|
|
9
9
|
|
|
10
|
-
var Plane =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var Plane = function () {
|
|
13
11
|
function Plane(distance, normal) {
|
|
14
12
|
this.distance = distance || 0;
|
|
15
13
|
this.normal = normal || _glMatrix.vec3.fromValues(0, 1, 0);
|
package/lib/shapes/Point.js
CHANGED
package/lib/shapes/Ray.js
CHANGED
|
@@ -24,9 +24,7 @@ var tmpVecE = _glMatrix.vec3.create();
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var Ray =
|
|
28
|
-
/** @class */
|
|
29
|
-
function () {
|
|
27
|
+
var Ray = function () {
|
|
30
28
|
function Ray(origin, direction) {
|
|
31
29
|
this.origin = origin || _glMatrix.vec3.create();
|
|
32
30
|
this.direction = direction || _glMatrix.vec3.fromValues(0, 0, -1);
|
package/lib/shapes/Rectangle.js
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="offscreencanvas" />
|
|
2
2
|
import type { vec2, vec3 } from 'gl-matrix';
|
|
3
|
-
import type { ParsedPathStyleProps, ParsedPolylineStyleProps } from './display-objects';
|
|
4
|
-
import type { DisplayObject } from './display-objects';
|
|
3
|
+
import type { DisplayObject, ParsedPathStyleProps, ParsedPolylineStyleProps } from './display-objects';
|
|
5
4
|
import type { IRenderer } from './AbstractRenderer';
|
|
6
5
|
import type { CSSGlobalKeywords, CSSGradientValue, CSSKeywordValue, CSSRGB, CSSUnitValue } from './css';
|
|
7
6
|
import { Syringe } from 'mana-syringe';
|
package/lib/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.CanvasConfig = exports.TextAlign = exports.TextTransform = exports.LineJoin = exports.LineCap = exports.Shape = void 0;
|
|
7
7
|
|
|
8
8
|
var _manaSyringe = require("mana-syringe");
|
|
9
9
|
|
package/lib/utils/animation.js
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.parseEasingFunction = parseEasingFunction;
|
|
7
7
|
exports.calculateActiveDuration = calculateActiveDuration;
|
|
8
8
|
exports.calculateIterationProgress = calculateIterationProgress;
|
|
9
|
-
exports.
|
|
10
|
-
exports.parseEasingFunction = parseEasingFunction;
|
|
9
|
+
exports.getEase = exports.EasingKeys = exports.EASINGS = exports.linear = void 0;
|
|
11
10
|
|
|
12
11
|
var _tslib = require("tslib");
|
|
13
12
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.bezier = exports.newtonRaphsonIterate = exports.binarySubdivide = exports.getSlope = exports.calcBezier = exports.C = exports.B = exports.A = exports.float32ArraySupported = exports.kSampleStepSize = exports.kSplineTableSize = exports.SUBDIVISION_MAX_ITERATIONS = exports.SUBDIVISION_PRECISION = exports.NEWTON_MIN_SLOPE = exports.NEWTON_ITERATIONS = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* https://github.com/gre/bezier-easing
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEasingFunction = exports.complexEasingSyntax = exports.EasingFunctions = exports.EaseOutIn = exports.EaseInOut = exports.EaseOut = exports.easein = exports.Bezier = exports.Steps = exports.parseEasingParameters = exports.INTINITE_LOOP_LIMIT = exports.EasingDurationCache = exports.Spring = exports.Elastic = exports.Bounce = exports.Back = exports.Circ = exports.Sine = exports.Expo = exports.Quint = exports.Quart = exports.Cubic = exports.Quad = exports.limit = exports.convertToDash = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ var _bezierEasing = require("./bezier-easing");
|
|
|
14
14
|
*/
|
|
15
15
|
var convertToDash = function convertToDash(str) {
|
|
16
16
|
str = str.replace(/([A-Z])/g, function (letter) {
|
|
17
|
-
return "-"
|
|
17
|
+
return "-" + letter.toLowerCase();
|
|
18
18
|
}); // Remove first dash
|
|
19
19
|
|
|
20
20
|
return str.charAt(0) === '-' ? str.substr(1) : str;
|
package/lib/utils/math.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getAngle = getAngle;
|
|
7
7
|
exports.createVec3 = createVec3;
|
|
8
|
-
exports.decompose = decompose;
|
|
9
8
|
exports.deg2rad = deg2rad;
|
|
9
|
+
exports.rad2deg = rad2deg;
|
|
10
|
+
exports.grad2deg = grad2deg;
|
|
10
11
|
exports.deg2turn = deg2turn;
|
|
11
|
-
exports.
|
|
12
|
-
exports.getAngle = getAngle;
|
|
13
|
-
exports.getEuler = getEuler;
|
|
14
|
-
exports.getRotationInRadians = getRotationInRadians;
|
|
12
|
+
exports.turn2deg = turn2deg;
|
|
15
13
|
exports.getScaling = getScaling;
|
|
16
14
|
exports.getTranslation = getTranslation;
|
|
17
|
-
exports.
|
|
15
|
+
exports.getRotationInRadians = getRotationInRadians;
|
|
16
|
+
exports.getEuler = getEuler;
|
|
17
|
+
exports.fromRotationTranslationScale = fromRotationTranslationScale;
|
|
18
18
|
exports.makePerspective = makePerspective;
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
19
|
+
exports.blend = blend;
|
|
20
|
+
exports.decompose = decompose;
|
|
21
21
|
|
|
22
22
|
var _tslib = require("tslib");
|
|
23
23
|
|
package/lib/utils/path.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { DisplayObject } from '../display-objects
|
|
1
|
+
import type { DisplayObject } from '../display-objects';
|
|
2
2
|
import type { PathCommand } from '../types';
|
|
3
3
|
export declare function equalizeSegments(path1: PathCommand[], path2: PathCommand[], TL?: number): PathCommand[][];
|
|
4
4
|
export declare function getDrawDirection(pathArray: PathCommand[]): boolean;
|
|
5
5
|
export declare function getPathArea(pathArray: PathCommand[]): number;
|
|
6
6
|
export declare function reverseCurve(pathArray: PathCommand[]): PathCommand[];
|
|
7
7
|
export declare function clonePath(pathArray: PathCommand[]): PathCommand[];
|
|
8
|
-
export declare function getRotatedCurve(a: PathCommand[], b: PathCommand[]): (string[] | ["a" | "A", number, number, number, number, number, number, number] | ["
|
|
8
|
+
export declare function getRotatedCurve(a: PathCommand[], b: PathCommand[]): (string[] | ["a" | "A", number, number, number, number, number, number, number] | ["c" | "C", number, number, number, number, number, number] | ["o" | "O", number, number] | ["h" | "H", number] | ["l" | "L", number, number] | ["m" | "M", number, number] | ["r" | "R", number, number, number, number] | ["Q" | "q", number, number, number, number] | ["s" | "S", number, number, number, number, number, number, number] | ["t" | "T", number, number] | ["v" | "V", number] | ["u" | "U", number, number, number])[];
|
|
9
9
|
/**
|
|
10
10
|
* convert object to path, should account for:
|
|
11
11
|
* * transform & origin
|
package/lib/utils/path.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.clonePath = clonePath;
|
|
7
|
-
exports.convertToPath = convertToPath;
|
|
8
6
|
exports.equalizeSegments = equalizeSegments;
|
|
9
7
|
exports.getDrawDirection = getDrawDirection;
|
|
10
8
|
exports.getPathArea = getPathArea;
|
|
11
|
-
exports.getRotatedCurve = getRotatedCurve;
|
|
12
9
|
exports.reverseCurve = reverseCurve;
|
|
10
|
+
exports.clonePath = clonePath;
|
|
11
|
+
exports.getRotatedCurve = getRotatedCurve;
|
|
12
|
+
exports.convertToPath = convertToPath;
|
|
13
13
|
|
|
14
14
|
var _tslib = require("tslib");
|
|
15
15
|
|
|
@@ -236,7 +236,7 @@ function commandsToPathString(commands, localTransform, anchor, parsedStyle) {
|
|
|
236
236
|
|
|
237
237
|
_glMatrix.vec3.transformMat4(p, p, localTransform);
|
|
238
238
|
|
|
239
|
-
path = ""
|
|
239
|
+
path = "" + cur[0] + p[0] + "," + p[1];
|
|
240
240
|
} else if (cur[0] === 'Z') {
|
|
241
241
|
path = cur[0];
|
|
242
242
|
} else if (cur[0] === 'C') {
|
|
@@ -252,13 +252,13 @@ function commandsToPathString(commands, localTransform, anchor, parsedStyle) {
|
|
|
252
252
|
|
|
253
253
|
_glMatrix.vec3.transformMat4(p3, p3, localTransform);
|
|
254
254
|
|
|
255
|
-
path = ""
|
|
255
|
+
path = "" + cur[0] + p1[0] + "," + p1[1] + "," + p2[0] + "," + p2[1] + "," + p3[0] + "," + p3[1];
|
|
256
256
|
} else if (cur[0] === 'A') {
|
|
257
257
|
var c = _glMatrix.vec3.fromValues(cur[6] - defX, cur[7] - defY, 0);
|
|
258
258
|
|
|
259
259
|
_glMatrix.vec3.transformMat4(c, c, localTransform);
|
|
260
260
|
|
|
261
|
-
path = ""
|
|
261
|
+
path = "" + cur[0] + cur[1] + "," + cur[2] + "," + cur[3] + "," + cur[4] + "," + cur[5] + "," + c[0] + "," + c[1];
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
return prev += path;
|
package/lib/utils/text.js
CHANGED
|
@@ -16,7 +16,7 @@ function toFontString(attributes) {
|
|
|
16
16
|
fontVariant = attributes.fontVariant,
|
|
17
17
|
fontWeight = attributes.fontWeight; // build canvas api font setting from individual components. Convert a numeric this.fontSize to px
|
|
18
18
|
|
|
19
|
-
var fontSizeString = (0, _util.isNumber)(fontSize) ?
|
|
19
|
+
var fontSizeString = (0, _util.isNumber)(fontSize) ? fontSize + "px" : fontSize.toString(); // Clean-up fontFamily property by quoting each font name
|
|
20
20
|
// this will support font names with spaces
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
|
|
@@ -27,11 +27,11 @@ function toFontString(attributes) {
|
|
|
27
27
|
var fontFamily_1 = fontFamilies[i].trim(); // Check if font already contains strings
|
|
28
28
|
|
|
29
29
|
if (!/([\"\'])[^\'\"]+\1/.test(fontFamily_1) && genericFontFamilies.indexOf(fontFamily_1) < 0) {
|
|
30
|
-
fontFamily_1 = "\""
|
|
30
|
+
fontFamily_1 = "\"" + fontFamily_1 + "\"";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
fontFamilies[i] = fontFamily_1;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return
|
|
36
|
+
return fontStyle + " " + fontVariant + " " + fontWeight + " " + fontSizeString + " " + fontFamilies.join(',');
|
|
37
37
|
}
|