@antv/g 5.0.22-alpha.5 → 5.0.22-alpha.6
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/index.umd.min.js +30 -0
- package/es/AbstractRenderer.js +3 -1
- package/es/Canvas.d.ts +1 -1
- package/es/Canvas.js +5 -3
- package/es/DisplayObjectPool.js +3 -1
- package/es/camera/Camera.d.ts +105 -66
- package/es/camera/Camera.js +307 -171
- package/es/camera/Landmark.d.ts +18 -25
- package/es/camera/Landmark.js +1 -72
- package/es/canvas-module.js +2 -4
- package/es/components/Cullable.js +3 -1
- package/es/components/Geometry.js +3 -1
- package/es/components/Renderable.js +3 -1
- package/es/components/Sortable.js +3 -1
- package/es/components/Transform.js +3 -1
- package/es/css/LayoutRegistry.js +3 -1
- package/es/css/StyleValueRegistry.d.ts +8 -0
- package/es/css/StyleValueRegistry.js +24 -19
- package/es/css/cssom/CSSColorValue.js +3 -1
- package/es/css/cssom/CSSGradientValue.js +8 -6
- package/es/css/cssom/CSSKeywordValue.js +3 -1
- package/es/css/cssom/CSSMathInvert.js +3 -1
- package/es/css/cssom/CSSMathMax.js +3 -1
- package/es/css/cssom/CSSMathMin.js +3 -1
- package/es/css/cssom/CSSMathNegate.js +3 -1
- package/es/css/cssom/CSSMathProduct.js +3 -1
- package/es/css/cssom/CSSMathSum.js +3 -1
- package/es/css/cssom/CSSMathValue.js +3 -1
- package/es/css/cssom/CSSMathVariadic.js +3 -1
- package/es/css/cssom/CSSNumericValue.js +3 -1
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +3 -1
- package/es/css/cssom/CSSRGB.js +4 -2
- package/es/css/cssom/CSSStyleValue.d.ts +1 -1
- package/es/css/cssom/CSSStyleValue.js +3 -1
- package/es/css/cssom/CSSTransformComponent.js +3 -1
- package/es/css/cssom/CSSTransformValue.js +3 -1
- package/es/css/cssom/CSSTranslate.js +3 -1
- package/es/css/cssom/CSSUnitValue.js +4 -2
- package/es/css/parser/color.js +2 -2
- package/es/css/parser/dimension.d.ts +1 -1
- package/es/css/parser/dimension.js +2 -2
- package/es/css/parser/numeric.js +1 -1
- package/es/css/parser/points.js +1 -1
- package/es/css/parser/transform-origin.js +1 -1
- package/es/css/properties/CSSPropertyAnchor.js +3 -1
- package/es/css/properties/CSSPropertyClipPath.js +3 -1
- package/es/css/properties/CSSPropertyColor.js +3 -1
- package/es/css/properties/CSSPropertyFilter.js +3 -1
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
- package/es/css/properties/CSSPropertyLineDash.js +3 -1
- package/es/css/properties/CSSPropertyLocalPosition.js +3 -1
- package/es/css/properties/CSSPropertyOffsetDistance.js +3 -1
- package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/es/css/properties/CSSPropertyOpacity.js +3 -1
- package/es/css/properties/CSSPropertyPath.js +3 -1
- package/es/css/properties/CSSPropertyPoints.js +3 -1
- package/es/css/properties/CSSPropertyShadowBlur.js +3 -1
- package/es/css/properties/CSSPropertyText.d.ts +1 -1
- package/es/css/properties/CSSPropertyText.js +4 -2
- package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -2
- package/es/css/properties/CSSPropertyTextTransform.js +3 -1
- package/es/css/properties/CSSPropertyTransform.js +4 -2
- package/es/css/properties/CSSPropertyTransformOrigin.js +3 -1
- package/es/css/properties/CSSPropertyVisibility.js +3 -1
- package/es/css/properties/CSSPropertyZIndex.js +3 -1
- package/es/display-objects/Circle.js +3 -1
- package/es/display-objects/CustomElement.js +3 -1
- package/es/display-objects/DisplayObject.js +7 -4
- package/es/display-objects/Ellipse.js +3 -1
- package/es/display-objects/Group.js +3 -1
- package/es/display-objects/HTML.js +6 -3
- package/es/display-objects/Image.js +3 -1
- package/es/display-objects/Line.js +3 -1
- package/es/display-objects/Path.js +5 -3
- package/es/display-objects/Polygon.js +3 -1
- package/es/display-objects/Polyline.js +3 -1
- package/es/display-objects/Rect.js +3 -1
- package/es/display-objects/Text.js +6 -3
- package/es/dom/Animation.js +4 -2
- package/es/dom/AnimationEffectTiming.js +3 -1
- package/es/dom/AnimationEvent.js +3 -1
- package/es/dom/AnimationTimeline.js +3 -1
- package/es/dom/CustomElementRegistry.js +3 -1
- package/es/dom/CustomEvent.js +3 -1
- package/es/dom/Document.js +3 -1
- package/es/dom/Element.js +7 -5
- package/es/dom/EventTarget.js +6 -4
- package/es/dom/FederatedEvent.js +3 -1
- package/es/dom/FederatedMouseEvent.js +3 -1
- package/es/dom/FederatedPointerEvent.js +3 -1
- package/es/dom/FederatedTouchEvent.d.ts +13 -0
- package/es/dom/FederatedTouchEvent.js +19 -0
- package/es/dom/FederatedWheelEvent.js +3 -1
- package/es/dom/KeyframeEffect.js +3 -1
- package/es/dom/KeyframeList.js +1 -1
- package/es/dom/MutationEvent.js +3 -1
- package/es/dom/MutationObserver.js +10 -3
- package/es/dom/MutationRecord.js +3 -1
- package/es/dom/Node.js +4 -2
- package/es/plugins/CullingPlugin.js +3 -1
- package/es/plugins/DirtyCheckPlugin.js +3 -1
- package/es/plugins/EventPlugin.js +4 -2
- package/es/plugins/FrustumCullingStrategy.js +3 -1
- package/es/plugins/PrepareRendererPlugin.js +3 -1
- package/es/services/EventService.js +5 -3
- package/es/services/OffscreenCanvasCreator.js +3 -1
- package/es/services/RenderingService.js +3 -1
- package/es/services/SceneGraphSelector.js +3 -1
- package/es/services/SceneGraphService.js +4 -2
- package/es/services/TextService.js +5 -3
- package/es/services/aabb/CircleUpdater.js +3 -1
- package/es/services/aabb/EllipseUpdater.js +3 -1
- package/es/services/aabb/LineUpdater.js +3 -1
- package/es/services/aabb/PathUpdater.js +3 -1
- package/es/services/aabb/PolylineUpdater.js +3 -1
- package/es/services/aabb/RectUpdater.js +4 -2
- package/es/services/aabb/TextUpdater.js +3 -1
- package/es/shapes/AABB.js +3 -1
- package/es/shapes/BoundingSphere.js +3 -1
- package/es/shapes/Frustum.js +3 -1
- package/es/shapes/Plane.js +3 -1
- package/es/shapes/Point.js +3 -1
- package/es/shapes/Ray.js +3 -1
- package/es/shapes/Rectangle.js +3 -1
- package/es/types.d.ts +4 -0
- package/es/utils/custom-easing.js +1 -1
- package/es/utils/math.d.ts +1 -2
- package/es/utils/math.js +11 -6
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +3 -3
- package/es/utils/text.js +4 -4
- package/lib/AbstractRenderer.js +3 -1
- package/lib/Canvas.d.ts +1 -1
- package/lib/Canvas.js +5 -3
- package/lib/DisplayObjectPool.js +3 -1
- package/lib/camera/Camera.d.ts +105 -66
- package/lib/camera/Camera.js +314 -179
- package/lib/camera/Landmark.d.ts +18 -25
- package/lib/camera/Landmark.js +1 -75
- package/lib/canvas-module.js +1 -3
- package/lib/components/Cullable.js +4 -2
- package/lib/components/Geometry.js +3 -1
- package/lib/components/Renderable.js +3 -1
- package/lib/components/Sortable.js +3 -1
- package/lib/components/Transform.js +3 -1
- package/lib/css/LayoutRegistry.js +3 -1
- package/lib/css/StyleValueRegistry.d.ts +8 -0
- package/lib/css/StyleValueRegistry.js +27 -20
- package/lib/css/cssom/CSSColorValue.js +3 -1
- package/lib/css/cssom/CSSGradientValue.js +9 -7
- package/lib/css/cssom/CSSKeywordValue.js +3 -1
- package/lib/css/cssom/CSSMathInvert.js +3 -1
- package/lib/css/cssom/CSSMathMax.js +3 -1
- package/lib/css/cssom/CSSMathMin.js +3 -1
- package/lib/css/cssom/CSSMathNegate.js +3 -1
- package/lib/css/cssom/CSSMathOperator.js +1 -1
- package/lib/css/cssom/CSSMathProduct.js +3 -1
- package/lib/css/cssom/CSSMathSum.js +3 -1
- package/lib/css/cssom/CSSMathValue.js +3 -1
- package/lib/css/cssom/CSSMathVariadic.js +4 -2
- package/lib/css/cssom/CSSNumericValue.js +3 -1
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +5 -3
- package/lib/css/cssom/CSSRGB.js +4 -2
- package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
- package/lib/css/cssom/CSSStyleValue.js +4 -2
- package/lib/css/cssom/CSSTransformComponent.js +4 -2
- package/lib/css/cssom/CSSTransformValue.js +3 -1
- package/lib/css/cssom/CSSTranslate.js +3 -1
- package/lib/css/cssom/CSSUnitValue.js +4 -2
- package/lib/css/cssom/types.js +1 -1
- package/lib/css/parser/color.js +7 -7
- package/lib/css/parser/dimension.d.ts +1 -1
- package/lib/css/parser/dimension.js +9 -8
- package/lib/css/parser/numeric.js +6 -6
- package/lib/css/parser/path.js +1 -1
- package/lib/css/parser/points.js +2 -2
- package/lib/css/parser/transform-origin.js +2 -2
- package/lib/css/parser/transform.js +2 -2
- package/lib/css/properties/CSSPropertyAnchor.js +3 -1
- package/lib/css/properties/CSSPropertyClipPath.js +3 -1
- package/lib/css/properties/CSSPropertyColor.js +3 -1
- package/lib/css/properties/CSSPropertyFilter.js +3 -1
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
- package/lib/css/properties/CSSPropertyLineDash.js +3 -1
- package/lib/css/properties/CSSPropertyLocalPosition.js +3 -1
- package/lib/css/properties/CSSPropertyOffsetDistance.js +3 -1
- package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/lib/css/properties/CSSPropertyOpacity.js +3 -1
- package/lib/css/properties/CSSPropertyPath.js +3 -1
- package/lib/css/properties/CSSPropertyPoints.js +3 -1
- package/lib/css/properties/CSSPropertyShadowBlur.js +3 -1
- package/lib/css/properties/CSSPropertyText.d.ts +1 -1
- package/lib/css/properties/CSSPropertyText.js +4 -2
- package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -2
- package/lib/css/properties/CSSPropertyTextTransform.js +3 -1
- package/lib/css/properties/CSSPropertyTransform.js +4 -2
- package/lib/css/properties/CSSPropertyTransformOrigin.js +3 -1
- package/lib/css/properties/CSSPropertyVisibility.js +3 -1
- package/lib/css/properties/CSSPropertyZIndex.js +3 -1
- package/lib/display-objects/Circle.js +3 -1
- package/lib/display-objects/CustomElement.js +3 -1
- package/lib/display-objects/DisplayObject.js +14 -11
- package/lib/display-objects/Ellipse.js +3 -1
- package/lib/display-objects/Group.js +3 -1
- package/lib/display-objects/HTML.js +6 -4
- package/lib/display-objects/Image.js +3 -1
- package/lib/display-objects/Line.js +3 -1
- package/lib/display-objects/Path.js +8 -6
- package/lib/display-objects/Polygon.js +3 -1
- package/lib/display-objects/Polyline.js +3 -1
- package/lib/display-objects/Rect.js +3 -1
- package/lib/display-objects/Text.js +6 -4
- package/lib/dom/Animation.js +4 -2
- package/lib/dom/AnimationEffectTiming.js +3 -1
- package/lib/dom/AnimationEvent.js +3 -1
- package/lib/dom/AnimationTimeline.js +4 -2
- package/lib/dom/CustomElementRegistry.js +3 -1
- package/lib/dom/CustomEvent.js +3 -1
- package/lib/dom/Document.js +3 -1
- package/lib/dom/Element.js +8 -6
- package/lib/dom/EventTarget.js +13 -11
- package/lib/dom/FederatedEvent.js +3 -1
- package/lib/dom/FederatedMouseEvent.js +3 -1
- package/lib/dom/FederatedPointerEvent.js +3 -1
- package/lib/dom/FederatedTouchEvent.d.ts +13 -0
- package/lib/dom/FederatedTouchEvent.js +27 -0
- package/lib/dom/FederatedWheelEvent.js +3 -1
- package/lib/dom/KeyframeEffect.js +4 -2
- package/lib/dom/KeyframeList.js +1 -1
- package/lib/dom/MutationEvent.js +3 -1
- package/lib/dom/MutationObserver.js +11 -4
- package/lib/dom/MutationRecord.js +3 -1
- package/lib/dom/Node.js +4 -2
- package/lib/index.js +1 -1
- package/lib/plugins/CullingPlugin.js +4 -2
- package/lib/plugins/DirtyCheckPlugin.js +3 -1
- package/lib/plugins/EventPlugin.js +26 -24
- package/lib/plugins/FrustumCullingStrategy.js +3 -1
- package/lib/plugins/PrepareRendererPlugin.js +3 -1
- package/lib/services/EventService.js +5 -3
- package/lib/services/OffscreenCanvasCreator.js +3 -1
- package/lib/services/RenderingService.js +3 -1
- package/lib/services/SceneGraphSelector.js +4 -2
- package/lib/services/SceneGraphService.js +7 -5
- package/lib/services/TextService.js +5 -3
- package/lib/services/aabb/CircleUpdater.js +3 -1
- package/lib/services/aabb/EllipseUpdater.js +3 -1
- package/lib/services/aabb/LineUpdater.js +3 -1
- package/lib/services/aabb/PathUpdater.js +3 -1
- package/lib/services/aabb/PolylineUpdater.js +3 -1
- package/lib/services/aabb/RectUpdater.js +5 -3
- package/lib/services/aabb/TextUpdater.js +3 -1
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.js +1 -1
- package/lib/shapes/AABB.js +3 -1
- package/lib/shapes/BoundingSphere.js +3 -1
- package/lib/shapes/Frustum.js +4 -2
- package/lib/shapes/Plane.js +3 -1
- package/lib/shapes/Point.js +3 -1
- package/lib/shapes/Ray.js +3 -1
- package/lib/shapes/Rectangle.js +3 -1
- package/lib/types.d.ts +4 -0
- package/lib/types.js +1 -1
- package/lib/utils/animation.js +3 -2
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.js +2 -2
- package/lib/utils/math.d.ts +1 -2
- package/lib/utils/math.js +20 -17
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js +6 -6
- package/lib/utils/text.js +5 -5
- package/package.json +7 -5
package/es/dom/Element.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __read, __spreadArray } from "tslib";
|
|
2
2
|
import { GlobalContainer } from 'mana-syringe';
|
|
3
|
-
import { isNil } from '
|
|
3
|
+
import { isNil } from 'lodash-es';
|
|
4
4
|
import { SceneGraphService } from '../services/SceneGraphService';
|
|
5
5
|
import { Cullable, Geometry, Renderable, Transform, Sortable } from '../components';
|
|
6
6
|
import { Node } from './Node';
|
|
@@ -15,7 +15,9 @@ var entityCounter = 0;
|
|
|
15
15
|
* * Animation
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
var Element =
|
|
18
|
+
var Element =
|
|
19
|
+
/** @class */
|
|
20
|
+
function (_super) {
|
|
19
21
|
__extends(Element, _super);
|
|
20
22
|
|
|
21
23
|
function Element() {
|
|
@@ -248,15 +250,15 @@ var Element = function (_super) {
|
|
|
248
250
|
};
|
|
249
251
|
|
|
250
252
|
Element.prototype.getElementById = function (id) {
|
|
251
|
-
return this.sceneGraphService.querySelector("#"
|
|
253
|
+
return this.sceneGraphService.querySelector("#".concat(id), this);
|
|
252
254
|
};
|
|
253
255
|
|
|
254
256
|
Element.prototype.getElementsByName = function (name) {
|
|
255
|
-
return this.sceneGraphService.querySelectorAll("[name=\""
|
|
257
|
+
return this.sceneGraphService.querySelectorAll("[name=\"".concat(name, "\"]"), this);
|
|
256
258
|
};
|
|
257
259
|
|
|
258
260
|
Element.prototype.getElementsByClassName = function (className) {
|
|
259
|
-
return this.sceneGraphService.querySelectorAll("."
|
|
261
|
+
return this.sceneGraphService.querySelectorAll(".".concat(className), this);
|
|
260
262
|
};
|
|
261
263
|
|
|
262
264
|
Element.prototype.getElementsByTagName = function (tagName) {
|
package/es/dom/EventTarget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __read, __spreadArray } from "tslib";
|
|
2
|
-
import { isBoolean, isFunction, isObject } from '
|
|
2
|
+
import { isBoolean, isFunction, isObject } from 'lodash-es';
|
|
3
3
|
import { EventEmitter } from 'eventemitter3';
|
|
4
4
|
import { CustomEvent } from './CustomEvent';
|
|
5
5
|
import { FederatedEvent } from './FederatedEvent';
|
|
@@ -10,7 +10,9 @@ export var DELEGATION_SPLITTER = ':';
|
|
|
10
10
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
var EventTarget =
|
|
13
|
+
var EventTarget =
|
|
14
|
+
/** @class */
|
|
15
|
+
function () {
|
|
14
16
|
function EventTarget() {
|
|
15
17
|
/**
|
|
16
18
|
* event emitter
|
|
@@ -52,7 +54,7 @@ var EventTarget = function () {
|
|
|
52
54
|
useDelegatedName = true;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
type = capture ? type
|
|
57
|
+
type = capture ? "".concat(type, "capture") : type;
|
|
56
58
|
listener = isFunction(listener) ? listener : listener.handleEvent; // compatible with G 3.0
|
|
57
59
|
|
|
58
60
|
if (useDelegatedName) {
|
|
@@ -108,7 +110,7 @@ var EventTarget = function () {
|
|
|
108
110
|
EventTarget.prototype.removeEventListener = function (type, listener, options) {
|
|
109
111
|
var capture = isBoolean(options) && options || isObject(options) && options.capture;
|
|
110
112
|
var context = isFunction(listener) ? undefined : listener;
|
|
111
|
-
type = capture ? type
|
|
113
|
+
type = capture ? "".concat(type, "capture") : type;
|
|
112
114
|
listener = isFunction(listener) ? listener : listener === null || listener === void 0 ? void 0 : listener.handleEvent;
|
|
113
115
|
this.emitter.off(type, listener, context);
|
|
114
116
|
return this;
|
package/es/dom/FederatedEvent.js
CHANGED
|
@@ -4,7 +4,9 @@ import { Point } from '../shapes/Point';
|
|
|
4
4
|
* FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
var FederatedEvent =
|
|
7
|
+
var FederatedEvent =
|
|
8
|
+
/** @class */
|
|
9
|
+
function () {
|
|
8
10
|
/**
|
|
9
11
|
* The event boundary which manages this event. Propagation can only occur
|
|
10
12
|
* within the boundary's jurisdiction.
|
|
@@ -2,7 +2,9 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import { FederatedEvent } from './FederatedEvent';
|
|
3
3
|
import { Point } from '../shapes/Point';
|
|
4
4
|
|
|
5
|
-
var FederatedMouseEvent =
|
|
5
|
+
var FederatedMouseEvent =
|
|
6
|
+
/** @class */
|
|
7
|
+
function (_super) {
|
|
6
8
|
__extends(FederatedMouseEvent, _super);
|
|
7
9
|
|
|
8
10
|
function FederatedMouseEvent() {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { FederatedMouseEvent } from './FederatedMouseEvent';
|
|
3
3
|
|
|
4
|
-
var FederatedPointerEvent =
|
|
4
|
+
var FederatedPointerEvent =
|
|
5
|
+
/** @class */
|
|
6
|
+
function (_super) {
|
|
5
7
|
__extends(FederatedPointerEvent, _super);
|
|
6
8
|
|
|
7
9
|
function FederatedPointerEvent() {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FederatedEvent } from './FederatedEvent';
|
|
2
|
+
/**
|
|
3
|
+
* @see https://w3c.github.io/touch-events/#touchevent-interface
|
|
4
|
+
*/
|
|
5
|
+
export declare class FederatedTouchEvent extends FederatedEvent<MouseEvent | PointerEvent | TouchEvent> implements TouchEvent {
|
|
6
|
+
altKey: boolean;
|
|
7
|
+
ctrlKey: boolean;
|
|
8
|
+
metaKey: boolean;
|
|
9
|
+
shiftKey: boolean;
|
|
10
|
+
changedTouches: TouchList;
|
|
11
|
+
targetTouches: TouchList;
|
|
12
|
+
touches: TouchList;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { FederatedEvent } from './FederatedEvent';
|
|
3
|
+
/**
|
|
4
|
+
* @see https://w3c.github.io/touch-events/#touchevent-interface
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var FederatedTouchEvent =
|
|
8
|
+
/** @class */
|
|
9
|
+
function (_super) {
|
|
10
|
+
__extends(FederatedTouchEvent, _super);
|
|
11
|
+
|
|
12
|
+
function FederatedTouchEvent() {
|
|
13
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return FederatedTouchEvent;
|
|
17
|
+
}(FederatedEvent);
|
|
18
|
+
|
|
19
|
+
export { FederatedTouchEvent };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { FederatedMouseEvent } from './FederatedMouseEvent';
|
|
3
3
|
|
|
4
|
-
var FederatedWheelEvent =
|
|
4
|
+
var FederatedWheelEvent =
|
|
5
|
+
/** @class */
|
|
6
|
+
function (_super) {
|
|
5
7
|
__extends(FederatedWheelEvent, _super);
|
|
6
8
|
|
|
7
9
|
function FederatedWheelEvent() {
|
package/es/dom/KeyframeEffect.js
CHANGED
package/es/dom/KeyframeList.js
CHANGED
|
@@ -95,7 +95,7 @@ export function normalizeKeyframes(effectInput, timing) {
|
|
|
95
95
|
// TODO: Support add & accumulate in KeyframeEffect.composite
|
|
96
96
|
// @see https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/composite
|
|
97
97
|
if (['replace', 'add', 'accumulate', 'auto'].indexOf(memberValue) === -1) {
|
|
98
|
-
throw new Error(memberValue
|
|
98
|
+
throw new Error("".concat(memberValue, " compositing is not supported"));
|
|
99
99
|
}
|
|
100
100
|
} else if (member === 'easing') {// TODO: Validate animation-timing-function
|
|
101
101
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
|
package/es/dom/MutationEvent.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { FederatedEvent } from './FederatedEvent';
|
|
3
3
|
|
|
4
|
-
var MutationEvent =
|
|
4
|
+
var MutationEvent =
|
|
5
|
+
/** @class */
|
|
6
|
+
function (_super) {
|
|
5
7
|
__extends(MutationEvent, _super);
|
|
6
8
|
|
|
7
9
|
function MutationEvent(typeArg, relatedNode, prevValue, newValue, attrName, attrChange, prevParsedValue, newParsedValue) {
|
|
@@ -4,7 +4,9 @@ import { MutationRecord } from './MutationRecord';
|
|
|
4
4
|
var uidCounter = 0;
|
|
5
5
|
var registrationsTable = new WeakMap();
|
|
6
6
|
|
|
7
|
-
var Registration =
|
|
7
|
+
var Registration =
|
|
8
|
+
/** @class */
|
|
9
|
+
function () {
|
|
8
10
|
function Registration(observer, target, options) {
|
|
9
11
|
this.observer = observer;
|
|
10
12
|
this.target = target;
|
|
@@ -194,7 +196,9 @@ export { Registration };
|
|
|
194
196
|
* @see https://github.com/googlearchive/MutationObservers/blob/master/MutationObserver.js
|
|
195
197
|
*/
|
|
196
198
|
|
|
197
|
-
var MutationObserver =
|
|
199
|
+
var MutationObserver =
|
|
200
|
+
/** @class */
|
|
201
|
+
function () {
|
|
198
202
|
function MutationObserver(callback) {
|
|
199
203
|
this.callback = callback;
|
|
200
204
|
this.nodes = [];
|
|
@@ -204,7 +208,10 @@ var MutationObserver = function () {
|
|
|
204
208
|
|
|
205
209
|
MutationObserver.prototype.observe = function (target, options) {
|
|
206
210
|
// 1.1
|
|
207
|
-
if (!options.childList && !options.attributes && !options.characterData ||
|
|
211
|
+
if (!options.childList && !options.attributes && !options.characterData || // 1.2
|
|
212
|
+
options.attributeOldValue && !options.attributes || // 1.3
|
|
213
|
+
options.attributeFilter && options.attributeFilter.length && !options.attributes || // 1.4
|
|
214
|
+
options.characterDataOldValue && !options.characterData) {
|
|
208
215
|
throw new SyntaxError();
|
|
209
216
|
}
|
|
210
217
|
|
package/es/dom/MutationRecord.js
CHANGED
package/es/dom/Node.js
CHANGED
|
@@ -6,7 +6,9 @@ import { EventTarget } from './EventTarget';
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Node
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var Node =
|
|
9
|
+
var Node =
|
|
10
|
+
/** @class */
|
|
11
|
+
function (_super) {
|
|
10
12
|
__extends(Node, _super);
|
|
11
13
|
|
|
12
14
|
function Node() {
|
|
@@ -115,7 +117,7 @@ var Node = function (_super) {
|
|
|
115
117
|
|
|
116
118
|
if (this.nodeName === Shape.TEXT) {
|
|
117
119
|
// @ts-ignore
|
|
118
|
-
this.style.text = ""
|
|
120
|
+
this.style.text = "".concat(content);
|
|
119
121
|
} else {// this.appendChild(
|
|
120
122
|
// new Text({
|
|
121
123
|
// style: {
|
|
@@ -8,7 +8,9 @@ export var CullingStrategyContribution = Syringe.defineToken('CullingStrategyCon
|
|
|
8
8
|
* 2. other custom culling strategies, eg. frustum culling
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var CullingPlugin =
|
|
11
|
+
var CullingPlugin =
|
|
12
|
+
/** @class */
|
|
13
|
+
function () {
|
|
12
14
|
function CullingPlugin() {}
|
|
13
15
|
|
|
14
16
|
CullingPlugin_1 = CullingPlugin;
|
|
@@ -6,7 +6,9 @@ import { RenderingContext, RenderReason } from '../services/RenderingContext';
|
|
|
6
6
|
* Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var DirtyCheckPlugin =
|
|
9
|
+
var DirtyCheckPlugin =
|
|
10
|
+
/** @class */
|
|
11
|
+
function () {
|
|
10
12
|
function DirtyCheckPlugin() {}
|
|
11
13
|
|
|
12
14
|
DirtyCheckPlugin_1 = DirtyCheckPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __generator, __metadata, __values } from "tslib";
|
|
2
2
|
import { inject, singleton } from 'mana-syringe';
|
|
3
|
-
import { isUndefined } from '
|
|
3
|
+
import { isUndefined } from 'lodash-es';
|
|
4
4
|
import { FederatedPointerEvent } from '../dom/FederatedPointerEvent';
|
|
5
5
|
import { FederatedWheelEvent } from '../dom/FederatedWheelEvent';
|
|
6
6
|
import { RenderingContext } from '../services';
|
|
@@ -15,7 +15,9 @@ import { MOUSE_POINTER_ID, TOUCH_TO_POINTER } from '../utils/event';
|
|
|
15
15
|
* also provide some extra events such as `drag`
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
var EventPlugin =
|
|
18
|
+
var EventPlugin =
|
|
19
|
+
/** @class */
|
|
20
|
+
function () {
|
|
19
21
|
function EventPlugin() {
|
|
20
22
|
var _this = this;
|
|
21
23
|
|
|
@@ -8,7 +8,9 @@ import { Shape } from '../types'; // group is not a 2d shape
|
|
|
8
8
|
|
|
9
9
|
var shape2D = [Shape.CIRCLE, Shape.ELLIPSE, Shape.IMAGE, Shape.RECT, Shape.LINE, Shape.POLYLINE, Shape.POLYGON, Shape.TEXT, Shape.PATH, Shape.HTML];
|
|
10
10
|
|
|
11
|
-
var FrustumCullingStrategy =
|
|
11
|
+
var FrustumCullingStrategy =
|
|
12
|
+
/** @class */
|
|
13
|
+
function () {
|
|
12
14
|
function FrustumCullingStrategy() {}
|
|
13
15
|
|
|
14
16
|
FrustumCullingStrategy.prototype.isVisible = function (object) {
|
|
@@ -4,7 +4,9 @@ import { StyleValueRegistry } from '../css';
|
|
|
4
4
|
import { ElementEvent } from '../dom';
|
|
5
5
|
import { RenderingContext, RenderingPluginContribution, dirtifyToRoot } from '../services';
|
|
6
6
|
|
|
7
|
-
var PrepareRendererPlugin =
|
|
7
|
+
var PrepareRendererPlugin =
|
|
8
|
+
/** @class */
|
|
9
|
+
function () {
|
|
8
10
|
function PrepareRendererPlugin() {}
|
|
9
11
|
|
|
10
12
|
PrepareRendererPlugin_1 = PrepareRendererPlugin;
|
|
@@ -13,7 +13,9 @@ import { Point } from '../shapes';
|
|
|
13
13
|
import { ContextService } from './ContextService';
|
|
14
14
|
var PROPAGATION_LIMIT = 2048;
|
|
15
15
|
|
|
16
|
-
var EventService =
|
|
16
|
+
var EventService =
|
|
17
|
+
/** @class */
|
|
18
|
+
function (_super) {
|
|
17
19
|
__extends(EventService, _super);
|
|
18
20
|
|
|
19
21
|
function EventService() {
|
|
@@ -561,7 +563,7 @@ var EventService = function (_super) {
|
|
|
561
563
|
mappers[i].fn(e);
|
|
562
564
|
}
|
|
563
565
|
} else {
|
|
564
|
-
console.warn("[EventService]: Event mapping not defined for "
|
|
566
|
+
console.warn("[EventService]: Event mapping not defined for ".concat(e.type));
|
|
565
567
|
}
|
|
566
568
|
};
|
|
567
569
|
|
|
@@ -893,7 +895,7 @@ var EventService = function (_super) {
|
|
|
893
895
|
|
|
894
896
|
EventService.prototype.notifyTarget = function (e, type) {
|
|
895
897
|
type = type !== null && type !== void 0 ? type : e.type;
|
|
896
|
-
var key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? type
|
|
898
|
+
var key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? "".concat(type, "capture") : type;
|
|
897
899
|
this.notifyListeners(e, key);
|
|
898
900
|
|
|
899
901
|
if (e.eventPhase === e.AT_TARGET) {
|
|
@@ -7,7 +7,9 @@ import { singleton } from 'mana-syringe';
|
|
|
7
7
|
* - g-plugin-webgl-renderer `ctx.createLinearGradient` and generate texture
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var OffscreenCanvasCreator =
|
|
10
|
+
var OffscreenCanvasCreator =
|
|
11
|
+
/** @class */
|
|
12
|
+
function () {
|
|
11
13
|
function OffscreenCanvasCreator() {}
|
|
12
14
|
|
|
13
15
|
OffscreenCanvasCreator.prototype.getOrCreateCanvas = function (offscreenCanvas) {
|
|
@@ -16,7 +16,9 @@ export var RenderingPluginContribution = Syringe.defineToken('RenderingPluginCon
|
|
|
16
16
|
* * end frame
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
var RenderingService =
|
|
19
|
+
var RenderingService =
|
|
20
|
+
/** @class */
|
|
21
|
+
function () {
|
|
20
22
|
function RenderingService() {
|
|
21
23
|
this.inited = false;
|
|
22
24
|
this.stats = {
|
|
@@ -15,7 +15,9 @@ var NAME_REGEXP = /\[\s*name=(.*)\s*\]/;
|
|
|
15
15
|
* * querySelectorAll
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
var DefaultSceneGraphSelector =
|
|
18
|
+
var DefaultSceneGraphSelector =
|
|
19
|
+
/** @class */
|
|
20
|
+
function () {
|
|
19
21
|
function DefaultSceneGraphSelector() {}
|
|
20
22
|
|
|
21
23
|
DefaultSceneGraphSelector.prototype.selectOne = function (query, root) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata, __read } from "tslib";
|
|
2
2
|
import { inject, singleton, Syringe } from 'mana-syringe';
|
|
3
|
-
import { isNil } from '
|
|
3
|
+
import { isNil } from 'lodash-es';
|
|
4
4
|
import { mat4, quat, vec3 } from 'gl-matrix';
|
|
5
5
|
import { AABB, Rectangle } from '../shapes';
|
|
6
6
|
import { SceneGraphSelectorFactory } from './SceneGraphSelector';
|
|
@@ -52,7 +52,9 @@ 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 =
|
|
55
|
+
var DefaultSceneGraphService =
|
|
56
|
+
/** @class */
|
|
57
|
+
function () {
|
|
56
58
|
function DefaultSceneGraphService() {
|
|
57
59
|
var _this = this;
|
|
58
60
|
/**
|
|
@@ -24,10 +24,12 @@ var regexCannotStartJaJp = /[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾー
|
|
|
24
24
|
var regexCannotEndJaJp = /[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/;
|
|
25
25
|
var regexCannotStartKoKr = /[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/;
|
|
26
26
|
var regexCannotEndKoKr = /[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/;
|
|
27
|
-
var regexCannotStart = new RegExp(regexCannotStartZhCn.source
|
|
28
|
-
var regexCannotEnd = new RegExp(regexCannotEndZhCn.source
|
|
27
|
+
var regexCannotStart = new RegExp("".concat(regexCannotStartZhCn.source, "|").concat(regexCannotStartZhTw.source, "|").concat(regexCannotStartJaJp.source, "|").concat(regexCannotStartKoKr.source));
|
|
28
|
+
var regexCannotEnd = new RegExp("".concat(regexCannotEndZhCn.source, "|").concat(regexCannotEndZhTw.source, "|").concat(regexCannotEndJaJp.source, "|").concat(regexCannotEndKoKr.source));
|
|
29
29
|
|
|
30
|
-
var TextService =
|
|
30
|
+
var TextService =
|
|
31
|
+
/** @class */
|
|
32
|
+
function () {
|
|
31
33
|
function TextService() {
|
|
32
34
|
var _this = this;
|
|
33
35
|
|
|
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var CircleUpdater =
|
|
6
|
+
var CircleUpdater =
|
|
7
|
+
/** @class */
|
|
8
|
+
function () {
|
|
7
9
|
function CircleUpdater() {}
|
|
8
10
|
|
|
9
11
|
CircleUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var EllipseUpdater =
|
|
6
|
+
var EllipseUpdater =
|
|
7
|
+
/** @class */
|
|
8
|
+
function () {
|
|
7
9
|
function EllipseUpdater() {}
|
|
8
10
|
|
|
9
11
|
EllipseUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var LineUpdater =
|
|
6
|
+
var LineUpdater =
|
|
7
|
+
/** @class */
|
|
8
|
+
function () {
|
|
7
9
|
function LineUpdater() {}
|
|
8
10
|
|
|
9
11
|
LineUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var PathUpdater =
|
|
6
|
+
var PathUpdater =
|
|
7
|
+
/** @class */
|
|
8
|
+
function () {
|
|
7
9
|
function PathUpdater() {}
|
|
8
10
|
|
|
9
11
|
PathUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
|
|
|
3
3
|
import { GeometryAABBUpdater } from './interfaces';
|
|
4
4
|
import { Shape } from '../../types';
|
|
5
5
|
|
|
6
|
-
var PolylineUpdater =
|
|
6
|
+
var PolylineUpdater =
|
|
7
|
+
/** @class */
|
|
8
|
+
function () {
|
|
7
9
|
function PolylineUpdater() {}
|
|
8
10
|
|
|
9
11
|
PolylineUpdater.prototype.update = function (parsedStyle) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
|
-
import { isString } from '
|
|
3
|
+
import { isString } from 'lodash-es';
|
|
4
4
|
import { GeometryAABBUpdater } from './interfaces';
|
|
5
5
|
import { Shape } from '../../types';
|
|
6
6
|
import { CSSUnitValue, UnitType } from '../../css';
|
|
7
7
|
|
|
8
|
-
var RectUpdater =
|
|
8
|
+
var RectUpdater =
|
|
9
|
+
/** @class */
|
|
10
|
+
function () {
|
|
9
11
|
function RectUpdater() {}
|
|
10
12
|
|
|
11
13
|
RectUpdater.prototype.update = function (parsedStyle, object) {
|
|
@@ -6,7 +6,9 @@ import { TextService } from '../TextService';
|
|
|
6
6
|
import { Shape } from '../../types';
|
|
7
7
|
import { CSSUnitValue } from '../../css';
|
|
8
8
|
|
|
9
|
-
var TextUpdater =
|
|
9
|
+
var TextUpdater =
|
|
10
|
+
/** @class */
|
|
11
|
+
function () {
|
|
10
12
|
function TextUpdater() {}
|
|
11
13
|
|
|
12
14
|
TextUpdater.prototype.isReadyToMeasure = function (parsedStyle, object) {
|
package/es/shapes/AABB.js
CHANGED
|
@@ -5,7 +5,9 @@ import { vec3 } from 'gl-matrix';
|
|
|
5
5
|
* @see https://github.com/antvis/GWebGPUEngine/issues/3
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var AABB =
|
|
8
|
+
var AABB =
|
|
9
|
+
/** @class */
|
|
10
|
+
function () {
|
|
9
11
|
function AABB(center, halfExtents) {
|
|
10
12
|
this.min = vec3.create();
|
|
11
13
|
this.max = vec3.create();
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { vec3 } from 'gl-matrix';
|
|
2
2
|
var tmpVecA = vec3.create();
|
|
3
3
|
|
|
4
|
-
var BoundingSphere =
|
|
4
|
+
var BoundingSphere =
|
|
5
|
+
/** @class */
|
|
6
|
+
function () {
|
|
5
7
|
function BoundingSphere(center, radius) {
|
|
6
8
|
this.center = center || vec3.create();
|
|
7
9
|
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,7 +11,9 @@ 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 =
|
|
14
|
+
var Ray =
|
|
15
|
+
/** @class */
|
|
16
|
+
function () {
|
|
15
17
|
function Ray(origin, direction) {
|
|
16
18
|
this.origin = origin || vec3.create();
|
|
17
19
|
this.direction = direction || vec3.fromValues(0, 0, -1);
|
package/es/shapes/Rectangle.js
CHANGED
package/es/types.d.ts
CHANGED
|
@@ -120,6 +120,10 @@ export interface BaseStyleProps {
|
|
|
120
120
|
opacity?: number;
|
|
121
121
|
/** 线宽 */
|
|
122
122
|
lineWidth?: string | number;
|
|
123
|
+
/**
|
|
124
|
+
* 交互区域
|
|
125
|
+
*/
|
|
126
|
+
hitArea?: DisplayObject | null;
|
|
123
127
|
/** 指定如何绘制每一条线段末端 */
|
|
124
128
|
lineCap?: CanvasLineCap;
|
|
125
129
|
/** 用来设置2个长度不为0的相连部分(线段,圆弧,曲线)如何连接在一起的属性(长度为0的变形部分,其指定的末端和控制点在同一位置,会被忽略) */
|
|
@@ -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 "-".concat(letter.toLowerCase());
|
|
10
10
|
}); // Remove first dash
|
|
11
11
|
|
|
12
12
|
return str.charAt(0) === '-' ? str.substr(1) : str;
|
package/es/utils/math.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { quat, vec2, vec4 } from 'gl-matrix';
|
|
2
2
|
import { mat3, mat4, vec3 } from 'gl-matrix';
|
|
3
|
-
export declare function getAngle(angle
|
|
3
|
+
export declare function getAngle(angle?: number): number;
|
|
4
4
|
export declare function createVec3(x: number | vec2 | vec3 | vec4, y?: number, z?: number): vec3;
|
|
5
5
|
export declare function deg2rad(deg: number): number;
|
|
6
6
|
export declare function rad2deg(rad: number): number;
|
|
@@ -25,5 +25,4 @@ export declare function getRotationInRadians(mat: mat3): number;
|
|
|
25
25
|
export declare function getEuler(out: vec3, quat: quat | mat4): vec3;
|
|
26
26
|
export declare function fromRotationTranslationScale(rotation: number, x: number, y: number, scaleX: number, scaleY: number): mat3;
|
|
27
27
|
export declare function makePerspective(out: mat4, left: number, right: number, top: number, bottom: number, near: number, far: number): mat4;
|
|
28
|
-
export declare function blend(from: number, to: number, progress: number): number;
|
|
29
28
|
export declare function decompose(mat: mat3): number[];
|