@visactor/vrender 0.22.5-vstory.1 → 0.22.6-alpha.1

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/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@visactor/vrender-core';
2
- export declare const version = "0.22.5-vstory.1";
2
+ export declare const version = "0.22.6-alpha.1";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.22.5-vstory.1", (0, vrender_core_1.preLoadAllModule)(), (0,
24
+ exports.version = "0.22.6-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
25
25
  vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
26
26
  vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
27
27
  (0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.22.5-vstory.1\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.22.6-alpha.1\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.es.js CHANGED
@@ -20475,10 +20475,11 @@ function getDefaultCharacterConfig(attribute) {
20475
20475
  };
20476
20476
  }
20477
20477
  function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
20478
+ var _a;
20478
20479
  if (cursorIndex < 0) return 0;
20479
20480
  const intCursorIndex = Math.round(cursorIndex);
20480
20481
  let tempCursorIndex = intCursorIndex,
20481
- lineBreak = !1,
20482
+ lineBreak = "\n" === (null === (_a = null == textConfig ? void 0 : textConfig[0]) || void 0 === _a ? void 0 : _a.text),
20482
20483
  configIdx = 0;
20483
20484
  for (configIdx = 0; configIdx < textConfig.length && tempCursorIndex >= 0; configIdx++) {
20484
20485
  "\n" === textConfig[configIdx].text ? (tempCursorIndex -= Number(lineBreak), lineBreak = !0) : (tempCursorIndex--, lineBreak = !1);
@@ -20486,26 +20487,27 @@ function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
20486
20487
  return tempCursorIndex >= 0 ? textConfig.length : (configIdx -= 1, cursorIndex > intCursorIndex && !lineBreak && (configIdx += 1), configIdx);
20487
20488
  }
20488
20489
  function findCursorIdxByConfigIndex(textConfig, configIndex) {
20489
- var _a, _b, _c;
20490
+ var _a, _b, _c, _d;
20490
20491
  let cursorIndex = 0;
20491
20492
  if (configIndex < 0) return -.1;
20492
- let lastLineBreak = !1;
20493
+ let lastLineBreak = "\n" === (null === (_a = null == textConfig ? void 0 : textConfig[0]) || void 0 === _a ? void 0 : _a.text);
20493
20494
  for (let i = 0; i <= configIndex && i < textConfig.length; i++) {
20494
20495
  "\n" === textConfig[i].text ? (cursorIndex += Number(lastLineBreak), lastLineBreak = !0) : (cursorIndex++, lastLineBreak = !1);
20495
20496
  }
20496
- if (cursorIndex = Math.max(cursorIndex - 1, 0), configIndex > textConfig.length - 1) return "\n" === (null === (_a = textConfig[textConfig.length - 1]) || void 0 === _a ? void 0 : _a.text) ? cursorIndex + .9 : cursorIndex + .1;
20497
- const lineBreak = "\n" === (null === (_b = textConfig[configIndex]) || void 0 === _b ? void 0 : _b.text);
20497
+ if (cursorIndex = Math.max(cursorIndex - 1, 0), configIndex > textConfig.length - 1) return "\n" === (null === (_b = textConfig[textConfig.length - 1]) || void 0 === _b ? void 0 : _b.text) ? cursorIndex + .9 : cursorIndex + .1;
20498
+ const lineBreak = "\n" === (null === (_c = textConfig[configIndex]) || void 0 === _c ? void 0 : _c.text);
20498
20499
  if (configIndex >= textConfig.length - 1 && lineBreak) return cursorIndex + 1 - .1;
20499
- return cursorIndex -= .1, lineBreak && "\n" !== (null === (_c = textConfig[configIndex - 1]) || void 0 === _c ? void 0 : _c.text) && (cursorIndex += .2), cursorIndex;
20500
+ return cursorIndex -= .1, lineBreak && "\n" !== (null === (_d = textConfig[configIndex - 1]) || void 0 === _d ? void 0 : _d.text) && (cursorIndex += .2), cursorIndex;
20500
20501
  }
