@visactor/vrender-core 0.17.8-alpha.0 → 0.17.9

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 (55) hide show
  1. package/cjs/canvas/conical-gradient.d.ts +10 -5
  2. package/cjs/canvas/conical-gradient.js +21 -14
  3. package/cjs/canvas/conical-gradient.js.map +1 -1
  4. package/cjs/core/graphic-utils.d.ts +2 -1
  5. package/cjs/core/graphic-utils.js +29 -1
  6. package/cjs/core/graphic-utils.js.map +1 -1
  7. package/cjs/env-check.d.ts +2 -2
  8. package/cjs/env-check.js +19 -2
  9. package/cjs/env-check.js.map +1 -1
  10. package/cjs/graphic/rect.d.ts +1 -1
  11. package/cjs/graphic/rect.js +7 -2
  12. package/cjs/graphic/rect.js.map +1 -1
  13. package/cjs/graphic/text.d.ts +1 -0
  14. package/cjs/graphic/text.js +7 -4
  15. package/cjs/graphic/text.js.map +1 -1
  16. package/cjs/interface/core.d.ts +2 -1
  17. package/cjs/interface/core.js.map +1 -1
  18. package/cjs/modules.d.ts +1 -0
  19. package/cjs/modules.js +11 -5
  20. package/cjs/modules.js.map +1 -1
  21. package/cjs/picker/pick-modules.js +3 -2
  22. package/cjs/picker/pick-modules.js.map +1 -1
  23. package/cjs/render/contributions/render/area-render.js +2 -2
  24. package/cjs/render/contributions/render/area-render.js.map +1 -1
  25. package/cjs/render/contributions/render/draw-contribution.js +2 -2
  26. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  27. package/dist/index.js +257 -152
  28. package/dist/index.min.js +1 -1
  29. package/es/canvas/conical-gradient.d.ts +10 -5
  30. package/es/canvas/conical-gradient.js +21 -16
  31. package/es/canvas/conical-gradient.js.map +1 -1
  32. package/es/core/graphic-utils.d.ts +2 -1
  33. package/es/core/graphic-utils.js +32 -0
  34. package/es/core/graphic-utils.js.map +1 -1
  35. package/es/env-check.d.ts +2 -2
  36. package/es/env-check.js +19 -2
  37. package/es/env-check.js.map +1 -1
  38. package/es/graphic/rect.d.ts +1 -1
  39. package/es/graphic/rect.js +9 -1
  40. package/es/graphic/rect.js.map +1 -1
  41. package/es/graphic/text.d.ts +1 -0
  42. package/es/graphic/text.js +7 -4
  43. package/es/graphic/text.js.map +1 -1
  44. package/es/interface/core.d.ts +2 -1
  45. package/es/interface/core.js.map +1 -1
  46. package/es/modules.d.ts +1 -0
  47. package/es/modules.js +9 -3
  48. package/es/modules.js.map +1 -1
  49. package/es/picker/pick-modules.js +4 -4
  50. package/es/picker/pick-modules.js.map +1 -1
  51. package/es/render/contributions/render/area-render.js +2 -2
  52. package/es/render/contributions/render/area-render.js.map +1 -1
  53. package/es/render/contributions/render/draw-contribution.js +2 -2
  54. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  55. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -4439,6 +4439,123 @@
4439
4439
  }
4440
4440
  const canvasAllocate = new DefaultCanvasAllocate();
4441
4441
 
