@vnejs/plugins.text 0.1.5 → 0.1.7

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/modules/cycle.js CHANGED
@@ -14,7 +14,13 @@ export class TextCycle extends Module {
14
14
 
15
15
  init = () => this.emit(this.EVENTS.SETTINGS.INIT, { name: this.SETTINGS.TEXT.TOKEN_RENDER_SPEED, value: this.PARAMS.TEXT.DEFAULT_TOKEN_RENDER_SPEED });
16
16
 
17
- onCicle = ({ tokens = [] } = {}) => {
17
+ onCicle = async ({ tokens = [] } = {}) => {
18
+ const { uid = "" } = this.globalState.text;
19
+ const { wall = [] } = this.globalState["text.wall"];
20
+
21
+ await this.emit(this.EVENTS.TEXT.CHANGED, { tokens, tokensVisible: 0, uid, wall });
22
+ await this.waitRerender();
23
+
18
24
  this.setState({ tokens, lastTs: new Date().getTime() });
19
25
  this.setUpdateTextRaf();
20
26
  };
package/modules/text.js CHANGED
@@ -19,7 +19,7 @@ export class Text extends Module {
19
19
  init = () => {
20
20
  this.shared.textNoAnimationSources = [];
21
21
 
22
- return this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineHandler });
22
+ return this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.CONST.SCENARIO.OTHER_MODULE, handler: this.onLineHandler });
23
23
  };
24
24
  onLineHandler = async (line, args) => {
25
25
  const { text, speaker: lineSpeaker } = line.match(this.CONST.TEXT.LINE_REG).groups;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.text",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {