@visactor/vrender-core 1.1.0-alpha.21 → 1.1.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/cjs/canvas/constants.js +2 -1
  2. package/cjs/canvas/empty-context.js +1 -2
  3. package/cjs/common/Reflect-metadata.js +1 -1
  4. package/cjs/common/bezier-utils.js +1 -1
  5. package/cjs/common/bounds-context.js +1 -1
  6. package/cjs/common/canvas-utils.js +1 -1
  7. package/cjs/common/color-utils.js +1 -1
  8. package/cjs/common/contribution-provider.js +1 -1
  9. package/cjs/common/custom-path2d.js +1 -1
  10. package/cjs/common/diff.js +2 -1
  11. package/cjs/common/enums.js +1 -1
  12. package/cjs/common/event-listener-manager.js +1 -1
  13. package/cjs/common/event-transformer.js +1 -1
  14. package/cjs/common/explicit-binding.js +1 -1
  15. package/cjs/common/generator.js +1 -1
  16. package/cjs/common/matrix.js +1 -1
  17. package/cjs/common/morphing-utils.js +1 -1
  18. package/cjs/common/path-svg.js +1 -1
  19. package/cjs/common/performance-raf.js +1 -1
  20. package/cjs/common/polygon.js +2 -2
  21. package/cjs/common/rect-utils.js +1 -1
  22. package/cjs/common/render-area.js +1 -1
  23. package/cjs/common/render-command-list.js +1 -1
  24. package/cjs/common/render-curve.js +1 -1
  25. package/cjs/common/render-utils.js +1 -1
  26. package/cjs/common/seg-context.js +2 -1
  27. package/cjs/common/simplify.js +1 -1
  28. package/cjs/common/sort.js +1 -1
  29. package/cjs/common/split-path.js +1 -1
  30. package/cjs/common/store.js +1 -1
  31. package/cjs/common/text.js +1 -1
  32. package/cjs/common/utils.js +1 -1
  33. package/cjs/core/camera.js +1 -1
  34. package/cjs/core/constants.js +1 -1
  35. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +1 -0
  36. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  37. package/cjs/core/core-modules.js +1 -1
  38. package/cjs/core/global-module.js +0 -2
  39. package/cjs/core/global.js +1 -1
  40. package/cjs/core/graphic-utils.js +1 -1
  41. package/cjs/core/index.js +1 -1
  42. package/cjs/core/layer-service.js +1 -2
  43. package/cjs/core/layer.js +1 -1
  44. package/cjs/core/light.js +1 -1
  45. package/cjs/core/stage.js +1 -1
  46. package/cjs/core/window.js +1 -1
  47. package/cjs/entries/app-context.js +1 -1
  48. package/cjs/entries/browser.js +1 -1
  49. package/cjs/entries/index.js +1 -1
  50. package/cjs/entries/miniapp.js +1 -1
  51. package/cjs/entries/node.js +1 -1
  52. package/cjs/entries/runtime-installer.js +1 -1
  53. package/cjs/entries/types.js +1 -1
  54. package/cjs/event/constant.js +1 -1
  55. package/cjs/event/event-manager.js +1 -1
  56. package/cjs/event/event-system.js +1 -1
  57. package/cjs/event/event-target.js +1 -1
  58. package/cjs/event/index.js +1 -2
  59. package/cjs/event/util.js +1 -1
  60. package/cjs/factory/graphic-factory.js +1 -1
  61. package/cjs/factory/index.js +1 -1
  62. package/cjs/factory/layer-factory.js +1 -1
  63. package/cjs/factory/stage-factory.js +1 -1
  64. package/cjs/factory/types.js +1 -1
  65. package/cjs/resource-loader/loader.js +5 -0
  66. package/cjs/resource-loader/loader.js.map +1 -1
  67. package/dist/index.es.js +11 -1
  68. package/es/canvas/constants.js +2 -1
  69. package/es/canvas/empty-context.js +1 -2
  70. package/es/common/Reflect-metadata.js +1 -1
  71. package/es/common/bezier-utils.js +1 -1
  72. package/es/common/bounds-context.js +1 -1
  73. package/es/common/canvas-utils.js +1 -1
  74. package/es/common/color-utils.js +1 -1
  75. package/es/common/contribution-provider.js +1 -1
  76. package/es/common/custom-path2d.js +1 -1
  77. package/es/common/diff.js +2 -1
  78. package/es/common/enums.js +1 -1
  79. package/es/common/event-listener-manager.js +1 -1
  80. package/es/common/event-transformer.js +1 -1
  81. package/es/common/explicit-binding.js +1 -1
  82. package/es/common/generator.js +1 -1
  83. package/es/common/matrix.js +1 -1
  84. package/es/common/morphing-utils.js +1 -1
  85. package/es/common/path-svg.js +1 -1
  86. package/es/common/performance-raf.js +1 -1
  87. package/es/common/polygon.js +1 -1
  88. package/es/common/rect-utils.js +1 -1
  89. package/es/common/render-area.js +1 -1
  90. package/es/common/render-command-list.js +1 -1
  91. package/es/common/render-curve.js +1 -1
  92. package/es/common/render-utils.js +1 -1
  93. package/es/common/seg-context.js +2 -1
  94. package/es/common/simplify.js +1 -1
  95. package/es/common/sort.js +1 -1
  96. package/es/common/split-path.js +1 -1
  97. package/es/common/store.js +1 -1
  98. package/es/common/text.js +1 -1
  99. package/es/common/utils.js +1 -1
  100. package/es/core/camera.js +1 -1
  101. package/es/core/constants.js +1 -1
  102. package/es/core/contributions/layerHandler/canvas2d-contribution.js +1 -0
  103. package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  104. package/es/core/core-modules.js +1 -1
  105. package/es/core/global-module.js +0 -2
  106. package/es/core/global.js +1 -1
  107. package/es/core/graphic-utils.js +1 -1
  108. package/es/core/index.js +1 -1
  109. package/es/core/layer-service.js +1 -2
  110. package/es/core/layer.js +1 -1
  111. package/es/core/light.js +1 -1
  112. package/es/core/stage.js +1 -1
  113. package/es/core/window.js +1 -1
  114. package/es/entries/app-context.js +1 -1
  115. package/es/entries/browser.js +1 -1
  116. package/es/entries/index.js +1 -1
  117. package/es/entries/miniapp.js +1 -1
  118. package/es/entries/node.js +1 -1
  119. package/es/entries/runtime-installer.js +1 -1
  120. package/es/entries/types.js +1 -1
  121. package/es/event/constant.js +1 -1
  122. package/es/event/event-manager.js +1 -1
  123. package/es/event/event-system.js +1 -1
  124. package/es/event/event-target.js +1 -1
  125. package/es/event/index.js +1 -2
  126. package/es/event/util.js +1 -1
  127. package/es/factory/graphic-factory.js +1 -1
  128. package/es/factory/index.js +1 -1
  129. package/es/factory/layer-factory.js +1 -1
  130. package/es/factory/stage-factory.js +1 -1
  131. package/es/factory/types.js +1 -1
  132. package/es/resource-loader/loader.js +5 -0
  133. package/es/resource-loader/loader.js.map +1 -1
  134. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -4826,7 +4826,8 @@ class ResourceLoader {
4826
4826
  }
