@drincs/pixi-vn 0.6.3 → 0.6.5

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 (238) hide show
  1. package/README.md +8 -5
  2. package/dist/LabelProps-CFV-zRjG.d.ts +113 -0
  3. package/dist/LabelProps-CmRpvUJm.d.mts +113 -0
  4. package/dist/classes/CharacterBaseModel.js +42 -33
  5. package/dist/classes/CharacterBaseModel.js.map +1 -1
  6. package/dist/classes/CharacterBaseModel.mjs +42 -33
  7. package/dist/classes/CharacterBaseModel.mjs.map +1 -1
  8. package/dist/classes/ChoiceMenuOption.d.mts +68 -8
  9. package/dist/classes/ChoiceMenuOption.d.ts +68 -8
  10. package/dist/classes/ChoiceMenuOption.js +119 -53
  11. package/dist/classes/ChoiceMenuOption.js.map +1 -1
  12. package/dist/classes/ChoiceMenuOption.mjs +119 -53
  13. package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
  14. package/dist/classes/CloseLabel.d.mts +2 -2
  15. package/dist/classes/CloseLabel.d.ts +2 -2
  16. package/dist/classes/CloseLabel.js +53 -17
  17. package/dist/classes/CloseLabel.js.map +1 -1
  18. package/dist/classes/CloseLabel.mjs +53 -17
  19. package/dist/classes/CloseLabel.mjs.map +1 -1
  20. package/dist/classes/Label.d.mts +4 -72
  21. package/dist/classes/Label.d.ts +4 -72
  22. package/dist/classes/Label.js +50 -16
  23. package/dist/classes/Label.js.map +1 -1
  24. package/dist/classes/Label.mjs +50 -16
  25. package/dist/classes/Label.mjs.map +1 -1
  26. package/dist/classes/StoredClassModel.js +42 -33
  27. package/dist/classes/StoredClassModel.js.map +1 -1
  28. package/dist/classes/StoredClassModel.mjs +42 -33
  29. package/dist/classes/StoredClassModel.mjs.map +1 -1
  30. package/dist/classes/canvas/CanvasContainer.js +2 -2
  31. package/dist/classes/canvas/CanvasContainer.js.map +1 -1
  32. package/dist/classes/canvas/CanvasContainer.mjs +2 -2
  33. package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
  34. package/dist/classes/canvas/CanvasImage.js +2 -2
  35. package/dist/classes/canvas/CanvasImage.js.map +1 -1
  36. package/dist/classes/canvas/CanvasImage.mjs +2 -2
  37. package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
  38. package/dist/classes/canvas/CanvasSprite.js +2 -2
  39. package/dist/classes/canvas/CanvasSprite.js.map +1 -1
  40. package/dist/classes/canvas/CanvasSprite.mjs +2 -2
  41. package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
  42. package/dist/classes/canvas/CanvasText.js +2 -2
  43. package/dist/classes/canvas/CanvasText.js.map +1 -1
  44. package/dist/classes/canvas/CanvasText.mjs +2 -2
  45. package/dist/classes/canvas/CanvasText.mjs.map +1 -1
  46. package/dist/classes/canvas/index.js +2 -2
  47. package/dist/classes/canvas/index.js.map +1 -1
  48. package/dist/classes/canvas/index.mjs +2 -2
  49. package/dist/classes/canvas/index.mjs.map +1 -1
  50. package/dist/classes/index.d.mts +2 -2
  51. package/dist/classes/index.d.ts +2 -2
  52. package/dist/classes/index.js +119 -53
  53. package/dist/classes/index.js.map +1 -1
  54. package/dist/classes/index.mjs +119 -53
  55. package/dist/classes/index.mjs.map +1 -1
  56. package/dist/classes/ticker/FadeAlphaTicker.js +42 -33
  57. package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
  58. package/dist/classes/ticker/FadeAlphaTicker.mjs +42 -33
  59. package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
  60. package/dist/classes/ticker/MoveTicker.d.mts +1 -0
  61. package/dist/classes/ticker/MoveTicker.d.ts +1 -0
  62. package/dist/classes/ticker/MoveTicker.js +42 -33
  63. package/dist/classes/ticker/MoveTicker.js.map +1 -1
  64. package/dist/classes/ticker/MoveTicker.mjs +42 -33
  65. package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
  66. package/dist/classes/ticker/RotateTicker.d.mts +1 -0
  67. package/dist/classes/ticker/RotateTicker.d.ts +1 -0
  68. package/dist/classes/ticker/RotateTicker.js +42 -33
  69. package/dist/classes/ticker/RotateTicker.js.map +1 -1
  70. package/dist/classes/ticker/RotateTicker.mjs +42 -33
  71. package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
  72. package/dist/classes/ticker/ZoomTicker.d.mts +1 -0
  73. package/dist/classes/ticker/ZoomTicker.d.ts +1 -0
  74. package/dist/classes/ticker/ZoomTicker.js +42 -33
  75. package/dist/classes/ticker/ZoomTicker.js.map +1 -1
  76. package/dist/classes/ticker/ZoomTicker.mjs +42 -33
  77. package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
  78. package/dist/classes/ticker/index.js +42 -33
  79. package/dist/classes/ticker/index.js.map +1 -1
  80. package/dist/classes/ticker/index.mjs +42 -33
  81. package/dist/classes/ticker/index.mjs.map +1 -1
  82. package/dist/constants.d.mts +1 -1
  83. package/dist/constants.d.ts +1 -1
  84. package/dist/constants.js +1 -1
  85. package/dist/constants.js.map +1 -1
  86. package/dist/constants.mjs +1 -1
  87. package/dist/constants.mjs.map +1 -1
  88. package/dist/decorators/CanvasElementDecorator.js +2 -2
  89. package/dist/decorators/CanvasElementDecorator.js.map +1 -1
  90. package/dist/decorators/CanvasElementDecorator.mjs +2 -2
  91. package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
  92. package/dist/decorators/LabelDecorator.d.mts +3 -3
  93. package/dist/decorators/LabelDecorator.d.ts +3 -3
  94. package/dist/decorators/LabelDecorator.js +74 -50
  95. package/dist/decorators/LabelDecorator.js.map +1 -1
  96. package/dist/decorators/LabelDecorator.mjs +74 -50
  97. package/dist/decorators/LabelDecorator.mjs.map +1 -1
  98. package/dist/decorators/index.d.mts +2 -2
  99. package/dist/decorators/index.d.ts +2 -2
  100. package/dist/decorators/index.js +74 -50
  101. package/dist/decorators/index.js.map +1 -1
  102. package/dist/decorators/index.mjs +74 -50
  103. package/dist/decorators/index.mjs.map +1 -1
  104. package/dist/functions/CanvasUtility.js +2 -2
  105. package/dist/functions/CanvasUtility.js.map +1 -1
  106. package/dist/functions/CanvasUtility.mjs +2 -2
  107. package/dist/functions/CanvasUtility.mjs.map +1 -1
  108. package/dist/functions/DialogueUtility.d.mts +9 -9
  109. package/dist/functions/DialogueUtility.d.ts +9 -9
  110. package/dist/functions/DialogueUtility.js +184 -106
  111. package/dist/functions/DialogueUtility.js.map +1 -1
  112. package/dist/functions/DialogueUtility.mjs +184 -106
  113. package/dist/functions/DialogueUtility.mjs.map +1 -1
  114. package/dist/functions/FlagsUtility.js +42 -33
  115. package/dist/functions/FlagsUtility.js.map +1 -1
  116. package/dist/functions/FlagsUtility.mjs +42 -33
  117. package/dist/functions/FlagsUtility.mjs.map +1 -1
  118. package/dist/functions/GameUtility.js +42 -33
  119. package/dist/functions/GameUtility.js.map +1 -1
  120. package/dist/functions/GameUtility.mjs +42 -33
  121. package/dist/functions/GameUtility.mjs.map +1 -1
  122. package/dist/functions/ImageUtility.js +45 -36
  123. package/dist/functions/ImageUtility.js.map +1 -1
  124. package/dist/functions/ImageUtility.mjs +45 -36
  125. package/dist/functions/ImageUtility.mjs.map +1 -1
  126. package/dist/functions/SavesUtility.d.mts +4 -4
  127. package/dist/functions/SavesUtility.d.ts +4 -4
  128. package/dist/functions/SavesUtility.js +173 -111
  129. package/dist/functions/SavesUtility.js.map +1 -1
  130. package/dist/functions/SavesUtility.mjs +173 -111
  131. package/dist/functions/SavesUtility.mjs.map +1 -1
  132. package/dist/functions/TickerUtility.d.mts +2 -1
  133. package/dist/functions/TickerUtility.d.ts +2 -1
  134. package/dist/functions/TickerUtility.js +19 -15
  135. package/dist/functions/TickerUtility.js.map +1 -1
  136. package/dist/functions/TickerUtility.mjs +19 -15
  137. package/dist/functions/TickerUtility.mjs.map +1 -1
  138. package/dist/functions/index.d.mts +3 -3
  139. package/dist/functions/index.d.ts +3 -3
  140. package/dist/functions/index.js +197 -115
  141. package/dist/functions/index.js.map +1 -1
  142. package/dist/functions/index.mjs +197 -115
  143. package/dist/functions/index.mjs.map +1 -1
  144. package/dist/index.d.mts +1 -1
  145. package/dist/index.d.ts +1 -1
  146. package/dist/index.js +325 -190
  147. package/dist/index.js.map +1 -1
  148. package/dist/index.mjs +326 -191
  149. package/dist/index.mjs.map +1 -1
  150. package/dist/interface/IHistoryStep.d.mts +1 -1
  151. package/dist/interface/IHistoryStep.d.ts +1 -1
  152. package/dist/interface/ISaveData.d.mts +2 -2
  153. package/dist/interface/ISaveData.d.ts +2 -2
  154. package/dist/interface/LabelProps.d.mts +5 -0
  155. package/dist/interface/LabelProps.d.ts +5 -0
  156. package/dist/interface/LabelProps.js +4 -0
  157. package/dist/interface/LabelProps.js.map +1 -0
  158. package/dist/interface/LabelProps.mjs +3 -0
  159. package/dist/interface/LabelProps.mjs.map +1 -0
  160. package/dist/interface/export/ExportedStep.d.mts +2 -2
  161. package/dist/interface/export/ExportedStep.d.ts +2 -2
  162. package/dist/interface/export/index.d.mts +2 -2
  163. package/dist/interface/export/index.d.ts +2 -2
  164. package/dist/interface/index.d.mts +4 -4
  165. package/dist/interface/index.d.ts +4 -4
  166. package/dist/labels/BaseCanvasElementTestLabel.d.mts +2 -2
  167. package/dist/labels/BaseCanvasElementTestLabel.d.ts +2 -2
  168. package/dist/labels/BaseCanvasElementTestLabel.js +175 -111
  169. package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
  170. package/dist/labels/BaseCanvasElementTestLabel.mjs +176 -112
  171. package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
  172. package/dist/labels/CanvasEventsTestLabel.d.mts +3 -6
  173. package/dist/labels/CanvasEventsTestLabel.d.ts +3 -6
  174. package/dist/labels/CanvasEventsTestLabel.js +186 -128
  175. package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
  176. package/dist/labels/CanvasEventsTestLabel.mjs +187 -129
  177. package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
  178. package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +2 -2
  179. package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +2 -2
  180. package/dist/labels/CustomTickerCanvasElementTestLabel.js +166 -108
  181. package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
  182. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +166 -108
  183. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
  184. package/dist/labels/ImagesAnimationsTestLabel.d.mts +2 -2
  185. package/dist/labels/ImagesAnimationsTestLabel.d.ts +2 -2
  186. package/dist/labels/ImagesAnimationsTestLabel.js +253 -147
  187. package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
  188. package/dist/labels/ImagesAnimationsTestLabel.mjs +253 -147
  189. package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
  190. package/dist/labels/MarkdownTest.d.mts +2 -2
  191. package/dist/labels/MarkdownTest.d.ts +2 -2
  192. package/dist/labels/MarkdownTest.js +166 -108
  193. package/dist/labels/MarkdownTest.js.map +1 -1
  194. package/dist/labels/MarkdownTest.mjs +166 -108
  195. package/dist/labels/MarkdownTest.mjs.map +1 -1
  196. package/dist/labels/StartLabel.d.mts +2 -2
  197. package/dist/labels/StartLabel.d.ts +2 -2
  198. package/dist/labels/StartLabel.js +316 -184
  199. package/dist/labels/StartLabel.js.map +1 -1
  200. package/dist/labels/StartLabel.mjs +317 -185
  201. package/dist/labels/StartLabel.mjs.map +1 -1
  202. package/dist/labels/StepLabelTest.d.mts +9 -0
  203. package/dist/labels/StepLabelTest.d.ts +9 -0
  204. package/dist/labels/StepLabelTest.js +2758 -0
  205. package/dist/labels/StepLabelTest.js.map +1 -0
  206. package/dist/labels/StepLabelTest.mjs +2752 -0
  207. package/dist/labels/StepLabelTest.mjs.map +1 -0
  208. package/dist/labels/TestConstant.js +43 -34
  209. package/dist/labels/TestConstant.js.map +1 -1
  210. package/dist/labels/TestConstant.mjs +43 -34
  211. package/dist/labels/TestConstant.mjs.map +1 -1
  212. package/dist/labels/index.d.mts +2 -2
  213. package/dist/labels/index.d.ts +2 -2
  214. package/dist/labels/index.js +316 -184
  215. package/dist/labels/index.js.map +1 -1
  216. package/dist/labels/index.mjs +317 -185
  217. package/dist/labels/index.mjs.map +1 -1
  218. package/dist/managers/StepManager.d.mts +6 -5
  219. package/dist/managers/StepManager.d.ts +6 -5
  220. package/dist/managers/StepManager.js +163 -105
  221. package/dist/managers/StepManager.js.map +1 -1
  222. package/dist/managers/StepManager.mjs +163 -105
  223. package/dist/managers/StepManager.mjs.map +1 -1
  224. package/dist/managers/WindowManager.js +2 -2
  225. package/dist/managers/WindowManager.js.map +1 -1
  226. package/dist/managers/WindowManager.mjs +2 -2
  227. package/dist/managers/WindowManager.mjs.map +1 -1
  228. package/dist/managers/index.d.mts +2 -2
  229. package/dist/managers/index.d.ts +2 -2
  230. package/dist/managers/index.js +163 -105
  231. package/dist/managers/index.js.map +1 -1
  232. package/dist/managers/index.mjs +163 -105
  233. package/dist/managers/index.mjs.map +1 -1
  234. package/dist/types/ChoiceMenuOptionsType.d.mts +2 -2
  235. package/dist/types/ChoiceMenuOptionsType.d.ts +2 -2
  236. package/dist/types/index.d.mts +1 -1
  237. package/dist/types/index.d.ts +1 -1
  238. package/package.json +6 -6
