@antv/g 5.0.22-alpha.3 → 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 -4
- 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 +10 -1
- package/es/css/StyleValueRegistry.js +28 -22
- 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 +2 -1
- package/es/css/parser/dimension.js +2 -2
- package/es/css/parser/numeric.js +1 -1
- package/es/css/parser/path.d.ts +1 -1
- package/es/css/parser/points.js +1 -1
- package/es/css/parser/transform-origin.d.ts +1 -1
- package/es/css/parser/transform-origin.js +3 -3
- package/es/css/properties/CSSPropertyAnchor.d.ts +4 -2
- package/es/css/properties/CSSPropertyAnchor.js +5 -2
- package/es/css/properties/CSSPropertyClipPath.d.ts +2 -1
- package/es/css/properties/CSSPropertyClipPath.js +4 -2
- package/es/css/properties/CSSPropertyColor.d.ts +3 -2
- package/es/css/properties/CSSPropertyColor.js +4 -2
- package/es/css/properties/CSSPropertyFilter.d.ts +3 -2
- package/es/css/properties/CSSPropertyFilter.js +4 -2
- package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +5 -2
- package/es/css/properties/CSSPropertyLineDash.d.ts +4 -2
- package/es/css/properties/CSSPropertyLineDash.js +4 -2
- package/es/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
- package/es/css/properties/CSSPropertyLocalPosition.js +4 -2
- package/es/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
- package/es/css/properties/CSSPropertyOffsetDistance.js +5 -2
- package/es/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
- package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/es/css/properties/CSSPropertyOpacity.d.ts +3 -2
- package/es/css/properties/CSSPropertyOpacity.js +4 -2
- package/es/css/properties/CSSPropertyPath.d.ts +3 -2
- package/es/css/properties/CSSPropertyPath.js +6 -2
- package/es/css/properties/CSSPropertyPoints.d.ts +3 -2
- package/es/css/properties/CSSPropertyPoints.js +4 -2
- package/es/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
- package/es/css/properties/CSSPropertyShadowBlur.js +4 -2
- package/es/css/properties/CSSPropertyText.d.ts +3 -2
- package/es/css/properties/CSSPropertyText.js +5 -3
- package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -1
- package/es/css/properties/CSSPropertyTextTransform.js +4 -2
- package/es/css/properties/CSSPropertyTransform.d.ts +3 -2
- package/es/css/properties/CSSPropertyTransform.js +5 -3
- package/es/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
- package/es/css/properties/CSSPropertyTransformOrigin.js +4 -2
- package/es/css/properties/CSSPropertyVisibility.d.ts +3 -1
- package/es/css/properties/CSSPropertyVisibility.js +3 -1
- package/es/css/properties/CSSPropertyZIndex.d.ts +4 -2
- package/es/css/properties/CSSPropertyZIndex.js +4 -2
- 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 +8 -6
- 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.d.ts +1 -1
- package/es/dom/MutationEvent.js +3 -1
- package/es/dom/MutationObserver.d.ts +2 -1
- package/es/dom/MutationObserver.js +11 -4
- package/es/dom/MutationRecord.d.ts +1 -1
- package/es/dom/MutationRecord.js +3 -1
- package/es/dom/Node.js +5 -3
- package/es/dom/interfaces.d.ts +2 -1
- 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.d.ts +1 -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.d.ts +2 -2
- 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.d.ts +2 -2
- package/es/services/TextService.js +7 -4
- 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.d.ts +1 -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 +2 -2
- 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 -4
- 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 +10 -1
- package/lib/css/StyleValueRegistry.js +38 -27
- 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 +2 -1
- package/lib/css/parser/dimension.js +9 -8
- package/lib/css/parser/numeric.js +6 -6
- package/lib/css/parser/path.d.ts +1 -1
- package/lib/css/parser/path.js +1 -1
- package/lib/css/parser/points.js +2 -2
- package/lib/css/parser/transform-origin.d.ts +1 -1
- package/lib/css/parser/transform-origin.js +7 -5
- package/lib/css/parser/transform.js +2 -2
- package/lib/css/properties/CSSPropertyAnchor.d.ts +4 -2
- package/lib/css/properties/CSSPropertyAnchor.js +8 -4
- package/lib/css/properties/CSSPropertyClipPath.d.ts +2 -1
- package/lib/css/properties/CSSPropertyClipPath.js +5 -3
- package/lib/css/properties/CSSPropertyColor.d.ts +3 -2
- package/lib/css/properties/CSSPropertyColor.js +6 -4
- package/lib/css/properties/CSSPropertyFilter.d.ts +3 -2
- package/lib/css/properties/CSSPropertyFilter.js +5 -3
- package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +14 -10
- package/lib/css/properties/CSSPropertyLineDash.d.ts +4 -2
- package/lib/css/properties/CSSPropertyLineDash.js +6 -4
- package/lib/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
- package/lib/css/properties/CSSPropertyLocalPosition.js +6 -4
- package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
- package/lib/css/properties/CSSPropertyOffsetDistance.js +9 -5
- package/lib/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
- package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
- package/lib/css/properties/CSSPropertyOpacity.d.ts +3 -2
- package/lib/css/properties/CSSPropertyOpacity.js +6 -4
- package/lib/css/properties/CSSPropertyPath.d.ts +3 -2
- package/lib/css/properties/CSSPropertyPath.js +12 -6
- package/lib/css/properties/CSSPropertyPoints.d.ts +3 -2
- package/lib/css/properties/CSSPropertyPoints.js +5 -3
- package/lib/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
- package/lib/css/properties/CSSPropertyShadowBlur.js +5 -3
- package/lib/css/properties/CSSPropertyText.d.ts +3 -2
- package/lib/css/properties/CSSPropertyText.js +6 -4
- package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -1
- package/lib/css/properties/CSSPropertyTextTransform.js +8 -6
- package/lib/css/properties/CSSPropertyTransform.d.ts +3 -2
- package/lib/css/properties/CSSPropertyTransform.js +26 -24
- package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
- package/lib/css/properties/CSSPropertyTransformOrigin.js +5 -3
- package/lib/css/properties/CSSPropertyVisibility.d.ts +3 -1
- package/lib/css/properties/CSSPropertyVisibility.js +3 -1
- package/lib/css/properties/CSSPropertyZIndex.d.ts +4 -2
- package/lib/css/properties/CSSPropertyZIndex.js +5 -3
- 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 +11 -9
- 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.d.ts +1 -1
- package/lib/dom/MutationEvent.js +3 -1
- package/lib/dom/MutationObserver.d.ts +2 -1
- package/lib/dom/MutationObserver.js +22 -15
- package/lib/dom/MutationRecord.d.ts +1 -1
- package/lib/dom/MutationRecord.js +3 -1
- package/lib/dom/Node.js +8 -6
- package/lib/dom/interfaces.d.ts +2 -1
- 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.d.ts +1 -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.d.ts +2 -2
- 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.d.ts +2 -2
- package/lib/services/TextService.js +10 -6
- 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.d.ts +1 -2
- 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 +2 -2
- package/lib/utils/path.js +6 -6
- package/lib/utils/text.js +5 -5
- package/package.json +7 -5
package/lib/camera/Landmark.d.ts
CHANGED
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
import { vec3 } from 'gl-matrix';
|
|
2
|
-
import type { Camera } from './Camera';
|
|
1
|
+
import type { mat4, vec3 } from 'gl-matrix';
|
|
3
2
|
/**
|
|
4
3
|
* 保存相机状态,便于后续在多个 Landmark 间移动
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
5
|
+
export interface Landmark {
|
|
7
6
|
name: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
constructor(name: string, c: Camera);
|
|
25
|
-
getPosition(): vec3;
|
|
26
|
-
getFocalPoint(): vec3;
|
|
27
|
-
getRoll(): number;
|
|
28
|
-
getZoom(): number;
|
|
29
|
-
retrieve(c: Camera): void;
|
|
7
|
+
matrix: mat4;
|
|
8
|
+
right: vec3;
|
|
9
|
+
up: vec3;
|
|
10
|
+
forward: vec3;
|
|
11
|
+
position: vec3;
|
|
12
|
+
focalPoint: vec3;
|
|
13
|
+
distanceVector: vec3;
|
|
14
|
+
distance: number;
|
|
15
|
+
dollyingStep: number;
|
|
16
|
+
azimuth: number;
|
|
17
|
+
elevation: number;
|
|
18
|
+
roll: number;
|
|
19
|
+
relAzimuth: number;
|
|
20
|
+
relElevation: number;
|
|
21
|
+
relRoll: number;
|
|
22
|
+
zoom: number;
|
|
30
23
|
}
|
package/lib/camera/Landmark.js
CHANGED
|
@@ -2,78 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Landmark = void 0;
|
|
7
|
-
|
|
8
|
-
var _glMatrix = require("gl-matrix");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 保存相机状态,便于后续在多个 Landmark 间移动
|
|
12
|
-
*/
|
|
13
|
-
var Landmark = function () {
|
|
14
|
-
function Landmark(name, c) {
|
|
15
|
-
this.azimuth = 0;
|
|
16
|
-
this.elevation = 0;
|
|
17
|
-
this.roll = 0;
|
|
18
|
-
this.relAzimuth = 0;
|
|
19
|
-
this.relElevation = 0;
|
|
20
|
-
this.relRoll = 0;
|
|
21
|
-
this.zoom = 1;
|
|
22
|
-
this.name = name;
|
|
23
|
-
this.matrix = _glMatrix.mat4.clone(c.matrix);
|
|
24
|
-
this.right = _glMatrix.vec3.clone(c.right);
|
|
25
|
-
this.up = _glMatrix.vec3.clone(c.up);
|
|
26
|
-
this.forward = _glMatrix.vec3.clone(c.forward);
|
|
27
|
-
this.position = _glMatrix.vec3.clone(c.position);
|
|
28
|
-
this.focalPoint = _glMatrix.vec3.clone(c.focalPoint);
|
|
29
|
-
this.distanceVector = _glMatrix.vec3.clone(c.distanceVector);
|
|
30
|
-
this.azimuth = c.azimuth;
|
|
31
|
-
this.elevation = c.elevation;
|
|
32
|
-
this.roll = c.roll;
|
|
33
|
-
this.relAzimuth = c.relAzimuth;
|
|
34
|
-
this.relElevation = c.relElevation;
|
|
35
|
-
this.relRoll = c.relRoll;
|
|
36
|
-
this.dollyingStep = c.dollyingStep;
|
|
37
|
-
this.distance = c.distance;
|
|
38
|
-
this.zoom = c.zoom;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
Landmark.prototype.getPosition = function () {
|
|
42
|
-
return this.position;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
Landmark.prototype.getFocalPoint = function () {
|
|
46
|
-
return this.focalPoint;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
Landmark.prototype.getRoll = function () {
|
|
50
|
-
return this.roll;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
Landmark.prototype.getZoom = function () {
|
|
54
|
-
return this.zoom;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
Landmark.prototype.retrieve = function (c) {
|
|
58
|
-
c.matrix = _glMatrix.mat4.copy(c.matrix, this.matrix);
|
|
59
|
-
c.right = _glMatrix.vec3.copy(c.right, this.right);
|
|
60
|
-
c.up = _glMatrix.vec3.copy(c.up, this.up);
|
|
61
|
-
c.forward = _glMatrix.vec3.copy(c.forward, this.forward);
|
|
62
|
-
c.position = _glMatrix.vec3.copy(c.position, this.position);
|
|
63
|
-
c.focalPoint = _glMatrix.vec3.copy(c.focalPoint, this.focalPoint);
|
|
64
|
-
c.distanceVector = _glMatrix.vec3.copy(c.distanceVector, this.distanceVector);
|
|
65
|
-
c.azimuth = this.azimuth;
|
|
66
|
-
c.elevation = this.elevation;
|
|
67
|
-
c.roll = this.roll;
|
|
68
|
-
c.relAzimuth = this.relAzimuth;
|
|
69
|
-
c.relElevation = this.relElevation;
|
|
70
|
-
c.relRoll = this.relRoll;
|
|
71
|
-
c.dollyingStep = this.dollyingStep;
|
|
72
|
-
c.distance = this.distance;
|
|
73
|
-
c.zoom = this.zoom;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
return Landmark;
|
|
77
|
-
}();
|
|
78
|
-
|
|
79
|
-
exports.Landmark = Landmark;
|
|
5
|
+
});
|
package/lib/canvas-module.js
CHANGED
|
@@ -19,7 +19,6 @@ var _services = require("./services");
|
|
|
19
19
|
|
|
20
20
|
var _EventPlugin = require("./plugins/EventPlugin");
|
|
21
21
|
|
|
22
|
-
// import { CSSCalculatorPlugin } from './plugins/CSSStyleCalculator';
|
|
23
22
|
var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
24
23
|
_manaSyringe.Contribution.register(register, _services.RenderingPluginContribution, {
|
|
25
24
|
cache: false
|
|
@@ -34,8 +33,7 @@ var containerModule = (0, _manaSyringe.Module)(function (register) {
|
|
|
34
33
|
register(_services.RenderingService);
|
|
35
34
|
register(_services.EventService);
|
|
36
35
|
register(_EventPlugin.EventPlugin);
|
|
37
|
-
register(_PrepareRendererPlugin.PrepareRendererPlugin);
|
|
38
|
-
|
|
36
|
+
register(_PrepareRendererPlugin.PrepareRendererPlugin);
|
|
39
37
|
register(_DirtyCheckPlugin.DirtyCheckPlugin);
|
|
40
38
|
register(_CullingPlugin.CullingPlugin);
|
|
41
39
|
register(_FrustumCullingStrategy.FrustumCullingStrategy);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Strategy = exports.Cullable = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @see https://doc.babylonjs.com/how_to/optimizing_your_scene#changing-mesh-culling-strategy
|
|
@@ -15,7 +15,9 @@ exports.Strategy = Strategy;
|
|
|
15
15
|
Strategy[Strategy["Standard"] = 0] = "Standard";
|
|
16
16
|
})(Strategy || (exports.Strategy = Strategy = {}));
|
|
17
17
|
|
|
18
|
-
var Cullable =
|
|
18
|
+
var Cullable =
|
|
19
|
+
/** @class */
|
|
20
|
+
function () {
|
|
19
21
|
function Cullable() {
|
|
20
22
|
this.strategy = Strategy.Standard;
|
|
21
23
|
this.visibilityPlaneMask = -1;
|
|
@@ -10,7 +10,9 @@ var _glMatrix = require("gl-matrix");
|
|
|
10
10
|
/**
|
|
11
11
|
* do RTS transformation for 2D/3D
|
|
12
12
|
*/
|
|
13
|
-
var Transform =
|
|
13
|
+
var Transform =
|
|
14
|
+
/** @class */
|
|
15
|
+
function () {
|
|
14
16
|
function Transform() {
|
|
15
17
|
this.dirtyFlag = false;
|
|
16
18
|
this.localDirtyFlag = false;
|
|
@@ -18,7 +18,9 @@ var _manaSyringe = require("mana-syringe");
|
|
|
18
18
|
* // use with `display` property
|
|
19
19
|
* group.style.display = 'layout(centering)';
|
|
20
20
|
*/
|
|
21
|
-
var LayoutRegistry =
|
|
21
|
+
var LayoutRegistry =
|
|
22
|
+
/** @class */
|
|
23
|
+
function () {
|
|
22
24
|
function LayoutRegistry() {}
|
|
23
25
|
|
|
24
26
|
LayoutRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], LayoutRegistry);
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type { DisplayObject
|
|
1
|
+
import type { DisplayObject } from '../display-objects';
|
|
2
|
+
import type { BaseStyleProps } from '../types';
|
|
2
3
|
import { CSSStyleValue } from './cssom';
|
|
3
4
|
export declare type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
|
|
4
5
|
export interface PropertyParseOptions {
|
|
5
6
|
skipUpdateAttribute: boolean;
|
|
6
7
|
skipParse: boolean;
|
|
7
8
|
}
|
|
9
|
+
export declare const PropertySyntax: {
|
|
10
|
+
COLOR: string;
|
|
11
|
+
PAINT: string;
|
|
12
|
+
NUMBER: string;
|
|
13
|
+
LENGTH: string;
|
|
14
|
+
PERCENTAGE: string;
|
|
15
|
+
LENGTH_PERCENTAGE: string;
|
|
16
|
+
};
|
|
8
17
|
export interface PropertyMetadata {
|
|
9
18
|
name: string;
|
|
10
19
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyleValueRegistry = exports.BUILT_IN_PROPERTIES = void 0;
|
|
6
|
+
exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -11,9 +11,11 @@ var _manaSyringe = require("mana-syringe");
|
|
|
11
11
|
|
|
12
12
|
var _glMatrix = require("gl-matrix");
|
|
13
13
|
|
|
14
|
+
var _services = require("../services");
|
|
15
|
+
|
|
14
16
|
var _dom = require("../dom");
|
|
15
17
|
|
|
16
|
-
var
|
|
18
|
+
var _types = require("../types");
|
|
17
19
|
|
|
18
20
|
var _cssom = require("./cssom");
|
|
19
21
|
|
|
@@ -23,9 +25,21 @@ var _properties = require("./properties");
|
|
|
23
25
|
|
|
24
26
|
var _utils = require("../utils");
|
|
25
27
|
|
|
28
|
+
var _shapes = require("../shapes");
|
|
29
|
+
|
|
30
|
+
var PropertySyntax = {
|
|
31
|
+
COLOR: '<color>',
|
|
32
|
+
PAINT: '<paint>',
|
|
33
|
+
NUMBER: '<number>',
|
|
34
|
+
LENGTH: '<length>',
|
|
35
|
+
PERCENTAGE: '<percentage>',
|
|
36
|
+
LENGTH_PERCENTAGE: '<length> | <percentage>'
|
|
37
|
+
};
|
|
26
38
|
/**
|
|
27
39
|
* Blink used them in code generation(css_properties.json5)
|
|
28
40
|
*/
|
|
41
|
+
|
|
42
|
+
exports.PropertySyntax = PropertySyntax;
|
|
29
43
|
var BUILT_IN_PROPERTIES = [{
|
|
30
44
|
/**
|
|
31
45
|
* used in CSS Layout API
|
|
@@ -39,7 +53,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
39
53
|
interpolable: true,
|
|
40
54
|
alias: ['cx'],
|
|
41
55
|
defaultValue: '0',
|
|
42
|
-
syntax:
|
|
56
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
43
57
|
handler: _properties.CSSPropertyLocalPosition
|
|
44
58
|
}, {
|
|
45
59
|
// y in local space
|
|
@@ -47,14 +61,14 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
47
61
|
interpolable: true,
|
|
48
62
|
alias: ['cy'],
|
|
49
63
|
defaultValue: '0',
|
|
50
|
-
syntax:
|
|
64
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
51
65
|
handler: _properties.CSSPropertyLocalPosition
|
|
52
66
|
}, {
|
|
53
67
|
// z in local space
|
|
54
68
|
name: 'z',
|
|
55
69
|
interpolable: true,
|
|
56
70
|
defaultValue: '0',
|
|
57
|
-
syntax:
|
|
71
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
58
72
|
handler: _properties.CSSPropertyLocalPosition
|
|
59
73
|
}, {
|
|
60
74
|
/**
|
|
@@ -64,7 +78,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
64
78
|
name: 'opacity',
|
|
65
79
|
interpolable: true,
|
|
66
80
|
defaultValue: '1',
|
|
67
|
-
syntax:
|
|
81
|
+
syntax: PropertySyntax.NUMBER,
|
|
68
82
|
handler: _properties.CSSPropertyOpacity
|
|
69
83
|
}, {
|
|
70
84
|
/**
|
|
@@ -75,7 +89,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
75
89
|
interpolable: true,
|
|
76
90
|
inherited: true,
|
|
77
91
|
defaultValue: '1',
|
|
78
|
-
syntax:
|
|
92
|
+
syntax: PropertySyntax.NUMBER,
|
|
79
93
|
handler: _properties.CSSPropertyOpacity
|
|
80
94
|
}, {
|
|
81
95
|
/**
|
|
@@ -86,7 +100,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
86
100
|
interpolable: true,
|
|
87
101
|
inherited: true,
|
|
88
102
|
defaultValue: '1',
|
|
89
|
-
syntax:
|
|
103
|
+
syntax: PropertySyntax.NUMBER,
|
|
90
104
|
handler: _properties.CSSPropertyOpacity
|
|
91
105
|
}, {
|
|
92
106
|
/**
|
|
@@ -97,31 +111,31 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
97
111
|
interpolable: true,
|
|
98
112
|
keywords: ['none'],
|
|
99
113
|
defaultValue: 'none',
|
|
100
|
-
syntax:
|
|
114
|
+
syntax: PropertySyntax.PAINT,
|
|
101
115
|
handler: _properties.CSSPropertyColor
|
|
102
116
|
}, {
|
|
103
117
|
name: 'stroke',
|
|
104
118
|
interpolable: true,
|
|
105
119
|
keywords: ['none'],
|
|
106
120
|
defaultValue: 'none',
|
|
107
|
-
syntax:
|
|
121
|
+
syntax: PropertySyntax.PAINT,
|
|
108
122
|
handler: _properties.CSSPropertyColor
|
|
109
123
|
}, {
|
|
110
124
|
name: 'shadowColor',
|
|
111
125
|
interpolable: true,
|
|
112
|
-
syntax:
|
|
126
|
+
syntax: PropertySyntax.COLOR,
|
|
113
127
|
handler: _properties.CSSPropertyColor
|
|
114
128
|
}, {
|
|
115
129
|
name: 'shadowOffsetX',
|
|
116
130
|
interpolable: true,
|
|
117
131
|
layoutDependent: true,
|
|
118
|
-
syntax:
|
|
132
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
119
133
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
120
134
|
}, {
|
|
121
135
|
name: 'shadowOffsetY',
|
|
122
136
|
interpolable: true,
|
|
123
137
|
layoutDependent: true,
|
|
124
|
-
syntax:
|
|
138
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
125
139
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
126
140
|
}, {
|
|
127
141
|
name: 'shadowBlur',
|
|
@@ -138,7 +152,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
138
152
|
defaultValue: '1',
|
|
139
153
|
layoutDependent: true,
|
|
140
154
|
alias: ['strokeWidth'],
|
|
141
|
-
syntax:
|
|
155
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
142
156
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
143
157
|
}, {
|
|
144
158
|
name: 'lineJoin',
|
|
@@ -237,12 +251,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
237
251
|
parsePriority: 99,
|
|
238
252
|
layoutDependent: true,
|
|
239
253
|
handler: _properties.CSSPropertyAnchor
|
|
240
|
-
}, //
|
|
241
|
-
// name: 'origin',
|
|
242
|
-
// layoutDependent: true,
|
|
243
|
-
// handler: CSSPropertyAnchor,
|
|
244
|
-
// },
|
|
245
|
-
// Circle
|
|
254
|
+
}, // Circle
|
|
246
255
|
{
|
|
247
256
|
name: 'r',
|
|
248
257
|
interpolable: true,
|
|
@@ -422,7 +431,9 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
422
431
|
}];
|
|
423
432
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
424
433
|
|
|
425
|
-
var StyleValueRegistry =
|
|
434
|
+
var StyleValueRegistry =
|
|
435
|
+
/** @class */
|
|
436
|
+
function () {
|
|
426
437
|
function StyleValueRegistry() {
|
|
427
438
|
/**
|
|
428
439
|
* need recalc later
|
|
@@ -750,7 +761,7 @@ var StyleValueRegistry = function () {
|
|
|
750
761
|
StyleValueRegistry.prototype.updateGeometry = function (object) {
|
|
751
762
|
var _a;
|
|
752
763
|
|
|
753
|
-
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(
|
|
764
|
+
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_services.GeometryUpdaterFactory);
|
|
754
765
|
|
|
755
766
|
var geometryUpdater = geometryUpdaterFactory(object.nodeName);
|
|
756
767
|
|
|
@@ -758,11 +769,11 @@ var StyleValueRegistry = function () {
|
|
|
758
769
|
var geometry_1 = object.geometry;
|
|
759
770
|
|
|
760
771
|
if (!geometry_1.contentBounds) {
|
|
761
|
-
geometry_1.contentBounds = new
|
|
772
|
+
geometry_1.contentBounds = new _shapes.AABB();
|
|
762
773
|
}
|
|
763
774
|
|
|
764
775
|
if (!geometry_1.renderBounds) {
|
|
765
|
-
geometry_1.renderBounds = new
|
|
776
|
+
geometry_1.renderBounds = new _shapes.AABB();
|
|
766
777
|
}
|
|
767
778
|
|
|
768
779
|
var parsedStyle = object.parsedStyle;
|
|
@@ -785,7 +796,7 @@ var StyleValueRegistry = function () {
|
|
|
785
796
|
_h = _b.offsetZ,
|
|
786
797
|
offsetZ = _h === void 0 ? 0 : _h;
|
|
787
798
|
|
|
788
|
-
if (object.nodeName ===
|
|
799
|
+
if (object.nodeName === _types.Shape.LINE || object.nodeName === _types.Shape.POLYLINE || object.nodeName === _types.Shape.POLYGON || object.nodeName === _types.Shape.PATH) {
|
|
789
800
|
parsedStyle.offsetX = x - (parsedStyle.defX || 0);
|
|
790
801
|
parsedStyle.offsetY = y - (parsedStyle.defY || 0);
|
|
791
802
|
parsedStyle.defX = x;
|
|
@@ -809,7 +820,7 @@ var StyleValueRegistry = function () {
|
|
|
809
820
|
transformOrigin = _j.transformOrigin;
|
|
810
821
|
var anchor = parsedStyle.anchor; // <Text> use textAlign & textBaseline instead of anchor
|
|
811
822
|
|
|
812
|
-
if (object.nodeName ===
|
|
823
|
+
if (object.nodeName === _types.Shape.TEXT) {
|
|
813
824
|
delete parsedStyle.anchor;
|
|
814
825
|
}
|
|
815
826
|
|
|
@@ -881,7 +892,7 @@ var StyleValueRegistry = function () {
|
|
|
881
892
|
usedOriginYValue -= (anchor && anchor[1].value || 0) * geometry_1.contentBounds.halfExtents[1] * 2;
|
|
882
893
|
object.setOrigin(usedOriginXValue, usedOriginYValue);
|
|
883
894
|
object.emit(_dom.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
|
|
884
|
-
(0,
|
|
895
|
+
(0, _services.dirtifyToRoot)(object);
|
|
885
896
|
}
|
|
886
897
|
};
|
|
887
898
|
|
|
@@ -14,7 +14,9 @@ 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 =
|
|
17
|
+
var CSSColorValue =
|
|
18
|
+
/** @class */
|
|
19
|
+
function (_super) {
|
|
18
20
|
(0, _tslib.__extends)(CSSColorValue, _super);
|
|
19
21
|
|
|
20
22
|
function CSSColorValue(colorSpace) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.GradientPatternType = exports.CSSGradientValue = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -19,7 +19,9 @@ exports.GradientPatternType = GradientPatternType;
|
|
|
19
19
|
GradientPatternType[GradientPatternType["Pattern"] = 3] = "Pattern";
|
|
20
20
|
})(GradientPatternType || (exports.GradientPatternType = GradientPatternType = {}));
|
|
21
21
|
|
|
22
|
-
var CSSGradientValue =
|
|
22
|
+
var CSSGradientValue =
|
|
23
|
+
/** @class */
|
|
24
|
+
function (_super) {
|
|
23
25
|
(0, _tslib.__extends)(CSSGradientValue, _super);
|
|
24
26
|
|
|
25
27
|
function CSSGradientValue(type, value) {
|
|
@@ -38,15 +40,15 @@ var CSSGradientValue = function (_super) {
|
|
|
38
40
|
var text = '';
|
|
39
41
|
|
|
40
42
|
if (this.type === GradientPatternType.LinearGradient) {
|
|
41
|
-
text = "linear-gradient("
|
|
43
|
+
text = "linear-gradient(".concat(this.value.steps.map(function (step) {
|
|
42
44
|
return step.join(',');
|
|
43
|
-
}).join(',')
|
|
45
|
+
}).join(','), ")");
|
|
44
46
|
} else if (this.type === GradientPatternType.RadialGradient) {
|
|
45
|
-
text = "radial-gradient("
|
|
47
|
+
text = "radial-gradient(".concat(this.value.steps.map(function (step) {
|
|
46
48
|
return step.join(',');
|
|
47
|
-
}).join(',')
|
|
49
|
+
}).join(','), ")");
|
|
48
50
|
} else if (this.type === GradientPatternType.Pattern) {
|
|
49
|
-
text = "url("
|
|
51
|
+
text = "url(".concat(this.value.src, ")");
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
return result += text;
|
|
@@ -15,7 +15,9 @@ 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 =
|
|
18
|
+
var CSSKeywordValue =
|
|
19
|
+
/** @class */
|
|
20
|
+
function (_super) {
|
|
19
21
|
(0, _tslib.__extends)(CSSKeywordValue, _super);
|
|
20
22
|
|
|
21
23
|
function CSSKeywordValue(value) {
|
|
@@ -11,7 +11,9 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathInvert =
|
|
14
|
+
var CSSMathInvert =
|
|
15
|
+
/** @class */
|
|
16
|
+
function (_super) {
|
|
15
17
|
(0, _tslib.__extends)(CSSMathInvert, _super);
|
|
16
18
|
|
|
17
19
|
function CSSMathInvert(value, type) {
|
|
@@ -19,7 +19,9 @@ 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 =
|
|
22
|
+
var CSSMathMax =
|
|
23
|
+
/** @class */
|
|
24
|
+
function (_super) {
|
|
23
25
|
(0, _tslib.__extends)(CSSMathMax, _super);
|
|
24
26
|
|
|
25
27
|
function CSSMathMax() {
|
|
@@ -19,7 +19,9 @@ 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 =
|
|
22
|
+
var CSSMathMin =
|
|
23
|
+
/** @class */
|
|
24
|
+
function (_super) {
|
|
23
25
|
(0, _tslib.__extends)(CSSMathMin, _super);
|
|
24
26
|
|
|
25
27
|
function CSSMathMin() {
|
|
@@ -11,7 +11,9 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathNegate =
|
|
14
|
+
var CSSMathNegate =
|
|
15
|
+
/** @class */
|
|
16
|
+
function (_super) {
|
|
15
17
|
(0, _tslib.__extends)(CSSMathNegate, _super);
|
|
16
18
|
|
|
17
19
|
function CSSMathNegate(value, type) {
|
|
@@ -17,7 +17,9 @@ 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 =
|
|
20
|
+
var CSSMathProduct =
|
|
21
|
+
/** @class */
|
|
22
|
+
function (_super) {
|
|
21
23
|
(0, _tslib.__extends)(CSSMathProduct, _super);
|
|
22
24
|
|
|
23
25
|
function CSSMathProduct() {
|
|
@@ -17,7 +17,9 @@ 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 =
|
|
20
|
+
var CSSMathSum =
|
|
21
|
+
/** @class */
|
|
22
|
+
function (_super) {
|
|
21
23
|
(0, _tslib.__extends)(CSSMathSum, _super);
|
|
22
24
|
|
|
23
25
|
function CSSMathSum() {
|
|
@@ -15,7 +15,9 @@ 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 =
|
|
18
|
+
var CSSMathValue =
|
|
19
|
+
/** @class */
|
|
20
|
+
function (_super) {
|
|
19
21
|
(0, _tslib.__extends)(CSSMathValue, _super);
|
|
20
22
|
|
|
21
23
|
function CSSMathValue() {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.typeCheck = typeCheck;
|
|
7
6
|
exports.CSSMathVariadic = void 0;
|
|
7
|
+
exports.typeCheck = typeCheck;
|
|
8
8
|
|
|
9
9
|
var _tslib = require("tslib");
|
|
10
10
|
|
|
@@ -23,7 +23,9 @@ function typeCheck(values, op, error) {
|
|
|
23
23
|
} // Represents an arithmetic operation with one or more CSSNumericValues.
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var CSSMathVariadic =
|
|
26
|
+
var CSSMathVariadic =
|
|
27
|
+
/** @class */
|
|
28
|
+
function (_super) {
|
|
27
29
|
(0, _tslib.__extends)(CSSMathVariadic, _super);
|
|
28
30
|
|
|
29
31
|
function CSSMathVariadic(values, type) {
|
|
@@ -19,7 +19,9 @@ var _ = require(".");
|
|
|
19
19
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
|
|
20
20
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
|
|
21
21
|
*/
|
|
22
|
-
var CSSNumericValue =
|
|
22
|
+
var CSSNumericValue =
|
|
23
|
+
/** @class */
|
|
24
|
+
function (_super) {
|
|
23
25
|
(0, _tslib.__extends)(CSSNumericValue, _super);
|
|
24
26
|
|
|
25
27
|
function CSSNumericValue(type_) {
|
|
@@ -10,7 +10,7 @@ export declare enum BaseType {
|
|
|
10
10
|
kNumBaseTypes = 7
|
|
11
11
|
}
|
|
12
12
|
export declare function unitTypeToBaseType(unit: UnitType): BaseType.kLength | BaseType.kAngle | BaseType.kTime | BaseType.kFrequency | BaseType.kResolution | BaseType.kFlex | BaseType.kPercent;
|
|
13
|
-
export declare function baseTypeToString(baseType: BaseType): "" | "
|
|
13
|
+
export declare function baseTypeToString(baseType: BaseType): "" | "percent" | "length" | "angle" | "time" | "frequency" | "resolution" | "flex";
|
|
14
14
|
export declare class CSSNumericValueType {
|
|
15
15
|
private exponents;
|
|
16
16
|
private numNonZeroEntries;
|