4827
4827
  else {
4828
4828
  data.waitingMark = [mark];
4829
- data.dataPromise.then(res => {
4829
+ data.dataPromise
4830
+ .then(res => {
4830
4831
  var _a;
4831
4832
  data.loadState = (res === null || res === void 0 ? void 0 : res.data) ? 'success' : 'fail';
4832
4833
  data.data = res === null || res === void 0 ? void 0 : res.data;
@@ -4842,6 +4843,14 @@ class ResourceLoader {
4842
4843
  }
4843
4844
  });
4844
4845
  data.waitingMark && (data.waitingMark = []);
4846
+ })
4847
+ .catch(() => {
4848
+ var _a;
4849
+ data.loadState = 'fail';
4850
+ (_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.map((mark) => {
4851
+ mark.imageLoadFail(svgStr);
4852
+ });
4853
+ data.waitingMark && (data.waitingMark = []);
4845
4854
  });
4846
4855
  }
4847
4856
  }
@@ -22483,6 +22492,7 @@ class CanvasLayerHandlerContribution {
22483
22492
  }
22484
22493
  if (!nativeCanvas) {
22485
22494
  nativeCanvas = this.global.createCanvas({
22495
+ id: params.canvasId,
22486
22496
  width: window.width,
22487
22497
  height: window.height
22488
22498
  });
@@ -1,3 +1,4 @@
1
1
  export const CanvasFactory = Symbol.for("CanvasFactory");
2
2
 
3
- export const Context2dFactory = Symbol.for("Context2dFactory");
3
+ export const Context2dFactory = Symbol.for("Context2dFactory");
4
+ //# sourceMappingURL=constants.js.map
@@ -205,5 +205,4 @@ export class EmptyContext2d {
205
205
  release(...params) {
206
206
  this.stack.forEach((m => matrixAllocate.free(m))), this.stack.length = 0;
207
207
  }
208
- }
209
- //# sourceMappingURL=empty-context.js.map
208
+ }
@@ -175,4 +175,4 @@ export default (function(Reflect) {
175
175
  }), previous && previous(key, value);