4442
+ const VWindow = Symbol.for('VWindow');
4443
+ const WindowHandlerContribution = Symbol.for('WindowHandlerContribution');
4444
+ exports.DefaultWindow = class DefaultWindow {
4445
+ get width() {
4446
+ if (this._handler) {
4447
+ const wh = this._handler.getWH();
4448
+ return (this._width = wh.width);
4449
+ }
4450
+ return this._width;
4451
+ }
4452
+ get height() {
4453
+ if (this._handler) {
4454
+ const wh = this._handler.getWH();
4455
+ return (this._height = wh.height);
4456
+ }
4457
+ return this._height;
4458
+ }
4459
+ get dpr() {
4460
+ return this._handler.getDpr();
4461
+ }
4462
+ constructor() {
4463
+ this.hooks = {
4464
+ onChange: new SyncHook(['x', 'y', 'width', 'height'])
4465
+ };
4466
+ this._uid = Generator.GenAutoIncrementId();
4467
+ this.global = application.global;
4468
+ this.postInit();
4469
+ }
4470
+ postInit() {
4471
+ this.global.hooks.onSetEnv.tap('window', () => {
4472
+ this.active();
4473
+ });
4474
+ this.active();
4475
+ }
4476
+ active() {
4477
+ const global = this.global;
4478
+ if (!global.env || this.actived) {
4479
+ return;
4480
+ }
4481
+ const handler = container.getNamed(WindowHandlerContribution, global.env);
4482
+ handler.configure(this, global);
4483
+ this.actived = true;
4484
+ }
4485
+ get style() {
4486
+ return this._handler.getStyle();
4487
+ }
4488
+ set style(style) {
4489
+ this._handler.setStyle(style);
4490
+ }
4491
+ create(params) {
4492
+ this._handler.createWindow(params);
4493
+ const windowWH = this._handler.getWH();
4494
+ this._width = windowWH.width;
4495
+ this._height = windowWH.height;
4496
+ this.title = this._handler.getTitle();
4497
+ this.resizable = true;
4498
+ }
4499
+ setWindowHandler(handler) {
4500
+ this._handler = handler;
4501
+ }
4502
+ setDpr(dpr) {
4503
+ return this._handler.setDpr(dpr);
4504
+ }
4505
+ resize(w, h) {
4506
+ return this._handler.resizeWindow(w, h);
4507
+ }
4508
+ configure() {
4509
+ throw new Error('暂不支持');
4510
+ }
4511
+ release() {
4512
+ return this._handler.releaseWindow();
4513
+ }
4514
+ getContext() {
4515
+ return this._handler.getContext();
4516
+ }
4517
+ getNativeHandler() {
4518
+ return this._handler.getNativeHandler();
4519
+ }
4520
+ getImageBuffer(type) {
4521
+ if (!this._handler.getImageBuffer) {
4522
+ return null;
4523
+ }
4524
+ return this._handler.getImageBuffer(type);
4525
+ }
4526
+ addEventListener(type, listener, options) {
4527
+ return this._handler.addEventListener(type, listener, options);
4528
+ }
4529
+ removeEventListener(type, listener, options) {
4530
+ return this._handler.removeEventListener(type, listener, options);
4531
+ }
4532
+ dispatchEvent(event) {
4533
+ return this._handler.dispatchEvent(event);
4534
+ }
4535
+ getBoundingClientRect() {
4536
+ return this._handler.getBoundingClientRect();
4537
+ }
4538
+ getContainer() {
4539
+ return this._handler.container;
4540
+ }
4541
+ clearViewBox(viewBox, color) {
4542
+ this._handler.clearViewBox(viewBox, color);
4543
+ }
4544
+ isVisible(bbox) {
4545
+ return this._handler.isVisible(bbox);
4546
+ }
4547
+ onVisibleChange(cb) {
4548
+ return this._handler.onVisibleChange(cb);
4549
+ }
4550
+ getTopLeft(baseWindow) {
4551
+ return this._handler.getTopLeft(baseWindow);
4552
+ }
4553
+ };
4554
+ exports.DefaultWindow = __decorate([
4555
+ injectable(),
4556
+ __metadata("design:paramtypes", [])
4557
+ ], exports.DefaultWindow);
4558
+
4442
4559
  exports.DefaultGraphicUtil = class DefaultGraphicUtil {
4443
4560
  get canvas() {
4444
4561
  this.tryInitCanvas();
@@ -4501,6 +4618,46 @@
4501
4618
  fontSize: DefaultTextStyle.fontSize
4502
4619
  }, getCanvasForMeasure: getCanvasForMeasure || (() => this.canvas), getTextBounds: undefined, specialCharSet: '-/: .,@%\'"~' + vutils.TextMeasure.ALPHABET_CHAR_SET + vutils.TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
4503
4620
  }
