@antv/g 5.0.22-alpha.1 → 5.0.22-alpha.2
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.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/LayoutRegistry.js +1 -3
- package/es/css/StyleValueRegistry.js +1 -3
- 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.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 +4 -6
- 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.js +1 -3
- package/es/dom/MutationObserver.js +3 -10
- package/es/dom/MutationRecord.js +1 -3
- package/es/dom/Node.js +2 -4
- 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 +1 -3
- 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.js +1 -3
- package/es/services/SceneGraphSelector.js +1 -3
- package/es/services/SceneGraphService.js +1 -3
- package/es/services/TextService.js +3 -5
- 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/utils/custom-easing.js +1 -1
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +3 -3
- package/es/utils/text.js +3 -3
- package/lib/AbstractRenderer.js +1 -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/LayoutRegistry.js +1 -3
- package/lib/css/StyleValueRegistry.js +1 -3
- 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.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 +4 -6
- 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.js +1 -3
- package/lib/dom/MutationObserver.js +4 -11
- package/lib/dom/MutationRecord.js +1 -3
- package/lib/dom/Node.js +2 -4
- 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 +1 -3
- 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.js +1 -3
- package/lib/services/SceneGraphSelector.js +2 -4
- package/lib/services/SceneGraphService.js +3 -5
- package/lib/services/TextService.js +3 -5
- 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.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 +1 -1
- 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
|
@@ -7,9 +7,7 @@ import { singleton } from 'mana-syringe';
|
|
|
7
7
|
* - g-plugin-webgl-renderer `ctx.createLinearGradient` and generate texture
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var OffscreenCanvasCreator =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var OffscreenCanvasCreator = function () {
|
|
13
11
|
function OffscreenCanvasCreator() {}
|
|
14
12
|
|
|
15
13
|
OffscreenCanvasCreator.prototype.getOrCreateCanvas = function (offscreenCanvas) {
|
|
@@ -16,9 +16,7 @@ export var RenderingPluginContribution = Syringe.defineToken('RenderingPluginCon
|
|
|
16
16
|
* * end frame
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
var RenderingService =
|
|
20
|
-
/** @class */
|
|
21
|
-
function () {
|
|
19
|
+
var RenderingService = function () {
|
|
22
20
|
function RenderingService() {
|
|
23
21
|
this.inited = false;
|
|
24
22
|
this.stats = {
|
|
@@ -15,9 +15,7 @@ var NAME_REGEXP = /\[\s*name=(.*)\s*\]/;
|
|
|
15
15
|
* * querySelectorAll
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
var DefaultSceneGraphSelector =
|
|
19
|
-
/** @class */
|
|
20
|
-
function () {
|
|
18
|
+
var DefaultSceneGraphSelector = function () {
|
|
21
19
|
function DefaultSceneGraphSelector() {}
|
|
22
20
|
|
|
23
21
|
DefaultSceneGraphSelector.prototype.selectOne = function (query, root) {
|
|
@@ -52,9 +52,7 @@ export var SceneGraphService = Syringe.defineToken('SceneGraphService');
|
|
|
52
52
|
* @see https://community.khronos.org/t/scene-graphs/50542/7
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
|
-
var DefaultSceneGraphService =
|
|
56
|
-
/** @class */
|
|
57
|
-
function () {
|
|
55
|
+
var DefaultSceneGraphService = function () {
|
|
58
56
|
function DefaultSceneGraphService() {
|
|
59
57
|
var _this = this;
|
|
60
58
|
/**
|
|
@@ -23,12 +23,10 @@ var regexCannotStartJaJp = /[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾー
|
|
|
23
23
|
var regexCannotEndJaJp = /[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/;
|
|
24
24
|
var regexCannotStartKoKr = /[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/;
|
|
25
25
|
var regexCannotEndKoKr = /[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/;
|
|
26
|
-
var regexCannotStart = new RegExp(
|
|
27
|
-
var regexCannotEnd = new RegExp(
|
|
26
|
+
var regexCannotStart = new RegExp(regexCannotStartZhCn.source + "|" + regexCannotStartZhTw.source + "|" + regexCannotStartJaJp.source + "|" + regexCannotStartKoKr.source);
|
|
27
|
+
var regexCannotEnd = new RegExp(regexCannotEndZhCn.source + "|" + regexCannotEndZhTw.source + "|" + regexCannotEndJaJp.source + "|" + regexCannotEndKoKr.source);
|
|
28
28
|
|
|
29
|
-
var TextService =
|
|
30
|
-
/** @class */
|
|
31
|
-
function () {
|
|
29
|
+
var TextService = function () {
|
|
32
30
|
function TextService() {
|
|
33
31
|
var _this = this;
|
|
34
32
|
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var CircleUpdater =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var CircleUpdater = function () {
|
|
9
7
|
function CircleUpdater() {}
|
|
10
8
|
|
|
11
9
|
CircleUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var EllipseUpdater =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var EllipseUpdater = function () {
|
|
9
7
|
function EllipseUpdater() {}
|
|
10
8
|
|
|
11
9
|
EllipseUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var LineUpdater =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var LineUpdater = function () {
|
|
9
7
|
function LineUpdater() {}
|
|
10
8
|
|
|
11
9
|
LineUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var PathUpdater =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var PathUpdater = function () {
|
|
9
7
|
function PathUpdater() {}
|
|
10
8
|
|
|
11
9
|
PathUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -3,9 +3,7 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var PolylineUpdater =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
6
|
+
var PolylineUpdater = function () {
|
|
9
7
|
function PolylineUpdater() {}
|
|
10
8
|
|
|
11
9
|
PolylineUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -5,9 +5,7 @@ import { GeometryAABBUpdater } from './interfaces';
|
|
|
5
5
|
import { Shape } from '../../types';
|
|
6
6
|
import { CSSUnitValue, UnitType } from '../../css';
|
|
7
7
|
|
|
8
|
-
var RectUpdater =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var RectUpdater = function () {
|
|
11
9
|
function RectUpdater() {}
|
|
12
10
|
|
|
13
11
|
RectUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -6,9 +6,7 @@ import { TextService } from '../TextService';
|
|
|
6
6
|
import { Shape } from '../../types';
|
|
7
7
|
import { CSSUnitValue } from '../../css';
|
|
8
8
|
|
|
9
|
-
var TextUpdater =
|
|
10
|
-
/** @class */
|
|
11
|
-
function () {
|
|
9
|
+
var TextUpdater = function () {
|
|
12
10
|
function TextUpdater() {}
|
|
13
11
|
|
|
14
12
|
TextUpdater.prototype.isReadyToMeasure = function (parsedStyle, object) {
|
package/es/shapes/AABB.js
CHANGED
|
@@ -5,9 +5,7 @@ import { vec3 } from 'gl-matrix';
|
|
|
5
5
|
* @see https://github.com/antvis/GWebGPUEngine/issues/3
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var AABB =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var AABB = function () {
|
|
11
9
|
function AABB(center, halfExtents) {
|
|
12
10
|
this.min = vec3.create();
|
|
13
11
|
this.max = vec3.create();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { vec3 } from 'gl-matrix';
|
|
2
2
|
var tmpVecA = vec3.create();
|
|
3
3
|
|
|
4
|
-
var BoundingSphere =
|
|
5
|
-
/** @class */
|
|
6
|
-
function () {
|
|
4
|
+
var BoundingSphere = function () {
|
|
7
5
|
function BoundingSphere(center, radius) {
|
|
8
6
|
this.center = center || vec3.create();
|
|
9
7
|
this.radius = radius || 0.5;
|
package/es/shapes/Frustum.js
CHANGED
package/es/shapes/Plane.js
CHANGED
package/es/shapes/Point.js
CHANGED
package/es/shapes/Ray.js
CHANGED
|
@@ -11,9 +11,7 @@ var tmpVecE = vec3.create();
|
|
|
11
11
|
* @see https://github.com/mrdoob/three.js/blob/dev/src/math/Ray.js
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
var Ray =
|
|
15
|
-
/** @class */
|
|
16
|
-
function () {
|
|
14
|
+
var Ray = function () {
|
|
17
15
|
function Ray(origin, direction) {
|
|
18
16
|
this.origin = origin || vec3.create();
|
|
19
17
|
this.direction = direction || vec3.fromValues(0, 0, -1);
|
package/es/shapes/Rectangle.js
CHANGED
|
@@ -6,7 +6,7 @@ import { __read } from "tslib";
|
|
|
6
6
|
import { bezier } from './bezier-easing';
|
|
7
7
|
export var convertToDash = function convertToDash(str) {
|
|
8
8
|
str = str.replace(/([A-Z])/g, function (letter) {
|
|
9
|
-
return "-"
|
|
9
|
+
return "-" + letter.toLowerCase();
|
|
10
10
|
}); // Remove first dash
|
|
11
11
|
|
|
12
12
|
return str.charAt(0) === '-' ? str.substr(1) : str;
|
package/es/utils/path.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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/es/utils/path.js
CHANGED
|
@@ -216,7 +216,7 @@ function commandsToPathString(commands, localTransform, anchor, parsedStyle) {
|
|
|
216
216
|
if (cur[0] === 'M' || cur[0] === 'L') {
|
|
217
217
|
var p = vec3.fromValues(cur[1] - defX, cur[2] - defY, 0);
|
|
218
218
|
vec3.transformMat4(p, p, localTransform);
|
|
219
|
-
path = ""
|
|
219
|
+
path = "" + cur[0] + p[0] + "," + p[1];
|
|
220
220
|
} else if (cur[0] === 'Z') {
|
|
221
221
|
path = cur[0];
|
|
222
222
|
} else if (cur[0] === 'C') {
|
|
@@ -226,11 +226,11 @@ function commandsToPathString(commands, localTransform, anchor, parsedStyle) {
|
|
|
226
226
|
vec3.transformMat4(p1, p1, localTransform);
|
|
227
227
|
vec3.transformMat4(p2, p2, localTransform);
|
|
228
228
|
vec3.transformMat4(p3, p3, localTransform);
|
|
229
|
-
path = ""
|
|
229
|
+
path = "" + cur[0] + p1[0] + "," + p1[1] + "," + p2[0] + "," + p2[1] + "," + p3[0] + "," + p3[1];
|
|
230
230
|
} else if (cur[0] === 'A') {
|
|
231
231
|
var c = vec3.fromValues(cur[6] - defX, cur[7] - defY, 0);
|
|
232
232
|
vec3.transformMat4(c, c, localTransform);
|
|
233
|
-
path = ""
|
|
233
|
+
path = "" + cur[0] + cur[1] + "," + cur[2] + "," + cur[3] + "," + cur[4] + "," + cur[5] + "," + c[0] + "," + c[1];
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
return prev += path;
|
package/es/utils/text.js
CHANGED
|
@@ -7,7 +7,7 @@ export function toFontString(attributes) {
|
|
|
7
7
|
fontVariant = attributes.fontVariant,
|
|
8
8
|
fontWeight = attributes.fontWeight; // build canvas api font setting from individual components. Convert a numeric this.fontSize to px
|
|
9
9
|
|
|
10
|
-
var fontSizeString = isNumber(fontSize) ?
|
|
10
|
+
var fontSizeString = isNumber(fontSize) ? fontSize + "px" : fontSize.toString(); // Clean-up fontFamily property by quoting each font name
|
|
11
11
|
// this will support font names with spaces
|
|
12
12
|
// @ts-ignore
|
|
13
13
|
|
|
@@ -18,11 +18,11 @@ export function toFontString(attributes) {
|
|
|
18
18
|
var fontFamily_1 = fontFamilies[i].trim(); // Check if font already contains strings
|
|
19
19
|
|
|
20
20
|
if (!/([\"\'])[^\'\"]+\1/.test(fontFamily_1) && genericFontFamilies.indexOf(fontFamily_1) < 0) {
|
|
21
|
-
fontFamily_1 = "\""
|
|
21
|
+
fontFamily_1 = "\"" + fontFamily_1 + "\"";
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
fontFamilies[i] = fontFamily_1;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return fontStyle + " " + fontVariant + " " + fontWeight + " " + fontSizeString + " " + fontFamilies.join(',');
|
|
28
28
|
}
|
package/lib/AbstractRenderer.js
CHANGED
|
@@ -7,9 +7,7 @@ exports.AbstractRenderer = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
10
|
-
var AbstractRenderer =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var AbstractRenderer = function () {
|
|
13
11
|
function AbstractRenderer(config) {
|
|
14
12
|
this.plugins = [];
|
|
15
13
|
this.config = (0, _tslib.__assign)({
|
package/lib/Canvas.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Canvas = exports.CanvasEvent = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -54,9 +54,7 @@ exports.CanvasEvent = CanvasEvent;
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var Canvas =
|
|
58
|
-
/** @class */
|
|
59
|
-
function (_super) {
|
|
57
|
+
var Canvas = function (_super) {
|
|
60
58
|
(0, _tslib.__extends)(Canvas, _super);
|
|
61
59
|
|
|
62
60
|
function Canvas(config) {
|
package/lib/DisplayObjectPool.js
CHANGED
package/lib/camera/Camera.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Camera = exports.CameraEvent = exports.CAMERA_PROJECTION_MODE = exports.CAMERA_TRACKING_MODE = exports.CAMERA_TYPE = exports.DefaultCamera = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -68,9 +68,7 @@ var RAD_2_DEG = 180 / Math.PI;
|
|
|
68
68
|
* 4. 移动到 Landmark,具有平滑的动画效果,其间禁止其他用户交互
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
|
-
var Camera =
|
|
72
|
-
/** @class */
|
|
73
|
-
function (_super) {
|
|
71
|
+
var Camera = function (_super) {
|
|
74
72
|
(0, _tslib.__extends)(Camera, _super);
|
|
75
73
|
|
|
76
74
|
function Camera() {
|
package/lib/camera/Landmark.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Cullable = exports.Strategy = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @see https://doc.babylonjs.com/how_to/optimizing_your_scene#changing-mesh-culling-strategy
|
|
@@ -15,9 +15,7 @@ exports.Strategy = Strategy;
|
|
|
15
15
|
Strategy[Strategy["Standard"] = 0] = "Standard";
|
|
16
16
|
})(Strategy || (exports.Strategy = Strategy = {}));
|
|
17
17
|
|
|
18
|
-
var Cullable =
|
|
19
|
-
/** @class */
|
|
20
|
-
function () {
|
|
18
|
+
var Cullable = function () {
|
|
21
19
|
function Cullable() {
|
|
22
20
|
this.strategy = Strategy.Standard;
|
|
23
21
|
this.visibilityPlaneMask = -1;
|
|
@@ -10,9 +10,7 @@ var _glMatrix = require("gl-matrix");
|
|
|
10
10
|
/**
|
|
11
11
|
* do RTS transformation for 2D/3D
|
|
12
12
|
*/
|
|
13
|
-
var Transform =
|
|
14
|
-
/** @class */
|
|
15
|
-
function () {
|
|
13
|
+
var Transform = function () {
|
|
16
14
|
function Transform() {
|
|
17
15
|
this.dirtyFlag = false;
|
|
18
16
|
this.localDirtyFlag = false;
|
|
@@ -18,9 +18,7 @@ var _manaSyringe = require("mana-syringe");
|
|
|
18
18
|
* // use with `display` property
|
|
19
19
|
* group.style.display = 'layout(centering)';
|
|
20
20
|
*/
|
|
21
|
-
var LayoutRegistry =
|
|
22
|
-
/** @class */
|
|
23
|
-
function () {
|
|
21
|
+
var LayoutRegistry = function () {
|
|
24
22
|
function LayoutRegistry() {}
|
|
25
23
|
|
|
26
24
|
LayoutRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], LayoutRegistry);
|
|
@@ -420,9 +420,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
420
420
|
}];
|
|
421
421
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
422
422
|
|
|
423
|
-
var StyleValueRegistry =
|
|
424
|
-
/** @class */
|
|
425
|
-
function () {
|
|
423
|
+
var StyleValueRegistry = function () {
|
|
426
424
|
function StyleValueRegistry() {
|
|
427
425
|
/**
|
|
428
426
|
* need recalc later
|
|
@@ -14,9 +14,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#colorvalue-objects
|
|
16
16
|
*/
|
|
17
|
-
var CSSColorValue =
|
|
18
|
-
/** @class */
|
|
19
|
-
function (_super) {
|
|
17
|
+
var CSSColorValue = function (_super) {
|
|
20
18
|
(0, _tslib.__extends)(CSSColorValue, _super);
|
|
21
19
|
|
|
22
20
|
function CSSColorValue(colorSpace) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.CSSGradientValue = exports.GradientPatternType = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -19,9 +19,7 @@ exports.GradientPatternType = GradientPatternType;
|
|
|
19
19
|
GradientPatternType[GradientPatternType["Pattern"] = 3] = "Pattern";
|
|
20
20
|
})(GradientPatternType || (exports.GradientPatternType = GradientPatternType = {}));
|
|
21
21
|
|
|
22
|
-
var CSSGradientValue =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSGradientValue = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSGradientValue, _super);
|
|
26
24
|
|
|
27
25
|
function CSSGradientValue(type, value) {
|
|
@@ -40,15 +38,15 @@ function (_super) {
|
|
|
40
38
|
var text = '';
|
|
41
39
|
|
|
42
40
|
if (this.type === GradientPatternType.LinearGradient) {
|
|
43
|
-
text = "linear-gradient("
|
|
41
|
+
text = "linear-gradient(" + this.value.steps.map(function (step) {
|
|
44
42
|
return step.join(',');
|
|
45
|
-
}).join(',')
|
|
43
|
+
}).join(',') + ")";
|
|
46
44
|
} else if (this.type === GradientPatternType.RadialGradient) {
|
|
47
|
-
text = "radial-gradient("
|
|
45
|
+
text = "radial-gradient(" + this.value.steps.map(function (step) {
|
|
48
46
|
return step.join(',');
|
|
49
|
-
}).join(',')
|
|
47
|
+
}).join(',') + ")";
|
|
50
48
|
} else if (this.type === GradientPatternType.Pattern) {
|
|
51
|
-
text = "url("
|
|
49
|
+
text = "url(" + this.value.src + ")";
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
return result += text;
|
|
@@ -15,9 +15,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
|
|
|
15
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSKeywordValue
|
|
16
16
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_keyword_value.idl
|
|
17
17
|
*/
|
|
18
|
-
var CSSKeywordValue =
|
|
19
|
-
/** @class */
|
|
20
|
-
function (_super) {
|
|
18
|
+
var CSSKeywordValue = function (_super) {
|
|
21
19
|
(0, _tslib.__extends)(CSSKeywordValue, _super);
|
|
22
20
|
|
|
23
21
|
function CSSKeywordValue(value) {
|
|
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathInvert =
|
|
15
|
-
/** @class */
|
|
16
|
-
function (_super) {
|
|
14
|
+
var CSSMathInvert = function (_super) {
|
|
17
15
|
(0, _tslib.__extends)(CSSMathInvert, _super);
|
|
18
16
|
|
|
19
17
|
function CSSMathInvert(value, type) {
|
|
@@ -19,9 +19,7 @@ var _ = require(".");
|
|
|
19
19
|
*/
|
|
20
20
|
// Represents the maximum of one or more CSSNumericValues.
|
|
21
21
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
22
|
-
var CSSMathMax =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSMathMax = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSMathMax, _super);
|
|
26
24
|
|
|
27
25
|
function CSSMathMax() {
|
|
@@ -19,9 +19,7 @@ var _ = require(".");
|
|
|
19
19
|
*/
|
|
20
20
|
// Represents the minimum of one or more CSSNumericValues.
|
|
21
21
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
22
|
-
var CSSMathMin =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSMathMin = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSMathMin, _super);
|
|
26
24
|
|
|
27
25
|
function CSSMathMin() {
|
|
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathNegate =
|
|
15
|
-
/** @class */
|
|
16
|
-
function (_super) {
|
|
14
|
+
var CSSMathNegate = function (_super) {
|
|
17
15
|
(0, _tslib.__extends)(CSSMathNegate, _super);
|
|
18
16
|
|
|
19
17
|
function CSSMathNegate(value, type) {
|
|
@@ -17,9 +17,7 @@ var _ = require(".");
|
|
|
17
17
|
* Represents the product of one or more CSSNumericValues.
|
|
18
18
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
|
|
19
19
|
*/
|
|
20
|
-
var CSSMathProduct =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSMathProduct = function (_super) {
|
|
23
21
|
(0, _tslib.__extends)(CSSMathProduct, _super);
|
|
24
22
|
|
|
25
23
|
function CSSMathProduct() {
|
|
@@ -17,9 +17,7 @@ var _ = require(".");
|
|
|
17
17
|
* Represents the sum of one or more CSSNumericValues.
|
|
18
18
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
19
19
|
*/
|
|
20
|
-
var CSSMathSum =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSMathSum = function (_super) {
|
|
23
21
|
(0, _tslib.__extends)(CSSMathSum, _super);
|
|
24
22
|
|
|
25
23
|
function CSSMathSum() {
|
|
@@ -15,9 +15,7 @@ var _CSSNumericValue = require("./CSSNumericValue");
|
|
|
15
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
|
|
16
16
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
|
|
17
17
|
*/
|
|
18
|
-
var CSSMathValue =
|
|
19
|
-
/** @class */
|
|
20
|
-
function (_super) {
|
|
18
|
+
var CSSMathValue = function (_super) {
|
|
21
19
|
(0, _tslib.__extends)(CSSMathValue, _super);
|
|
22
20
|
|
|
23
21
|
function CSSMathValue() {
|