176
176
  })), Reflect;
177
177
  }({}));
178
- //# sourceMappingURL=Reflect-metadata.js.map
178
+ //# sourceMappingURL=Reflect-metadata.js.map
@@ -37,4 +37,4 @@ export function quadPointAt(p0, p1, p2, t) {
37
37
  export function quadLength(p0, p1, p2, iterationCount) {
38
38
  return snapLength([ p0.x, p1.x, p2.x ], [ p0.y, p1.y, p2.y ]);
39
39
  }
40
- //# sourceMappingURL=bezier-utils.js.map
40
+ //# sourceMappingURL=bezier-utils.js.map
@@ -50,4 +50,4 @@ export class BoundsContext {
50
50
  }
51
51
  release(...params) {}
52
52
  }
53
- //# sourceMappingURL=bounds-context.js.map
53
+ //# sourceMappingURL=bounds-context.js.map
@@ -52,4 +52,4 @@ function createConicGradient(context, color, x, y, w, h) {
52
52
  canvasGradient.addColorStop(stop.offset, stop.color);
53
53
  })), canvasGradient.GetPattern ? canvasGradient.GetPattern(w + x, h + y, undefined) : canvasGradient;
54
54
  }
55
- //# sourceMappingURL=canvas-utils.js.map
55
+ //# sourceMappingURL=canvas-utils.js.map
@@ -238,4 +238,4 @@ export class GradientParser {
238
238
  };
239
239
  }
240
240
  }
241
- //# sourceMappingURL=color-utils.js.map
241
+ //# sourceMappingURL=color-utils.js.map
@@ -40,4 +40,4 @@ export class ContributionStore {
40
40
  }
41
41
 
42
42
  ContributionStore.store = new Map;
43
- //# sourceMappingURL=contribution-provider.js.map
43
+ //# sourceMappingURL=contribution-provider.js.map
@@ -373,4 +373,4 @@ function scale(current, sX, sY) {
373
373
  temp[7] = sY * current[7]; else if ("h" === c || "H" === c) temp[1] = sX * current[1]; else if ("v" === c || "V" === c) temp[1] = sY * current[1]; else for (let i = 1, n = current.length; i < n; ++i) temp[i] = (i % 2 == 1 ? sX : sY) * current[i];
374
374
  return temp;
375
375
  }
376
- //# sourceMappingURL=custom-path2d.js.map
376
+ //# sourceMappingURL=custom-path2d.js.map
package/es/common/diff.js CHANGED
@@ -8,4 +8,5 @@ export function diff(oldAttrs, newAttrs, getAttr) {
8
8
  void 0 !== value && (diffObj[key] = value);
9
9
  }
10
10
  return diffObj;
11
- }
11
+ }
12
+ //# sourceMappingURL=diff.js.map
@@ -51,4 +51,4 @@ export var BaseRenderContributionTime;
51
51
  BaseRenderContributionTime[BaseRenderContributionTime.beforeFillStroke = 0] = "beforeFillStroke",
52
52
  BaseRenderContributionTime[BaseRenderContributionTime.afterFillStroke = 1] = "afterFillStroke";
53
53
  }(BaseRenderContributionTime || (BaseRenderContributionTime = {}));
54
- //# sourceMappingURL=enums.js.map
54
+ //# sourceMappingURL=enums.js.map
@@ -71,4 +71,4 @@ export class EventListenerManager {
71
71
  throw new Error("_nativeDispatchEvent must be implemented by derived classes");
72
72
  }
73
73
  }
74
- //# sourceMappingURL=event-listener-manager.js.map
74
+ //# sourceMappingURL=event-listener-manager.js.map
@@ -114,4 +114,4 @@ export function mapToCanvasPointForCanvas(nativeEvent) {
114
114
  y: nativeEvent._canvasY || 0
115
115
  };
116
116
  }
117
- //# sourceMappingURL=event-transformer.js.map
117
+ //# sourceMappingURL=event-transformer.js.map
@@ -7,4 +7,4 @@ export function resolveContainerBinding(container, serviceIdentifier) {
7
7
  if (null == instance) throw new Error(`No binding found for ${describeServiceIdentifier(serviceIdentifier)}.`);
8
8
  return instance;
9
9
  }
10
- //# sourceMappingURL=explicit-binding.js.map
10
+ //# sourceMappingURL=explicit-binding.js.map
@@ -5,4 +5,4 @@ export class Generator {
5
5
  }
6
6
 
7
7
  Generator.auto_increment_id = 0;