4621
+ drawGraphicToCanvas(graphic, stage, canvas) {
4622
+ if (!stage.defaultLayer) {
4623
+ return null;
4624
+ }
4625
+ const window = container.get(VWindow);
4626
+ const bounds = graphic.AABBBounds;
4627
+ const width = bounds.width();
4628
+ const height = bounds.height();
4629
+ window.create({
4630
+ width,
4631
+ height,
4632
+ canvas,
4633
+ dpr: stage.window.dpr,
4634
+ canvasControled: true,
4635
+ offscreen: true,
4636
+ title: ''
4637
+ });
4638
+ const x = -bounds.x1;
4639
+ const y = -bounds.y1;
4640
+ const disableCheckGraphicWidthOutRange = stage.params.optimize.disableCheckGraphicWidthOutRange;
4641
+ stage.params.optimize.disableCheckGraphicWidthOutRange = true;
4642
+ stage.defaultLayer.getNativeHandler().drawTo(window, [graphic], {
4643
+ x,
4644
+ y,
4645
+ width,
4646
+ height,
4647
+ stage,
4648
+ layer: stage.defaultLayer,
4649
+ renderService: stage.renderService,
4650
+ background: 'transparent',
4651
+ clear: true,
4652
+ updateBounds: false
4653
+ });
4654
+ stage.params.optimize.disableCheckGraphicWidthOutRange = disableCheckGraphicWidthOutRange;
4655
+ const c = window.getNativeHandler();
4656
+ if (c.nativeCanvas) {
4657
+ return c.nativeCanvas;
4658
+ }
4659
+ return null;
4660
+ }
4504
4661
  };
4505
4662
  exports.DefaultGraphicUtil = __decorate([
4506
4663
  injectable(),
@@ -12643,123 +12800,6 @@
12643
12800
  __metadata("design:paramtypes", [])
12644
12801
  ], exports.DefaultLayerService);
12645
12802
 
12646
- const VWindow = Symbol.for('VWindow');
12647
- const WindowHandlerContribution = Symbol.for('WindowHandlerContribution');
12648
- exports.DefaultWindow = class DefaultWindow {
12649
- get width() {
12650
- if (this._handler) {
12651
- const wh = this._handler.getWH();
12652
- return (this._width = wh.width);
12653
- }
12654
- return this._width;
12655
- }
12656
- get height() {
12657
- if (this._handler) {
12658
- const wh = this._handler.getWH();
12659
- return (this._height = wh.height);
12660
- }
12661
- return this._height;
12662
- }
12663
- get dpr() {
12664
- return this._handler.getDpr();
12665
- }
12666
- constructor() {
12667
- this.hooks = {
12668
- onChange: new SyncHook(['x', 'y', 'width', 'height'])
12669
- };
12670
- this._uid = Generator.GenAutoIncrementId();
12671
- this.global = application.global;
12672
- this.postInit();
12673
- }
12674
- postInit() {
12675
- this.global.hooks.onSetEnv.tap('window', () => {
12676
- this.active();
12677
- });
12678
- this.active();
12679
- }
12680
- active() {
12681
- const global = this.global;
12682
- if (!global.env || this.actived) {
12683
- return;
12684
- }
12685
- const handler = container.getNamed(WindowHandlerContribution, global.env);
12686
- handler.configure(this, global);
12687
- this.actived = true;
12688
- }
12689
- get style() {
12690
- return this._handler.getStyle();
12691
- }
12692
- set style(style) {
12693
- this._handler.setStyle(style);
12694
- }
12695
- create(params) {
12696
- this._handler.createWindow(params);
12697
- const windowWH = this._handler.getWH();
12698
- this._width = windowWH.width;
12699
- this._height = windowWH.height;
12700
- this.title = this._handler.getTitle();
12701
- this.resizable = true;
12702
- }
12703
- setWindowHandler(handler) {
12704
- this._handler = handler;
12705
- }
12706
- setDpr(dpr) {
12707
- return this._handler.setDpr(dpr);
12708
- }
12709
- resize(w, h) {
12710
- return this._handler.resizeWindow(w, h);
12711
- }
12712
- configure() {
12713
- throw new Error('暂不支持');
12714
- }
12715
- release() {
12716
- return this._handler.releaseWindow();
12717
- }
12718
- getContext() {
12719
- return this._handler.getContext();
12720
- }
12721
- getNativeHandler() {
12722
- return this._handler.getNativeHandler();
12723
- }
12724
- getImageBuffer(type) {
12725
- if (!this._handler.getImageBuffer) {
12726
- return null;
12727
- }
12728
- return this._handler.getImageBuffer(type);
12729
- }
12730
- addEventListener(type, listener, options) {
12731
- return this._handler.addEventListener(type, listener, options);
12732
- }
12733
- removeEventListener(type, listener, options) {
12734
- return this._handler.removeEventListener(type, listener, options);
12735
- }
12736
- dispatchEvent(event) {
12737
- return this._handler.dispatchEvent(event);
12738
- }
12739
- getBoundingClientRect() {
12740
- return this._handler.getBoundingClientRect();
12741
- }
12742
- getContainer() {
12743
- return this._handler.container;
12744
- }
12745
- clearViewBox(viewBox, color) {
12746
- this._handler.clearViewBox(viewBox, color);
12747
- }
12748
- isVisible(bbox) {
12749
- return this._handler.isVisible(bbox);
12750
- }
12751
- onVisibleChange(cb) {
12752
- return this._handler.onVisibleChange(cb);
12753
- }
12754
- getTopLeft(baseWindow) {
12755
- return this._handler.getTopLeft(baseWindow);
12756
- }
12757
- };
12758
- exports.DefaultWindow = __decorate([
12759
- injectable(),
12760
- __metadata("design:paramtypes", [])
12761
- ], exports.DefaultWindow);
12762
-
12763
12803
  var coreModule = new ContainerModule(bind => {
12764
12804
  bind(VGlobal).to(exports.DefaultGlobal).inSingletonScope();
12765
12805
  bind(VWindow).to(exports.DefaultWindow);
@@ -13084,8 +13124,17 @@
13084
13124
  return ConicalCanvas.ctx;
13085
13125
  }
13086
13126
  }
