@antv/g 5.0.22-alpha.5 → 5.0.23-alpha.0

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.
Files changed (319) hide show
  1. package/dist/index.umd.min.js +30 -0
  2. package/es/AbstractRenderer.js +8 -1
  3. package/es/Canvas.d.ts +1 -1
  4. package/es/Canvas.js +5 -3
  5. package/es/DisplayObjectPool.js +3 -1
  6. package/es/camera/Camera.d.ts +105 -66
  7. package/es/camera/Camera.js +306 -170
  8. package/es/camera/Landmark.d.ts +18 -25
  9. package/es/camera/Landmark.js +1 -72
  10. package/es/canvas-module.js +2 -4
  11. package/es/components/Cullable.js +3 -1
  12. package/es/components/Geometry.js +3 -1
  13. package/es/components/Renderable.js +3 -1
  14. package/es/components/Sortable.js +3 -1
  15. package/es/components/Transform.js +3 -1
  16. package/es/css/LayoutRegistry.js +3 -1
  17. package/es/css/StyleValueRegistry.d.ts +8 -0
  18. package/es/css/StyleValueRegistry.js +24 -19
  19. package/es/css/cssom/CSSColorValue.js +3 -1
  20. package/es/css/cssom/CSSGradientValue.js +8 -6
  21. package/es/css/cssom/CSSKeywordValue.js +3 -1
  22. package/es/css/cssom/CSSMathInvert.js +3 -1
  23. package/es/css/cssom/CSSMathMax.js +3 -1
  24. package/es/css/cssom/CSSMathMin.js +3 -1
  25. package/es/css/cssom/CSSMathNegate.js +3 -1
  26. package/es/css/cssom/CSSMathProduct.js +3 -1
  27. package/es/css/cssom/CSSMathSum.js +3 -1
  28. package/es/css/cssom/CSSMathValue.js +3 -1
  29. package/es/css/cssom/CSSMathVariadic.js +3 -1
  30. package/es/css/cssom/CSSNumericValue.js +3 -1
  31. package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
  32. package/es/css/cssom/CSSNumericValueType.js +3 -1
  33. package/es/css/cssom/CSSRGB.js +4 -2
  34. package/es/css/cssom/CSSStyleValue.d.ts +1 -1
  35. package/es/css/cssom/CSSStyleValue.js +3 -1
  36. package/es/css/cssom/CSSTransformComponent.js +3 -1
  37. package/es/css/cssom/CSSTransformValue.js +3 -1
  38. package/es/css/cssom/CSSTranslate.js +3 -1
  39. package/es/css/cssom/CSSUnitValue.js +4 -2
  40. package/es/css/parser/color.js +2 -2
  41. package/es/css/parser/dimension.d.ts +1 -1
  42. package/es/css/parser/dimension.js +2 -3
  43. package/es/css/parser/numeric.js +1 -1
  44. package/es/css/parser/path.d.ts +2 -2
  45. package/es/css/parser/path.js +1 -1
  46. package/es/css/parser/points.js +1 -1
  47. package/es/css/parser/transform-origin.js +1 -1
  48. package/es/css/properties/CSSPropertyAnchor.js +3 -1
  49. package/es/css/properties/CSSPropertyClipPath.js +3 -1
  50. package/es/css/properties/CSSPropertyColor.js +3 -1
  51. package/es/css/properties/CSSPropertyFilter.js +3 -1
  52. package/es/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
  53. package/es/css/properties/CSSPropertyLineDash.js +3 -1
  54. package/es/css/properties/CSSPropertyLocalPosition.js +3 -1
  55. package/es/css/properties/CSSPropertyOffsetDistance.js +3 -1
  56. package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
  57. package/es/css/properties/CSSPropertyOpacity.js +3 -1
  58. package/es/css/properties/CSSPropertyPath.d.ts +14 -2
  59. package/es/css/properties/CSSPropertyPath.js +3 -1
  60. package/es/css/properties/CSSPropertyPoints.js +3 -1
  61. package/es/css/properties/CSSPropertyShadowBlur.js +3 -1
  62. package/es/css/properties/CSSPropertyText.d.ts +1 -1
  63. package/es/css/properties/CSSPropertyText.js +4 -2
  64. package/es/css/properties/CSSPropertyTextTransform.d.ts +3 -3
  65. package/es/css/properties/CSSPropertyTextTransform.js +3 -1
  66. package/es/css/properties/CSSPropertyTransform.js +4 -3
  67. package/es/css/properties/CSSPropertyTransformOrigin.js +3 -1
  68. package/es/css/properties/CSSPropertyVisibility.js +3 -1
  69. package/es/css/properties/CSSPropertyZIndex.js +3 -1
  70. package/es/display-objects/Circle.js +3 -1
  71. package/es/display-objects/CustomElement.js +3 -1
  72. package/es/display-objects/DisplayObject.js +10 -8
  73. package/es/display-objects/Ellipse.js +3 -1
  74. package/es/display-objects/Group.js +3 -1
  75. package/es/display-objects/HTML.js +6 -3
  76. package/es/display-objects/Image.js +3 -1
  77. package/es/display-objects/Line.js +3 -1
  78. package/es/display-objects/Path.d.ts +15 -15
  79. package/es/display-objects/Path.js +5 -3
  80. package/es/display-objects/Polygon.d.ts +8 -1
  81. package/es/display-objects/Polygon.js +3 -1
  82. package/es/display-objects/Polyline.d.ts +7 -5
  83. package/es/display-objects/Polyline.js +3 -1
  84. package/es/display-objects/Rect.js +3 -1
  85. package/es/display-objects/Text.js +6 -3
  86. package/es/dom/Animation.js +4 -2
  87. package/es/dom/AnimationEffectTiming.js +3 -1
  88. package/es/dom/AnimationEvent.js +3 -1
  89. package/es/dom/AnimationTimeline.js +3 -1
  90. package/es/dom/CustomElementRegistry.js +3 -1
  91. package/es/dom/CustomEvent.js +3 -1
  92. package/es/dom/Document.js +5 -3
  93. package/es/dom/Element.js +7 -6
  94. package/es/dom/EventTarget.js +6 -4
  95. package/es/dom/FederatedEvent.js +3 -1
  96. package/es/dom/FederatedMouseEvent.js +3 -1
  97. package/es/dom/FederatedPointerEvent.js +3 -1
  98. package/es/dom/FederatedTouchEvent.d.ts +15 -0
  99. package/es/dom/FederatedTouchEvent.js +19 -0
  100. package/es/dom/FederatedWheelEvent.js +3 -1
  101. package/es/dom/KeyframeEffect.js +3 -1
  102. package/es/dom/KeyframeList.js +1 -1
  103. package/es/dom/MutationEvent.js +3 -1
  104. package/es/dom/MutationObserver.js +10 -3
  105. package/es/dom/MutationRecord.js +3 -1
  106. package/es/dom/Node.js +4 -2
  107. package/es/plugins/CullingPlugin.d.ts +0 -1
  108. package/es/plugins/CullingPlugin.js +6 -9
  109. package/es/plugins/DirtyCheckPlugin.d.ts +1 -1
  110. package/es/plugins/DirtyCheckPlugin.js +12 -9
  111. package/es/plugins/EventPlugin.d.ts +1 -1
  112. package/es/plugins/EventPlugin.js +166 -149
  113. package/es/plugins/FrustumCullingStrategy.js +3 -1
  114. package/es/plugins/PrepareRendererPlugin.d.ts +0 -1
  115. package/es/plugins/PrepareRendererPlugin.js +18 -17
  116. package/es/services/EventService.d.ts +8 -0
  117. package/es/services/EventService.js +279 -23
  118. package/es/services/OffscreenCanvasCreator.js +3 -1
  119. package/es/services/RenderingService.d.ts +17 -16
  120. package/es/services/RenderingService.js +21 -18
  121. package/es/services/SceneGraphSelector.js +3 -1
  122. package/es/services/SceneGraphService.js +4 -2
  123. package/es/services/TextService.js +5 -3
  124. package/es/services/aabb/CircleUpdater.js +3 -1
  125. package/es/services/aabb/EllipseUpdater.js +3 -1
  126. package/es/services/aabb/LineUpdater.js +3 -1
  127. package/es/services/aabb/PathUpdater.d.ts +3 -3
  128. package/es/services/aabb/PathUpdater.js +3 -1
  129. package/es/services/aabb/PolylineUpdater.d.ts +3 -3
  130. package/es/services/aabb/PolylineUpdater.js +3 -1
  131. package/es/services/aabb/RectUpdater.js +4 -2
  132. package/es/services/aabb/TextUpdater.js +3 -1
  133. package/es/shapes/AABB.js +3 -1
  134. package/es/shapes/BoundingSphere.js +3 -1
  135. package/es/shapes/Frustum.js +3 -1
  136. package/es/shapes/Plane.js +3 -1
  137. package/es/shapes/Point.js +3 -1
  138. package/es/shapes/Ray.js +3 -1
  139. package/es/shapes/Rectangle.js +3 -1
  140. package/es/types.d.ts +9 -3
  141. package/es/utils/assert.d.ts +6 -0
  142. package/es/utils/assert.js +18 -0
  143. package/es/utils/custom-easing.js +1 -1
  144. package/es/utils/event.d.ts +18 -16
  145. package/es/utils/hooks.d.ts +280 -0
  146. package/es/utils/hooks.js +753 -0
  147. package/es/utils/index.d.ts +1 -0
  148. package/es/utils/index.js +2 -1
  149. package/es/utils/math.d.ts +2 -2
  150. package/es/utils/math.js +22 -6
  151. package/es/utils/path.d.ts +1 -1
  152. package/es/utils/path.js +3 -3
  153. package/es/utils/string.d.ts +1 -0
  154. package/es/utils/string.js +8 -0
  155. package/es/utils/text.js +5 -4
  156. package/lib/AbstractRenderer.js +8 -1
  157. package/lib/Canvas.d.ts +1 -1
  158. package/lib/Canvas.js +5 -3
  159. package/lib/DisplayObjectPool.js +3 -1
  160. package/lib/camera/Camera.d.ts +105 -66
  161. package/lib/camera/Camera.js +313 -178
  162. package/lib/camera/Landmark.d.ts +18 -25
  163. package/lib/camera/Landmark.js +1 -75
  164. package/lib/canvas-module.js +1 -3
  165. package/lib/components/Cullable.js +4 -2
  166. package/lib/components/Geometry.js +3 -1
  167. package/lib/components/Renderable.js +3 -1
  168. package/lib/components/Sortable.js +3 -1
  169. package/lib/components/Transform.js +3 -1
  170. package/lib/css/LayoutRegistry.js +3 -1
  171. package/lib/css/StyleValueRegistry.d.ts +8 -0
  172. package/lib/css/StyleValueRegistry.js +27 -20
  173. package/lib/css/cssom/CSSColorValue.js +3 -1
  174. package/lib/css/cssom/CSSGradientValue.js +9 -7
  175. package/lib/css/cssom/CSSKeywordValue.js +3 -1
  176. package/lib/css/cssom/CSSMathInvert.js +3 -1
  177. package/lib/css/cssom/CSSMathMax.js +3 -1
  178. package/lib/css/cssom/CSSMathMin.js +3 -1
  179. package/lib/css/cssom/CSSMathNegate.js +3 -1
  180. package/lib/css/cssom/CSSMathOperator.js +1 -1
  181. package/lib/css/cssom/CSSMathProduct.js +3 -1
  182. package/lib/css/cssom/CSSMathSum.js +3 -1
  183. package/lib/css/cssom/CSSMathValue.js +3 -1
  184. package/lib/css/cssom/CSSMathVariadic.js +4 -2
  185. package/lib/css/cssom/CSSNumericValue.js +3 -1
  186. package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
  187. package/lib/css/cssom/CSSNumericValueType.js +5 -3
  188. package/lib/css/cssom/CSSRGB.js +4 -2
  189. package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
  190. package/lib/css/cssom/CSSStyleValue.js +4 -2
  191. package/lib/css/cssom/CSSTransformComponent.js +4 -2
  192. package/lib/css/cssom/CSSTransformValue.js +3 -1
  193. package/lib/css/cssom/CSSTranslate.js +3 -1
  194. package/lib/css/cssom/CSSUnitValue.js +4 -2
  195. package/lib/css/cssom/types.js +1 -1
  196. package/lib/css/parser/color.js +8 -8
  197. package/lib/css/parser/dimension.d.ts +1 -1
  198. package/lib/css/parser/dimension.js +8 -9
  199. package/lib/css/parser/numeric.js +6 -6
  200. package/lib/css/parser/path.d.ts +2 -2
  201. package/lib/css/parser/path.js +5 -5
  202. package/lib/css/parser/points.js +2 -2
  203. package/lib/css/parser/transform-origin.js +2 -2
  204. package/lib/css/parser/transform.js +2 -2
  205. package/lib/css/properties/CSSPropertyAnchor.js +3 -1
  206. package/lib/css/properties/CSSPropertyClipPath.js +3 -1
  207. package/lib/css/properties/CSSPropertyColor.js +3 -1
  208. package/lib/css/properties/CSSPropertyFilter.js +3 -1
  209. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
  210. package/lib/css/properties/CSSPropertyLineDash.js +3 -1
  211. package/lib/css/properties/CSSPropertyLocalPosition.js +3 -1
  212. package/lib/css/properties/CSSPropertyOffsetDistance.js +3 -1
  213. package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
  214. package/lib/css/properties/CSSPropertyOpacity.js +3 -1
  215. package/lib/css/properties/CSSPropertyPath.d.ts +14 -2
  216. package/lib/css/properties/CSSPropertyPath.js +3 -1
  217. package/lib/css/properties/CSSPropertyPoints.js +3 -1
  218. package/lib/css/properties/CSSPropertyShadowBlur.js +3 -1
  219. package/lib/css/properties/CSSPropertyText.d.ts +1 -1
  220. package/lib/css/properties/CSSPropertyText.js +4 -2
  221. package/lib/css/properties/CSSPropertyTextTransform.d.ts +3 -3
  222. package/lib/css/properties/CSSPropertyTextTransform.js +3 -1
  223. package/lib/css/properties/CSSPropertyTransform.js +3 -3
  224. package/lib/css/properties/CSSPropertyTransformOrigin.js +3 -1
  225. package/lib/css/properties/CSSPropertyVisibility.js +3 -1
  226. package/lib/css/properties/CSSPropertyZIndex.js +3 -1
  227. package/lib/display-objects/Circle.js +3 -1
  228. package/lib/display-objects/CustomElement.js +3 -1
  229. package/lib/display-objects/DisplayObject.js +13 -12
  230. package/lib/display-objects/Ellipse.js +3 -1
  231. package/lib/display-objects/Group.js +3 -1
  232. package/lib/display-objects/HTML.js +6 -4
  233. package/lib/display-objects/Image.js +3 -1
  234. package/lib/display-objects/Line.js +3 -1
  235. package/lib/display-objects/Path.d.ts +15 -15
  236. package/lib/display-objects/Path.js +7 -5
  237. package/lib/display-objects/Polygon.d.ts +8 -1
  238. package/lib/display-objects/Polygon.js +3 -1
  239. package/lib/display-objects/Polyline.d.ts +7 -5
  240. package/lib/display-objects/Polyline.js +3 -1
  241. package/lib/display-objects/Rect.js +3 -1
  242. package/lib/display-objects/Text.js +6 -4
  243. package/lib/dom/Animation.js +4 -2
  244. package/lib/dom/AnimationEffectTiming.js +3 -1
  245. package/lib/dom/AnimationEvent.js +3 -1
  246. package/lib/dom/AnimationTimeline.js +4 -2
  247. package/lib/dom/CustomElementRegistry.js +3 -1
  248. package/lib/dom/CustomEvent.js +3 -1
  249. package/lib/dom/Document.js +5 -3
  250. package/lib/dom/Element.js +7 -7
  251. package/lib/dom/EventTarget.js +14 -12
  252. package/lib/dom/FederatedEvent.js +3 -1
  253. package/lib/dom/FederatedMouseEvent.js +3 -1
  254. package/lib/dom/FederatedPointerEvent.js +3 -1
  255. package/lib/dom/FederatedTouchEvent.d.ts +15 -0
  256. package/lib/dom/FederatedTouchEvent.js +27 -0
  257. package/lib/dom/FederatedWheelEvent.js +3 -1
  258. package/lib/dom/KeyframeEffect.js +4 -2
  259. package/lib/dom/KeyframeList.js +1 -1
  260. package/lib/dom/MutationEvent.js +3 -1
  261. package/lib/dom/MutationObserver.js +11 -4
  262. package/lib/dom/MutationRecord.js +3 -1
  263. package/lib/dom/Node.js +4 -2
  264. package/lib/index.js +1 -1
  265. package/lib/plugins/CullingPlugin.d.ts +0 -1
  266. package/lib/plugins/CullingPlugin.js +7 -9
  267. package/lib/plugins/DirtyCheckPlugin.d.ts +1 -1
  268. package/lib/plugins/DirtyCheckPlugin.js +13 -9
  269. package/lib/plugins/EventPlugin.d.ts +1 -1
  270. package/lib/plugins/EventPlugin.js +175 -157
  271. package/lib/plugins/FrustumCullingStrategy.js +3 -1
  272. package/lib/plugins/PrepareRendererPlugin.d.ts +0 -1
  273. package/lib/plugins/PrepareRendererPlugin.js +17 -15
  274. package/lib/services/EventService.d.ts +8 -0
  275. package/lib/services/EventService.js +279 -22
  276. package/lib/services/OffscreenCanvasCreator.js +3 -1
  277. package/lib/services/RenderingService.d.ts +17 -16
  278. package/lib/services/RenderingService.js +22 -19
  279. package/lib/services/SceneGraphSelector.js +4 -2
  280. package/lib/services/SceneGraphService.js +8 -6
  281. package/lib/services/TextService.js +5 -3
  282. package/lib/services/aabb/CircleUpdater.js +3 -1
  283. package/lib/services/aabb/EllipseUpdater.js +3 -1
  284. package/lib/services/aabb/LineUpdater.js +3 -1
  285. package/lib/services/aabb/PathUpdater.d.ts +3 -3
  286. package/lib/services/aabb/PathUpdater.js +3 -1
  287. package/lib/services/aabb/PolylineUpdater.d.ts +3 -3
  288. package/lib/services/aabb/PolylineUpdater.js +3 -1
  289. package/lib/services/aabb/RectUpdater.js +6 -4
  290. package/lib/services/aabb/TextUpdater.js +3 -1
  291. package/lib/services/aabb/index.js +10 -10
  292. package/lib/services/aabb/interfaces.js +1 -1
  293. package/lib/shapes/AABB.js +3 -1
  294. package/lib/shapes/BoundingSphere.js +3 -1
  295. package/lib/shapes/Frustum.js +4 -2
  296. package/lib/shapes/Plane.js +3 -1
  297. package/lib/shapes/Point.js +3 -1
  298. package/lib/shapes/Ray.js +3 -1
  299. package/lib/shapes/Rectangle.js +3 -1
  300. package/lib/types.d.ts +9 -3
  301. package/lib/types.js +1 -1
  302. package/lib/utils/animation.js +3 -2
  303. package/lib/utils/assert.d.ts +6 -0
  304. package/lib/utils/assert.js +30 -0
  305. package/lib/utils/bezier-easing.js +1 -1
  306. package/lib/utils/custom-easing.js +2 -2
  307. package/lib/utils/event.d.ts +18 -16
  308. package/lib/utils/hooks.d.ts +280 -0
  309. package/lib/utils/hooks.js +759 -0
  310. package/lib/utils/index.d.ts +1 -0
  311. package/lib/utils/index.js +13 -0
  312. package/lib/utils/math.d.ts +2 -2
  313. package/lib/utils/math.js +34 -18
  314. package/lib/utils/path.d.ts +1 -1
  315. package/lib/utils/path.js +6 -6
  316. package/lib/utils/string.d.ts +1 -0
  317. package/lib/utils/string.js +11 -0
  318. package/lib/utils/text.js +7 -5
  319. package/package.json +5 -6