8
- //# sourceMappingURL=generator.js.map
8
+ //# sourceMappingURL=generator.js.map
@@ -118,4 +118,4 @@ export function transformMat4(out, a, m) {
118
118
  return w = w || 1, out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w, out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w,
119
119
  out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w, out;
120
120
  }
121
- //# sourceMappingURL=matrix.js.map
121
+ //# sourceMappingURL=matrix.js.map
@@ -189,4 +189,4 @@ export function bezierCurversToPath(bezierCurves) {
189
189
  }
190
190
  return path;
191
191
  }
192
- //# sourceMappingURL=morphing-utils.js.map
192
+ //# sourceMappingURL=morphing-utils.js.map
@@ -55,4 +55,4 @@ export function parseSvgPath(str) {
55
55
  } else result.push(currCommandData);
56
56
  return result;
57
57
  }
58
- //# sourceMappingURL=path-svg.js.map
58
+ //# sourceMappingURL=path-svg.js.map
@@ -26,4 +26,4 @@ export class PerformanceRAF {
26
26
  }));
27
27
  }
28
28
  }
29
- //# sourceMappingURL=performance-raf.js.map
29
+ //# sourceMappingURL=performance-raf.js.map
@@ -38,4 +38,4 @@ function getProportionPoint(point, segment, length, dx, dy) {
38
38
  y: point.y - dy * factor
39
39
  };
40
40
  }
41
- //# sourceMappingURL=polygon.js.map
41
+ //# sourceMappingURL=polygon.js.map
@@ -17,4 +17,4 @@ export const normalizeRectAttributes = attribute => {
17
17
  height: height
18
18
  };
19
19
  };
20
- //# sourceMappingURL=rect-utils.js.map
20
+ //# sourceMappingURL=rect-utils.js.map
@@ -61,4 +61,4 @@ function drawAreaBlock(path, topList, bottomList, params) {
61
61
  }
62
62
  path.closePath();
63
63
  }
64
- //# sourceMappingURL=render-area.js.map
64
+ //# sourceMappingURL=render-area.js.map
@@ -6,4 +6,4 @@ export function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy
6
6
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
7
7
  }
8
8
  }
9
- //# sourceMappingURL=render-command-list.js.map
9
+ //# sourceMappingURL=render-command-list.js.map
@@ -93,4 +93,4 @@ export function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
93
93
  path.closePath();
94
94
  }));
95
95
  }
96
- //# sourceMappingURL=render-curve.js.map
96
+ //# sourceMappingURL=render-curve.js.map
@@ -11,4 +11,4 @@ export function drawSegItem(ctx, curve, endPercent, params) {
11
11
  ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
12
12
  }
13
13
  }
14
- //# sourceMappingURL=render-utils.js.map
14
+ //# sourceMappingURL=render-utils.js.map
@@ -90,4 +90,5 @@ export class ReflectSegContext extends SegContext {
90
90
  clear() {
91
91
  return super.clear();
92
92
  }
93
- }
93
+ }
94
+ //# sourceMappingURL=seg-context.js.map
@@ -30,4 +30,4 @@ export function flatten_simplify(points, tolerance, highestQuality) {
30
30
  if (points.length <= 10) return points;
31
31
  return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
32
32
  }
33
- //# sourceMappingURL=simplify.js.map
33
+ //# sourceMappingURL=simplify.js.map
package/es/common/sort.js CHANGED
@@ -94,4 +94,4 @@ export function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
94
94
  !1)), reverse);
95
95
  return result;
96
96
  }
97
- //# sourceMappingURL=sort.js.map
97
+ //# sourceMappingURL=sort.js.map
@@ -248,4 +248,4 @@ export const splitPath = (path, count) => {
248
248
  }
249
249
  return res;
250
250
  };
251
- //# sourceMappingURL=split-path.js.map
251
+ //# sourceMappingURL=split-path.js.map
@@ -1,2 +1,2 @@
1
1
  class StageStore {}
2
- //# sourceMappingURL=store.js.map
2
+ //# sourceMappingURL=store.js.map
package/es/common/text.js CHANGED
@@ -24,4 +24,4 @@ export function textAttributesToStyle(attrs) {
24
24
  attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"),
25
25
  attrs.fill && isString(attrs.fill) && (style.color = attrs.fill), style;
26
26
  }
27
- //# sourceMappingURL=text.js.map
27
+ //# sourceMappingURL=text.js.map
@@ -148,4 +148,4 @@ export const calculateLineHeight = (lineHeight, fontSize) => {
148
148
  const _lh = _calculateLineHeight(lineHeight, fontSize);
149
149
  return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
150
150
  };