20501
20502
  class EditModule {
20502
20503
  constructor(container) {
20503
20504
  this.handleFocusIn = () => {}, this.handleFocusOut = () => {}, this.handleKeyDown = e => {
20504
- "Delete" !== e.key && "Backspace" !== e.key || this.handleInput({
20505
+ this.currRt && ("Delete" !== e.key && "Backspace" !== e.key || this.handleInput({
20505
20506
  data: null,
20506
20507
  type: "Backspace"
20507
- });
20508
+ }));
20508
20509
  }, this.handleCompositionStart = () => {
20510
+ if (!this.currRt) return;
20509
20511
  this.isComposing = !0;
20510
20512
  const {
20511
20513
  textConfig = []
@@ -20588,6 +20590,7 @@ class EditModule {
20588
20590
  }
20589
20591
  parseCompositionStr(configIdx) {
20590
20592
  var _a;
20593
+ if (!this.currRt) return "";
20591
20594
  const {
20592
20595
  textConfig = []
20593
20596
  } = this.currRt.attribute,
@@ -21078,7 +21081,7 @@ class RichTextEditPlugin {
21078
21081
  const {
21079
21082
  editOptions = {}
21080
21083
  } = currRt.attribute;
21081
- editOptions.stopPropagation && currRt.removeEventListener("*", this.stopPropagation), trulyDeFocus && (this.trySyncPlaceholderToTextConfig(), currRt.detachShadow()), this.currRt = null;
21084
+ editOptions.stopPropagation && currRt.removeEventListener("*", this.stopPropagation), trulyDeFocus && (this.trySyncPlaceholderToTextConfig(), currRt.detachShadow()), this.currRt = null, this.editModule.currRt = null;
21082
21085
  const shadowRoot = this.getShadow(currRt);
21083
21086
  this.editLine && (this.removeEditLineOrBgOrBounds(this.editLine, shadowRoot), this.editLine.release(), this.editLine = null, this.removeEditLineOrBgOrBounds(this.editBg, shadowRoot), this.editBg.release(), this.editBg = null), trulyDeFocus && (this.shadowBounds && (this.removeEditLineOrBgOrBounds(this.shadowBounds, shadowRoot), this.shadowBounds.release(), this.shadowBounds = null), this.shadowPlaceHolder && (this.shadowPlaceHolder.parent && this.shadowPlaceHolder.parent.removeChild(this.shadowPlaceHolder), this.shadowPlaceHolder.release(), this.shadowPlaceHolder = null)), this.focusing = !1, currRt.removeEventListener("pointerleave", this.handleLeave);
21084
21087
  }
@@ -31448,11 +31451,15 @@ function _registerWrapText() {
31448
31451
  _registerWrapText.__loaded = !1;
31449
31452
  const registerWrapText = _registerWrapText;
31450
31453
 
31454
+ function pseudoRandom(n) {
31455
+ let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
31456
+ let hash = 3735928559 ^ seed;
31457
+ return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
31458
+ }
31451
31459
  function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31452
31460
  let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31453
31461
  let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31454
- graphic.dynamicTextureCache || (graphic.dynamicTextureCache = new Array(rowCount * columnCount).fill(0).map(item => 2 * Math.random() * Math.PI));
31455
- const targetRandomValue = graphic.dynamicTextureCache[row * columnCount + column],
31462
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
31456
31463
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
31457
31464
  return Math.min(1, Math.max(0, _r));
31458
31465
  }
@@ -31612,15 +31619,10 @@ function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31612
31619
  function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31613
31620
  let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31614
31621
  let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31615
- graphic.dynamicTextureCache || (graphic.dynamicTextureCache = {
31616
- phases: new Array(rowCount * columnCount).fill(0).map(() => 2 * Math.random() * Math.PI),
31617
- speeds: new Array(rowCount * columnCount).fill(0).map(() => .5 + .5 * Math.random()),
31618
- directions: new Array(rowCount * columnCount).fill(0).map(() => 2 * Math.random() * Math.PI)
31619
- });
31620
31622
  const index = row * columnCount + column,
31621
- phase = graphic.dynamicTextureCache.phases[index],
31622
- speed = graphic.dynamicTextureCache.speeds[index],
31623
- direction = graphic.dynamicTextureCache.directions[index],
31623
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
31624
+ speed = .5 * pseudoRandom(index, 1) + .5,
31625
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
31624
31626
  centerRow = rowCount / 2,
31625
31627
  centerCol = columnCount / 2,
31626
31628
  distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
@@ -31634,7 +31636,7 @@ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic)
31634
31636
 
31635
31637
  const roughModule = _roughModule;
31636
31638
 
31637
- const version = "0.22.5-vstory.1";
31639
+ const version = "0.22.6-alpha.1";
31638
31640
  preLoadAllModule();
31639
31641
  if (isBrowserEnv()) {
31640
31642
  loadBrowserEnv(container);
package/dist/index.js CHANGED
@@ -20481,10 +20481,11 @@
20481
20481
  };
20482
20482
  }
20483
20483
  function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
20484
+ var _a;
20484
20485
  if (cursorIndex < 0) return 0;
20485
20486
  const intCursorIndex = Math.round(cursorIndex);
20486
20487
  let tempCursorIndex = intCursorIndex,
20487
- lineBreak = !1,
20488
+ lineBreak = "\n" === (null === (_a = null == textConfig ? void 0 : textConfig[0]) || void 0 === _a ? void 0 : _a.text),
20488
20489
  configIdx = 0;
20489
20490
  for (configIdx = 0; configIdx < textConfig.length && tempCursorIndex >= 0; configIdx++) {
20490
20491
  "\n" === textConfig[configIdx].text ? (tempCursorIndex -= Number(lineBreak), lineBreak = !0) : (tempCursorIndex--, lineBreak = !1);
@@ -20492,26 +20493,27 @@
20492
20493
  return tempCursorIndex >= 0 ? textConfig.length : (configIdx -= 1, cursorIndex > intCursorIndex && !lineBreak && (configIdx += 1), configIdx);
20493
20494
  }
20494
20495
  function findCursorIdxByConfigIndex(textConfig, configIndex) {
20495
- var _a, _b, _c;
20496
+ var _a, _b, _c, _d;
20496
20497
  let cursorIndex = 0;
20497
20498
  if (configIndex < 0) return -.1;
20498
- let lastLineBreak = !1;
20499
+ let lastLineBreak = "\n" === (null === (_a = null == textConfig ? void 0 : textConfig[0]) || void 0 === _a ? void 0 : _a.text);
20499
20500
  for (let i = 0; i <= configIndex && i < textConfig.length; i++) {
20500
20501
  "\n" === textConfig[i].text ? (cursorIndex += Number(lastLineBreak), lastLineBreak = !0) : (cursorIndex++, lastLineBreak = !1);
20501
20502
  }
20502
- if (cursorIndex = Math.max(cursorIndex - 1, 0), configIndex > textConfig.length - 1) return "\n" === (null === (_a = textConfig[textConfig.length - 1]) || void 0 === _a ? void 0 : _a.text) ? cursorIndex + .9 : cursorIndex + .1;
20503
- const lineBreak = "\n" === (null === (_b = textConfig[configIndex]) || void 0 === _b ? void 0 : _b.text);
20503
+ if (cursorIndex = Math.max(cursorIndex - 1, 0), configIndex > textConfig.length - 1) return "\n" === (null === (_b = textConfig[textConfig.length - 1]) || void 0 === _b ? void 0 : _b.text) ? cursorIndex + .9 : cursorIndex + .1;
20504
+ const lineBreak = "\n" === (null === (_c = textConfig[configIndex]) || void 0 === _c ? void 0 : _c.text);
20504
20505
  if (configIndex >= textConfig.length - 1 && lineBreak) return cursorIndex + 1 - .1;
20505
- return cursorIndex -= .1, lineBreak && "\n" !== (null === (_c = textConfig[configIndex - 1]) || void 0 === _c ? void 0 : _c.text) && (cursorIndex += .2), cursorIndex;
20506
+ return cursorIndex -= .1, lineBreak && "\n" !== (null === (_d = textConfig[configIndex - 1]) || void 0 === _d ? void 0 : _d.text) && (cursorIndex += .2), cursorIndex;
20506
20507
  }
20507
20508
  class EditModule {
20508
20509
  constructor(container) {
20509
20510
  this.handleFocusIn = () => {}, this.handleFocusOut = () => {}, this.handleKeyDown = e => {
20510
- "Delete" !== e.key && "Backspace" !== e.key || this.handleInput({
20511
+ this.currRt && ("Delete" !== e.key && "Backspace" !== e.key || this.handleInput({
20511
20512
  data: null,
20512
20513
  type: "Backspace"
20513
- });
20514
+ }));
20514
20515
  }, this.handleCompositionStart = () => {
20516
+ if (!this.currRt) return;
20515
20517
  this.isComposing = !0;
20516
20518
  const {
20517
20519
  textConfig = []
@@ -20594,6 +20596,7 @@
20594
20596
  }
20595
20597
  parseCompositionStr(configIdx) {
20596
20598
  var _a;
20599
+ if (!this.currRt) return "";
20597
20600
  const {
20598
20601
  textConfig = []
20599
20602
  } = this.currRt.attribute,
@@ -21084,7 +21087,7 @@
21084
21087
  const {
21085
21088
  editOptions = {}
21086
21089
  } = currRt.attribute;
21087
- editOptions.stopPropagation && currRt.removeEventListener("*", this.stopPropagation), trulyDeFocus && (this.trySyncPlaceholderToTextConfig(), currRt.detachShadow()), this.currRt = null;
21090
+ editOptions.stopPropagation && currRt.removeEventListener("*", this.stopPropagation), trulyDeFocus && (this.trySyncPlaceholderToTextConfig(), currRt.detachShadow()), this.currRt = null, this.editModule.currRt = null;
21088
21091
  const shadowRoot = this.getShadow(currRt);
21089
21092
  this.editLine && (this.removeEditLineOrBgOrBounds(this.editLine, shadowRoot), this.editLine.release(), this.editLine = null, this.removeEditLineOrBgOrBounds(this.editBg, shadowRoot), this.editBg.release(), this.editBg = null), trulyDeFocus && (this.shadowBounds && (this.removeEditLineOrBgOrBounds(this.shadowBounds, shadowRoot), this.shadowBounds.release(), this.shadowBounds = null), this.shadowPlaceHolder && (this.shadowPlaceHolder.parent && this.shadowPlaceHolder.parent.removeChild(this.shadowPlaceHolder), this.shadowPlaceHolder.release(), this.shadowPlaceHolder = null)), this.focusing = !1, currRt.removeEventListener("pointerleave", this.handleLeave);
21090
21093
  }
@@ -31454,11 +31457,15 @@
31454
31457
  _registerWrapText.__loaded = !1;
31455
31458
  const registerWrapText = _registerWrapText;
31456
31459
 
31460
+ function pseudoRandom(n) {
31461
+ let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
31462
+ let hash = 3735928559 ^ seed;
31463
+ return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
31464
+ }
31457
31465
  function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31458
31466
  let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31459
31467
  let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31460
- graphic.dynamicTextureCache || (graphic.dynamicTextureCache = new Array(rowCount * columnCount).fill(0).map(item => 2 * Math.random() * Math.PI));
31461
- const targetRandomValue = graphic.dynamicTextureCache[row * columnCount + column],
31468
+ const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
31462
31469
  _r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
31463
31470
  return Math.min(1, Math.max(0, _r));
31464
31471
  }
@@ -31618,15 +31625,10 @@
31618
31625
  function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
31619
31626
  let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
31620
31627
  let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
31621
- graphic.dynamicTextureCache || (graphic.dynamicTextureCache = {
31622
- phases: new Array(rowCount * columnCount).fill(0).map(() => 2 * Math.random() * Math.PI),
31623
- speeds: new Array(rowCount * columnCount).fill(0).map(() => .5 + .5 * Math.random()),
31624
- directions: new Array(rowCount * columnCount).fill(0).map(() => 2 * Math.random() * Math.PI)
31625
- });
31626
31628
  const index = row * columnCount + column,
31627
- phase = graphic.dynamicTextureCache.phases[index],
31628
- speed = graphic.dynamicTextureCache.speeds[index],
31629
- direction = graphic.dynamicTextureCache.directions[index],
31629
+ phase = 2 * pseudoRandom(index, 0) * Math.PI,
31630
+ speed = .5 * pseudoRandom(index, 1) + .5,
31631
+ direction = 2 * pseudoRandom(index, 2) * Math.PI,
31630
31632
  centerRow = rowCount / 2,
31631
31633
  centerCol = columnCount / 2,
31632
31634
  distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
@@ -31640,7 +31642,7 @@
31640
31642
 
31641
31643
  const roughModule = _roughModule;
31642
31644
 
31643
- const version = "0.22.5-vstory.1";
31645
+ const version = "0.22.6-alpha.1";
31644
31646
  preLoadAllModule();
31645
31647
  if (isBrowserEnv()) {
31646
31648
  loadBrowserEnv(container);