@@ -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 declare class Landmark {
5
+ export interface Landmark {
7
6
  name: string;
8
- private matrix;
9
- private right;
10
- private up;
11
- private forward;
12
- private position;
13
- private focalPoint;
14
- private distanceVector;
15
- private distance;
16
- private dollyingStep;
17
- private azimuth;
18
- private elevation;
19
- private roll;
20
- private relAzimuth;
21
- private relElevation;
22
- private relRoll;
23
- private zoom;
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
  }
@@ -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
+ });
@@ -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); // register(CSSCalculatorPlugin);
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.Cullable = exports.Strategy = void 0;
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 = function () {
18
+ var Cullable =
19
+ /** @class */
20
+ function () {
19
21
  function Cullable() {
20
22
  this.strategy = Strategy.Standard;
21
23
  this.visibilityPlaneMask = -1;
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Geometry = void 0;
7
7
 
8
- var Geometry = function () {
8
+ var Geometry =
9
+ /** @class */
10
+ function () {
9
11
  function Geometry() {}
10
12
 
11
13
  Geometry.tag = 'c-geometry';
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Renderable = void 0;
7
7
 
8
- var Renderable = function () {
8
+ var Renderable =
9
+ /** @class */
10
+ function () {
9
11
  function Renderable() {
10
12
  this.boundsDirty = true;
11
13
  this.renderBoundsDirty = true;
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Sortable = void 0;
7
7
 
8
- var Sortable = function () {
8
+ var Sortable =
9
+ /** @class */
10
+ function () {
9
11
  function Sortable() {
10
12
  /**
11
13
  * need to re-sort
@@ -10,7 +10,9 @@ var _glMatrix = require("gl-matrix");
10
10
  /**
11
11
  * do RTS transformation for 2D/3D
12
12
  */
13
- var Transform = function () {
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 = function () {
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: '<length> | <percentage>',
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: '<length> | <percentage>',
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: '<length> | <percentage>',
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: '<number>',
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: '<number>',
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: '<number>',
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: '<paint>',
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: '<paint>',
121
+ syntax: PropertySyntax.PAINT,
112
122
  handler: _properties.CSSPropertyColor
113
123
  }, {
114
124
  name: 'shadowColor',
115
125
  interpolable: true,
116
- syntax: '<color>',
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: '<length> | <percentage>',
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: '<length> | <percentage>',
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: '<length> | <percentage>',
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 = function () {
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 = function (_super) {
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.CSSGradientValue = exports.GradientPatternType = void 0;
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 = function (_super) {
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(" + this.value.steps.map(function (step) {
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(" + this.value.steps.map(function (step) {
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(" + this.value.src + ")";
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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
14
+ var CSSMathNegate =
15
+ /** @class */
16
+ function (_super) {
15
17
  (0, _tslib.__extends)(CSSMathNegate, _super);
16
18
 
17
19
  function CSSMathNegate(value, type) {
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isComparison = isComparison;
7
6
  exports.CSSMathOperator = void 0;
7
+ exports.isComparison = isComparison;
8
8
  var CSSMathOperator;
9
9
  exports.CSSMathOperator = CSSMathOperator;
10
10
 
@@ -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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
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 = function (_super) {
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): "" | "time" | "flex" | "percent" | "length" | "angle" | "frequency" | "resolution";
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 = function () {
137
+ var CSSNumericValueType =
138
+ /** @class */
139
+ function () {
138
140
  function CSSNumericValueType(unit, exponent) {
139
141
  if (unit === void 0) {
140
142
  unit = _.UnitType.kNumber;
@@ -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 = function (_super) {
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 + ("rgba(" + this.r + "," + this.g + "," + this.b + "," + this.alpha + ")");
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" | "s" | "px" | "deg" | "rad" | "grad" | "ms" | "rem" | "turn" | "%";
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
  /**