151
- //# sourceMappingURL=utils.js.map
151
+ //# sourceMappingURL=utils.js.map
package/es/core/camera.js CHANGED
@@ -66,4 +66,4 @@ export class OrthoCamera {
66
66
  export const registerOrthoCamera = () => {
67
67
  Factory.registerPlugin("OrthoCamera", OrthoCamera);
68
68
  };
69
- //# sourceMappingURL=camera.js.map
69
+ //# sourceMappingURL=camera.js.map
@@ -9,4 +9,4 @@ export const StaticLayerHandlerContribution = Symbol.for("StaticLayerHandlerCont
9
9
  export const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
10
10
 
11
11
  export const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
12
- //# sourceMappingURL=constants.js.map
12
+ //# sourceMappingURL=constants.js.map
@@ -15,6 +15,7 @@ export class CanvasLayerHandlerContribution {
15
15
  let nativeCanvas;
16
16
  this.main = !1, params.canvasId && (nativeCanvas = this.global.getElementById(params.canvasId)),
17
17
  nativeCanvas || (nativeCanvas = this.global.createCanvas({
18
+ id: params.canvasId,
18
19
  width: window.width,
19
20
  height: window.height
20
21
  })), nativeCanvas.style && (nativeCanvas.style["pointer-events"] = "none");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/contributions/layerHandler/canvas2d-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAgBlD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,OAAO,8BAA8B;IAYzC;QALA,SAAI,GAAc,QAAQ,CAAC;QAMzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QACtB,OAAO;IACT,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,MAAe,EAAE,MAA+B;QAClE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,MAAM,CAAC,IAAI,EAAE;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,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AAC;IAED,MAAM,CAAC,MAAe,EAAE,KAAe,EAAE,MAA+C;;QACtF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,gCAC/B,OAAO,IACJ,MAAM,KACT,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAA,MAAM,CAAC,UAAU,mCAAI,MAAM,CAAC,CAAC,CAAC,SAAS,IAC7D,CAAC;QACH,OAAO;IACT,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;CACF","file":"canvas2d-contribution.js","sourcesContent":["import { wrapCanvas } from '../../../canvas/util';\nimport type {\n IGlobal,\n ICanvas,\n IContext2d,\n IDrawToParams,\n IGroup,\n ILayer,\n ILayerHandlerContribution,\n IWindow,\n ILayerHandlerInitParams,\n ILayerHandlerDrawParams,\n IDrawContext,\n LayerMode\n} from '../../../interface';\nimport type { IBounds } from '@visactor/vutils';\nimport { application } from '../../../application';\n\nexport class CanvasLayerHandlerContribution implements ILayerHandlerContribution {\n layer: ILayer;\n canvas: ICanvas;\n context: IContext2d;\n offscreen: boolean;\n main: boolean;\n window: IWindow;\n type: LayerMode = 'static';\n global: IGlobal;\n // 所绑定的副layer handler\n secondaryHandlers: ILayerHandlerContribution[];\n\n constructor() {\n this.offscreen = false;\n this.global = application.global;\n }\n\n setDpr(dpr: number) {\n this.canvas.dpr = dpr;\n return;\n }\n\n init(layer: ILayer, window: IWindow, params: ILayerHandlerInitParams): void {\n this.layer = layer;\n this.window = window;\n // 默认图层,那么直接拿window上的上下文和canvas即可\n if (params.main) {\n this.main = true;\n this.context = window.getContext();\n this.canvas = this.context.getCanvas();\n } else {\n this.main = false;\n let nativeCanvas: HTMLElement;\n if (params.canvasId) {\n nativeCanvas = this.global.getElementById(params.canvasId);\n }\n if (!nativeCanvas) {\n nativeCanvas = this.global.createCanvas({\n width: window.width,\n height: window.height\n });\n }\n // 不是main的话,就穿透点击事件\n if (nativeCanvas.style) {\n nativeCanvas.style['pointer-events'] = 'none';\n }\n const windowContext = window.getContext();\n const windowCanvas = windowContext.getCanvas().nativeCanvas;\n const canvas = wrapCanvas({\n nativeCanvas,\n width: window.width,\n height: window.height,\n dpr: window.dpr,\n id: params.canvasId,\n canvasControled: true,\n container: window.getContainer(),\n x: windowCanvas.offsetLeft,\n y: windowCanvas.offsetTop\n });\n canvas.applyPosition();\n this.canvas = canvas;\n this.context = canvas.getContext();\n }\n }\n\n resize(w: number, h: number) {\n this.canvas.resize(w, h);\n return;\n }\n resizeView(w: number, h: number) {\n return;\n }\n\n render(group: IGroup[], params: ILayerHandlerDrawParams, userParams?: Partial<IDrawContext>): void {\n // 调整位置\n if (!this.main) {\n const windowContext = this.window.getContext();\n const windowCanvas = windowContext.getCanvas().nativeCanvas;\n if (windowCanvas && (this.canvas.x !== windowCanvas.offsetLeft || this.canvas.y !== windowCanvas.offsetTop)) {\n this.canvas.x = windowCanvas.offsetLeft;\n this.canvas.y = windowCanvas.offsetTop;\n this.canvas.applyPosition();\n }\n }\n params.renderService.render(group, {\n context: this.context,\n clear: params.background ?? '#ffffff',\n ...params,\n ...userParams\n });\n }\n\n merge(layerHandlers: ILayerHandlerContribution[]) {\n layerHandlers.forEach(l => {\n const ctx = l.getContext();\n const canvas = ctx.canvas.nativeCanvas;\n this.context.drawImage(canvas, 0, 0);\n });\n }\n\n prepare(dirtyBounds: IBounds, params: ILayerHandlerDrawParams) {\n return;\n }\n\n drawTo(target: IWindow, group: IGroup[], params: IDrawToParams & ILayerHandlerDrawParams) {\n const context = target.getContext();\n params.renderService.render(group, {\n context,\n ...params,\n clear: params.clear ? params.background ?? '#fff' : undefined\n });\n return;\n }\n\n getContext(): IContext2d {\n return this.context;\n }\n\n release() {\n this.canvas.release();\n }\n}\n"]}
1
+ {"version":3,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AC,OAAO,EAAE,CAAC;IACxB,CAAC;CACF","file":"canvas2d-contribution.js","sourcesContent":["import { wrapCanvas } from '../../../canvas/util';\nimport type {\n IGlobal,\n ICanvas,\n IContext2d,\n IDrawToParams,\n IGroup,\n ILayer,\n ILayerHandlerContribution,\n IWindow,\n ILayerHandlerInitParams,\n ILayerHandlerDrawParams,\n IDrawContext,\n LayerMode\n} from '../../../interface';\nimport type { IBounds } from '@visactor/vutils';\nimport { application } from '../../../application';\n\nexport class CanvasLayerHandlerContribution implements ILayerHandlerContribution {\n layer: ILayer;\n canvas: ICanvas;\n context: IContext2d;\n offscreen: boolean;\n main: boolean;\n window: IWindow;\n type: LayerMode = 'static';\n global: IGlobal;\n // 所绑定的副layer handler\n secondaryHandlers: ILayerHandlerContribution[];\n\n constructor() {\n this.offscreen = false;\n this.global = application.global;\n }\n\n setDpr(dpr: number) {\n this.canvas.dpr = dpr;\n return;\n }\n\n init(layer: ILayer, window: IWindow, params: ILayerHandlerInitParams): void {\n this.layer = layer;\n this.window = window;\n // 默认图层,那么直接拿window上的上下文和canvas即可\n if (params.main) {\n this.main = true;\n this.context = window.getContext();\n this.canvas = this.context.getCanvas();\n } else {\n this.main = false;\n let nativeCanvas: HTMLElement;\n if (params.canvasId) {\n nativeCanvas = this.global.getElementById(params.canvasId);\n }\n if (!nativeCanvas) {\n nativeCanvas = this.global.createCanvas({\n id: params.canvasId,\n width: window.width,\n height: window.height\n });\n }\n // 不是main的话,就穿透点击事件\n if (nativeCanvas.style) {\n nativeCanvas.style['pointer-events'] = 'none';\n }\n const windowContext = window.getContext();\n const windowCanvas = windowContext.getCanvas().nativeCanvas;\n const canvas = wrapCanvas({\n nativeCanvas,\n width: window.width,\n height: window.height,\n dpr: window.dpr,\n id: params.canvasId,\n canvasControled: true,\n container: window.getContainer(),\n x: windowCanvas.offsetLeft,\n y: windowCanvas.offsetTop\n });\n canvas.applyPosition();\n this.canvas = canvas;\n this.context = canvas.getContext();\n }\n }\n\n resize(w: number, h: number) {\n this.canvas.resize(w, h);\n return;\n }\n resizeView(w: number, h: number) {\n return;\n }\n\n render(group: IGroup[], params: ILayerHandlerDrawParams, userParams?: Partial<IDrawContext>): void {\n // 调整位置\n if (!this.main) {\n const windowContext = this.window.getContext();\n const windowCanvas = windowContext.getCanvas().nativeCanvas;\n if (windowCanvas && (this.canvas.x !== windowCanvas.offsetLeft || this.canvas.y !== windowCanvas.offsetTop)) {\n this.canvas.x = windowCanvas.offsetLeft;\n this.canvas.y = windowCanvas.offsetTop;\n this.canvas.applyPosition();\n }\n }\n params.renderService.render(group, {\n context: this.context,\n clear: params.background ?? '#ffffff',\n ...params,\n ...userParams\n });\n }\n\n merge(layerHandlers: ILayerHandlerContribution[]) {\n layerHandlers.forEach(l => {\n const ctx = l.getContext();\n const canvas = ctx.canvas.nativeCanvas;\n this.context.drawImage(canvas, 0, 0);\n });\n }\n\n prepare(dirtyBounds: IBounds, params: ILayerHandlerDrawParams) {\n return;\n }\n\n drawTo(target: IWindow, group: IGroup[], params: IDrawToParams & ILayerHandlerDrawParams) {\n const context = target.getContext();\n params.renderService.render(group, {\n context,\n ...params,\n clear: params.clear ? params.background ?? '#fff' : undefined\n });\n return;\n }\n\n getContext(): IContext2d {\n return this.context;\n }\n\n release() {\n this.canvas.release();\n }\n}\n"]}
@@ -21,4 +21,4 @@ export function bindCoreModules({bind: bind}) {
21
21
  }
22
22
 
23
23
  export default bindCoreModules;
24
- //# sourceMappingURL=core-modules.js.map
24
+ //# sourceMappingURL=core-modules.js.map
@@ -1,3 +1 @@
1
-
2
-
3
1
  //# sourceMappingURL=global-module.js.map
package/es/core/global.js CHANGED
@@ -222,4 +222,4 @@ export class DefaultGlobal extends EventListenerManager {
222
222
  return this._env || this.setEnv("browser"), this.envContribution.copyToClipBoard(text);
223
223
  }
224
224
  }
225
- //# sourceMappingURL=global.js.map
225
+ //# sourceMappingURL=global.js.map
@@ -162,4 +162,4 @@ export class DefaultTransformUtil {
162
162
  return this;
163
163
  }
164
164
  }
165
- //# sourceMappingURL=graphic-utils.js.map
165
+ //# sourceMappingURL=graphic-utils.js.map
package/es/core/index.js CHANGED
@@ -15,4 +15,4 @@ export * from "./layer-service";
15
15
  export * from "./constants";
16
16
 
17
17
  export * from "../interface/core";
18
- //# sourceMappingURL=index.js.map
18
+ //# sourceMappingURL=index.js.map
@@ -75,5 +75,4 @@ export class DefaultLayerService {
75
75
  }
76
76
  }
77
77
 
78
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
79
- //# sourceMappingURL=layer-service.js.map
78
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
package/es/core/layer.js CHANGED
@@ -112,4 +112,4 @@ export class Layer extends Group {
112
112
  }, params)), this.afterDrawCbs.forEach((c => c(this)));
113
113
  }