@@ -69,14 +69,15 @@ var Label = class {
69
69
  /**
70
70
  * @param id is the id of the label
71
71
  * @param steps is the list of steps that the label will perform
72
- * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
73
- * @param choiseIndex is the index of the choice that the label will perform
72
+ * @param props is the properties of the label
74
73
  */
75
- constructor(id, steps, onStepRun, choiseIndex) {
74
+ constructor(id, steps, props) {
76
75
  this._id = id;
77
76
  this._steps = steps;
78
- this._onStepRun = onStepRun;
79
- this._choiseIndex = choiseIndex;
77
+ this._onStepStart = props == null ? void 0 : props.onStepStart;
78
+ this._onLoadStep = props == null ? void 0 : props.onLoadStep;
79
+ this._onStepEnd = props == null ? void 0 : props.onStepEnd;
80
+ this._choiseIndex = props == null ? void 0 : props.choiseIndex;
80
81
  }
81
82
  /**
82
83
  * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
@@ -113,18 +114,32 @@ var Label = class {
113
114
  return res;
114
115
  }
115
116
  /**
116
- * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
117
+ * Is a function that will be executed in {@link Label#onStepStart} and when the user goes back to it or when the user laods a save file.
118
+ * @returns Promise<void> or void
119
+ */
120
+ get onStepStart() {
121
+ return (stepIndex, label) => __async(this, null, function* () {
122
+ if (this._onLoadStep) {
123
+ yield this._onLoadStep(stepIndex, label);
124
+ }
125
+ if (this._onStepStart) {
126
+ return yield this._onStepStart(stepIndex, label);
127
+ }
128
+ });
129
+ }
130
+ /**
131
+ * Get the function that will be executed a old step is reloaded. A step is reloaded when the user goes back to it or when the user laods a save file.
132
+ * @returns Promise<void> or void
133
+ */
134
+ get onLoadStep() {
135
+ return this._onLoadStep;
136
+ }
137
+ /**
138
+ * Is a function that will be executed when the step ends.
117
139
  * @returns Promise<void> or void
118
- * @example
119
- * ```typescript
120
- * newLabel("id", [], () => {
121
- * Assets.load('path/to/image1.png')
122
- * Assets.load('path/to/image2.png')
123
- * })
124
- * ```
125
140
  */
126
- get onStepRun() {
127
- return this._onStepRun;
141
+ get onStepEnd() {
142
+ return this._onStepEnd;
128
143
  }
129
144
  get choiseIndex() {
130
145
  return this._choiseIndex;
@@ -134,16 +149,18 @@ var Label = class {
134
149
  // src/classes/CloseLabel.ts
135
150
  var CLOSE_LABEL_ID = "__close-label-id__";
136
151
  function newCloseLabel(choiseIndex) {
137
- return new Label(CLOSE_LABEL_ID, [], void 0, choiseIndex);
152
+ return new Label(CLOSE_LABEL_ID, [], {
153
+ choiseIndex
154
+ });
138
155
  }
139
156
 
140
157
  // src/decorators/LabelDecorator.ts
141
158
  var registeredLabels = {};
142
- function newLabel(id, steps, onStepRun) {
159
+ function newLabel(id, steps, props) {
143
160
  if (registeredLabels[id]) {
144
161
  console.info(`[Pixi'VN] Label ${id} already exists, it will be overwritten`);
145
162
  }
146
- let label = new Label(id, steps, onStepRun);
163
+ let label = new Label(id, steps, props);
147
164
  registeredLabels[id] = label;
148
165
  return label;
149
166
  }
@@ -232,8 +249,6 @@ function getMemoryContainer(element) {
232
249
  };
233
250
  }
234
251
  function setMemoryContainer(element, memory) {
235
- memory.width && (element.width = memory.width);
236
- memory.height && (element.height = memory.height);
237
252
  memory.isRenderGroup && (element.isRenderGroup = memory.isRenderGroup);
238
253
  memory.blendMode && (element.blendMode = memory.blendMode);
239
254
  memory.tint && (element.tint = memory.tint);
@@ -266,6 +281,8 @@ function setMemoryContainer(element, memory) {
266
281
  memory.interactive && (element.interactive = memory.interactive);
267
282
  memory.interactiveChildren && (element.interactiveChildren = memory.interactiveChildren);
268
283
  memory.hitArea && (element.hitArea = memory.hitArea);
284
+ memory.width && (element.width = memory.width);
285
+ memory.height && (element.height = memory.height);
269
286
  }
270
287
  function getTexture(imageUrl) {
271
288
  return __async(this, null, function* () {
@@ -687,12 +704,32 @@ var ChoiceMenuOption = class {
687
704
  /**
688
705
  * @param text Text to be displayed in the menu
689
706
  * @param label Label to be opened when the option is selected or the id of the label
707
+ * @param props Properties to be passed to the label and olther parameters that you can use when get all the choice menu options. It be converted to a JSON string, so it cannot contain functions or classes.
690
708
  * @param type Type of the label to be opened. @default "call"
691
- * @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes. @default {}
692
709
  */
693
- constructor(text, label, type = "call", props) {
710
+ constructor(text, label, props, type = "call") {
694
711
  /**
695
- * Properties to be passed to the label
712
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
713
+ * @example
714
+ * ```tsx
715
+ * setChoiceMenuOptions([
716
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
717
+ * ])
718
+ * return <List>
719
+ * {getChoiceMenuOptions()?.map((item, index) => {
720
+ * return (
721
+ * <ChoiceButton
722
+ * disabled={item.props.disabled}
723
+ * onClick={() => {
724
+ * afterSelectChoice(item)
725
+ * }}
726
+ * >
727
+ * {item.text}
728
+ * </ChoiceButton>
729
+ * )
730
+ * })}
731
+ * </List>
732
+ * ```
696
733
  */
697
734
  this.props = {};
698
735
  if (typeof label === "string") {
@@ -726,7 +763,27 @@ var ChoiceMenuOptionClose = class {
726
763
  */
727
764
  this.type = Close;
728
765
  /**
729
- * Properties to be passed to the label
766
+ * Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
767
+ * @example
768
+ * ```tsx
769
+ * setChoiceMenuOptions([
770
+ * new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
771
+ * ])
772
+ * return <List>
773
+ * {getChoiceMenuOptions()?.map((item, index) => {
774
+ * return (
775
+ * <ChoiceButton
776
+ * disabled={item.props.disabled}
777
+ * onClick={() => {
778
+ * afterSelectChoice(item)
779
+ * }}
780
+ * >
781
+ * {item.text}
782
+ * </ChoiceButton>
783
+ * )
784
+ * })}
785
+ * </List>
786
+ * ```
730
787
  */
731
788
  this.props = {};
732
789
  this.text = text;
@@ -795,7 +852,10 @@ function getChoiceMenuOptions() {
795
852
  }
796
853
  let label = getLabelById(option.label);
797
854
  if (label) {
798
- let itemLabel = new Label(label.id, label.steps, label.onStepRun, index);
855
+ let itemLabel = new Label(label.id, label.steps, {
856
+ onStepStart: label.onStepStart,
857
+ choiseIndex: index
858
+ });
799
859
  options.push(__spreadProps(__spreadValues({}, option), {
800
860
  label: itemLabel
801
861
  }));
@@ -886,8 +946,9 @@ FadeAlphaTicker = __decorateClass([
886
946
  ], FadeAlphaTicker);
887
947
 
888
948
  // src/functions/TickerUtility.ts
889
- function updateTickerProgression(args, propertyName, progression) {
890
- if (args[propertyName] === void 0 || !progression || args[propertyName] === progression.limit) {
949
+ function updateTickerProgression(args, propertyName, progression, valueConvert) {
950
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
951
+ if (args[propertyName] === void 0 || !progression || args[propertyName] === limit) {
891
952
  return;
892
953
  }
893
954
  if (typeof args[propertyName] === "number") {
@@ -906,22 +967,25 @@ function updateTickerProgression(args, propertyName, progression) {
906
967
  }
907
968
  }
908
969
  }
909
- function getLinearProgression(number, progression) {
910
- if (progression.limit !== void 0) {
911
- if (number > progression.limit && progression.amt > 0) {
912
- return progression.limit;
913
- } else if (number < progression.limit && progression.amt < 0) {
914
- return progression.limit;
970
+ function getLinearProgression(number, progression, valueConvert) {
971
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
972
+ let amt = valueConvert ? valueConvert(progression.amt) : progression.amt;
973
+ if (limit !== void 0) {
974
+ if (number > limit && amt > 0) {
975
+ return limit;
976
+ } else if (number < limit && amt < 0) {
977
+ return limit;
915
978
  }
916
979
  }
917
- return number + progression.amt / 60;
980
+ return number + amt;
918
981
  }
919
- function getExponentialProgression(number, progression) {
920
- if (progression.limit !== void 0) {
921
- if (number > progression.limit && progression.percentage > 0) {
922
- return progression.limit;
923
- } else if (number < progression.limit && progression.percentage < 0) {
924
- return progression.limit;
982
+ function getExponentialProgression(number, progression, valueConvert) {
983
+ let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
984
+ if (limit !== void 0) {
985
+ if (number > limit && progression.percentage > 0) {
986
+ return limit;
987
+ } else if (number < limit && progression.percentage < 0) {
988
+ return limit;
925
989
  }
926
990
  }
927
991
  return number + number * progression.percentage;
@@ -934,15 +998,13 @@ var MoveTicker = class extends TickerBase {
934
998
  let ySpeed = 1;
935
999
  if (args.speed) {
936
1000
  if (typeof args.speed === "number") {
937
- xSpeed = args.speed;
938
- ySpeed = args.speed;
1001
+ xSpeed = this.speedConvert(args.speed);
1002
+ ySpeed = this.speedConvert(args.speed);
939
1003
  } else {
940
- xSpeed = args.speed.x;
941
- ySpeed = args.speed.y;
1004
+ xSpeed = this.speedConvert(args.speed.x);
1005
+ ySpeed = this.speedConvert(args.speed.y);
942
1006
  }
943
1007
  }
944
- xSpeed /= 60;
945
- ySpeed /= 60;
946
1008
  let destination = args.destination;
947
1009
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
948
1010
  if (typeof tagToRemoveAfter2 === "string") {
@@ -982,7 +1044,10 @@ var MoveTicker = class extends TickerBase {
982
1044
  }
983
1045
  });
984
1046
  if (args.speedProgression)
985
- updateTickerProgression(args, "speed", args.speedProgression);
1047
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
1048
+ }
1049
+ speedConvert(speed) {
1050
+ return speed / 6;
986
1051
  }
987
1052
  };
988
1053
  MoveTicker = __decorateClass([
@@ -990,7 +1055,7 @@ MoveTicker = __decorateClass([
990
1055
  ], MoveTicker);
991
1056
  var RotateTicker = class extends TickerBase {
992
1057
  fn(ticker, args, tags, tickerId) {
993
- let speed = (args.speed === void 0 ? 1 : args.speed) / 60;
1058
+ let speed = this.speedConvert(args.speed === void 0 ? 1 : args.speed);
994
1059
  let clockwise = args.clockwise === void 0 ? true : args.clockwise;
995
1060
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
996
1061
  if (typeof tagToRemoveAfter2 === "string") {
@@ -1018,7 +1083,10 @@ var RotateTicker = class extends TickerBase {
1018
1083
  }
1019
1084
  });
1020
1085
  if (args.speedProgression)
1021
- updateTickerProgression(args, "speed", args.speedProgression);
1086
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
1087
+ }
1088
+ speedConvert(speed) {
1089
+ return speed / 60;
1022
1090
  }
1023
1091
  };
1024
1092
  RotateTicker = __decorateClass([
@@ -1030,15 +1098,13 @@ var ZoomTicker = class extends TickerBase {
1030
1098
  let ySpeed = 0.1;
1031
1099
  if (args.speed) {
1032
1100
  if (typeof args.speed === "number") {
1033
- xSpeed = args.speed;
1034
- ySpeed = args.speed;
1101
+ xSpeed = this.speedConvert(args.speed);
1102
+ ySpeed = this.speedConvert(args.speed);
1035
1103
  } else {
1036
- xSpeed = args.speed.x;
1037
- ySpeed = args.speed.y;
1104
+ xSpeed = this.speedConvert(args.speed.x);
1105
+ ySpeed = this.speedConvert(args.speed.y);
1038
1106
  }
1039
1107
  }
1040
- xSpeed /= 60;
1041
- ySpeed /= 60;
1042
1108
  let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
1043
1109
  if (typeof tagToRemoveAfter2 === "string") {
1044
1110
  tagToRemoveAfter2 = [tagToRemoveAfter2];
@@ -1105,7 +1171,10 @@ var ZoomTicker = class extends TickerBase {
1105
1171
  }
1106
1172
  });
1107
1173
  if (args.speedProgression)
1108
- updateTickerProgression(args, "speed", args.speedProgression);
1174
+ updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
1175
+ }
1176
+ speedConvert(speed) {
1177
+ return speed / 60;
1109
1178
  }
1110
1179
  onEndOfTicker(tag, tickerId, _element, tagToRemoveAfter2) {
1111
1180
  GameWindowManager.onEndOfTicker(tag, this, tagToRemoveAfter2, tickerId);
@@ -1302,14 +1371,14 @@ function zoomIn(_0, _1) {
1302
1371
  } else {
1303
1372
  canvasElement = image;
1304
1373
  }
1305
- if (canvasElement instanceof CanvasImage && ((_a = canvasElement.texture) == null ? void 0 : _a.label) == "EMPTY") {
1306
- yield canvasElement.load();
1307
- }
1308
1374
  let container = new CanvasContainer();
1309
1375
  container.addChild(canvasElement);
1310
1376
  container.height = GameWindowManager.canvasHeight;
1311
1377
  container.width = GameWindowManager.canvasWidth;
1312
1378
  GameWindowManager.addCanvasElement(tag, container);
1379
+ if (canvasElement instanceof CanvasImage && ((_a = canvasElement.texture) == null ? void 0 : _a.label) == "EMPTY") {
1380
+ yield canvasElement.load();
1381
+ }
1313
1382
  if (props.direction == "up") {
1314
1383
  container.pivot.y = GameWindowManager.canvasHeight;
1315
1384
  container.pivot.x = GameWindowManager.canvasWidth / 2;
@@ -2331,6 +2400,16 @@ var _GameStepManager = class _GameStepManager {
2331
2400
  static set originalStepData(value) {
2332
2401
  _GameStepManager._originalStepData = createExportableElement(value);
2333
2402
  }
2403
+ static get currentStepData() {
2404
+ let currentStepData = {
2405
+ path: window.location.pathname,
2406
+ storage: GameStorageManager.export(),
2407
+ canvas: GameWindowManager.export(),
2408
+ labelIndex: _GameStepManager.currentLabelStepIndex || 0,
2409
+ openedLabels: createExportableElement(_GameStepManager._openedLabels)
2410
+ };
2411
+ return currentStepData;
2412
+ }
2334
2413
  /* Edit History Methods */
2335
2414
  /**
2336
2415
  * Add a label to the history.
@@ -2338,19 +2417,13 @@ var _GameStepManager = class _GameStepManager {
2338
2417
  */
2339
2418
  static addStepHistory(step, choiseMade) {
2340
2419
  let stepHistory = getStepSha1(step);
2341
- let historyStep = {
2342
- path: window.location.pathname,
2343
- storage: GameStorageManager.export(),
2344
- canvas: GameWindowManager.export(),
2345
- labelIndex: _GameStepManager.currentLabelStepIndex || 0,
2346
- openedLabels: createExportableElement(_GameStepManager._openedLabels)
2347
- };
2420
+ let currentStepData = _GameStepManager.currentStepData;
2348
2421
  if (_GameStepManager.originalStepData) {
2349
- if (_GameStepManager.originalStepData.openedLabels.length === historyStep.openedLabels.length) {
2422
+ if (_GameStepManager.originalStepData.openedLabels.length === currentStepData.openedLabels.length) {
2350
2423
  try {
2351
2424
  let lastStepDataOpenedLabelsString = JSON.stringify(_GameStepManager.originalStepData.openedLabels);
2352
- let historyStepOpenedLabelsString = JSON.stringify(historyStep.openedLabels);
2353
- if (lastStepDataOpenedLabelsString === historyStepOpenedLabelsString && _GameStepManager.originalStepData.path === historyStep.path && _GameStepManager.originalStepData.labelIndex === historyStep.labelIndex) {
2425
+ let historyStepOpenedLabelsString = JSON.stringify(currentStepData.openedLabels);
2426
+ if (lastStepDataOpenedLabelsString === historyStepOpenedLabelsString && _GameStepManager.originalStepData.path === currentStepData.path && _GameStepManager.originalStepData.labelIndex === currentStepData.labelIndex) {
2354
2427
  return;
2355
2428
  }
2356
2429
  } catch (e) {
@@ -2358,7 +2431,7 @@ var _GameStepManager = class _GameStepManager {
2358
2431
  }
2359
2432
  }
2360
2433
  }
2361
- let data = deepDiff.diff(_GameStepManager.originalStepData, historyStep);
2434
+ let data = deepDiff.diff(_GameStepManager.originalStepData, currentStepData);
2362
2435
  if (data) {
2363
2436
  let dialoge = void 0;
2364
2437
  let requiredChoices = void 0;
@@ -2377,7 +2450,7 @@ var _GameStepManager = class _GameStepManager {
2377
2450
  index: _GameStepManager.lastStepIndex,
2378
2451
  choiceIndexMade: choiseMade
2379
2452
  });
2380
- _GameStepManager.originalStepData = historyStep;
2453
+ _GameStepManager.originalStepData = currentStepData;
2381
2454
  }
2382
2455
  _GameStepManager.increaseLastStepIndex();
2383
2456
  }
@@ -2468,6 +2541,9 @@ var _GameStepManager = class _GameStepManager {
2468
2541
  console.warn("[Pixi'VN] The player must make a choice");
2469
2542
  return;
2470
2543
  }
2544
+ if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
2545
+ yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
2546
+ }
2471
2547
  _GameStepManager.increaseCurrentStepIndex();
2472
2548
  return yield _GameStepManager.runCurrentStep(props, choiseMade);
2473
2549
  });
@@ -2492,6 +2568,10 @@ var _GameStepManager = class _GameStepManager {
2492
2568
  return;
2493
2569
  }
2494
2570
  if (currentLabel.steps.length > currentLabelStepIndex) {
2571
+ let onStepRun = currentLabel.onStepStart;
2572
+ if (onStepRun) {
2573
+ yield onStepRun(currentLabelStepIndex, currentLabel);
2574
+ }
2495
2575
  let step = currentLabel.steps[currentLabelStepIndex];
2496
2576
  let result = yield step(props);
2497
2577
  _GameStepManager.addStepHistory(step, choiseMade);
@@ -2556,6 +2636,9 @@ var _GameStepManager = class _GameStepManager {
2556
2636
  if (!tempLabel) {
2557
2637
  throw new Error(`[Pixi'VN] Label ${labelId} not found`);
2558
2638
  }
2639
+ if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
2640
+ yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
2641
+ }
2559
2642
  _GameStepManager.pushNewLabel(tempLabel.id);
2560
2643
  } catch (e) {
2561
2644
  console.error("[Pixi'VN] Error calling label", e);
@@ -2614,6 +2697,9 @@ var _GameStepManager = class _GameStepManager {
2614
2697
  if (!tempLabel) {
2615
2698
  throw new Error(`[Pixi'VN] Label ${labelId} not found`);
2616
2699
  }
2700
+ if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
2701
+ yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
2702
+ }
2617
2703
  _GameStepManager.pushNewLabel(tempLabel.id);
2618
2704
  } catch (e) {
2619
2705
  console.error("[Pixi'VN] Error jumping label", e);
@@ -2719,24 +2805,29 @@ var _GameStepManager = class _GameStepManager {
2719
2805
  * ```
2720
2806
  */
2721
2807
  static goBack(navigate, steps = 1) {
2722
- if (steps <= 0) {
2723
- console.warn("[Pixi'VN] Steps must be greater than 0");
2724
- return;
2725
- }
2726
- if (_GameStepManager._stepsHistory.length <= 1) {
2727
- console.warn("[Pixi'VN] No steps to go back");
2728
- return;
2729
- }
2730
- let restoredStep = _GameStepManager.goBackInternal(steps, _GameStepManager.originalStepData);
2731
- if (restoredStep) {
2732
- _GameStepManager._originalStepData = restoredStep;
2733
- _GameStepManager._openedLabels = createExportableElement(restoredStep.openedLabels);
2734
- GameStorageManager.import(createExportableElement(restoredStep.storage));
2735
- GameWindowManager.import(createExportableElement(restoredStep.canvas));
2736
- navigate(restoredStep.path);
2737
- } else {
2738
- console.error("[Pixi'VN] Error going back");
2739
- }
2808
+ return __async(this, null, function* () {
2809
+ if (steps <= 0) {
2810
+ console.warn("[Pixi'VN] Steps must be greater than 0");
2811
+ return;
2812
+ }
2813
+ if (_GameStepManager._stepsHistory.length <= 1) {
2814
+ console.warn("[Pixi'VN] No steps to go back");
2815
+ return;
2816
+ }
2817
+ let restoredStep = _GameStepManager.goBackInternal(steps, _GameStepManager.originalStepData);
2818
+ if (restoredStep) {
2819
+ _GameStepManager._originalStepData = restoredStep;
2820
+ _GameStepManager._openedLabels = createExportableElement(restoredStep.openedLabels);
2821
+ if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onLoadStep) {
2822
+ yield _GameStepManager.currentLabel.onLoadStep(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
2823
+ }
2824
+ GameStorageManager.import(createExportableElement(restoredStep.storage));
2825
+ GameWindowManager.import(createExportableElement(restoredStep.canvas));
2826
+ navigate(restoredStep.path);
2827
+ } else {
2828
+ console.error("[Pixi'VN] Error going back");
2829
+ }
2830
+ });
2740
2831
  }
2741
2832
  static goBackInternal(steps, restoredStep) {
2742
2833
  if (steps <= 0) {
@@ -2798,38 +2889,45 @@ var _GameStepManager = class _GameStepManager {
2798
2889
  * @param dataString The history in a JSON string.
2799
2890
  */
2800
2891
  static importJson(dataString) {
2801
- _GameStepManager.import(JSON.parse(dataString));
2892
+ return __async(this, null, function* () {
2893
+ yield _GameStepManager.import(JSON.parse(dataString));
2894
+ });
2802
2895
  }
2803
2896
  /**
2804
2897
  * Import the history from an object.
2805
2898
  * @param data The history in an object.
2806
2899
  */
2807
2900
  static import(data) {
2808
- _GameStepManager.clear();
2809
- try {
2810
- if (data.hasOwnProperty("stepsHistory")) {
2811
- _GameStepManager._stepsHistory = data["stepsHistory"];
2812
- } else {
2813
- console.warn("[Pixi'VN] Could not import stepsHistory data, so will be ignored");
2814
- }
2815
- if (data.hasOwnProperty("openedLabels")) {
2816
- _GameStepManager._openedLabels = data["openedLabels"];
2817
- } else {
2818
- console.warn("[Pixi'VN] Could not import openedLabels data, so will be ignored");
2819
- }
2820
- if (data.hasOwnProperty("lastStepIndex")) {
2821
- _GameStepManager._lastStepIndex = data["lastStepIndex"];
2822
- } else {
2823
- console.warn("[Pixi'VN] Could not import lastStepIndex data, so will be ignored");
2824
- }
2825
- if (data.hasOwnProperty("originalStepData")) {
2826
- _GameStepManager._originalStepData = data["originalStepData"];
2827
- } else {
2828
- console.warn("[Pixi'VN] Could not import originalStepData data, so will be ignored");
2901
+ return __async(this, null, function* () {
2902
+ _GameStepManager.clear();
2903
+ try {
2904
+ if (data.hasOwnProperty("stepsHistory")) {
2905
+ _GameStepManager._stepsHistory = data["stepsHistory"];
2906
+ } else {
2907
+ console.warn("[Pixi'VN] Could not import stepsHistory data, so will be ignored");
2908
+ }
2909
+ if (data.hasOwnProperty("openedLabels")) {
2910
+ _GameStepManager._openedLabels = data["openedLabels"];
2911
+ } else {
2912
+ console.warn("[Pixi'VN] Could not import openedLabels data, so will be ignored");
2913
+ }
2914
+ if (data.hasOwnProperty("lastStepIndex")) {
2915
+ _GameStepManager._lastStepIndex = data["lastStepIndex"];
2916
+ } else {
2917
+ console.warn("[Pixi'VN] Could not import lastStepIndex data, so will be ignored");
2918
+ }
2919
+ if (data.hasOwnProperty("originalStepData")) {
2920
+ _GameStepManager._originalStepData = data["originalStepData"];
2921
+ } else {
2922
+ console.warn("[Pixi'VN] Could not import originalStepData data, so will be ignored");
2923
+ }
2924
+ if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onLoadStep) {
2925
+ yield _GameStepManager.currentLabel.onLoadStep(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
2926
+ }
2927
+ } catch (e) {
2928
+ console.error("[Pixi'VN] Error importing data", e);
2829
2929
  }
2830
- } catch (e) {
2831
- console.error("[Pixi'VN] Error importing data", e);
2832
- }
2930
+ });
2833
2931
  }
2834
2932
  };
2835
2933
  /**
@@ -3005,7 +3103,7 @@ var DialogueBaseModel = class {
3005
3103
  var juliette = new CharacterBaseModel2("___pixivn_juliette___", {
3006
3104
  name: "Juliette",
3007
3105
  age: 25,
3008
- icon: "https://firebasestorage.googleapis.com/v0/b/pixi-vn.appspot.com/o/public%2Fcharacters%2Fjuliette-square.webp?alt=media&token=5856ae7b-d99e-4563-86ec-cbc48cc9c6b4",
3106
+ icon: "https://firebasestorage.googleapis.com/v0/b/pixi-vn.appspot.com/o/public%2Fcharacters%2Fjuliette-square.webp?alt=media",
3009
3107
  color: "#ac0086"
3010
3108
  });
3011
3109
  saveCharacter(juliette);
@@ -3042,13 +3140,13 @@ var imagesAnimationsTest = newLabel(IMAGE_ANIMAIONS_TEST_LABEL, [
3042
3140
  () => __async(void 0, null, function* () {
3043
3141
  setDialogue({ character: juliette, text: "Here's what they can do." });
3044
3142
  setChoiceMenuOptions([
3045
- new ChoiceMenuOption("Dissolve effect", imagesDissolveTest),
3046
- new ChoiceMenuOption("Fade effect", imagesFadeTest),
3047
- new ChoiceMenuOption("Rotate", imagesRotateTest),
3048
- new ChoiceMenuOption("Move", imagesMoveTest),
3049
- new ChoiceMenuOption("Zoom", imagesZoomTest),
3050
- new ChoiceMenuOption("Move in/out", imagesMoveInOutTest),
3051
- new ChoiceMenuOption("Zoom in/out", imagesZoomInOutTest),
3143
+ new ChoiceMenuOption("Dissolve effect", imagesDissolveTest, {}),
3144
+ new ChoiceMenuOption("Fade effect", imagesFadeTest, {}),
3145
+ new ChoiceMenuOption("Rotate", imagesRotateTest, {}),
3146
+ new ChoiceMenuOption("Move", imagesMoveTest, {}),
3147
+ new ChoiceMenuOption("Zoom", imagesZoomTest, {}),
3148
+ new ChoiceMenuOption("Move in/out", imagesMoveInOutTest, {}),
3149
+ new ChoiceMenuOption("Zoom in/out", imagesZoomInOutTest, {}),
3052
3150
  new ChoiceMenuOptionClose("Cancel", true)
3053
3151
  ]);
3054
3152
  }),
@@ -3158,8 +3256,8 @@ var imagesRotateTest = newLabel("___pixi_vn_images_rotate_test___", [
3158
3256
  text: `Here's what's going to happen:
3159
3257
  - ${eggHeadName} will rotate with a anchor set to 0.
3160
3258
  - ${flowerTopName} will rotate with a anchor set to 0.5 and a exponential speed progression.
3161
- - ${helmlokName} will rotate with a anchor set to 0.5, rotate 2 times, move to the right, rotate 5 times, and repeat.
3162
- - ${skullyName} will rotate with a anchor set to 1, rotate 3 times, wait for 0.5 seconds, rotate 7 times.`
3259
+ - ${helmlokName} will rotate with a anchor set to 0.5, rotate clockwise for 2 seconds, rotate counterclockwise with a exponential (-0.05) speed progression, and when it reaches 0, it will repeat.
3260
+ - ${skullyName} will rotate with a anchor set to 1, rotate 3 seconds clockwise, wait for 0.5 seconds, and rotate 7 seconds counterclockwise.`
3163
3261
  });
3164
3262
  let eggHead = GameWindowManager.getCanvasElement("eggHead");
3165
3263
  if (eggHead)
@@ -3212,10 +3310,10 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
3212
3310
  setDialogue({
3213
3311
  character: juliette,
3214
3312
  text: `Here's what's going to happen:
3215
- - ${eggHeadName} will move to { x: 500, y: 100 } with a speed of 0.4.
3216
- - ${flowerTopName} will move to { x: 500, y: 300 } with a speed of 0.3.
3217
- - ${helmlokName} will move to the right with a speed of 20 and a linear speed progression of -0.2, and then move to the left with a speed of 0.1 and a linear speed progression of 0.05.
3218
- - ${skullyName} will move to { x: 500, y: 500 } with a speed of 0.5, wait for 0.5 seconds, and move to { x: 100, y: 100 } with a speed of 0.5.`
3313
+ - ${eggHeadName} will move to { x: 500, y: 100 } with a speed of 24.
3314
+ - ${flowerTopName} will move to { x: 500, y: 300 } with a speed of 18.
3315
+ - ${helmlokName} will move to { x: 100, y: 500 } with a speed of 150 and a linear speed progression of -2 ( limit 10 ), and then move to { x: 1700, y: 500 } with a speed of 10 and a linear speed progression of 2 ( limit 150 ), and repeat.
3316
+ - ${skullyName} will move to { x: 500, y: 500 } with a speed of 40, wait for 0.5 seconds, and move to { x: 100, y: 100 } with a speed of 40.`
3219
3317
  });
3220
3318
  GameWindowManager.addTicker("eggHead", new MoveTicker({
3221
3319
  destination: { x: 500, y: 100 },
@@ -3228,25 +3326,25 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
3228
3326
  GameWindowManager.addTickersSteps("helmlok", [
3229
3327
  new MoveTicker({
3230
3328
  destination: { x: 100, y: 500 },
3231
- speed: 1200,
3232
- speedProgression: { type: "linear", amt: -12, limit: 60 }
3329
+ speed: 150,
3330
+ speedProgression: { type: "linear", amt: -2, limit: 10 }
3233
3331
  }),
3234
3332
  new MoveTicker({
3235
3333
  destination: { x: 1700, y: 500 },
3236
- speed: 6,
3237
- speedProgression: { type: "linear", amt: 3 }
3334
+ speed: 10,
3335
+ speedProgression: { type: "linear", amt: 2, limit: 150 }
3238
3336
  }),
3239
3337
  Repeat
3240
3338
  ]);
3241
3339
  GameWindowManager.addTickersSteps("skully", [
3242
3340
  new MoveTicker({
3243
3341
  destination: { x: 500, y: 500 },
3244
- speed: 60
3342
+ speed: 40
3245
3343
  }),
3246
3344
  Pause(0.5),
3247
3345
  new MoveTicker({
3248
3346
  destination: { x: 100, y: 100 },
3249
- speed: 60
3347
+ speed: 40
3250
3348
  })
3251
3349
  ]);
3252
3350
  }
@@ -3308,37 +3406,45 @@ var imagesMoveInOutTest = newLabel("___pixi_vn_images_move_in_out_test___", [
3308
3406
  setDialogue({
3309
3407
  character: juliette,
3310
3408
  text: `Here's what's going to happen:
3311
- - ${eggHeadName} will move in from the top with a speed of 800. If you go next, ${eggHeadName} will move out from the bottom with a speed of 800.
3312
- - ${flowerTopName} will move in from the right with a speed of 800 and a speed progression of 0.02. If you go next, ${flowerTopName} will move out from the left with a speed of 800 and a speed progression of 0.02.
3313
- - ${helmlokName} will move in from the left with a speed of 800. If you go next, ${helmlokName} will move out from the right with a speed of 800.
3314
- - ${skullyName} will move in from the bottom with a speed of 800 and a speed progression of 0.02. If you go next, ${skullyName} will move out from the top with a speed of 800 and a speed progression of 0.02.`
3409
+ - ${eggHeadName} will move in from the top with a speed of 80. If you go next, ${eggHeadName} will move out from the bottom with a speed of 80.
3410
+ - ${flowerTopName} will move in from the right with a speed of 80 and a speed progression of 0.02. If you go next, ${flowerTopName} will move out from the left with a speed of 80 and a speed progression of 0.02.
3411
+ - ${helmlokName} will move in from the left with a speed of 80. If you go next, ${helmlokName} will move out from the right with a speed of 80.
3412
+ - ${skullyName} will move in from the bottom with a speed of 80 and a speed progression of 0.02. If you go next, ${skullyName} will move out from the top with a speed of 80 and a speed progression of 0.02.`
3315
3413
  });
3316
3414
  let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
3317
3415
  let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
3318
3416
  let helmlok = new CanvasImage({ x: 100, y: 300 }, helmlokImage);
3319
3417
  let skully = new CanvasImage({ x: 300, y: 300 }, skullyImage);
3320
- moveIn("eggHead", eggHead, { speed: 800, direction: "down" });
3418
+ moveIn("eggHead", eggHead, { speed: 80, direction: "down" });
3321
3419
  moveIn("flowerTop", flowerTop, {
3322
- speed: 800,
3420
+ speed: 80,
3323
3421
  direction: "left",
3324
3422
  speedProgression: { type: "exponential", percentage: 0.02 }
3325
3423
  });
3326
- moveIn("helmlok", helmlok, { speed: 800, direction: "right" });
3424
+ moveIn("helmlok", helmlok, { speed: 80, direction: "right" });
3327
3425
  moveIn("skully", skully, {
3328
- speed: 800,
3426
+ speed: 80,
3329
3427
  direction: "up",
3330
3428
  speedProgression: { type: "exponential", percentage: 0.02 }
3331
3429
  });
3332
3430
  }),
3333
3431
  () => {
3334
- moveOut("eggHead", { speed: 800, direction: "down" });
3335
- moveOut("flowerTop", { speed: 800, direction: "left" });
3336
- moveOut("helmlok", { speed: 800, direction: "right" });
3337
- moveOut("skully", { speed: 800, direction: "up" });
3432
+ moveOut("eggHead", { speed: 80, direction: "down" });
3433
+ moveOut("flowerTop", { speed: 80, direction: "left" });
3434
+ moveOut("helmlok", { speed: 80, direction: "right" });
3435
+ moveOut("skully", { speed: 80, direction: "up" });
3338
3436
  }
3339
3437
  ]);
3340
3438
  var imagesZoomInOutTest = newLabel("___pixi_vn_images_zoom_in_out_test___", [
3341
3439
  () => __async(void 0, null, function* () {
3440
+ setDialogue({
3441
+ character: juliette,
3442
+ text: `Here's what's going to happen:
3443
+ - ${eggHeadName} will zoom in with a speed of 3. If you go next, ${eggHeadName} will zoom out with a speed of 3.
3444
+ - ${flowerTopName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${flowerTopName} will zoom out with a speed of 3.
3445
+ - ${helmlokName} will zoom in with a speed of 3. If you go next, ${helmlokName} will zoom out with a speed of 1.
3446
+ - ${skullyName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${skullyName} will zoom out with a speed of 3 and a speed progression of 0.02.`
3447
+ });
3342
3448
  GameWindowManager.removeCanvasElements();
3343
3449
  let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
3344
3450
  let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
@@ -3364,7 +3470,7 @@ var imagesZoomInOutTest = newLabel("___pixi_vn_images_zoom_in_out_test___", [
3364
3470
  speedProgression: { type: "exponential", percentage: 0.02 }
3365
3471
  });
3366
3472
  zoomOut("flowerTop", { speed: 3, direction: "left" });
3367
- zoomOut("helmlok", { speed: 3, direction: "right" });
3473
+ zoomOut("helmlok", { speed: 1, direction: "right" });
3368
3474
  zoomOut("skully", {
3369
3475
  speed: 3,
3370
3476
  direction: "up",