@antv/g-lite 1.1.0-beta.1 → 1.2.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.
package/dist/index.js CHANGED
@@ -6579,8 +6579,7 @@ var DefaultStyleValueRegistry = /** @class */ (function () {
6579
6579
  // Marker
6580
6580
  // @ts-ignore
6581
6581
  if (attributes.markerStart) {
6582
- // @ts-ignore
6583
- object.parsedStyle.markerStart = runtime.CSSPropertySyntaxFactory['<marker>'].calculator(null,
6582
+ object.parsedStyle.markerStart = this.runtime.CSSPropertySyntaxFactory['<marker>'].calculator(null,
6584
6583
  // @ts-ignore
6585
6584
  attributes.markerStart,
6586
6585
  // @ts-ignore
@@ -6588,8 +6587,7 @@ var DefaultStyleValueRegistry = /** @class */ (function () {
6588
6587
  }
6589
6588
  // @ts-ignore
6590
6589
  if (attributes.markerEnd) {
6591
- // @ts-ignore
6592
- object.parsedStyle.markerEnd = runtime.CSSPropertySyntaxFactory['<marker>'].calculator(null,
6590
+ object.parsedStyle.markerEnd = this.runtime.CSSPropertySyntaxFactory['<marker>'].calculator(null,
6593
6591
  // @ts-ignore
6594
6592
  attributes.markerEnd,
6595
6593
  // @ts-ignore
@@ -6597,8 +6595,7 @@ var DefaultStyleValueRegistry = /** @class */ (function () {
6597
6595
  }
6598
6596
  // @ts-ignore
6599
6597
  if (attributes.markerMid) {
6600
- // @ts-ignore
6601
- object.parsedStyle.markerMid = runtime.CSSPropertySyntaxFactory['<marker>'].calculator('',
6598
+ object.parsedStyle.markerMid = this.runtime.CSSPropertySyntaxFactory['<marker>'].calculator('',
6602
6599
  // @ts-ignore
6603
6600
  attributes.markerMid,
6604
6601
  // @ts-ignore
@@ -11515,7 +11512,7 @@ var TextService = /** @class */ (function () {
11515
11512
  return TextService;
11516
11513
  }());
11517
11514
 
11518
- var runtime$1 = {};
11515
+ var runtime = {};
11519
11516
  /**
11520
11517
  * Replace with IoC container
11521
11518
  */
@@ -11530,7 +11527,7 @@ var geometryUpdaterFactory = (function () {
11530
11527
  _a[exports.Shape.IMAGE] = rectUpdater,
11531
11528
  _a[exports.Shape.GROUP] = rectUpdater,
11532
11529
  _a[exports.Shape.LINE] = new LineUpdater(),
11533
- _a[exports.Shape.TEXT] = new TextUpdater(runtime$1),
11530
+ _a[exports.Shape.TEXT] = new TextUpdater(runtime),
11534
11531
  _a[exports.Shape.POLYLINE] = polylineUpdater,
11535
11532
  _a[exports.Shape.POLYGON] = polylineUpdater,
11536
11533
  _a[exports.Shape.PATH] = new PathUpdater(),
@@ -11587,25 +11584,25 @@ var getGlobalThis = function () {
11587
11584
  * Camera
11588
11585
  * `g-camera-api` will provide an advanced implementation
11589
11586
  */
11590
- runtime$1.CameraContribution = Camera;
11587
+ runtime.CameraContribution = Camera;
11591
11588
  /**
11592
11589
  * `g-web-animations-api` will provide an AnimationTimeline
11593
11590
  */
11594
- runtime$1.AnimationTimeline = null;
11595
- runtime$1.EasingFunction = null;
11596
- runtime$1.offscreenCanvas = new OffscreenCanvasCreator();
11597
- runtime$1.nativeHTMLMap = new WeakMap();
11598
- runtime$1.sceneGraphSelector = new DefaultSceneGraphSelector();
11599
- runtime$1.sceneGraphService = new DefaultSceneGraphService(runtime$1);
11600
- runtime$1.textService = new TextService(runtime$1);
11601
- runtime$1.geometryUpdaterFactory = geometryUpdaterFactory;
11602
- runtime$1.CSSPropertySyntaxFactory = CSSPropertySyntaxFactory;
11603
- runtime$1.styleValueRegistry = new DefaultStyleValueRegistry(runtime$1);
11604
- runtime$1.layoutRegistry = null;
11605
- runtime$1.globalThis = getGlobalThis();
11606
- runtime$1.enableCSSParsing = true;
11607
- runtime$1.enableDataset = false;
11608
- runtime$1.enableStyleSyntax = true;
11591
+ runtime.AnimationTimeline = null;
11592
+ runtime.EasingFunction = null;
11593
+ runtime.offscreenCanvas = new OffscreenCanvasCreator();
11594
+ runtime.nativeHTMLMap = new WeakMap();
11595
+ runtime.sceneGraphSelector = new DefaultSceneGraphSelector();
11596
+ runtime.sceneGraphService = new DefaultSceneGraphService(runtime);
11597
+ runtime.textService = new TextService(runtime);
11598
+ runtime.geometryUpdaterFactory = geometryUpdaterFactory;
11599
+ runtime.CSSPropertySyntaxFactory = CSSPropertySyntaxFactory;
11600
+ runtime.styleValueRegistry = new DefaultStyleValueRegistry(runtime);
11601
+ runtime.layoutRegistry = null;
11602
+ runtime.globalThis = getGlobalThis();
11603
+ runtime.enableCSSParsing = true;
11604
+ runtime.enableDataset = false;
11605
+ runtime.enableStyleSyntax = true;
11609
11606
 
11610
11607
  var entityCounter = 0;
11611
11608
  function resetEntityCounter() {
@@ -11693,7 +11690,7 @@ var Element = /** @class */ (function (_super) {
11693
11690
  * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
11694
11691
  */
11695
11692
  _this.style = {};
11696
- _this.computedStyle = runtime$1.enableCSSParsing
11693
+ _this.computedStyle = runtime.enableCSSParsing
11697
11694
  ? {
11698
11695
  anchor: unsetKeywordValue,
11699
11696
  opacity: unsetKeywordValue,
@@ -11848,7 +11845,7 @@ var Element = /** @class */ (function (_super) {
11848
11845
  if (child.destroyed) {
11849
11846
  throw new Error(ERROR_MSG_APPEND_DESTROYED_ELEMENT);
11850
11847
  }
11851
- runtime$1.sceneGraphService.attach(child, this, index);
11848
+ runtime.sceneGraphService.attach(child, this, index);
11852
11849
  if ((_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) {
11853
11850
  this.ownerDocument.defaultView.mountChildren(child);
11854
11851
  }
@@ -11881,7 +11878,7 @@ var Element = /** @class */ (function (_super) {
11881
11878
  child.ownerDocument.defaultView.unmountChildren(child);
11882
11879
  }
11883
11880
  // remove from scene graph
11884
- runtime$1.sceneGraphService.detach(child);
11881
+ runtime.sceneGraphService.detach(child);
11885
11882
  return child;
11886
11883
  };
11887
11884
  /**
@@ -11909,25 +11906,25 @@ var Element = /** @class */ (function (_super) {
11909
11906
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
11910
11907
  */
11911
11908
  Element.prototype.matches = function (selector) {
11912
- return runtime$1.sceneGraphService.matches(selector, this);
11909
+ return runtime.sceneGraphService.matches(selector, this);
11913
11910
  };
11914
11911
  Element.prototype.getElementById = function (id) {
11915
- return runtime$1.sceneGraphService.querySelector("#".concat(id), this);
11912
+ return runtime.sceneGraphService.querySelector("#".concat(id), this);
11916
11913
  };
11917
11914
  Element.prototype.getElementsByName = function (name) {
11918
- return runtime$1.sceneGraphService.querySelectorAll("[name=\"".concat(name, "\"]"), this);
11915
+ return runtime.sceneGraphService.querySelectorAll("[name=\"".concat(name, "\"]"), this);
11919
11916
  };
11920
11917
  Element.prototype.getElementsByClassName = function (className) {
11921
- return runtime$1.sceneGraphService.querySelectorAll(".".concat(className), this);
11918
+ return runtime.sceneGraphService.querySelectorAll(".".concat(className), this);
11922
11919
  };
11923
11920
  Element.prototype.getElementsByTagName = function (tagName) {
11924
- return runtime$1.sceneGraphService.querySelectorAll(tagName, this);
11921
+ return runtime.sceneGraphService.querySelectorAll(tagName, this);
11925
11922
  };
11926
11923
  Element.prototype.querySelector = function (selectors) {
11927
- return runtime$1.sceneGraphService.querySelector(selectors, this);
11924
+ return runtime.sceneGraphService.querySelector(selectors, this);
11928
11925
  };
11929
11926
  Element.prototype.querySelectorAll = function (selectors) {
11930
- return runtime$1.sceneGraphService.querySelectorAll(selectors, this);
11927
+ return runtime.sceneGraphService.querySelectorAll(selectors, this);
11931
11928
  };
11932
11929
  /**
11933
11930
  * should traverses the element and its parents (heading toward the document root)
@@ -11938,7 +11935,7 @@ var Element = /** @class */ (function (_super) {
11938
11935
  Element.prototype.closest = function (selectors) {
11939
11936
  var el = this;
11940
11937
  do {
11941
- if (runtime$1.sceneGraphService.matches(selectors, el))
11938
+ if (runtime.sceneGraphService.matches(selectors, el))
11942
11939
  return el;
11943
11940
  el = el.parentElement;
11944
11941
  } while (el !== null);
@@ -12064,22 +12061,22 @@ var Element = /** @class */ (function (_super) {
12064
12061
  this.destroyed = true;
12065
12062
  };
12066
12063
  Element.prototype.getGeometryBounds = function () {
12067
- return runtime$1.sceneGraphService.getGeometryBounds(this);
12064
+ return runtime.sceneGraphService.getGeometryBounds(this);
12068
12065
  };
12069
12066
  Element.prototype.getRenderBounds = function () {
12070
- return runtime$1.sceneGraphService.getBounds(this, true);
12067
+ return runtime.sceneGraphService.getBounds(this, true);
12071
12068
  };
12072
12069
  /**
12073
12070
  * get bounds in world space, account for children
12074
12071
  */
12075
12072
  Element.prototype.getBounds = function () {
12076
- return runtime$1.sceneGraphService.getBounds(this);
12073
+ return runtime.sceneGraphService.getBounds(this);
12077
12074
  };
12078
12075
  /**
12079
12076
  * get bounds in local space, account for children
12080
12077
  */
12081
12078
  Element.prototype.getLocalBounds = function () {
12082
- return runtime$1.sceneGraphService.getLocalBounds(this);
12079
+ return runtime.sceneGraphService.getLocalBounds(this);
12083
12080
  };
12084
12081
  /**
12085
12082
  * account for context's bounds in client space,
@@ -12087,7 +12084,7 @@ var Element = /** @class */ (function (_super) {
12087
12084
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
12088
12085
  */
12089
12086
  Element.prototype.getBoundingClientRect = function () {
12090
- return runtime$1.sceneGraphService.getBoundingClientRect(this);
12087
+ return runtime.sceneGraphService.getBoundingClientRect(this);
12091
12088
  };
12092
12089
  /**
12093
12090
  * @see https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getClientRects
@@ -12114,14 +12111,14 @@ var Element = /** @class */ (function (_super) {
12114
12111
  Element.prototype.getAttribute = function (name) {
12115
12112
  // @see https://github.com/antvis/G/issues/1267
12116
12113
  if (isSymbol(name)) {
12117
- return runtime$1.enableCSSParsing ? null : undefined;
12114
+ return runtime.enableCSSParsing ? null : undefined;
12118
12115
  }
12119
12116
  var value = this.attributes[name];
12120
12117
  if (value === undefined) {
12121
12118
  var attributeName = formatAttributeName(name);
12122
12119
  value = this.attributes[attributeName];
12123
12120
  // if the given attribute does not exist, the value returned will either be null or ""
12124
- return runtime$1.enableCSSParsing ? (util.isNil(value) ? null : value) : value;
12121
+ return runtime.enableCSSParsing ? (util.isNil(value) ? null : value) : value;
12125
12122
  }
12126
12123
  else {
12127
12124
  return value;
@@ -12318,18 +12315,18 @@ var DisplayObject = /** @class */ (function (_super) {
12318
12315
  _this.config.interactive === false ? 'none' : 'auto';
12319
12316
  }
12320
12317
  // merge parsed value
12321
- Object.assign(_this.parsedStyle, runtime$1.enableCSSParsing
12318
+ Object.assign(_this.parsedStyle, runtime.enableCSSParsing
12322
12319
  ? DEFAULT_PARSED_STYLE_PROPS
12323
12320
  : DEFAULT_PARSED_STYLE_PROPS_CSS_DISABLED, _this.config.initialParsedStyle);
12324
- if (runtime$1.enableCSSParsing) {
12321
+ if (runtime.enableCSSParsing) {
12325
12322
  Object.assign(_this.attributes, DEFAULT_STYLE_PROPS);
12326
12323
  }
12327
12324
  // start to process attributes
12328
12325
  _this.initAttributes(_this.config.style);
12329
- var Proxy = runtime$1.globalThis.Proxy
12330
- ? runtime$1.globalThis.Proxy
12326
+ var Proxy = runtime.globalThis.Proxy
12327
+ ? runtime.globalThis.Proxy
12331
12328
  : function () { };
12332
- if (runtime$1.enableDataset) {
12329
+ if (runtime.enableDataset) {
12333
12330
  _this.dataset = new Proxy({}, {
12334
12331
  get: function (target, name) {
12335
12332
  var formattedName = "".concat(DATASET_PREFIX).concat(kebabize(name));
@@ -12344,7 +12341,7 @@ var DisplayObject = /** @class */ (function (_super) {
12344
12341
  },
12345
12342
  });
12346
12343
  }
12347
- if (runtime$1.enableStyleSyntax) {
12344
+ if (runtime.enableStyleSyntax) {
12348
12345
  _this.style = new Proxy(
12349
12346
  // @ts-ignore
12350
12347
  {
@@ -12441,7 +12438,7 @@ var DisplayObject = /** @class */ (function (_super) {
12441
12438
  // ? INHERITABLE_STYLE_PROPS
12442
12439
  // : INHERITABLE_BASE_STYLE_PROPS,
12443
12440
  };
12444
- if (runtime$1.enableCSSParsing) {
12441
+ if (runtime.enableCSSParsing) {
12445
12442
  // @ts-ignore
12446
12443
  options.usedAttributes = INHERITABLE_STYLE_PROPS;
12447
12444
  }
@@ -12451,7 +12448,7 @@ var DisplayObject = /** @class */ (function (_super) {
12451
12448
  var attributeName = formatAttributeName(name_1);
12452
12449
  formattedAttributes[attributeName] = attributes[name_1];
12453
12450
  }
12454
- runtime$1.styleValueRegistry.processProperties(this, formattedAttributes, options);
12451
+ runtime.styleValueRegistry.processProperties(this, formattedAttributes, options);
12455
12452
  // redraw at next frame
12456
12453
  renderable.dirty = true;
12457
12454
  };
@@ -12476,7 +12473,7 @@ var DisplayObject = /** @class */ (function (_super) {
12476
12473
  var renderable = this.renderable;
12477
12474
  var oldValue = this.attributes[name];
12478
12475
  var oldParsedValue = this.parsedStyle[name];
12479
- runtime$1.styleValueRegistry.processProperties(this, (_a = {},
12476
+ runtime.styleValueRegistry.processProperties(this, (_a = {},
12480
12477
  _a[name] = value,
12481
12478
  _a), parseOptions);
12482
12479
  // redraw at next frame
@@ -12519,11 +12516,11 @@ var DisplayObject = /** @class */ (function (_super) {
12519
12516
  DisplayObject.prototype.setOrigin = function (position, y, z) {
12520
12517
  if (y === void 0) { y = 0; }
12521
12518
  if (z === void 0) { z = 0; }
12522
- runtime$1.sceneGraphService.setOrigin(this, createVec3(position, y, z));
12519
+ runtime.sceneGraphService.setOrigin(this, createVec3(position, y, z));
12523
12520
  return this;
12524
12521
  };
12525
12522
  DisplayObject.prototype.getOrigin = function () {
12526
- return runtime$1.sceneGraphService.getOrigin(this);
12523
+ return runtime.sceneGraphService.getOrigin(this);
12527
12524
  };
12528
12525
  /**
12529
12526
  * set position in world space
@@ -12531,7 +12528,7 @@ var DisplayObject = /** @class */ (function (_super) {
12531
12528
  DisplayObject.prototype.setPosition = function (position, y, z) {
12532
12529
  if (y === void 0) { y = 0; }
12533
12530
  if (z === void 0) { z = 0; }
12534
- runtime$1.sceneGraphService.setPosition(this, createVec3(position, y, z));
12531
+ runtime.sceneGraphService.setPosition(this, createVec3(position, y, z));
12535
12532
  return this;
12536
12533
  };
12537
12534
  /**
@@ -12540,7 +12537,7 @@ var DisplayObject = /** @class */ (function (_super) {
12540
12537
  DisplayObject.prototype.setLocalPosition = function (position, y, z) {
12541
12538
  if (y === void 0) { y = 0; }
12542
12539
  if (z === void 0) { z = 0; }
12543
- runtime$1.sceneGraphService.setLocalPosition(this, createVec3(position, y, z));
12540
+ runtime.sceneGraphService.setLocalPosition(this, createVec3(position, y, z));
12544
12541
  return this;
12545
12542
  };
12546
12543
  /**
@@ -12549,7 +12546,7 @@ var DisplayObject = /** @class */ (function (_super) {
12549
12546
  DisplayObject.prototype.translate = function (position, y, z) {
12550
12547
  if (y === void 0) { y = 0; }
12551
12548
  if (z === void 0) { z = 0; }
12552
- runtime$1.sceneGraphService.translate(this, createVec3(position, y, z));
12549
+ runtime.sceneGraphService.translate(this, createVec3(position, y, z));
12553
12550
  return this;
12554
12551
  };
12555
12552
  /**
@@ -12558,14 +12555,14 @@ var DisplayObject = /** @class */ (function (_super) {
12558
12555
  DisplayObject.prototype.translateLocal = function (position, y, z) {
12559
12556
  if (y === void 0) { y = 0; }
12560
12557
  if (z === void 0) { z = 0; }
12561
- runtime$1.sceneGraphService.translateLocal(this, createVec3(position, y, z));
12558
+ runtime.sceneGraphService.translateLocal(this, createVec3(position, y, z));
12562
12559
  return this;
12563
12560
  };
12564
12561
  DisplayObject.prototype.getPosition = function () {
12565
- return runtime$1.sceneGraphService.getPosition(this);
12562
+ return runtime.sceneGraphService.getPosition(this);
12566
12563
  };
12567
12564
  DisplayObject.prototype.getLocalPosition = function () {
12568
- return runtime$1.sceneGraphService.getLocalPosition(this);
12565
+ return runtime.sceneGraphService.getLocalPosition(this);
12569
12566
  };
12570
12567
  /**
12571
12568
  * compatible with G 3.0
@@ -12584,7 +12581,7 @@ var DisplayObject = /** @class */ (function (_super) {
12584
12581
  z = z || scaling;
12585
12582
  scaling = createVec3(scaling, y, z);
12586
12583
  }
12587
- runtime$1.sceneGraphService.scaleLocal(this, scaling);
12584
+ runtime.sceneGraphService.scaleLocal(this, scaling);
12588
12585
  return this;
12589
12586
  };
12590
12587
  /**
@@ -12596,100 +12593,100 @@ var DisplayObject = /** @class */ (function (_super) {
12596
12593
  z = z || scaling;
12597
12594
  scaling = createVec3(scaling, y, z);
12598
12595
  }
12599
- runtime$1.sceneGraphService.setLocalScale(this, scaling);
12596
+ runtime.sceneGraphService.setLocalScale(this, scaling);
12600
12597
  return this;
12601
12598
  };
12602
12599
  /**
12603
12600
  * get scaling in local space
12604
12601
  */
12605
12602
  DisplayObject.prototype.getLocalScale = function () {
12606
- return runtime$1.sceneGraphService.getLocalScale(this);
12603
+ return runtime.sceneGraphService.getLocalScale(this);
12607
12604
  };
12608
12605
  /**
12609
12606
  * get scaling in world space
12610
12607
  */
12611
12608
  DisplayObject.prototype.getScale = function () {
12612
- return runtime$1.sceneGraphService.getScale(this);
12609
+ return runtime.sceneGraphService.getScale(this);
12613
12610
  };
12614
12611
  /**
12615
12612
  * only return degrees of Z axis in world space
12616
12613
  */
12617
12614
  DisplayObject.prototype.getEulerAngles = function () {
12618
- var _a = tslib.__read(getEuler(glMatrix.vec3.create(), runtime$1.sceneGraphService.getWorldTransform(this)), 3), ez = _a[2];
12615
+ var _a = tslib.__read(getEuler(glMatrix.vec3.create(), runtime.sceneGraphService.getWorldTransform(this)), 3), ez = _a[2];
12619
12616
  return rad2deg(ez);
12620
12617
  };
12621
12618
  /**
12622
12619
  * only return degrees of Z axis in local space
12623
12620
  */
12624
12621
  DisplayObject.prototype.getLocalEulerAngles = function () {
12625
- var _a = tslib.__read(getEuler(glMatrix.vec3.create(), runtime$1.sceneGraphService.getLocalRotation(this)), 3), ez = _a[2];
12622
+ var _a = tslib.__read(getEuler(glMatrix.vec3.create(), runtime.sceneGraphService.getLocalRotation(this)), 3), ez = _a[2];
12626
12623
  return rad2deg(ez);
12627
12624
  };
12628
12625
  /**
12629
12626
  * set euler angles(degrees) in world space
12630
12627
  */
12631
12628
  DisplayObject.prototype.setEulerAngles = function (z) {
12632
- runtime$1.sceneGraphService.setEulerAngles(this, 0, 0, z);
12629
+ runtime.sceneGraphService.setEulerAngles(this, 0, 0, z);
12633
12630
  return this;
12634
12631
  };
12635
12632
  /**
12636
12633
  * set euler angles(degrees) in local space
12637
12634
  */
12638
12635
  DisplayObject.prototype.setLocalEulerAngles = function (z) {
12639
- runtime$1.sceneGraphService.setLocalEulerAngles(this, 0, 0, z);
12636
+ runtime.sceneGraphService.setLocalEulerAngles(this, 0, 0, z);
12640
12637
  return this;
12641
12638
  };
12642
12639
  DisplayObject.prototype.rotateLocal = function (x, y, z) {
12643
12640
  if (util.isNil(y) && util.isNil(z)) {
12644
- runtime$1.sceneGraphService.rotateLocal(this, 0, 0, x);
12641
+ runtime.sceneGraphService.rotateLocal(this, 0, 0, x);
12645
12642
  }
12646
12643
  else {
12647
- runtime$1.sceneGraphService.rotateLocal(this, x, y, z);
12644
+ runtime.sceneGraphService.rotateLocal(this, x, y, z);
12648
12645
  }
12649
12646
  return this;
12650
12647
  };
12651
12648
  DisplayObject.prototype.rotate = function (x, y, z) {
12652
12649
  if (util.isNil(y) && util.isNil(z)) {
12653
- runtime$1.sceneGraphService.rotate(this, 0, 0, x);
12650
+ runtime.sceneGraphService.rotate(this, 0, 0, x);
12654
12651
  }
12655
12652
  else {
12656
- runtime$1.sceneGraphService.rotate(this, x, y, z);
12653
+ runtime.sceneGraphService.rotate(this, x, y, z);
12657
12654
  }
12658
12655
  return this;
12659
12656
  };
12660
12657
  DisplayObject.prototype.setRotation = function (rotation, y, z, w) {
12661
- runtime$1.sceneGraphService.setRotation(this, rotation, y, z, w);
12658
+ runtime.sceneGraphService.setRotation(this, rotation, y, z, w);
12662
12659
  return this;
12663
12660
  };
12664
12661
  DisplayObject.prototype.setLocalRotation = function (rotation, y, z, w) {
12665
- runtime$1.sceneGraphService.setLocalRotation(this, rotation, y, z, w);
12662
+ runtime.sceneGraphService.setLocalRotation(this, rotation, y, z, w);
12666
12663
  return this;
12667
12664
  };
12668
12665
  DisplayObject.prototype.setLocalSkew = function (skew, y) {
12669
- runtime$1.sceneGraphService.setLocalSkew(this, skew, y);
12666
+ runtime.sceneGraphService.setLocalSkew(this, skew, y);
12670
12667
  return this;
12671
12668
  };
12672
12669
  DisplayObject.prototype.getRotation = function () {
12673
- return runtime$1.sceneGraphService.getRotation(this);
12670
+ return runtime.sceneGraphService.getRotation(this);
12674
12671
  };
12675
12672
  DisplayObject.prototype.getLocalRotation = function () {
12676
- return runtime$1.sceneGraphService.getLocalRotation(this);
12673
+ return runtime.sceneGraphService.getLocalRotation(this);
12677
12674
  };
12678
12675
  DisplayObject.prototype.getLocalSkew = function () {
12679
- return runtime$1.sceneGraphService.getLocalSkew(this);
12676
+ return runtime.sceneGraphService.getLocalSkew(this);
12680
12677
  };
12681
12678
  DisplayObject.prototype.getLocalTransform = function () {
12682
- return runtime$1.sceneGraphService.getLocalTransform(this);
12679
+ return runtime.sceneGraphService.getLocalTransform(this);
12683
12680
  };
12684
12681
  DisplayObject.prototype.getWorldTransform = function () {
12685
- return runtime$1.sceneGraphService.getWorldTransform(this);
12682
+ return runtime.sceneGraphService.getWorldTransform(this);
12686
12683
  };
12687
12684
  DisplayObject.prototype.setLocalTransform = function (transform) {
12688
- runtime$1.sceneGraphService.setLocalTransform(this, transform);
12685
+ runtime.sceneGraphService.setLocalTransform(this, transform);
12689
12686
  return this;
12690
12687
  };
12691
12688
  DisplayObject.prototype.resetLocalTransform = function () {
12692
- runtime$1.sceneGraphService.resetLocalTransform(this);
12689
+ runtime.sceneGraphService.resetLocalTransform(this);
12693
12690
  };
12694
12691
  // #endregion transformable
12695
12692
  // #region animatable
@@ -12839,7 +12836,7 @@ var DisplayObject = /** @class */ (function (_super) {
12839
12836
  * @deprecated
12840
12837
  */
12841
12838
  DisplayObject.prototype.show = function () {
12842
- if (runtime$1.enableCSSParsing) {
12839
+ if (runtime.enableCSSParsing) {
12843
12840
  this.style.visibility = 'visible';
12844
12841
  }
12845
12842
  else {
@@ -12853,7 +12850,7 @@ var DisplayObject = /** @class */ (function (_super) {
12853
12850
  * @deprecated
12854
12851
  */
12855
12852
  DisplayObject.prototype.hide = function () {
12856
- if (runtime$1.enableCSSParsing) {
12853
+ if (runtime.enableCSSParsing) {
12857
12854
  this.style.visibility = 'hidden';
12858
12855
  }
12859
12856
  else {
@@ -13045,7 +13042,7 @@ var CSS = {
13045
13042
  */
13046
13043
  registerProperty: function (definition) {
13047
13044
  var name = definition.name, inherits = definition.inherits, interpolable = definition.interpolable, initialValue = definition.initialValue, syntax = definition.syntax;
13048
- runtime$1.styleValueRegistry.registerMetadata({
13045
+ runtime.styleValueRegistry.registerMetadata({
13049
13046
  n: name,
13050
13047
  inh: inherits,
13051
13048
  int: interpolable,
@@ -13061,7 +13058,7 @@ var CSS = {
13061
13058
  * @see https://developer.mozilla.org/en-US/docs/Web/Guide/Houdini#css_layout_api
13062
13059
  */
13063
13060
  registerLayout: function (name, clazz) {
13064
- runtime$1.layoutRegistry.registerLayout(name, clazz);
13061
+ runtime.layoutRegistry.registerLayout(name, clazz);
13065
13062
  },
13066
13063
  };
13067
13064
 
@@ -13070,10 +13067,10 @@ var Circle = /** @class */ (function (_super) {
13070
13067
  function Circle(_a) {
13071
13068
  if (_a === void 0) { _a = {}; }
13072
13069
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13073
- return _super.call(this, tslib.__assign({ type: exports.Shape.CIRCLE, style: runtime$1.enableCSSParsing
13070
+ return _super.call(this, tslib.__assign({ type: exports.Shape.CIRCLE, style: runtime.enableCSSParsing
13074
13071
  ? tslib.__assign({ cx: '', cy: '', r: '' }, style) : tslib.__assign({}, style), initialParsedStyle: {
13075
13072
  anchor: [0.5, 0.5],
13076
- transformOrigin: runtime$1.enableCSSParsing
13073
+ transformOrigin: runtime.enableCSSParsing
13077
13074
  ? null
13078
13075
  : [PECENTAGE_50, PECENTAGE_50],
13079
13076
  } }, rest)) || this;
@@ -13092,7 +13089,7 @@ var CustomElement = /** @class */ (function (_super) {
13092
13089
  if (_a === void 0) { _a = {}; }
13093
13090
  var _this = this;
13094
13091
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13095
- _this = _super.call(this, tslib.__assign({ style: runtime$1.enableCSSParsing
13092
+ _this = _super.call(this, tslib.__assign({ style: runtime.enableCSSParsing
13096
13093
  ? tslib.__assign({ x: '', y: '' }, style) : tslib.__assign({}, style) }, rest)) || this;
13097
13094
  // static get observedAttributes(): string[] {
13098
13095
  // return [];
@@ -13108,10 +13105,10 @@ var Ellipse = /** @class */ (function (_super) {
13108
13105
  function Ellipse(_a) {
13109
13106
  if (_a === void 0) { _a = {}; }
13110
13107
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13111
- return _super.call(this, tslib.__assign({ type: exports.Shape.ELLIPSE, style: runtime$1.enableCSSParsing
13108
+ return _super.call(this, tslib.__assign({ type: exports.Shape.ELLIPSE, style: runtime.enableCSSParsing
13112
13109
  ? tslib.__assign({ cx: '', cy: '', rx: '', ry: '' }, style) : tslib.__assign({}, style), initialParsedStyle: {
13113
13110
  anchor: [0.5, 0.5],
13114
- transformOrigin: runtime$1.enableCSSParsing
13111
+ transformOrigin: runtime.enableCSSParsing
13115
13112
  ? null
13116
13113
  : [PECENTAGE_50, PECENTAGE_50],
13117
13114
  } }, rest)) || this;
@@ -13134,7 +13131,7 @@ var Group = /** @class */ (function (_super) {
13134
13131
  function Group(_a) {
13135
13132
  if (_a === void 0) { _a = {}; }
13136
13133
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13137
- return _super.call(this, tslib.__assign({ type: exports.Shape.GROUP, style: runtime$1.enableCSSParsing
13134
+ return _super.call(this, tslib.__assign({ type: exports.Shape.GROUP, style: runtime.enableCSSParsing
13138
13135
  ? tslib.__assign({ x: '', y: '', width: '', height: '' }, style) : tslib.__assign({}, style) }, rest)) || this;
13139
13136
  }
13140
13137
  return Group;
@@ -13150,7 +13147,7 @@ var HTML = /** @class */ (function (_super) {
13150
13147
  if (_a === void 0) { _a = {}; }
13151
13148
  var _this = this;
13152
13149
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13153
- _this = _super.call(this, tslib.__assign({ type: exports.Shape.HTML, style: runtime$1.enableCSSParsing
13150
+ _this = _super.call(this, tslib.__assign({ type: exports.Shape.HTML, style: runtime.enableCSSParsing
13154
13151
  ? tslib.__assign({ x: '', y: '', width: 'auto', height: 'auto', innerHTML: '' }, style) : tslib.__assign({}, style) }, rest)) || this;
13155
13152
  _this.cullable.enable = false;
13156
13153
  return _this;
@@ -13212,7 +13209,7 @@ var Image = /** @class */ (function (_super) {
13212
13209
  function Image(_a) {
13213
13210
  if (_a === void 0) { _a = {}; }
13214
13211
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13215
- return _super.call(this, tslib.__assign({ type: exports.Shape.IMAGE, style: runtime$1.enableCSSParsing
13212
+ return _super.call(this, tslib.__assign({ type: exports.Shape.IMAGE, style: runtime.enableCSSParsing
13216
13213
  ? tslib.__assign({ x: '', y: '', img: '', width: '', height: '' }, style) : tslib.__assign({}, style) }, rest)) || this;
13217
13214
  }
13218
13215
  return Image;
@@ -13341,8 +13338,8 @@ var Path = /** @class */ (function (_super) {
13341
13338
  if (_a === void 0) { _a = {}; }
13342
13339
  var _this = this;
13343
13340
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13344
- _this = _super.call(this, tslib.__assign({ type: exports.Shape.PATH, style: runtime$1.enableCSSParsing
13345
- ? tslib.__assign({ path: '', miterLimit: '' }, style) : tslib.__assign({}, style), initialParsedStyle: runtime$1.enableCSSParsing
13341
+ _this = _super.call(this, tslib.__assign({ type: exports.Shape.PATH, style: runtime.enableCSSParsing
13342
+ ? tslib.__assign({ path: '', miterLimit: '' }, style) : tslib.__assign({}, style), initialParsedStyle: runtime.enableCSSParsing
13346
13343
  ? null
13347
13344
  : {
13348
13345
  miterLimit: 4,
@@ -13542,8 +13539,8 @@ var Polygon = /** @class */ (function (_super) {
13542
13539
  if (_a === void 0) { _a = {}; }
13543
13540
  var _this = this;
13544
13541
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13545
- _this = _super.call(this, tslib.__assign({ type: exports.Shape.POLYGON, style: runtime$1.enableCSSParsing
13546
- ? tslib.__assign({ points: '', miterLimit: '', isClosed: true }, style) : tslib.__assign({}, style), initialParsedStyle: runtime$1.enableCSSParsing
13542
+ _this = _super.call(this, tslib.__assign({ type: exports.Shape.POLYGON, style: runtime.enableCSSParsing
13543
+ ? tslib.__assign({ points: '', miterLimit: '', isClosed: true }, style) : tslib.__assign({}, style), initialParsedStyle: runtime.enableCSSParsing
13547
13544
  ? null
13548
13545
  : {
13549
13546
  points: {
@@ -13686,8 +13683,8 @@ var Polyline = /** @class */ (function (_super) {
13686
13683
  function Polyline(_a) {
13687
13684
  if (_a === void 0) { _a = {}; }
13688
13685
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13689
- return _super.call(this, tslib.__assign({ type: exports.Shape.POLYLINE, style: runtime$1.enableCSSParsing
13690
- ? tslib.__assign({ points: '', miterLimit: '', isClosed: false }, style) : tslib.__assign({}, style), initialParsedStyle: runtime$1.enableCSSParsing
13686
+ return _super.call(this, tslib.__assign({ type: exports.Shape.POLYLINE, style: runtime.enableCSSParsing
13687
+ ? tslib.__assign({ points: '', miterLimit: '', isClosed: false }, style) : tslib.__assign({}, style), initialParsedStyle: runtime.enableCSSParsing
13691
13688
  ? null
13692
13689
  : {
13693
13690
  points: {
@@ -13745,7 +13742,7 @@ var Rect = /** @class */ (function (_super) {
13745
13742
  function Rect(_a) {
13746
13743
  if (_a === void 0) { _a = {}; }
13747
13744
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13748
- return _super.call(this, tslib.__assign({ type: exports.Shape.RECT, style: runtime$1.enableCSSParsing
13745
+ return _super.call(this, tslib.__assign({ type: exports.Shape.RECT, style: runtime.enableCSSParsing
13749
13746
  ? tslib.__assign({ x: '', y: '', width: '', height: '', radius: '' }, style) : tslib.__assign({}, style) }, rest)) || this;
13750
13747
  }
13751
13748
  return Rect;
@@ -13765,10 +13762,10 @@ var Text = /** @class */ (function (_super) {
13765
13762
  function Text(_a) {
13766
13763
  if (_a === void 0) { _a = {}; }
13767
13764
  var style = _a.style, rest = tslib.__rest(_a, ["style"]);
13768
- return _super.call(this, tslib.__assign({ type: exports.Shape.TEXT, style: runtime$1.enableCSSParsing
13765
+ return _super.call(this, tslib.__assign({ type: exports.Shape.TEXT, style: runtime.enableCSSParsing
13769
13766
  ? tslib.__assign({ x: '', y: '', text: '', fontSize: '', fontFamily: '', fontStyle: '', fontWeight: '', fontVariant: '', textAlign: '', textBaseline: '', textTransform: '', fill: 'black', letterSpacing: '', lineHeight: '', miterLimit: '',
13770
13767
  // whiteSpace: 'pre',
13771
- wordWrap: false, wordWrapWidth: 0, leading: 0, dx: '', dy: '', isBillboard: false, sizeAttenuation: true }, style) : tslib.__assign({ fill: 'black' }, style), initialParsedStyle: runtime$1.enableCSSParsing
13768
+ wordWrap: false, wordWrapWidth: 0, leading: 0, dx: '', dy: '', isBillboard: false, sizeAttenuation: true }, style) : tslib.__assign({ fill: 'black' }, style), initialParsedStyle: runtime.enableCSSParsing
13772
13769
  ? {}
13773
13770
  : {
13774
13771
  x: 0,
@@ -13884,7 +13881,7 @@ var Document = /** @class */ (function (_super) {
13884
13881
  _this.nodeName = 'document';
13885
13882
  // create timeline
13886
13883
  try {
13887
- _this.timeline = new runtime$1.AnimationTimeline(_this);
13884
+ _this.timeline = new runtime.AnimationTimeline(_this);
13888
13885
  }
13889
13886
  catch (e) { }
13890
13887
  /**
@@ -14768,11 +14765,11 @@ var PrepareRendererPlugin = /** @class */ (function () {
14768
14765
  };
14769
14766
  var handleMounted = function (e) {
14770
14767
  var object = e.target;
14771
- if (runtime$1.enableCSSParsing) {
14768
+ if (runtime.enableCSSParsing) {
14772
14769
  // recalc style values
14773
- runtime$1.styleValueRegistry.recalc(object);
14770
+ runtime.styleValueRegistry.recalc(object);
14774
14771
  }
14775
- runtime$1.sceneGraphService.dirtifyToRoot(object);
14772
+ runtime.sceneGraphService.dirtifyToRoot(object);
14776
14773
  renderingService.dirtify();
14777
14774
  };
14778
14775
  var handleUnmounted = function (e) {
@@ -14782,7 +14779,7 @@ var PrepareRendererPlugin = /** @class */ (function () {
14782
14779
  _this.rBush.remove(rBushNode.aabb);
14783
14780
  }
14784
14781
  _this.toSync.delete(object);
14785
- runtime$1.sceneGraphService.dirtifyToRoot(object);
14782
+ runtime.sceneGraphService.dirtifyToRoot(object);
14786
14783
  renderingService.dirtify();
14787
14784
  };
14788
14785
  renderingService.hooks.init.tap(PrepareRendererPlugin.tag, function () {
@@ -14931,29 +14928,29 @@ var Canvas = /** @class */ (function (_super) {
14931
14928
  */
14932
14929
  _this.devicePixelRatio = dpr;
14933
14930
  _this.requestAnimationFrame =
14934
- requestAnimationFrame !== null && requestAnimationFrame !== void 0 ? requestAnimationFrame : raf.bind(runtime$1.globalThis);
14931
+ requestAnimationFrame !== null && requestAnimationFrame !== void 0 ? requestAnimationFrame : raf.bind(runtime.globalThis);
14935
14932
  _this.cancelAnimationFrame =
14936
- cancelAnimationFrame !== null && cancelAnimationFrame !== void 0 ? cancelAnimationFrame : caf.bind(runtime$1.globalThis);
14933
+ cancelAnimationFrame !== null && cancelAnimationFrame !== void 0 ? cancelAnimationFrame : caf.bind(runtime.globalThis);
14937
14934
  /**
14938
14935
  * limits query
14939
14936
  */
14940
14937
  // the following feature-detect from hammer.js
14941
14938
  // @see https://github.com/hammerjs/hammer.js/blob/master/src/inputjs/input-consts.js#L5
14942
14939
  _this.supportsTouchEvents =
14943
- supportsTouchEvents !== null && supportsTouchEvents !== void 0 ? supportsTouchEvents : 'ontouchstart' in runtime$1.globalThis;
14940
+ supportsTouchEvents !== null && supportsTouchEvents !== void 0 ? supportsTouchEvents : 'ontouchstart' in runtime.globalThis;
14944
14941
  _this.supportsPointerEvents =
14945
- supportsPointerEvents !== null && supportsPointerEvents !== void 0 ? supportsPointerEvents : !!runtime$1.globalThis.PointerEvent;
14942
+ supportsPointerEvents !== null && supportsPointerEvents !== void 0 ? supportsPointerEvents : !!runtime.globalThis.PointerEvent;
14946
14943
  _this.isTouchEvent =
14947
14944
  isTouchEvent !== null && isTouchEvent !== void 0 ? isTouchEvent : (function (event) {
14948
14945
  return _this.supportsTouchEvents &&
14949
- event instanceof runtime$1.globalThis.TouchEvent;
14946
+ event instanceof runtime.globalThis.TouchEvent;
14950
14947
  });
14951
14948
  _this.isMouseEvent =
14952
14949
  isMouseEvent !== null && isMouseEvent !== void 0 ? isMouseEvent : (function (event) {
14953
- return !runtime$1.globalThis.MouseEvent ||
14954
- (event instanceof runtime$1.globalThis.MouseEvent &&
14950
+ return !runtime.globalThis.MouseEvent ||
14951
+ (event instanceof runtime.globalThis.MouseEvent &&
14955
14952
  (!_this.supportsPointerEvents ||
14956
- !(event instanceof runtime$1.globalThis.PointerEvent)));
14953
+ !(event instanceof runtime.globalThis.PointerEvent)));
14957
14954
  });
14958
14955
  _this.initRenderingContext({
14959
14956
  container: container,
@@ -14993,7 +14990,7 @@ var Canvas = /** @class */ (function (_super) {
14993
14990
  Canvas.prototype.initDefaultCamera = function (width, height) {
14994
14991
  var _this = this;
14995
14992
  // set a default ortho camera
14996
- var camera = new runtime$1.CameraContribution();
14993
+ var camera = new runtime.CameraContribution();
14997
14994
  camera
14998
14995
  .setType(exports.CameraType.EXPLORING, exports.CameraTrackingMode.DEFAULT)
14999
14996
  .setPosition(width / 2, height / 2, DEFAULT_CAMERA_Z)
@@ -15186,11 +15183,11 @@ var Canvas = /** @class */ (function (_super) {
15186
15183
  //
15187
15184
  this.loadRendererContainerModule(renderer);
15188
15185
  // init context service
15189
- this.context.contextService = new this.context.ContextService(tslib.__assign(tslib.__assign({}, runtime$1), this.context));
15186
+ this.context.contextService = new this.context.ContextService(tslib.__assign(tslib.__assign({}, runtime), this.context));
15190
15187
  // init rendering service
15191
- this.context.renderingService = new RenderingService(runtime$1, this.context);
15188
+ this.context.renderingService = new RenderingService(runtime, this.context);
15192
15189
  // init event service
15193
- this.context.eventService = new EventService(runtime$1, this.context);
15190
+ this.context.eventService = new EventService(runtime, this.context);
15194
15191
  this.context.eventService.init();
15195
15192
  if (this.context.contextService.init) {
15196
15193
  this.context.contextService.init();
@@ -15247,7 +15244,7 @@ var Canvas = /** @class */ (function (_super) {
15247
15244
  var plugins = renderer.getPlugins();
15248
15245
  plugins.forEach(function (plugin) {
15249
15246
  plugin.context = _this.context;
15250
- plugin.init(runtime$1);
15247
+ plugin.init(runtime);
15251
15248
  });
15252
15249
  };
15253
15250
  Canvas.prototype.setRenderer = function (renderer) {
@@ -15262,7 +15259,7 @@ var Canvas = /** @class */ (function (_super) {
15262
15259
  this.destroy(false, true);
15263
15260
  // destroy all plugins, reverse will mutate origin array
15264
15261
  tslib.__spreadArray([], tslib.__read(oldRenderer === null || oldRenderer === void 0 ? void 0 : oldRenderer.getPlugins()), false).reverse().forEach(function (plugin) {
15265
- plugin.destroy(runtime$1);
15262
+ plugin.destroy(runtime);
15266
15263
  });
15267
15264
  this.initRenderer(renderer);
15268
15265
  };
@@ -15443,7 +15440,7 @@ exports.parsedTransformToMat4 = parsedTransformToMat4;
15443
15440
  exports.propertyMetadataCache = propertyMetadataCache;
15444
15441
  exports.rad2deg = rad2deg;
15445
15442
  exports.resetEntityCounter = resetEntityCounter;
15446
- exports.runtime = runtime$1;
15443
+ exports.runtime = runtime;
15447
15444
  exports.setDOMSize = setDOMSize;
15448
15445
  exports.translatePathToString = translatePathToString;
15449
15446
  exports.turn2deg = turn2deg;