114
114
  }
115
- //# sourceMappingURL=layer.js.map
115
+ //# sourceMappingURL=layer.js.map
package/es/core/light.js CHANGED
@@ -23,4 +23,4 @@ export class DirectionalLight {
23
23
  export const registerDirectionalLight = () => {
24
24
  Factory.registerPlugin("DirectionalLight", DirectionalLight);
25
25
  };
26
- //# sourceMappingURL=light.js.map
26
+ //# sourceMappingURL=light.js.map
package/es/core/stage.js CHANGED
@@ -616,4 +616,4 @@ export class Stage extends Group {
616
616
  this.renderService.reInit(), this.pickerService.reInit();
617
617
  }
618
618
  }
619
- //# sourceMappingURL=stage.js.map
619
+ //# sourceMappingURL=stage.js.map
package/es/core/window.js CHANGED
@@ -150,4 +150,4 @@ export class DefaultWindow extends EventListenerManager {
150
150
  return this._handler.getTopLeft(baseWindow);
151
151
  }
152
152
  }
153
- //# sourceMappingURL=window.js.map
153
+ //# sourceMappingURL=window.js.map
@@ -83,4 +83,4 @@ export class AppContext {
83
83
  };
84
84
  }
85
85
  }
86
- //# sourceMappingURL=app-context.js.map
86
+ //# sourceMappingURL=app-context.js.map
@@ -33,4 +33,4 @@ export class BrowserEntry {
33
33
  export function createBrowserApp(options = {}) {
34
34
  return new BrowserEntry(options);
35
35
  }
36
- //# sourceMappingURL=browser.js.map
36
+ //# sourceMappingURL=browser.js.map
@@ -11,4 +11,4 @@ export * from "./miniapp";
11
11
  export * from "./runtime-installer";
12
12
 
13
13
  export { createBrowserApp as createApp } from "./browser";
14
- //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -9,4 +9,4 @@ export class MiniappEntry extends BrowserEntry {
9
9
  export function createMiniappApp(options = {}) {
10
10
  return new MiniappEntry(options);
11
11
  }
12
- //# sourceMappingURL=miniapp.js.map
12
+ //# sourceMappingURL=miniapp.js.map
@@ -9,4 +9,4 @@ export class NodeEntry extends BrowserEntry {
9
9
  export function createNodeApp(options = {}) {
10
10
  return new NodeEntry(options);
11
11
  }
12
- //# sourceMappingURL=node.js.map
12
+ //# sourceMappingURL=node.js.map
@@ -127,4 +127,4 @@ export function installRuntimePickersToApp(app, serviceIdentifier) {
127
127
  const pickers = bindingContext.getAll(serviceIdentifier);
128
128
  app.registry.picker.clear(), registerRuntimeEntries(((key, picker) => app.registry.picker.register(key, picker)), pickers, "runtime-picker");
129
129
  }
130
- //# sourceMappingURL=runtime-installer.js.map
130
+ //# sourceMappingURL=runtime-installer.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -1,2 +1,2 @@
1
1
  export const WILDCARD = "*";
2
- //# sourceMappingURL=constant.js.map
2
+ //# sourceMappingURL=constant.js.map
@@ -299,4 +299,4 @@ export class EventManager {
299
299
  this.mappingTable = null, this.mappingState = null, this.cursorTarget = null;
300
300
  }
301
301
  }
302
- //# sourceMappingURL=event-manager.js.map
302
+ //# sourceMappingURL=event-manager.js.map
@@ -212,4 +212,4 @@ export class EventSystem {
212
212
  this.manager.pauseNotify = !1;
213
213
  }
214
214
  }