13087
- class ColorInterpolate {
13127
+ class ColorInterpolate extends vutils.LRU {
13128
+ static getInstance() {
13129
+ if (!ColorInterpolate._instance) {
13130
+ ColorInterpolate._instance = new ColorInterpolate();
13131
+ }
13132
+ return ColorInterpolate._instance;
13133
+ }
13088
13134
  constructor(stops = [], precision = 100) {
13135
+ super();
13136
+ this.cacheParams = { CLEAN_THRESHOLD: 100, L_TIME: 1e3 };
13137
+ this.dataMap = new Map();
13089
13138
  const canvas = ConicalCanvas.GetCanvas();
13090
13139
  const conicalCtx = ConicalCanvas.GetCtx();
13091
13140
  canvas.width = precision;
@@ -13109,25 +13158,21 @@
13109
13158
  const rgba = this.rgbaSet.slice(4 * offset, 4 * offset + 4);
13110
13159
  return `rgba(${rgba[0]}, ${rgba[1]}, ${rgba[2]}, ${rgba[3] / 255})`;
13111
13160
  }
13112
- static GetOrCreate(stops = [], precision = 100) {
13113
- let str = '';
13161
+ GetOrCreate(x, y, w, h, stops = [], precision = 100) {
13162
+ let str = `${x}${y}${w}${h}`;
13114
13163
  stops.forEach(item => (str += item.join()));
13115
13164
  str += precision;
13116
- let colorInter = ColorInterpolate.dataMap.get(str);
13165
+ let colorInter = this.dataMap.get(str);
13117
13166
  if (!colorInter) {
13118
- colorInter = new ColorInterpolate(stops, precision);
13119
- ColorInterpolate.dataMap.set(str, colorInter);
13167
+ const data = new ColorInterpolate(stops, precision);
13168
+ colorInter = { data, timestamp: [] };
13169
+ this.addLimitedTimestamp(colorInter, Date.now(), {});
13170
+ this.dataMap.set(str, colorInter);
13120
13171
  }
13121
- return colorInter;
13122
- }
13123
- static SetColorInterpolateInstance(stops, ins) {
13124
- ColorInterpolate.dataMap.set(stops, ins);
13125
- }
13126
- static GetColorInterpolateInstance(stops) {
13127
- return ColorInterpolate.dataMap.get(stops);
13172
+ this.clearCache(this.dataMap, this.cacheParams);
13173
+ return colorInter.data;
13128
13174
  }
13129
13175
  }
13130
- ColorInterpolate.dataMap = new Map();
13131
13176
  class ConicalPatternStore {
13132
13177
  static GetSize(minSize) {
13133
13178
  for (let i = 0; i < ConicalPatternStore.ImageSize.length; i++) {
@@ -13218,7 +13263,7 @@
13218
13263
  const r = Math.sqrt(Math.max(Math.max(Math.pow(x, 2) + Math.pow(y, 2), Math.pow(width - x, 2) + Math.pow(y, 2)), Math.max(Math.pow(width - x, 2) + Math.pow(height - y, 2), Math.pow(x, 2) + Math.pow(height - y, 2))));
13219
13264
  const stepNum = deltaDeg + 1;
13220
13265
  const step = deltaAngle / Math.max(1, stepNum - 1);
13221
- const colorInter = ColorInterpolate.GetOrCreate(stops, stepNum);
13266
+ const colorInter = ColorInterpolate.getInstance().GetOrCreate(x, y, width, height, stops, stepNum);
13222
13267
  const lineWidth = (2 * Math.PI * r) / 360;
13223
13268
  conicalCanvas.width = width;
13224
13269
  conicalCanvas.height = height;
@@ -13550,7 +13595,7 @@
13550
13595
  var _a;
13551
13596
  const attribute = this.attribute;
13552
13597
  const textTheme = getTheme(this).text;
13553
- if (this.isMultiLine) {
13598
+ if (!this.isSimplify()) {
13554
13599
  return undefined;
13555
13600
  }
13556
13601
  const { maxLineWidth = textTheme.maxLineWidth } = attribute;
@@ -13561,7 +13606,7 @@
13561
13606
  return this.cache.clipedText;
13562
13607
  }
13563
13608
  get clipedWidth() {
13564
- if (this.isMultiLine) {
13609
+ if (!this.isSimplify()) {
13565
13610
  return undefined;
13566
13611
  }
13567
13612
  this.tryUpdateAABBBounds();
@@ -13570,7 +13615,7 @@
13570
13615
  get cliped() {
13571
13616
  const textTheme = getTheme(this).text;
13572
13617
  const attribute = this.attribute;
13573
- if (this.isMultiLine) {
13618
+ if (!this.isSimplify()) {
13574
13619
  return undefined;
13575
13620
  }
13576
13621
  const { maxLineWidth = textTheme.maxLineWidth } = attribute;
@@ -13578,6 +13623,9 @@
13578
13623
  return false;
13579
13624
  }
13580
13625
  this.tryUpdateAABBBounds();
13626
+ if (this.clipedText == null) {
13627
+ return false;
13628
+ }
13581
13629
  return this.clipedText !== attribute.text.toString();
13582
13630
  }
13583
13631
  get multilineLayout() {
@@ -13587,6 +13635,9 @@
13587
13635
  this.tryUpdateAABBBounds();
13588
13636
  return this.cache.layoutData;
13589
13637
  }
13638
+ isSimplify() {
13639
+ return !this.isMultiLine && this.attribute.direction !== 'vertical';
13640
+ }
13590
13641
  get isMultiLine() {
13591
13642
  return Array.isArray(this.attribute.text) || this.attribute.whiteSpace === 'normal';
13592
13643
  }
@@ -15202,7 +15253,23 @@
15202
15253
  return super.needUpdateTag(key, RECT_UPDATE_TAG_KEY);
15203
15254
  }
15204
15255
  toCustomPath() {
15205
- throw new Error('暂不支持');
15256
+ const attribute = this.attribute;
15257
+ let width = vutils.isNil(attribute.width) ? attribute.x1 - attribute.x : attribute.width;
15258
+ let height = vutils.isNil(attribute.height) ? attribute.y1 - attribute.y : attribute.height;
15259
+ let x = 0;
15260
+ let y = 0;
15261
+ if (width < 0) {
15262
+ x = width;
15263
+ width = -width;
15264
+ }
15265
+ if (height < 0) {
15266
+ y = height;
15267
+ height = -height;
15268
+ }
15269
+ const path = new CustomPath2D();
15270
+ path.moveTo(x, y);
15271
+ path.rect(x, y, width, height);
15272
+ return path;
15206
15273
  }
15207
15274
  clone() {
15208
15275
  return new Rect(Object.assign({}, this.attribute));
@@ -20782,8 +20849,10 @@
20782
20849
  y: (_d = endPoint.y1) !== null && _d !== void 0 ? _d : endPoint.y
20783
20850
  });
20784
20851
  }
20785
- lastBottomSeg = calcLineCache(bottomPoints, curveType === 'stepBefore' ? 'stepAfter' : curveType === 'stepAfter' ? 'stepBefore' : curveType);
20786
- bottomCaches.unshift(lastBottomSeg);
20852
+ if (bottomPoints.length > 1) {
20853
+ lastBottomSeg = calcLineCache(bottomPoints, curveType === 'stepBefore' ? 'stepAfter' : curveType === 'stepAfter' ? 'stepBefore' : curveType);
20854
+ bottomCaches.unshift(lastBottomSeg);
20855
+ }
20787
20856
  }
20788
20857
  area.cacheArea = bottomCaches.map((item, index) => ({
20789
20858
  top: topCaches[index],
@@ -22049,8 +22118,11 @@
22049
22118
  injectable()
22050
22119
  ], exports.Canvas3DPickItemInterceptor);
22051
22120
 
22052
- var pickModule = new ContainerModule(bind => {
22053
- bind(PickerService).toService(GlobalPickerService);
22121
+ var pickModule = new ContainerModule((bind, unbind, isBound) => {
22122
+ if (!isBound(PickerService)) {
22123
+ bind(GlobalPickerService).toSelf();
22124
+ bind(PickerService).toService(GlobalPickerService);
22125
+ }
22054
22126
  bind(exports.Canvas3DPickItemInterceptor).toSelf().inSingletonScope();
22055
22127
  bind(PickItemInterceptor).toService(exports.Canvas3DPickItemInterceptor);
22056
22128
  bind(exports.ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope();
@@ -22937,8 +23009,8 @@
22937
23009
  context.inuse = true;
22938
23010
  context.clearMatrix();
22939
23011
  context.setTransformForCurrent(true);
22940
- const drawInArea = dirtyBounds.width() * context.dpr !== context.canvas.width ||
22941
- dirtyBounds.height() * context.dpr !== context.canvas.height;
23012
+ const drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width ||
23013
+ dirtyBounds.height() * context.dpr < context.canvas.height;
22942
23014
  context.save();
22943
23015
  context.translate(x, y, true);
22944
23016
  if (drawInArea) {
@@ -22958,7 +23030,9 @@
22958
23030
  return ((_a = a.attribute.zIndex) !== null && _a !== void 0 ? _a : DefaultAttribute.zIndex) - ((_b = b.attribute.zIndex) !== null && _b !== void 0 ? _b : DefaultAttribute.zIndex);
22959
23031
  })
22960
23032
  .forEach(group => {
22961
- this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0));
23033
+ group.isContainer
23034
+ ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0))
23035
+ : this.renderItem(group, drawContext);
22962
23036
  });
22963
23037
  context.restore();
22964
23038
  context.restore();
@@ -23677,13 +23751,21 @@
23677
23751
  container.load(renderModule);
23678
23752
  }
23679
23753
 
23680
- container.load(coreModule);
23681
- container.load(graphicModule);
23682
- container.load(renderModule$1);
23683
- container.load(pickModule);
23684
- container.load(pluginModule);
23685
- load$1(container);
23686
- load(container);
23754
+ let loaded = false;
23755
+ function preLoadAllModule() {
23756
+ if (loaded) {
23757
+ return;
23758
+ }
23759
+ loaded = true;
23760
+ container.load(coreModule);
23761
+ container.load(graphicModule);
23762
+ container.load(renderModule$1);
23763
+ container.load(pickModule);
23764
+ container.load(pluginModule);
23765
+ load$1(container);
23766
+ load(container);
23767
+ }
23768
+ preLoadAllModule();
23687
23769
  const vglobal = container.get(VGlobal);
23688
23770
  application.global = vglobal;
23689
23771
  const graphicUtil = container.get(GraphicUtil);
@@ -24681,11 +24763,33 @@
24681
24763
  }
24682
24764
  }
24683
24765
 
24766
+ let _isBrowserEnv;
24767
+ function initIsBrowserEnv() {
24768
+ if (_isBrowserEnv != null) {
24769
+ return;
24770
+ }
24771
+ try {
24772
+ _isBrowserEnv = !!window;
24773
+ }
24774
+ catch (err) {
24775
+ _isBrowserEnv = false;
24776
+ }
24777
+ if (_isBrowserEnv) {
24778
+ try {
24779
+ _isBrowserEnv = !tt;
24780
+ }
24781
+ catch (err) {
24782
+ _isBrowserEnv = true;
24783
+ }
24784
+ }
24785
+ }
24684
24786
  function isBrowserEnv() {
24685
- return new Function('try {return this===window;}catch(e){ return false;}')();
24787
+ initIsBrowserEnv();
24788
+ return _isBrowserEnv;
24686
24789
  }
24687
24790
  function isNodeEnv() {
24688
- return new Function('try {return this===global;}catch(e){return false;}')();
24791
+ initIsBrowserEnv();
24792
+ return !_isBrowserEnv;
24689
24793
  }
24690
24794
  function getCurrentEnv() {
24691
24795
  return isBrowserEnv() ? 'browser' : 'node';
@@ -27535,6 +27639,7 @@
27535
27639
  exports.pointsEqual = pointsEqual;
27536
27640
  exports.pointsInterpolation = pointsInterpolation;
27537
27641
  exports.polygonModule = polygonModule;
27642
+ exports.preLoadAllModule = preLoadAllModule;
27538
27643
  exports.pyramid3dModule = pyramid3dModule;
27539
27644
  exports.rafBasedSto = rafBasedSto;
27540
27645
  exports.rect3dModule = rect3dModule;