@antv/g 5.0.22-alpha.4 → 5.0.22
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 +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.js +1 -1
- 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 +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.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 +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 +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.js +2 -2
- 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 +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.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 +1 -1
- 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);
|
|
@@ -6,6 +6,14 @@ export interface PropertyParseOptions {
|
|
|
6
6
|
skipUpdateAttribute: boolean;
|
|
7
7
|
skipParse: boolean;
|
|
8
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
|
+
};
|
|
9
17
|
export interface PropertyMetadata {
|
|
10
18
|
name: string;
|
|
11
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
|
|
|
@@ -27,9 +27,19 @@ var _utils = require("../utils");
|
|
|
27
27
|
|
|
28
28
|
var _shapes = require("../shapes");
|
|
29
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
|
+
};
|
|
30
38
|
/**
|
|
31
39
|
* Blink used them in code generation(css_properties.json5)
|
|
32
40
|
*/
|
|
41
|
+
|
|
42
|
+
exports.PropertySyntax = PropertySyntax;
|
|
33
43
|
var BUILT_IN_PROPERTIES = [{
|
|
34
44
|
/**
|
|
35
45
|
* used in CSS Layout API
|
|
@@ -43,7 +53,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
43
53
|
interpolable: true,
|
|
44
54
|
alias: ['cx'],
|
|
45
55
|
defaultValue: '0',
|
|
46
|
-
syntax:
|
|
56
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
47
57
|
handler: _properties.CSSPropertyLocalPosition
|
|
48
58
|
}, {
|
|
49
59
|
// y in local space
|
|
@@ -51,14 +61,14 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
51
61
|
interpolable: true,
|
|
52
62
|
alias: ['cy'],
|
|
53
63
|
defaultValue: '0',
|
|
54
|
-
syntax:
|
|
64
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
55
65
|
handler: _properties.CSSPropertyLocalPosition
|
|
56
66
|
}, {
|
|
57
67
|
// z in local space
|
|
58
68
|
name: 'z',
|
|
59
69
|
interpolable: true,
|
|
60
70
|
defaultValue: '0',
|
|
61
|
-
syntax:
|
|
71
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
62
72
|
handler: _properties.CSSPropertyLocalPosition
|
|
63
73
|
}, {
|
|
64
74
|
/**
|
|
@@ -68,7 +78,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
68
78
|
name: 'opacity',
|
|
69
79
|
interpolable: true,
|
|
70
80
|
defaultValue: '1',
|
|
71
|
-
syntax:
|
|
81
|
+
syntax: PropertySyntax.NUMBER,
|
|
72
82
|
handler: _properties.CSSPropertyOpacity
|
|
73
83
|
}, {
|
|
74
84
|
/**
|
|
@@ -79,7 +89,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
79
89
|
interpolable: true,
|
|
80
90
|
inherited: true,
|
|
81
91
|
defaultValue: '1',
|
|
82
|
-
syntax:
|
|
92
|
+
syntax: PropertySyntax.NUMBER,
|
|
83
93
|
handler: _properties.CSSPropertyOpacity
|
|
84
94
|
}, {
|
|
85
95
|
/**
|
|
@@ -90,7 +100,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
90
100
|
interpolable: true,
|
|
91
101
|
inherited: true,
|
|
92
102
|
defaultValue: '1',
|
|
93
|
-
syntax:
|
|
103
|
+
syntax: PropertySyntax.NUMBER,
|
|
94
104
|
handler: _properties.CSSPropertyOpacity
|
|
95
105
|
}, {
|
|
96
106
|
/**
|
|
@@ -101,31 +111,31 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
101
111
|
interpolable: true,
|
|
102
112
|
keywords: ['none'],
|
|
103
113
|
defaultValue: 'none',
|
|
104
|
-
syntax:
|
|
114
|
+
syntax: PropertySyntax.PAINT,
|
|
105
115
|
handler: _properties.CSSPropertyColor
|
|
106
116
|
}, {
|
|
107
117
|
name: 'stroke',
|
|
108
118
|
interpolable: true,
|
|
109
119
|
keywords: ['none'],
|
|
110
120
|
defaultValue: 'none',
|
|
111
|
-
syntax:
|
|
121
|
+
syntax: PropertySyntax.PAINT,
|
|
112
122
|
handler: _properties.CSSPropertyColor
|
|
113
123
|
}, {
|
|
114
124
|
name: 'shadowColor',
|
|
115
125
|
interpolable: true,
|
|
116
|
-
syntax:
|
|
126
|
+
syntax: PropertySyntax.COLOR,
|
|
117
127
|
handler: _properties.CSSPropertyColor
|
|
118
128
|
}, {
|
|
119
129
|
name: 'shadowOffsetX',
|
|
120
130
|
interpolable: true,
|
|
121
131
|
layoutDependent: true,
|
|
122
|
-
syntax:
|
|
132
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
123
133
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
124
134
|
}, {
|
|
125
135
|
name: 'shadowOffsetY',
|
|
126
136
|
interpolable: true,
|
|
127
137
|
layoutDependent: true,
|
|
128
|
-
syntax:
|
|
138
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
129
139
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
130
140
|
}, {
|
|
131
141
|
name: 'shadowBlur',
|
|
@@ -142,7 +152,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
142
152
|
defaultValue: '1',
|
|
143
153
|
layoutDependent: true,
|
|
144
154
|
alias: ['strokeWidth'],
|
|
145
|
-
syntax:
|
|
155
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
146
156
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
147
157
|
}, {
|
|
148
158
|
name: 'lineJoin',
|
|
@@ -241,12 +251,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
241
251
|
parsePriority: 99,
|
|
242
252
|
layoutDependent: true,
|
|
243
253
|
handler: _properties.CSSPropertyAnchor
|
|
244
|
-
}, //
|
|
245
|
-
// name: 'origin',
|
|
246
|
-
// layoutDependent: true,
|
|
247
|
-
// handler: CSSPropertyAnchor,
|
|
248
|
-
// },
|
|
249
|
-
// Circle
|
|
254
|
+
}, // Circle
|
|
250
255
|
{
|
|
251
256
|
name: 'r',
|
|
252
257
|
interpolable: true,
|
|
@@ -426,7 +431,9 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
426
431
|
}];
|
|
427
432
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
428
433
|
|
|
429
|
-
var StyleValueRegistry =
|
|
434
|
+
var StyleValueRegistry =
|
|
435
|
+
/** @class */
|
|
436
|
+
function () {
|
|
430
437
|
function StyleValueRegistry() {
|
|
431
438
|
/**
|
|
432
439
|
* need recalc later
|
|
@@ -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;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unitTypeToBaseType = unitTypeToBaseType;
|
|
7
|
-
exports.baseTypeToString = baseTypeToString;
|
|
8
6
|
exports.CSSNumericValueType = exports.BaseType = void 0;
|
|
7
|
+
exports.baseTypeToString = baseTypeToString;
|
|
8
|
+
exports.unitTypeToBaseType = unitTypeToBaseType;
|
|
9
9
|
|
|
10
10
|
var _utils = require("../../utils");
|
|
11
11
|
|
|
@@ -134,7 +134,9 @@ function baseTypeToString(baseType) {
|
|
|
134
134
|
return '';
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
var CSSNumericValueType =
|
|
137
|
+
var CSSNumericValueType =
|
|
138
|
+
/** @class */
|
|
139
|
+
function () {
|
|
138
140
|
function CSSNumericValueType(unit, exponent) {
|
|
139
141
|
if (unit === void 0) {
|
|
140
142
|
unit = _.UnitType.kNumber;
|
package/lib/css/cssom/CSSRGB.js
CHANGED
|
@@ -14,7 +14,9 @@ var _CSSColorValue = require("./CSSColorValue");
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
|
|
16
16
|
*/
|
|
17
|
-
var CSSRGB =
|
|
17
|
+
var CSSRGB =
|
|
18
|
+
/** @class */
|
|
19
|
+
function (_super) {
|
|
18
20
|
(0, _tslib.__extends)(CSSRGB, _super);
|
|
19
21
|
|
|
20
22
|
function CSSRGB(r, g, b, alpha,
|
|
@@ -45,7 +47,7 @@ var CSSRGB = function (_super) {
|
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
CSSRGB.prototype.buildCSSText = function (n, p, result) {
|
|
48
|
-
return result +
|
|
50
|
+
return result + "rgba(".concat(this.r, ",").concat(this.g, ",").concat(this.b, ",").concat(this.alpha, ")");
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
return CSSRGB;
|
|
@@ -29,7 +29,7 @@ export declare abstract class CSSStyleValue {
|
|
|
29
29
|
static parseAll(propertyName: string, value: string): CSSStyleValue[];
|
|
30
30
|
static unitFromName(name: string): UnitType;
|
|
31
31
|
static unitTypeToUnitCategory(type: UnitType): UnitCategory;
|
|
32
|
-
static unitTypeToString(type: UnitType): "" | "em" | "
|
|
32
|
+
static unitTypeToString(type: UnitType): "" | "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "%";
|
|
33
33
|
static stringToUnitType(name: string): UnitType;
|
|
34
34
|
static canonicalUnitTypeForCategory(category: UnitCategory): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
|
|
35
35
|
/**
|