215
- //# sourceMappingURL=event-system.js.map
215
+ //# sourceMappingURL=event-system.js.map
@@ -12,4 +12,4 @@ export const EventTarget = {
12
12
  return this.dispatchEvent(new CustomEvent(eventName, object));
13
13
  }
14
14
  };
15
- //# sourceMappingURL=event-target.js.map
15
+ //# sourceMappingURL=event-target.js.map
package/es/event/index.js CHANGED
@@ -10,5 +10,4 @@ export * from "../interface/event";
10
10
 
11
11
  export * from "./util";
12
12
 
13
- export * from "./constant";
14
- //# sourceMappingURL=index.js.map
13
+ export * from "./constant";
package/es/event/util.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const clock = "object" == typeof performance && performance.now ? performance : Date;
2
- //# sourceMappingURL=util.js.map
2
+ //# sourceMappingURL=util.js.map
@@ -12,4 +12,4 @@ export class GraphicFactory {
12
12
  this.registry.set(type, ctor);
13
13
  }
14
14
  }
15
- //# sourceMappingURL=graphic-factory.js.map
15
+ //# sourceMappingURL=graphic-factory.js.map
@@ -5,4 +5,4 @@ export * from "./stage-factory";
5
5
  export * from "./layer-factory";
6
6
 
7
7
  export * from "./graphic-factory";
8
- //# sourceMappingURL=index.js.map
8
+ //# sourceMappingURL=index.js.map
@@ -8,4 +8,4 @@ export class LayerFactory {
8
8
  return new this.LayerCtor(stage, global, window, params);
9
9
  }
10
10
  }
11
- //# sourceMappingURL=layer-factory.js.map
11
+ //# sourceMappingURL=layer-factory.js.map
@@ -9,4 +9,4 @@ export class StageFactory {
9
9
  return new this.StageCtor(params, null === (_a = this.depsFactory) || void 0 === _a ? void 0 : _a.call(this));
10
10
  }
11
11
  }
12
- //# sourceMappingURL=stage-factory.js.map
12
+ //# sourceMappingURL=stage-factory.js.map
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -26,6 +26,11 @@ export class ResourceLoader {
26
26
  (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data,
27
27
  mark.imageLoadSuccess(svgStr, res.data)) : (data.loadState = "fail", mark.imageLoadFail(svgStr));
28
28
  })), data.waitingMark && (data.waitingMark = []);
29
+ })).catch((() => {
30
+ var _a;
31
+ data.loadState = "fail", null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark => {
32
+ mark.imageLoadFail(svgStr);
33
+ })), data.waitingMark && (data.waitingMark = []);
29
34
  }))) : (data.loadState = "fail", mark.imageLoadFail(svgStr)));
30
35
  }
31
36
  static GetFile(url, type) {