@drincs/pixi-vn 0.4.6 → 0.4.8

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 (513) hide show
  1. package/dist/TickerBase-CFEJHstJ.d.mts +73 -0
  2. package/dist/TickerBase-CjfyD6j5.d.ts +73 -0
  3. package/dist/classes/CanvasEvent.d.mts +24 -0
  4. package/dist/classes/CanvasEvent.d.ts +24 -0
  5. package/dist/classes/CanvasEvent.js +12 -0
  6. package/dist/classes/CanvasEvent.js.map +1 -0
  7. package/dist/classes/CanvasEvent.mjs +10 -0
  8. package/dist/classes/CanvasEvent.mjs.map +1 -0
  9. package/dist/classes/CharacterBaseModel.d.mts +90 -0
  10. package/dist/classes/CharacterBaseModel.d.ts +90 -0
  11. package/dist/classes/CharacterBaseModel.js +1529 -0
  12. package/dist/classes/CharacterBaseModel.js.map +1 -0
  13. package/dist/classes/CharacterBaseModel.mjs +1527 -0
  14. package/dist/classes/CharacterBaseModel.mjs.map +1 -0
  15. package/dist/classes/ChoiceMenuOptionLabel.d.mts +42 -0
  16. package/dist/classes/ChoiceMenuOptionLabel.d.ts +42 -0
  17. package/dist/classes/ChoiceMenuOptionLabel.js +19 -0
  18. package/dist/classes/ChoiceMenuOptionLabel.js.map +1 -0
  19. package/dist/classes/ChoiceMenuOptionLabel.mjs +17 -0
  20. package/dist/classes/ChoiceMenuOptionLabel.mjs.map +1 -0
  21. package/dist/classes/DialogueBaseModel.d.mts +58 -0
  22. package/dist/classes/DialogueBaseModel.d.ts +58 -0
  23. package/dist/classes/DialogueBaseModel.js +51 -0
  24. package/dist/classes/DialogueBaseModel.js.map +1 -0
  25. package/dist/classes/DialogueBaseModel.mjs +49 -0
  26. package/dist/classes/DialogueBaseModel.mjs.map +1 -0
  27. package/dist/classes/Label.d.mts +46 -0
  28. package/dist/classes/Label.d.ts +46 -0
  29. package/dist/classes/Label.js +41 -0
  30. package/dist/classes/Label.js.map +1 -0
  31. package/dist/classes/Label.mjs +39 -0
  32. package/dist/classes/Label.mjs.map +1 -0
  33. package/dist/classes/StoredClassModel.d.mts +55 -0
  34. package/dist/classes/StoredClassModel.d.ts +55 -0
  35. package/dist/classes/StoredClassModel.js +1470 -0
  36. package/dist/classes/StoredClassModel.js.map +1 -0
  37. package/dist/classes/StoredClassModel.mjs +1468 -0
  38. package/dist/classes/StoredClassModel.mjs.map +1 -0
  39. package/dist/classes/canvas/CanvasBase.d.mts +37 -0
  40. package/dist/classes/canvas/CanvasBase.d.ts +37 -0
  41. package/dist/classes/canvas/CanvasBase.js +23 -0
  42. package/dist/classes/canvas/CanvasBase.js.map +1 -0
  43. package/dist/classes/canvas/CanvasBase.mjs +21 -0
  44. package/dist/classes/canvas/CanvasBase.mjs.map +1 -0
  45. package/dist/classes/canvas/CanvasContainer.d.mts +30 -0
  46. package/dist/classes/canvas/CanvasContainer.d.ts +30 -0
  47. package/dist/classes/canvas/CanvasContainer.js +514 -0
  48. package/dist/classes/canvas/CanvasContainer.js.map +1 -0
  49. package/dist/classes/canvas/CanvasContainer.mjs +508 -0
  50. package/dist/classes/canvas/CanvasContainer.mjs.map +1 -0
  51. package/dist/classes/canvas/CanvasImage.d.mts +50 -0
  52. package/dist/classes/canvas/CanvasImage.d.ts +50 -0
  53. package/dist/classes/canvas/CanvasImage.js +326 -0
  54. package/dist/classes/canvas/CanvasImage.js.map +1 -0
  55. package/dist/classes/canvas/CanvasImage.mjs +324 -0
  56. package/dist/classes/canvas/CanvasImage.mjs.map +1 -0
  57. package/dist/classes/canvas/CanvasSprite.d.mts +90 -0
  58. package/dist/classes/canvas/CanvasSprite.d.ts +90 -0
  59. package/dist/classes/canvas/CanvasSprite.js +285 -0
  60. package/dist/classes/canvas/CanvasSprite.js.map +1 -0
  61. package/dist/classes/canvas/CanvasSprite.mjs +279 -0
  62. package/dist/classes/canvas/CanvasSprite.mjs.map +1 -0
  63. package/dist/classes/canvas/CanvasText.d.mts +79 -0
  64. package/dist/classes/canvas/CanvasText.d.ts +79 -0
  65. package/dist/classes/canvas/CanvasText.js +259 -0
  66. package/dist/classes/canvas/CanvasText.js.map +1 -0
  67. package/dist/classes/canvas/CanvasText.mjs +253 -0
  68. package/dist/classes/canvas/CanvasText.mjs.map +1 -0
  69. package/dist/classes/canvas/index.d.mts +15 -0
  70. package/dist/classes/canvas/index.d.ts +15 -0
  71. package/dist/classes/canvas/index.js +528 -0
  72. package/dist/classes/canvas/index.js.map +1 -0
  73. package/dist/classes/canvas/index.mjs +522 -0
  74. package/dist/classes/canvas/index.mjs.map +1 -0
  75. package/dist/classes/index.d.mts +14 -0
  76. package/dist/classes/index.d.ts +14 -0
  77. package/dist/classes/index.js +1633 -0
  78. package/dist/classes/index.js.map +1 -0
  79. package/dist/classes/index.mjs +1626 -0
  80. package/dist/classes/index.mjs.map +1 -0
  81. package/dist/classes/ticker/TickerBase.d.mts +3 -0
  82. package/dist/classes/ticker/TickerBase.d.ts +3 -0
  83. package/dist/classes/ticker/TickerBase.js +29 -0
  84. package/dist/classes/ticker/TickerBase.js.map +1 -0
  85. package/dist/classes/ticker/TickerBase.mjs +27 -0
  86. package/dist/classes/ticker/TickerBase.mjs.map +1 -0
  87. package/dist/classes/ticker/TickerFadeAlpha.d.mts +31 -0
  88. package/dist/classes/ticker/TickerFadeAlpha.d.ts +31 -0
  89. package/dist/classes/ticker/TickerFadeAlpha.js +1330 -0
  90. package/dist/classes/ticker/TickerFadeAlpha.js.map +1 -0
  91. package/dist/classes/ticker/TickerFadeAlpha.mjs +1328 -0
  92. package/dist/classes/ticker/TickerFadeAlpha.mjs.map +1 -0
  93. package/dist/classes/ticker/TickerMove.d.mts +29 -0
  94. package/dist/classes/ticker/TickerMove.d.ts +29 -0
  95. package/dist/classes/ticker/TickerMove.js +1328 -0
  96. package/dist/classes/ticker/TickerMove.js.map +1 -0
  97. package/dist/classes/ticker/TickerMove.mjs +1326 -0
  98. package/dist/classes/ticker/TickerMove.mjs.map +1 -0
  99. package/dist/classes/ticker/TickerRotate.d.mts +30 -0
  100. package/dist/classes/ticker/TickerRotate.d.ts +30 -0
  101. package/dist/classes/ticker/TickerRotate.js +1328 -0
  102. package/dist/classes/ticker/TickerRotate.js.map +1 -0
  103. package/dist/classes/ticker/TickerRotate.mjs +1326 -0
  104. package/dist/classes/ticker/TickerRotate.mjs.map +1 -0
  105. package/dist/classes/ticker/index.d.mts +10 -0
  106. package/dist/classes/ticker/index.d.ts +10 -0
  107. package/dist/classes/ticker/index.js +1330 -0
  108. package/dist/classes/ticker/index.js.map +1 -0
  109. package/dist/classes/ticker/index.mjs +1328 -0
  110. package/dist/classes/ticker/index.mjs.map +1 -0
  111. package/dist/constants.d.mts +3 -0
  112. package/dist/constants.d.ts +3 -0
  113. package/dist/constants.js +8 -0
  114. package/dist/constants.js.map +1 -0
  115. package/dist/constants.mjs +6 -0
  116. package/dist/constants.mjs.map +1 -0
  117. package/dist/decorators/CanvasElementDecorator.d.mts +18 -0
  118. package/dist/decorators/CanvasElementDecorator.d.ts +18 -0
  119. package/dist/decorators/CanvasElementDecorator.js +540 -0
  120. package/dist/decorators/CanvasElementDecorator.js.map +1 -0
  121. package/dist/decorators/CanvasElementDecorator.mjs +533 -0
  122. package/dist/decorators/CanvasElementDecorator.mjs.map +1 -0
  123. package/dist/decorators/CharacterDecorator.d.mts +39 -0
  124. package/dist/decorators/CharacterDecorator.d.ts +39 -0
  125. package/dist/decorators/CharacterDecorator.js +37 -0
  126. package/dist/decorators/CharacterDecorator.js.map +1 -0
  127. package/dist/decorators/CharacterDecorator.mjs +32 -0
  128. package/dist/decorators/CharacterDecorator.mjs.map +1 -0
  129. package/dist/decorators/EventDecorator.d.mts +35 -0
  130. package/dist/decorators/EventDecorator.d.ts +35 -0
  131. package/dist/decorators/EventDecorator.js +52 -0
  132. package/dist/decorators/EventDecorator.js.map +1 -0
  133. package/dist/decorators/EventDecorator.mjs +45 -0
  134. package/dist/decorators/EventDecorator.mjs.map +1 -0
  135. package/dist/decorators/LabelDecorator.d.mts +32 -0
  136. package/dist/decorators/LabelDecorator.d.ts +32 -0
  137. package/dist/decorators/LabelDecorator.js +56 -0
  138. package/dist/decorators/LabelDecorator.js.map +1 -0
  139. package/dist/decorators/LabelDecorator.mjs +49 -0
  140. package/dist/decorators/LabelDecorator.mjs.map +1 -0
  141. package/dist/decorators/TickerDecorator.d.mts +27 -0
  142. package/dist/decorators/TickerDecorator.d.ts +27 -0
  143. package/dist/decorators/TickerDecorator.js +36 -0
  144. package/dist/decorators/TickerDecorator.js.map +1 -0
  145. package/dist/decorators/TickerDecorator.mjs +30 -0
  146. package/dist/decorators/TickerDecorator.mjs.map +1 -0
  147. package/dist/decorators/index.d.mts +23 -0
  148. package/dist/decorators/index.d.ts +23 -0
  149. package/dist/decorators/index.js +100 -0
  150. package/dist/decorators/index.js.map +1 -0
  151. package/dist/decorators/index.mjs +92 -0
  152. package/dist/decorators/index.mjs.map +1 -0
  153. package/dist/enums/LabelRunModeEnum.d.mts +9 -0
  154. package/dist/enums/LabelRunModeEnum.d.ts +9 -0
  155. package/dist/enums/LabelRunModeEnum.js +12 -0
  156. package/dist/enums/LabelRunModeEnum.js.map +1 -0
  157. package/dist/enums/LabelRunModeEnum.mjs +10 -0
  158. package/dist/enums/LabelRunModeEnum.mjs.map +1 -0
  159. package/dist/enums/index.d.mts +1 -0
  160. package/dist/enums/index.d.ts +1 -0
  161. package/dist/enums/index.js +12 -0
  162. package/dist/enums/index.js.map +1 -0
  163. package/dist/enums/index.mjs +10 -0
  164. package/dist/enums/index.mjs.map +1 -0
  165. package/dist/functions/CanvasUtility.d.mts +25 -0
  166. package/dist/functions/CanvasUtility.d.ts +25 -0
  167. package/dist/functions/CanvasUtility.js +510 -0
  168. package/dist/functions/CanvasUtility.js.map +1 -0
  169. package/dist/functions/CanvasUtility.mjs +506 -0
  170. package/dist/functions/CanvasUtility.mjs.map +1 -0
  171. package/dist/functions/DialogueUtility.d.mts +72 -0
  172. package/dist/functions/DialogueUtility.d.ts +72 -0
  173. package/dist/functions/DialogueUtility.js +2189 -0
  174. package/dist/functions/DialogueUtility.js.map +1 -0
  175. package/dist/functions/DialogueUtility.mjs +2177 -0
  176. package/dist/functions/DialogueUtility.mjs.map +1 -0
  177. package/dist/functions/DiffUtility.d.mts +5 -0
  178. package/dist/functions/DiffUtility.d.ts +5 -0
  179. package/dist/functions/DiffUtility.js +57 -0
  180. package/dist/functions/DiffUtility.js.map +1 -0
  181. package/dist/functions/DiffUtility.mjs +55 -0
  182. package/dist/functions/DiffUtility.mjs.map +1 -0
  183. package/dist/functions/EasterEgg.d.mts +3 -0
  184. package/dist/functions/EasterEgg.d.ts +3 -0
  185. package/dist/functions/EasterEgg.js +16 -0
  186. package/dist/functions/EasterEgg.js.map +1 -0
  187. package/dist/functions/EasterEgg.mjs +14 -0
  188. package/dist/functions/EasterEgg.mjs.map +1 -0
  189. package/dist/functions/ErrorUtility.d.mts +24 -0
  190. package/dist/functions/ErrorUtility.d.ts +24 -0
  191. package/dist/functions/ErrorUtility.js +261 -0
  192. package/dist/functions/ErrorUtility.js.map +1 -0
  193. package/dist/functions/ErrorUtility.mjs +258 -0
  194. package/dist/functions/ErrorUtility.mjs.map +1 -0
  195. package/dist/functions/ExportUtility.d.mts +8 -0
  196. package/dist/functions/ExportUtility.d.ts +8 -0
  197. package/dist/functions/ExportUtility.js +16 -0
  198. package/dist/functions/ExportUtility.js.map +1 -0
  199. package/dist/functions/ExportUtility.mjs +14 -0
  200. package/dist/functions/ExportUtility.mjs.map +1 -0
  201. package/dist/functions/FlagsUtility.d.mts +14 -0
  202. package/dist/functions/FlagsUtility.d.ts +14 -0
  203. package/dist/functions/FlagsUtility.js +1436 -0
  204. package/dist/functions/FlagsUtility.js.map +1 -0
  205. package/dist/functions/FlagsUtility.mjs +1433 -0
  206. package/dist/functions/FlagsUtility.mjs.map +1 -0
  207. package/dist/functions/GameUtility.d.mts +6 -0
  208. package/dist/functions/GameUtility.d.ts +6 -0
  209. package/dist/functions/GameUtility.js +1335 -0
  210. package/dist/functions/GameUtility.js.map +1 -0
  211. package/dist/functions/GameUtility.mjs +1333 -0
  212. package/dist/functions/GameUtility.mjs.map +1 -0
  213. package/dist/functions/ImageUtility.d.mts +51 -0
  214. package/dist/functions/ImageUtility.d.ts +51 -0
  215. package/dist/functions/ImageUtility.js +1392 -0
  216. package/dist/functions/ImageUtility.js.map +1 -0
  217. package/dist/functions/ImageUtility.mjs +1387 -0
  218. package/dist/functions/ImageUtility.mjs.map +1 -0
  219. package/dist/functions/SavesUtility.d.mts +90 -0
  220. package/dist/functions/SavesUtility.d.ts +90 -0
  221. package/dist/functions/SavesUtility.js +2081 -0
  222. package/dist/functions/SavesUtility.js.map +1 -0
  223. package/dist/functions/SavesUtility.mjs +2071 -0
  224. package/dist/functions/SavesUtility.mjs.map +1 -0
  225. package/dist/functions/StepLabelUtility.d.mts +20 -0
  226. package/dist/functions/StepLabelUtility.d.ts +20 -0
  227. package/dist/functions/StepLabelUtility.js +21 -0
  228. package/dist/functions/StepLabelUtility.js.map +1 -0
  229. package/dist/functions/StepLabelUtility.mjs +14 -0
  230. package/dist/functions/StepLabelUtility.mjs.map +1 -0
  231. package/dist/functions/TextureUtility.d.mts +11 -0
  232. package/dist/functions/TextureUtility.d.ts +11 -0
  233. package/dist/functions/TextureUtility.js +78 -0
  234. package/dist/functions/TextureUtility.js.map +1 -0
  235. package/dist/functions/TextureUtility.mjs +75 -0
  236. package/dist/functions/TextureUtility.mjs.map +1 -0
  237. package/dist/functions/TickerUtility.d.mts +13 -0
  238. package/dist/functions/TickerUtility.d.ts +13 -0
  239. package/dist/functions/TickerUtility.js +33 -0
  240. package/dist/functions/TickerUtility.js.map +1 -0
  241. package/dist/functions/TickerUtility.mjs +31 -0
  242. package/dist/functions/TickerUtility.mjs.map +1 -0
  243. package/dist/functions/index.d.mts +41 -0
  244. package/dist/functions/index.d.ts +41 -0
  245. package/dist/functions/index.js +2313 -0
  246. package/dist/functions/index.js.map +1 -0
  247. package/dist/functions/index.mjs +2289 -0
  248. package/dist/functions/index.mjs.map +1 -0
  249. package/dist/index.d.mts +63 -1751
  250. package/dist/index.d.ts +63 -1751
  251. package/dist/index.js +122 -226
  252. package/dist/index.js.map +1 -1
  253. package/dist/index.mjs +49 -127
  254. package/dist/index.mjs.map +1 -1
  255. package/dist/interface/IClassWithArgsHistory.d.mts +25 -0
  256. package/dist/interface/IClassWithArgsHistory.d.ts +25 -0
  257. package/dist/interface/IClassWithArgsHistory.js +4 -0
  258. package/dist/interface/IClassWithArgsHistory.js.map +1 -0
  259. package/dist/interface/IClassWithArgsHistory.mjs +3 -0
  260. package/dist/interface/IClassWithArgsHistory.mjs.map +1 -0
  261. package/dist/interface/IDialogueHistory.d.mts +33 -0
  262. package/dist/interface/IDialogueHistory.d.ts +33 -0
  263. package/dist/interface/IDialogueHistory.js +4 -0
  264. package/dist/interface/IDialogueHistory.js.map +1 -0
  265. package/dist/interface/IDialogueHistory.mjs +3 -0
  266. package/dist/interface/IDialogueHistory.mjs.map +1 -0
  267. package/dist/interface/IHistoryStep.d.mts +75 -0
  268. package/dist/interface/IHistoryStep.d.ts +75 -0
  269. package/dist/interface/IHistoryStep.js +4 -0
  270. package/dist/interface/IHistoryStep.js.map +1 -0
  271. package/dist/interface/IHistoryStep.mjs +3 -0
  272. package/dist/interface/IHistoryStep.mjs.map +1 -0
  273. package/dist/interface/IOpenedLabel.d.mts +8 -0
  274. package/dist/interface/IOpenedLabel.d.ts +8 -0
  275. package/dist/interface/IOpenedLabel.js +4 -0
  276. package/dist/interface/IOpenedLabel.js.map +1 -0
  277. package/dist/interface/IOpenedLabel.mjs +3 -0
  278. package/dist/interface/IOpenedLabel.mjs.map +1 -0
  279. package/dist/interface/ISaveData.d.mts +33 -0
  280. package/dist/interface/ISaveData.d.ts +33 -0
  281. package/dist/interface/ISaveData.js +4 -0
  282. package/dist/interface/ISaveData.js.map +1 -0
  283. package/dist/interface/ISaveData.mjs +3 -0
  284. package/dist/interface/ISaveData.mjs.map +1 -0
  285. package/dist/interface/ITicker.d.mts +3 -0
  286. package/dist/interface/ITicker.d.ts +3 -0
  287. package/dist/interface/ITicker.js +4 -0
  288. package/dist/interface/ITicker.js.map +1 -0
  289. package/dist/interface/ITicker.mjs +3 -0
  290. package/dist/interface/ITicker.mjs.map +1 -0
  291. package/dist/interface/ITickersSteps.d.mts +31 -0
  292. package/dist/interface/ITickersSteps.d.ts +31 -0
  293. package/dist/interface/ITickersSteps.js +4 -0
  294. package/dist/interface/ITickersSteps.js.map +1 -0
  295. package/dist/interface/ITickersSteps.mjs +3 -0
  296. package/dist/interface/ITickersSteps.mjs.map +1 -0
  297. package/dist/interface/TickerProgrationType.d.mts +13 -0
  298. package/dist/interface/TickerProgrationType.d.ts +13 -0
  299. package/dist/interface/TickerProgrationType.js +4 -0
  300. package/dist/interface/TickerProgrationType.js.map +1 -0
  301. package/dist/interface/TickerProgrationType.mjs +3 -0
  302. package/dist/interface/TickerProgrationType.mjs.map +1 -0
  303. package/dist/interface/canvas/ICanvasBaseMemory.d.mts +8 -0
  304. package/dist/interface/canvas/ICanvasBaseMemory.d.ts +8 -0
  305. package/dist/interface/canvas/ICanvasBaseMemory.js +4 -0
  306. package/dist/interface/canvas/ICanvasBaseMemory.js.map +1 -0
  307. package/dist/interface/canvas/ICanvasBaseMemory.mjs +3 -0
  308. package/dist/interface/canvas/ICanvasBaseMemory.mjs.map +1 -0
  309. package/dist/interface/canvas/ICanvasContainerMemory.d.mts +11 -0
  310. package/dist/interface/canvas/ICanvasContainerMemory.d.ts +11 -0
  311. package/dist/interface/canvas/ICanvasContainerMemory.js +4 -0
  312. package/dist/interface/canvas/ICanvasContainerMemory.js.map +1 -0
  313. package/dist/interface/canvas/ICanvasContainerMemory.mjs +3 -0
  314. package/dist/interface/canvas/ICanvasContainerMemory.mjs.map +1 -0
  315. package/dist/interface/canvas/ICanvasImageMemory.d.mts +14 -0
  316. package/dist/interface/canvas/ICanvasImageMemory.d.ts +14 -0
  317. package/dist/interface/canvas/ICanvasImageMemory.js +4 -0
  318. package/dist/interface/canvas/ICanvasImageMemory.js.map +1 -0
  319. package/dist/interface/canvas/ICanvasImageMemory.mjs +3 -0
  320. package/dist/interface/canvas/ICanvasImageMemory.mjs.map +1 -0
  321. package/dist/interface/canvas/ICanvasSpriteMemory.d.mts +19 -0
  322. package/dist/interface/canvas/ICanvasSpriteMemory.d.ts +19 -0
  323. package/dist/interface/canvas/ICanvasSpriteMemory.js +4 -0
  324. package/dist/interface/canvas/ICanvasSpriteMemory.js.map +1 -0
  325. package/dist/interface/canvas/ICanvasSpriteMemory.mjs +3 -0
  326. package/dist/interface/canvas/ICanvasSpriteMemory.mjs.map +1 -0
  327. package/dist/interface/canvas/ICanvasTextTextMemory.d.mts +15 -0
  328. package/dist/interface/canvas/ICanvasTextTextMemory.d.ts +15 -0
  329. package/dist/interface/canvas/ICanvasTextTextMemory.js +4 -0
  330. package/dist/interface/canvas/ICanvasTextTextMemory.js.map +1 -0
  331. package/dist/interface/canvas/ICanvasTextTextMemory.mjs +3 -0
  332. package/dist/interface/canvas/ICanvasTextTextMemory.mjs.map +1 -0
  333. package/dist/interface/canvas/ITextureMemory.d.mts +8 -0
  334. package/dist/interface/canvas/ITextureMemory.d.ts +8 -0
  335. package/dist/interface/canvas/ITextureMemory.js +4 -0
  336. package/dist/interface/canvas/ITextureMemory.js.map +1 -0
  337. package/dist/interface/canvas/ITextureMemory.mjs +3 -0
  338. package/dist/interface/canvas/ITextureMemory.mjs.map +1 -0
  339. package/dist/interface/canvas/index.d.mts +8 -0
  340. package/dist/interface/canvas/index.d.ts +8 -0
  341. package/dist/interface/canvas/index.js +4 -0
  342. package/dist/interface/canvas/index.js.map +1 -0
  343. package/dist/interface/canvas/index.mjs +3 -0
  344. package/dist/interface/canvas/index.mjs.map +1 -0
  345. package/dist/interface/export/ExportedCanvas.d.mts +19 -0
  346. package/dist/interface/export/ExportedCanvas.d.ts +19 -0
  347. package/dist/interface/export/ExportedCanvas.js +4 -0
  348. package/dist/interface/export/ExportedCanvas.js.map +1 -0
  349. package/dist/interface/export/ExportedCanvas.mjs +3 -0
  350. package/dist/interface/export/ExportedCanvas.mjs.map +1 -0
  351. package/dist/interface/export/ExportedStep.d.mts +34 -0
  352. package/dist/interface/export/ExportedStep.d.ts +34 -0
  353. package/dist/interface/export/ExportedStep.js +4 -0
  354. package/dist/interface/export/ExportedStep.js.map +1 -0
  355. package/dist/interface/export/ExportedStep.mjs +3 -0
  356. package/dist/interface/export/ExportedStep.mjs.map +1 -0
  357. package/dist/interface/export/ExportedStorage.d.mts +10 -0
  358. package/dist/interface/export/ExportedStorage.d.ts +10 -0
  359. package/dist/interface/export/ExportedStorage.js +4 -0
  360. package/dist/interface/export/ExportedStorage.js.map +1 -0
  361. package/dist/interface/export/ExportedStorage.mjs +3 -0
  362. package/dist/interface/export/ExportedStorage.mjs.map +1 -0
  363. package/dist/interface/export/index.d.mts +23 -0
  364. package/dist/interface/export/index.d.ts +23 -0
  365. package/dist/interface/export/index.js +4 -0
  366. package/dist/interface/export/index.js.map +1 -0
  367. package/dist/interface/export/index.mjs +3 -0
  368. package/dist/interface/export/index.mjs.map +1 -0
  369. package/dist/interface/index.d.mts +29 -0
  370. package/dist/interface/index.d.ts +29 -0
  371. package/dist/interface/index.js +4 -0
  372. package/dist/interface/index.js.map +1 -0
  373. package/dist/interface/index.mjs +3 -0
  374. package/dist/interface/index.mjs.map +1 -0
  375. package/dist/managers/StepManager.d.mts +210 -0
  376. package/dist/managers/StepManager.d.ts +210 -0
  377. package/dist/managers/StepManager.js +2043 -0
  378. package/dist/managers/StepManager.js.map +1 -0
  379. package/dist/managers/StepManager.mjs +2037 -0
  380. package/dist/managers/StepManager.mjs.map +1 -0
  381. package/dist/managers/StorageManager.d.mts +45 -0
  382. package/dist/managers/StorageManager.d.ts +45 -0
  383. package/dist/managers/StorageManager.js +101 -0
  384. package/dist/managers/StorageManager.js.map +1 -0
  385. package/dist/managers/StorageManager.mjs +99 -0
  386. package/dist/managers/StorageManager.mjs.map +1 -0
  387. package/dist/managers/WindowManager.d.mts +265 -0
  388. package/dist/managers/WindowManager.d.ts +265 -0
  389. package/dist/managers/WindowManager.js +1142 -0
  390. package/dist/managers/WindowManager.js.map +1 -0
  391. package/dist/managers/WindowManager.mjs +1140 -0
  392. package/dist/managers/WindowManager.mjs.map +1 -0
  393. package/dist/managers/index.d.mts +30 -0
  394. package/dist/managers/index.d.ts +30 -0
  395. package/dist/managers/index.js +2049 -0
  396. package/dist/managers/index.js.map +1 -0
  397. package/dist/managers/index.mjs +2041 -0
  398. package/dist/managers/index.mjs.map +1 -0
  399. package/dist/override/StepLabelProps.d.mts +18 -0
  400. package/dist/override/StepLabelProps.d.ts +18 -0
  401. package/dist/override/StepLabelProps.js +4 -0
  402. package/dist/override/StepLabelProps.js.map +1 -0
  403. package/dist/override/StepLabelProps.mjs +3 -0
  404. package/dist/override/StepLabelProps.mjs.map +1 -0
  405. package/dist/override/StepLabelResult.d.mts +19 -0
  406. package/dist/override/StepLabelResult.d.ts +19 -0
  407. package/dist/override/StepLabelResult.js +4 -0
  408. package/dist/override/StepLabelResult.js.map +1 -0
  409. package/dist/override/StepLabelResult.mjs +3 -0
  410. package/dist/override/StepLabelResult.mjs.map +1 -0
  411. package/dist/override/index.d.mts +2 -0
  412. package/dist/override/index.d.ts +2 -0
  413. package/dist/override/index.js +4 -0
  414. package/dist/override/index.js.map +1 -0
  415. package/dist/override/index.mjs +3 -0
  416. package/dist/override/index.mjs.map +1 -0
  417. package/dist/types/CanvasElementTagType.d.mts +3 -0
  418. package/dist/types/CanvasElementTagType.d.ts +3 -0
  419. package/dist/types/CanvasElementTagType.js +4 -0
  420. package/dist/types/CanvasElementTagType.js.map +1 -0
  421. package/dist/types/CanvasElementTagType.mjs +3 -0
  422. package/dist/types/CanvasElementTagType.mjs.map +1 -0
  423. package/dist/types/CanvasEventNamesType.d.mts +6 -0
  424. package/dist/types/CanvasEventNamesType.d.ts +6 -0
  425. package/dist/types/CanvasEventNamesType.js +4 -0
  426. package/dist/types/CanvasEventNamesType.js.map +1 -0
  427. package/dist/types/CanvasEventNamesType.mjs +3 -0
  428. package/dist/types/CanvasEventNamesType.mjs.map +1 -0
  429. package/dist/types/ChoiceMenuOptionsType.d.mts +16 -0
  430. package/dist/types/ChoiceMenuOptionsType.d.ts +16 -0
  431. package/dist/types/ChoiceMenuOptionsType.js +4 -0
  432. package/dist/types/ChoiceMenuOptionsType.js.map +1 -0
  433. package/dist/types/ChoiceMenuOptionsType.mjs +3 -0
  434. package/dist/types/ChoiceMenuOptionsType.mjs.map +1 -0
  435. package/dist/types/EventIdType.d.mts +3 -0
  436. package/dist/types/EventIdType.d.ts +3 -0
  437. package/dist/types/EventIdType.js +4 -0
  438. package/dist/types/EventIdType.js.map +1 -0
  439. package/dist/types/EventIdType.mjs +3 -0
  440. package/dist/types/EventIdType.mjs.map +1 -0
  441. package/dist/types/LabelIdType.d.mts +7 -0
  442. package/dist/types/LabelIdType.d.ts +7 -0
  443. package/dist/types/LabelIdType.js +4 -0
  444. package/dist/types/LabelIdType.js.map +1 -0
  445. package/dist/types/LabelIdType.mjs +3 -0
  446. package/dist/types/LabelIdType.mjs.map +1 -0
  447. package/dist/types/PauseType.d.mts +8 -0
  448. package/dist/types/PauseType.d.ts +8 -0
  449. package/dist/types/PauseType.js +15 -0
  450. package/dist/types/PauseType.js.map +1 -0
  451. package/dist/types/PauseType.mjs +12 -0
  452. package/dist/types/PauseType.mjs.map +1 -0
  453. package/dist/types/RepeatType.d.mts +4 -0
  454. package/dist/types/RepeatType.d.ts +4 -0
  455. package/dist/types/RepeatType.js +8 -0
  456. package/dist/types/RepeatType.js.map +1 -0
  457. package/dist/types/RepeatType.mjs +6 -0
  458. package/dist/types/RepeatType.mjs.map +1 -0
  459. package/dist/types/StepHistoryDataType.d.mts +8 -0
  460. package/dist/types/StepHistoryDataType.d.ts +8 -0
  461. package/dist/types/StepHistoryDataType.js +4 -0
  462. package/dist/types/StepHistoryDataType.js.map +1 -0
  463. package/dist/types/StepHistoryDataType.mjs +3 -0
  464. package/dist/types/StepHistoryDataType.mjs.map +1 -0
  465. package/dist/types/StepLabelType.d.mts +11 -0
  466. package/dist/types/StepLabelType.d.ts +11 -0
  467. package/dist/types/StepLabelType.js +4 -0
  468. package/dist/types/StepLabelType.js.map +1 -0
  469. package/dist/types/StepLabelType.mjs +3 -0
  470. package/dist/types/StepLabelType.mjs.map +1 -0
  471. package/dist/types/StorageElementType.d.mts +10 -0
  472. package/dist/types/StorageElementType.d.ts +10 -0
  473. package/dist/types/StorageElementType.js +4 -0
  474. package/dist/types/StorageElementType.js.map +1 -0
  475. package/dist/types/StorageElementType.mjs +3 -0
  476. package/dist/types/StorageElementType.mjs.map +1 -0
  477. package/dist/types/TickerIdType.d.mts +7 -0
  478. package/dist/types/TickerIdType.d.ts +7 -0
  479. package/dist/types/TickerIdType.js +4 -0
  480. package/dist/types/TickerIdType.js.map +1 -0
  481. package/dist/types/TickerIdType.mjs +3 -0
  482. package/dist/types/TickerIdType.mjs.map +1 -0
  483. package/dist/types/index.d.mts +13 -0
  484. package/dist/types/index.d.ts +13 -0
  485. package/dist/types/index.js +19 -0
  486. package/dist/types/index.js.map +1 -0
  487. package/dist/types/index.mjs +15 -0
  488. package/dist/types/index.mjs.map +1 -0
  489. package/dist/types/ticker/TickerFadeAlphaProps.d.mts +26 -0
  490. package/dist/types/ticker/TickerFadeAlphaProps.d.ts +26 -0
  491. package/dist/types/ticker/TickerFadeAlphaProps.js +4 -0
  492. package/dist/types/ticker/TickerFadeAlphaProps.js.map +1 -0
  493. package/dist/types/ticker/TickerFadeAlphaProps.mjs +3 -0
  494. package/dist/types/ticker/TickerFadeAlphaProps.mjs.map +1 -0
  495. package/dist/types/ticker/TickerMoveProps.d.mts +26 -0
  496. package/dist/types/ticker/TickerMoveProps.d.ts +26 -0
  497. package/dist/types/ticker/TickerMoveProps.js +4 -0
  498. package/dist/types/ticker/TickerMoveProps.js.map +1 -0
  499. package/dist/types/ticker/TickerMoveProps.mjs +3 -0
  500. package/dist/types/ticker/TickerMoveProps.mjs.map +1 -0
  501. package/dist/types/ticker/TickerRotateProps.d.mts +24 -0
  502. package/dist/types/ticker/TickerRotateProps.d.ts +24 -0
  503. package/dist/types/ticker/TickerRotateProps.js +4 -0
  504. package/dist/types/ticker/TickerRotateProps.js.map +1 -0
  505. package/dist/types/ticker/TickerRotateProps.mjs +3 -0
  506. package/dist/types/ticker/TickerRotateProps.mjs.map +1 -0
  507. package/dist/types/ticker/index.d.mts +3 -0
  508. package/dist/types/ticker/index.d.ts +3 -0
  509. package/dist/types/ticker/index.js +4 -0
  510. package/dist/types/ticker/index.js.map +1 -0
  511. package/dist/types/ticker/index.mjs +3 -0
  512. package/dist/types/ticker/index.mjs.map +1 -0
  513. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,1752 +1,64 @@
1
- import * as pixi_js from 'pixi.js';
2
- import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, ContainerChild, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
3
1
  export { Assets } from 'pixi.js';
4
- import deepDiff from 'deep-diff';
5
-
6
- /**
7
- * CanvasEventNamesType is a type that is used to define the event names for the canvas.
8
- */
9
- type CanvasEventNamesType = (string | symbol) extends string | symbol ? (string | symbol) : keyof (string | symbol);
10
-
11
- /**
12
- * CanvasEvent is a class that is used to create a pixi event, and connect it to a canvas element, with on().
13
- * This class should be extended and the fn method should be overridden.
14
- * You must use the eventDecorator to register the event in the game.
15
- * @example
16
- * ```typescript
17
- * \@eventDecorator() // this is equivalent to eventDecorator("EventTest")
18
- * export class EventTest extends CanvasEvent<CanvasSprite> {
19
- * override fn(event: CanvasEventNamesType, sprite: CanvasSprite): void {
20
- * if (event === 'pointerdown') {
21
- * sprite.scale.x *= 1.25;
22
- * sprite.scale.y *= 1.25;
23
- * }
24
- * }
25
- * }
26
- * ```
27
- */
28
- declare class CanvasEvent<C> {
29
- fn(_event: CanvasEventNamesType, _element: C): void;
30
- }
31
-
32
- /**
33
- * StoredClassModel is a abstract class that contains the methods to store a class in the game.
34
- * I suggest you extend this class to create your own stored class.
35
- * @example
36
- * ```typescript
37
- * export class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
38
- * constructor(id: string, props: CharacterBaseModelProps) {
39
- * super("___character___", id)
40
- * this.defaultName = props.name
41
- * this.defaultSurname = props.surname
42
- * }
43
- * private defaultName: string = ""
44
- * get name(): string {
45
- * return this.getStorageProperty<string>("name") || this.defaultName
46
- * }
47
- * set name(value: string) {
48
- * this.setStorageProperty<string>("name", value)
49
- * }
50
- * private defaultSurname?: string
51
- * get surname(): string | undefined {
52
- * return this.getStorageProperty<string>("surname") || this.defaultSurname
53
- * }
54
- * set surname(value: string | undefined) {
55
- * this.setStorageProperty<string>("surname", value)
56
- * }
57
- * }
58
- * ```
59
- */
60
- declare class StoredClassModel {
61
- /**
62
- * @param categoryId The id of the category. For example if you are storing a character class, you can use "characters" as categoryId. so all instances of the character class will be stored in the "characters" category.
63
- * @param id The id of instance of the class. This id must be unique for the category.
64
- */
65
- constructor(categoryId: string, id: string);
66
- private _id;
67
- /**
68
- * Is id of the stored class. is unique for this class.
69
- */
70
- get id(): string;
71
- private categoryId;
72
- /**
73
- * Update a property in the storage.
74
- * @param propertyName The name of the property to set.
75
- * @param value The value to set. If is undefined, the property will be removed from the storage.
76
- */
77
- setStorageProperty<T>(propertyName: string, value: T | undefined): void;
78
- /**
79
- * Get a property from the storage.
80
- * @param propertyName The name of the property to get.
81
- * @returns The value of the property. If the property is not found, returns undefined.
82
- */
83
- getStorageProperty<T>(propertyName: string): T | undefined;
84
- }
85
-
86
- /**
87
- * CharacterBaseModelProps is an interface that is used to create a character model.
88
- */
89
- interface CharacterBaseModelProps {
90
- /**
91
- * The name of the character.
92
- */
93
- name: string;
94
- /**
95
- * The surname of the character.
96
- */
97
- surname?: string;
98
- /**
99
- * The age of the character.
100
- */
101
- age?: number;
102
- /**
103
- * The icon of the character.
104
- */
105
- icon?: string;
106
- /**
107
- * The color of the character.
108
- */
109
- color?: string;
110
- }
111
- /**
112
- * CharacterBaseModel is a class that is used to create a character model.
113
- * I suggest you extend this class to create your own character models.
114
- * You must use the saveCharacter function to save the character in the game.
115
- * @example
116
- * ```typescript
117
- * export const liam = new CharacterBaseModel('liam', {
118
- * name: 'Liam',
119
- * surname: 'Smith',
120
- * age: 25,
121
- * icon: "https://pixijs.com/assets/eggHead.png",
122
- * color: "#9e2e12"
123
- * });
124
- * export const alice = new CharacterBaseModel('alice', {
125
- * name: 'Alice',
126
- * surname: 'Smith',
127
- * age: 25,
128
- * icon: "https://pixijs.com/assets/eggHead.png",
129
- * color: "#9e2e12"
130
- * });
131
- * saveCharacter([liam, alice]);
132
- * ```
133
- */
134
- declare class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
135
- /**
136
- * @param id The id of the character.
137
- * @param props The properties of the character.
138
- */
139
- constructor(id: string, props: CharacterBaseModelProps);
140
- private defaultName;
141
- /***
142
- * The name of the character.
143
- * If you set undefined, it will return the default name.
144
- */
145
- get name(): string;
146
- set name(value: string | undefined);
147
- private defaultSurname?;
148
- /**
149
- * The surname of the character.
150
- * If you set undefined, it will return the default surname.
151
- */
152
- get surname(): string | undefined;
153
- set surname(value: string | undefined);
154
- private defaultAge?;
155
- /**
156
- * The age of the character.
157
- * If you set undefined, it will return the default age.
158
- */
159
- get age(): number | undefined;
160
- set age(value: number | undefined);
161
- private _icon?;
162
- /**
163
- * The icon of the character.
164
- */
165
- get icon(): string | undefined;
166
- private _color?;
167
- /**
168
- * The color of the character.
169
- */
170
- get color(): string | undefined;
171
- }
172
-
173
- /**
174
- * Enumeration of label modes that occurred during the progression of the steps.
175
- */
176
- declare enum LabelRunModeEnum {
177
- OpenByCall = "openbycall",
178
- OpenByJump = "openbyjump"
179
- }
180
-
181
- /**
182
- * is a string containing the name of the label.
183
- * It is used to GameStepManager.registeredLabels to get the label class.
184
- */
185
- type LabelIdType = string;
186
-
187
- /**
188
- * StepHistoryData is a string that will be stored in the history of the game.
189
- * It is a function converted to string.
190
- * if the corresponding function of the step has been changed then StepHistoryData is not equal.
191
- */
192
- type StepHistoryDataType = string;
193
-
194
- /**
195
- * StepLabel is a function that will be executed as the game continues.
196
- */
197
- type StepLabelType = (() => StepLabelResultType | Promise<StepLabelResultType>);
198
- /**
199
- * StepLabelResultType is the return type of the StepLabel function.
200
- * It can be useful for returning to the information calling function to perform other operations that cannot be performed within the StepLabel.
201
- */
202
- type StepLabelResultType = {
203
- /**
204
- * The new route to navigate to.
205
- */
206
- newRoute?: string;
207
- [key: string]: any;
208
- } | void;
209
-
210
- /**
211
- * Label is a class that contains a list of steps, which will be performed as the game continues.
212
- * You must use the labelDecorator to register the label in the game.
213
- * For Ren'py this is the equivalent of a label.
214
- * @example
215
- * ```typescript
216
- * \@labelDecorator() // this is equivalent to labelDecorator("StartLabel")
217
- * export class StartLabel extends Label {
218
- * override get steps(): StepLabelType[] {
219
- * return [
220
- * () => {
221
- * GameWindowManager.clear()
222
- * setDialogue({ character: liam, text: "Which test do you want to perform?" })
223
- * setChoiceMenuOptions([
224
- * new ChoiceMenuOptionLabel("Events Test", EventsTestLabel),
225
- * new ChoiceMenuOptionLabel("Show Image Test", ShowImageTest),
226
- * ])
227
- * },
228
- * () => GameStepManager.jumpLabel(StartLabel),
229
- * ]
230
- * }
231
- * }
232
- * GameStepManager.callLabel(StartLabel)
233
- * ```
234
- */
235
- declare class Label {
236
- /**
237
- * Get the steps of the label.
238
- * This class should be extended and the steps method should be overridden.
239
- * Every time you update this list will also be updated when the other game versions load.
240
- */
241
- get steps(): StepLabelType[];
242
- /**
243
- * Get the corresponding steps number
244
- * @param externalSteps
245
- * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1
246
- */
247
- getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number;
248
- }
249
-
250
- /**
251
- * ChoiceMenuOptionLabel is a class that contains a Label and a text that will be displayed in the menu.
252
- * @example
253
- * ```typescript
254
- * new ChoiceMenuOptionLabel("Events Test", EventsTestLabel)
255
- * ```
256
- */
257
- declare class ChoiceMenuOptionLabel {
258
- /**
259
- * Text to be displayed in the menu
260
- */
261
- text: string;
262
- /**
263
- * Label to be opened when the option is selected
264
- */
265
- label: typeof Label;
266
- /**
267
- * Type of the label to be opened
268
- */
269
- type: LabelRunModeEnum;
270
- /**
271
- * @param text Text to be displayed in the menu
272
- * @param label Label to be opened when the option is selected
273
- * @param type Type of the label to be opened
274
- */
275
- constructor(text: string, label: typeof Label, type?: LabelRunModeEnum);
276
- }
277
- type IStoratedChoiceMenuOptionLabel = {
278
- text: string;
279
- label: LabelIdType;
280
- type: LabelRunModeEnum;
281
- };
282
-
283
- /**
284
- * Munu is a type that contains a list of Label that a player can choose from.
285
- * For Ren'py this is the equivalent of a menu.
286
- */
287
- type ChoiceMenuOptionsType = ChoiceMenuOptionLabel[];
288
-
289
- declare const PauseValueType = "Pause";
290
- type PauseType = {
291
- type: typeof PauseValueType;
292
- duration: number;
293
- };
294
- declare function Pause(duration: number): PauseType;
295
-
296
- type RepeatType = "Repeat";
297
- declare const Repeat: RepeatType;
298
-
299
- type StorageElementPrimaryType = string | number | boolean | undefined | null | StorageElementPrimaryType[];
300
- type StorageElementInternalType = StorageElementPrimaryType | Record<string | number | symbol, StorageElementPrimaryType> | StorageElementInternalType[];
301
- /**
302
- * StorageElementType are all the types that can be stored in the storage
303
- */
304
- type StorageElementType = StorageElementInternalType | Record<string | number | symbol, StorageElementInternalType> | {
305
- [key: string | number | symbol]: StorageElementType;
306
- };
307
-
308
- type DialogueData = {
309
- /**
310
- * The text of the dialogue.
311
- */
312
- text: string;
313
- /**
314
- * The id of the character that is speaking.
315
- */
316
- characterId?: string;
317
- /**
318
- * Other parameters that can be stored in the dialogue.
319
- */
320
- oltherParams?: Record<string | number | symbol, StorageElementType>;
321
- };
322
- /**
323
- * Base class for all dialogue models.
324
- * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.
325
- * @example
326
- * ```typescript
327
- * setDialogue(new DialogueBaseModel("Hello World", character))
328
- * ```
329
- */
330
- declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {
331
- /**
332
- * @param text The text of the dialogue.
333
- * @param character The id of the character that is speaking.
334
- * @param oltherParams Other parameters that can be stored in the dialogue.
335
- */
336
- constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams?: {
337
- [key: string]: StorageElementType;
338
- });
339
- /**
340
- * The text of the dialogue.
341
- */
342
- text: string;
343
- /**
344
- * The id of the character that is speaking.
345
- */
346
- characterId?: string;
347
- /**
348
- * Other parameters that can be stored in the dialogue.
349
- */
350
- oltherParams: {
351
- [key: string]: StorageElementType;
352
- };
353
- /**
354
- * Export the dialogue to a DialogueBaseData object.
355
- *
356
- * @returns The data of the dialogue.
357
- */
358
- export(): DialogueData;
359
- }
360
-
361
- /**
362
- * Interface for the canvas base memory
363
- */
364
- interface ICanvasBaseMemory {
365
- className: string;
366
- }
367
-
368
- /**
369
- * Interface for the canvas container memory
370
- */
371
- interface ICanvasContainerMemory extends ContainerOptions, ICanvasBaseMemory {
372
- elements: ICanvasBaseMemory[];
373
- }
374
-
375
- type EventIdType = string;
376
-
377
- /**
378
- * Interface for texture memory
379
- */
380
- interface ITextureMemory {
381
- image: string;
382
- }
383
-
384
- interface ICanvasSpriteBaseMemory extends SpriteOptions, ICanvasBaseMemory {
385
- textureImage: ITextureMemory;
386
- onEvents: {
387
- [name: CanvasEventNamesType]: EventIdType;
388
- };
389
- }
390
- /**
391
- * Interface for the canvas sprite memory
392
- */
393
- interface ICanvasSpriteMemory extends ICanvasSpriteBaseMemory {
394
- className: "CanvasSprite";
395
- }
396
-
397
- /**
398
- * The memory of the image. It uses for save the state of the image.
399
- */
400
- interface ICanvasImageMemory extends ICanvasSpriteBaseMemory {
401
- className: "CanvasImage";
402
- }
403
-
404
- /**
405
- * Interface for the canvas text memory
406
- */
407
- interface ICanvasTextMemory extends TextOptions, ICanvasBaseMemory {
408
- className: "CanvasText";
409
- onEvents: {
410
- [name: CanvasEventNamesType]: EventIdType;
411
- };
412
- }
413
-
414
- /**
415
- * This class is used to create a canvas element to add into a Pixi Application.
416
- * You can use GameWindowManager.addCanvasElement() to add this element into the application.
417
- * This class should be implemented and the memory method should be overridden.
418
- * You must use the canvasElementDecorator to register the canvas in the game.
419
- * In Ren'Py is a displayable.
420
- * @example
421
- * ```typescript
422
- * \@canvasElementDecorator() // this is equivalent to canvasElementDecorator("CanvasExample")
423
- * export class CanvasExample extends Container implements CanvasBase<ICanvasExampleMemory> {
424
- * get memory(): ICanvasExampleMemory {
425
- * return {
426
- * className: "CanvasExample",
427
- * // ... other properties
428
- * }
429
- * }
430
- * set memory(value: ICanvasExampleMemory) {
431
- * // ... set other properties
432
- * }
433
- * }
434
- * ```
435
- */
436
- declare class CanvasBase<T2 extends ICanvasBaseMemory> extends Container {
437
- /**
438
- * This method return the memory of the canvas element.
439
- */
440
- get memory(): T2;
441
- /**
442
- * This method set the memory of the canvas element.
443
- */
444
- set memory(_value: T2);
445
- }
446
-
447
- /**
448
- * This class is a extension of the [PIXI.Container class](https://pixijs.com/8.x/examples/basic/container), it has the same properties and methods,
449
- * but it has the ability to be saved and loaded by the Pixi'VN library.
450
- * @example
451
- * ```typescript
452
- * const container = new CanvasContainer();
453
- * GameWindowManager.addCanvasElement(container);
454
- * const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
455
- * for (let i = 0; i < 25; i++)
456
- * {
457
- * const bunny = new CanvasSprite(texture);
458
- * bunny.x = (i % 5) * 40;
459
- * bunny.y = Math.floor(i / 5) * 40;
460
- * container.addChild(bunny);
461
- * }
462
- * ```
463
- */
464
- declare class CanvasContainer extends Container implements CanvasBase<ICanvasContainerMemory> {
465
- get memory(): ICanvasContainerMemory;
466
- set memory(value: ICanvasContainerMemory);
467
- }
468
-
469
- /**
470
- * This class is a extension of the [PIXI.Sprite class](https://pixijs.com/8.x/examples/sprite/basic), it has the same properties and methods,
471
- * but it has the ability to be saved and loaded by the Pixi'VN library.
472
- * @example
473
- * ```typescript
474
- * const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
475
- * const sprite = CanvasSprite.from(texture);
476
- *
477
- * sprite.anchor.set(0.5);
478
- * sprite.x = GameWindowManager.screen.width / 2;
479
- * sprite.y = GameWindowManager.screen.height / 2;
480
- *
481
- * sprite.eventMode = 'static';
482
- * sprite.cursor = 'pointer';
483
- * sprite.onEvent('pointerdown', EventTest);
484
- *
485
- * GameWindowManager.addCanvasElement("bunny", sprite);
486
- * ```
487
- */
488
- declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = ICanvasSpriteMemory> extends Sprite implements CanvasBase<Memory | ICanvasSpriteMemory> {
489
- get memory(): Memory | ICanvasSpriteMemory;
490
- set memory(value: ICanvasSpriteMemory);
491
- private _onEvents;
492
- get onEvents(): {
493
- [name: string]: string;
494
- [name: symbol]: string;
495
- };
496
- /**
497
- * is same function as on(), but it keeps in memory the children.
498
- * @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
499
- * @param eventClass The class that extends CanvasEvent.
500
- * @returns
501
- * @example
502
- * ```typescript
503
- * \@eventDecorator()
504
- * export class EventTest extends CanvasEvent<CanvasSprite> {
505
- * override fn(event: CanvasEventNamesType, sprite: CanvasSprite): void {
506
- * if (event === 'pointerdown') {
507
- * sprite.scale.x *= 1.25;
508
- * sprite.scale.y *= 1.25;
509
- * }
510
- * }
511
- * }
512
- * ```
513
- *
514
- * ```typescript
515
- * let sprite = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
516
- * await sprite.load()
517
- *
518
- * sprite.eventMode = 'static';
519
- * sprite.cursor = 'pointer';
520
- * sprite.onEvent('pointerdown', EventTest);
521
- *
522
- * GameWindowManager.addCanvasElement("bunny", sprite);
523
- * ```
524
- */
525
- onEvent<T extends CanvasEventNamesType, T2 extends typeof CanvasEvent<typeof this>>(event: T, eventClass: T2): this;
526
- /**
527
- * on() does not keep in memory the event class, use onEvent() instead
528
- * @deprecated
529
- * @private
530
- * @param event
531
- * @param fn
532
- * @param context
533
- */
534
- on<T extends keyof ContainerEvents<ContainerChild> | keyof {
535
- [K: symbol]: any;
536
- [K: {} & string]: any;
537
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
538
- [K: symbol]: any;
539
- [K: {} & string]: any;
540
- }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
541
- [K: symbol]: any;
542
- [K: {} & string]: any;
543
- }>]) => void, context?: any): this;
544
- static from(source: Texture | TextureSourceLike, skipCache?: boolean): CanvasSprite<any>;
545
- }
546
-
547
- /**
548
- * This class is a extension of the CanvasSprite class, it has the same properties and methods,
549
- * but it has some features that make texture management easier.
550
- * You need to use CanvasImage.load() to show the image in the canvas.
551
- * This class is used for functions like addImage, loadImages and showImageWithDissolveTransition.
552
- * @example
553
- * ```typescript
554
- * let alien = new CanvasImage({
555
- * anchor: { x: 0.5, y: 0.5 },
556
- * x: 100,
557
- * y: 100,
558
- * }, 'https://pixijs.com/assets/eggHead.png')
559
- * await alien.load()
560
- * GameWindowManager.addCanvasElement("alien", alien)
561
- * ```
562
- * @example
563
- * ```typescript
564
- * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
565
- * alien.anchor.set(0.5);
566
- * alien.x = 100
567
- * alien.y = 100
568
- * await alien.load()
569
- * ```
570
- */
571
- declare class CanvasImage extends CanvasSprite<ICanvasImageMemory> {
572
- constructor(options?: SpriteOptions | Texture | undefined, imageLink?: string);
573
- get memory(): ICanvasImageMemory;
574
- set memory(memory: ICanvasImageMemory);
575
- imageLink: string;
576
- static from(source: Texture | TextureSourceLike, skipCache?: boolean): CanvasImage;
577
- /**
578
- * Load the image from the link and set the texture of the sprite.
579
- * @param image The link of the image. If it is not set, it will use the imageLink property.
580
- * @returns A promise that resolves when the image is loaded.
581
- */
582
- load(image?: string): Promise<void>;
583
- }
584
-
585
- /**
586
- * This class is a extension of the [PIXI.Text class](https://pixijs.com/8.x/examples/text/pixi-text), it has the same properties and methods,
587
- * but it has the ability to be saved and loaded by the Pixi'VN library.
588
- * @example
589
- * ```typescript
590
- * const text = new CanvasText();
591
- * text.text = "Hello World"
592
- * GameWindowManager.addCanvasElement("text", text);
593
- * ```
594
- */
595
- declare class CanvasText extends Text implements CanvasBase<ICanvasTextMemory> {
596
- get memory(): ICanvasTextMemory;
597
- set memory(value: ICanvasTextMemory);
598
- private _onEvents;
599
- get onEvents(): {
600
- [name: string]: string;
601
- [name: symbol]: string;
602
- };
603
- /**
604
- * is same function as on(), but it keeps in memory the children.
605
- * @param event The event type, e.g., 'click', 'mousedown', 'mouseup', 'pointerdown', etc.
606
- * @param eventClass The class that extends CanvasEvent.
607
- * @returns
608
- * @example
609
- * ```typescript
610
- * \@eventDecorator()
611
- * export class EventTest extends CanvasEvent<CanvasText> {
612
- * override fn(event: CanvasEventNamesType, text: CanvasText): void {
613
- * if (event === 'pointerdown') {
614
- * text.scale.x *= 1.25;
615
- * text.scale.y *= 1.25;
616
- * }
617
- * }
618
- * }
619
- * ```
620
- *
621
- * ```typescript
622
- * const text = new CanvasText();
623
- * text.text = "Hello World"
624
- *
625
- * text.eventMode = 'static';
626
- * text.cursor = 'pointer';
627
- * text.onEvent('pointerdown', EventTest);
628
- *
629
- * GameWindowManager.addCanvasElement("text", text);
630
- * ```
631
- */
632
- onEvent<T extends CanvasEventNamesType, T2 extends typeof CanvasEvent<typeof this>>(event: T, eventClass: T2): this;
633
- /**
634
- * on() does not keep in memory the event class, use onEvent() instead
635
- * @deprecated
636
- * @private
637
- * @param event
638
- * @param fn
639
- * @param context
640
- */
641
- on<T extends keyof ContainerEvents<ContainerChild> | keyof {
642
- [K: symbol]: any;
643
- [K: {} & string]: any;
644
- }>(event: T, fn: (...args: EventEmitter.ArgumentMap<ContainerEvents<ContainerChild> & {
645
- [K: symbol]: any;
646
- [K: {} & string]: any;
647
- }>[Extract<T, keyof ContainerEvents<ContainerChild> | keyof {
648
- [K: symbol]: any;
649
- [K: {} & string]: any;
650
- }>]) => void, context?: any): this;
651
- }
652
-
653
- interface ITicker<TArgs extends TickerArgsType> {
654
- /**
655
- * Arguments to pass to the ticker
656
- */
657
- args: TArgs;
658
- /**
659
- * Duration in milliseconds
660
- */
661
- duration?: number;
662
- /**
663
- * Priority of the ticker
664
- */
665
- priority?: UPDATE_PRIORITY;
666
- }
667
-
668
- type TickerArgsType = {
669
- [id: string]: StorageElementType;
670
- };
671
- /**
672
- * A class is used to create a ticker element to add into a Pixi Application.
673
- * You can use GameWindowManager.addTicker() to add this element into the application.
674
- * This class should be extended and the fn method should be overridden.
675
- * You must use the tickerDecorator to register the ticker in the game.
676
- * In Ren'Py is a transform.
677
- * @example
678
- * ```typescript
679
- * \@tickerDecorator() // this is equivalent to tickerDecorator("TickerRotate")
680
- * export class TickerRotate extends TickerBase<{ speed?: number }> {
681
- * override fn(
682
- * t: Ticker,
683
- * args: {
684
- * speed?: number,
685
- * },
686
- * tags: string[]
687
- * ): void {
688
- * let speed = args.speed === undefined ? 0.1 : args.speed
689
- * tags.forEach((tag) => {
690
- * let element = GameWindowManager.getCanvasElement(tag)
691
- * if (element && element instanceof Container) {
692
- * if (clockwise)
693
- * element.rotation += speed * t.deltaTime
694
- * else
695
- * element.rotation -= speed * t.deltaTime
696
- * }
697
- * })
698
- * }
699
- * }
700
- * ```
701
- */
702
- declare class TickerBase<TArgs extends TickerArgsType> implements ITicker<TArgs> {
703
- /**
704
- * @param args The arguments that you want to pass to the ticker.
705
- * @param duration The duration of the ticker. If is undefined, the ticker will be called every frame.
706
- * @param priority The priority of the ticker. If is undefined, the priority will be UPDATE_PRIORITY.NORMAL.
707
- */
708
- constructor(args: TArgs, duration?: number, priority?: UPDATE_PRIORITY);
709
- args: TArgs;
710
- duration?: number;
711
- priority?: UPDATE_PRIORITY;
712
- /**
713
- * The method that will be called every frame.
714
- * This method should be overridden and you can use GameWindowManager.addCanvasElement() to get the canvas element of the canvas, and edit them.
715
- * @param t The ticker that is calling this method
716
- * @param args The arguments that you passed when you added the ticker
717
- * @param tags The tags of the canvas elements that are connected to this ticker
718
- */
719
- fn(_t: Ticker, _args: TArgs, _tags: string | string[]): void;
720
- }
721
-
722
- type TickerFadeAlphaProps = {
723
- /**
724
- * The speed of the fade
725
- */
726
- speed?: number;
727
- /**
728
- * The type of the fade
729
- * @default "hide"
730
- */
731
- type?: "hide" | "show";
732
- /**
733
- * The limit of the fade
734
- * @default type === "hide" ? 0 : 1
735
- */
736
- limit?: number;
737
- /**
738
- * The tag to remove after the fade is done
739
- */
740
- tagToRemoveAfter?: string[] | string;
741
- /**
742
- * If true, the fade only starts if the canvas element have a texture
743
- */
744
- startOnlyIfHaveTexture?: boolean;
745
- };
746
-
747
- /**
748
- * A ticker that fades the alpha of the canvas element of the canvas.
749
- * @example
750
- * ```typescript
751
- * let bunny = addImage("bunny1", "https://pixijs.com/assets/eggHead.png")
752
- * await bunny.load()
753
- * GameWindowManager.addCanvasElement("bunny", bunny);
754
- * // ...
755
- * const ticker = new TickerFadeAlpha({
756
- * speed: 0.01,
757
- * type: "hide",
758
- * }),
759
- * GameWindowManager.addTicker("bunny", ticker)
760
- * ```
761
- */
762
- declare class TickerFadeAlpha extends TickerBase<TickerFadeAlphaProps> {
763
- /**
764
- * The method that will be called every frame to fade the alpha of the canvas element of the canvas.
765
- * @param delta The delta time
766
- * @param args The arguments that are passed to the ticker
767
- * @param tags The tags of the canvas element that are connected to this ticker
768
- */
769
- fn(t: Ticker, args: TickerFadeAlphaProps, tags: string[]): void;
770
- }
771
-
772
- /**
773
- * is a string that represents a ticker id.
774
- * It is used to GameWindowManager.tickers to get the ticker class.
775
- */
776
- type TickerIdType = string;
777
-
778
- /**
779
- * IClassWithArgsHistory is a class that contains the name of a class and the arguments that were used to create it.
780
- */
781
- interface IClassWithArgsHistory<TArgs extends TickerArgsType> {
782
- fn: TickerCallback<any>;
783
- className: TickerIdType;
784
- args: TArgs;
785
- canvasElementTags: string[];
786
- priority?: UPDATE_PRIORITY;
787
- duration?: number;
788
- }
789
- interface IClassWithArgsHistoryForExport<TArgs extends TickerArgsType> {
790
- className: TickerIdType;
791
- args: TArgs;
792
- canvasElementTags: string[];
793
- priority?: UPDATE_PRIORITY;
794
- duration?: number;
795
- }
796
-
797
- interface IDialogueHistory<T extends DialogueBaseModel = DialogueBaseModel> {
798
- /**
799
- * Dialogue to be shown in the game
800
- */
801
- dialoge?: T;
802
- /**
803
- * List of choices asked of the player
804
- */
805
- choices?: IStoratedChoiceMenuOptionLabel[];
806
- /**
807
- * Choice made by the player
808
- */
809
- choiceMade?: IStoratedChoiceMenuOptionLabel;
810
- /**
811
- * The index of the step in the history.
812
- */
813
- stepIndex: number;
814
- }
815
-
816
- /**
817
- * Interface exported canvas
818
- */
819
- interface ExportedCanvas {
820
- currentTickers: IClassWithArgsHistoryForExport<any>[];
821
- currentElements: {
822
- [tag: string]: ICanvasBaseMemory;
823
- };
824
- childrenTagsOrder: string[];
825
- }
826
-
827
- /**
828
- * Interface exported storage data
829
- */
830
- interface ExportedStorage {
831
- [key: string]: StorageElementType;
832
- }
833
-
834
- interface IOpenedLabel {
835
- label: LabelIdType;
836
- currentStepIndex: number;
837
- }
838
-
839
- /**
840
- * IHistoryStep is a interface that contains the information of a step in the history.
841
- */
842
- interface IHistoryStepData {
843
- /**
844
- * The browser path that occurred during the progression of the steps.
845
- */
846
- path: string;
847
- /**
848
- * The storage that occurred during the progression of the steps.
849
- */
850
- storage: ExportedStorage;
851
- /**
852
- * The index of the label that occurred during the progression of the steps.
853
- */
854
- labelIndex: number;
855
- /**
856
- * The canvas that occurred during the progression of the steps.
857
- */
858
- canvas: ExportedCanvas;
859
- /**
860
- * The opened labels that occurred during the progression of the steps.
861
- */
862
- openedLabels: IOpenedLabel[];
863
- }
864
- interface IHistoryStep<T extends DialogueBaseModel = DialogueBaseModel> {
865
- /**
866
- * The difference between the previous step and the current step.
867
- */
868
- diff: deepDiff.Diff<IHistoryStepData, IHistoryStepData>[];
869
- /**
870
- * The label id of the current step.
871
- */
872
- currentLabel?: LabelIdType;
873
- /**
874
- * The sha1 of the step function.
875
- */
876
- stepSha1: StepHistoryDataType;
877
- /**
878
- * The index of the step in the history.
879
- */
880
- index: number;
881
- /**
882
- * Dialogue to be shown in the game
883
- */
884
- dialoge?: T;
885
- /**
886
- * List of choices asked of the player
887
- */
888
- choices?: IStoratedChoiceMenuOptionLabel[];
889
- }
890
-
891
- /**
892
- * Interface exported step data
893
- */
894
- interface ExportedStep {
895
- stepsHistory: IHistoryStep[];
896
- openedLabels: IOpenedLabel[];
897
- lastStepIndex: number;
898
- originalStepData: IHistoryStepData | undefined;
899
- }
900
-
901
- interface ISaveData {
902
- pixivn_version: string;
903
- stepData: ExportedStep;
904
- storageData: ExportedStorage;
905
- canvasData: ExportedCanvas;
906
- path: string;
907
- }
908
-
909
- interface ITickersStep<TArgs extends TickerArgsType> extends ITicker<TArgs> {
910
- /**
911
- * Ticker class name
912
- */
913
- ticker: string;
914
- /**
915
- * Duration in milliseconds
916
- */
917
- duration: number;
918
- }
919
- /**
920
- * The steps of the tickers
921
- */
922
- interface ITickersSteps {
923
- /**
924
- * The step number
925
- */
926
- currentStepNumber: number;
927
- /**
928
- * The steps of the tickers
929
- */
930
- steps: (ITickersStep<any> | RepeatType | PauseType)[];
931
- }
932
-
933
- type TickerProgrationType = ITickerProgrationLinear | ITickerProgrationExponential;
934
- type ITickerProgrationLinear = {
935
- amt: number;
936
- limit?: number;
937
- type: "linear";
938
- };
939
- type ITickerProgrationExponential = {
940
- percentage: number;
941
- limit?: number;
942
- type: "exponential";
943
- };
944
-
945
- type TickerMoveProps = {
946
- /**
947
- * The speed of the movement
948
- * @default 0.1
949
- */
950
- speed?: number;
951
- /**
952
- * The destination of the movement
953
- */
954
- destination: {
955
- y: number;
956
- x: number;
957
- };
958
- /**
959
- * The progression of the speed
960
- */
961
- speedProgression?: TickerProgrationType;
962
- /**
963
- * If true, the rotation only starts if the canvas element have a texture
964
- */
965
- startOnlyIfHaveTexture?: boolean;
966
- };
967
-
968
- /**
969
- * A ticker that moves the canvas element of the canvas.
970
- * @example
971
- * ```typescript
972
- * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
973
- * GameWindowManager.addCanvasElement("alien", alien);
974
- * const ticker = new TickerMove({
975
- * speed: 0.1,
976
- * destination: { x: 100, y: 100 },
977
- * }),
978
- * ```
979
- */
980
- declare class TickerMove extends TickerBase<TickerMoveProps> {
981
- /**
982
- * The method that will be called every frame to move the canvas element of the canvas.
983
- * @param t The ticker that is calling this method
984
- * @param args The arguments that are passed to the ticker
985
- * @param tags The tags of the canvas element that are connected to this ticker
986
- */
987
- fn(t: Ticker, args: TickerMoveProps, tags: string[]): void;
988
- }
989
-
990
- type TickerRotateProps = {
991
- /**
992
- * The speed of the rotation
993
- * @default 0.1
994
- */
995
- speed?: number;
996
- /**
997
- * The direction of the rotation
998
- * @default true
999
- */
1000
- clockwise?: boolean;
1001
- /**
1002
- * The progression of the speed
1003
- */
1004
- speedProgression?: TickerProgrationType;
1005
- /**
1006
- * If true, the rotation only starts if the canvas element have a texture
1007
- */
1008
- startOnlyIfHaveTexture?: boolean;
1009
- };
1010
-
1011
- /**
1012
- * A ticker that rotates the canvas element of the canvas.
1013
- * @example
1014
- * ```typescript
1015
- * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
1016
- * GameWindowManager.addCanvasElement("alien", alien);
1017
- * const ticker = new TickerRotate({
1018
- * speed: 0.1,
1019
- * clockwise: true,
1020
- * }),
1021
- * GameWindowManager.addTicker("alien", ticker)
1022
- * ```
1023
- */
1024
- declare class TickerRotate extends TickerBase<TickerRotateProps> {
1025
- /**
1026
- * The method that will be called every frame to rotate the canvas element of the canvas.
1027
- * @param delta The delta time
1028
- * @param args The arguments that are passed to the ticker
1029
- * @param tags The tags of the canvas element that are connected to this ticker
1030
- */
1031
- fn(t: Ticker, args: TickerRotateProps, tags: string[]): void;
1032
- }
1033
-
1034
- type CanvasElementTagType = string;
1035
-
1036
- /**
1037
- * Is a decorator that register a canvas element in the game.
1038
- * @param name Name of the canvas element, by default it will use the class name. If the name is already registered, it will show a warning
1039
- * @returns
1040
- */
1041
- declare function canvasElementDecorator(name?: CanvasElementTagType): (target: typeof CanvasBase<any>) => void;
1042
-
1043
- /**
1044
- * Is a function that saves the character. If the character already exists, it will be overwritten.
1045
- * @param character is the character to save
1046
- * @returns
1047
- * @example
1048
- * ```typescript
1049
- * export const liam = new CharacterBaseModel('liam', { name: 'Liam'});
1050
- * export const alice = new CharacterBaseModel('alice', { name: 'Alice'});
1051
- * saveCharacter([liam, alice]);
1052
- * ```
1053
- */
1054
- declare function saveCharacter<T extends CharacterBaseModel = CharacterBaseModel>(character: T | T[]): void;
1055
- /**
1056
- * is a function that returns the character by the id
1057
- * @param id is the id of the character
1058
- * @returns the character
1059
- * @example
1060
- * ```typescript
1061
- * const liam = getCharacterById('liam');
1062
- * ```
1063
- */
1064
- declare function getCharacterById<T extends CharacterBaseModel>(id: string): T | undefined;
1065
- /**
1066
- * is a function that returns all characters
1067
- * @returns all characters
1068
- * @example
1069
- * ```typescript
1070
- * const allCharacters = getAllCharacters();
1071
- * ```
1072
- */
1073
- declare function getAllCharacters<T extends CharacterBaseModel>(): T[];
1074
-
1075
- /**
1076
- * Is a decorator that register a event in the game.
1077
- * Is a required decorator for use the event in the game.
1078
- * Thanks to this decoration the game has the possibility of updating the events to the latest modification and saving the game.
1079
- * @param name is th identifier of the event, by default is the name of the class
1080
- * @returns
1081
- */
1082
- declare function eventDecorator(name?: EventIdType): (target: typeof CanvasEvent<any>) => void;
1083
-
1084
- /**
1085
- * Is a decorator that register a label in the game.
1086
- * Is a required decorator for use the label in the game.
1087
- * Thanks to this decoration the game has the possibility of updating the labels to the latest modification and saving the game.
1088
- * @param name is th identifier of the label, by default is the name of the class
1089
- * @returns
1090
- */
1091
- declare function labelDecorator(name?: LabelIdType): (target: typeof Label) => void;
1092
-
1093
- /**
1094
- * Is a decorator that register a ticker in the game.
1095
- * Is a required decorator for use the ticker in the game.
1096
- * Thanks to this decoration the game has the possibility of updating the tickers to the latest modification and saving the game.
1097
- * @param name is th identifier of the label, by default is the name of the class
1098
- * @returns
1099
- */
1100
- declare function tickerDecorator(name?: TickerIdType): (target: typeof TickerBase<any>) => void;
1101
-
1102
- /**
1103
- * Set the dialogue to be shown in the game
1104
- * @param text Text of the dialogue
1105
- * @example
1106
- * ```typescript
1107
- * setDialogue("Hello World")
1108
- * setDialogue({
1109
- * character: "characterId",
1110
- * text: "Hello World"
1111
- * })
1112
- * setDialogue(new DialogueBaseModel("Hello World", character))
1113
- * ```
1114
- */
1115
- declare function setDialogue<TCharacter extends CharacterBaseModel = CharacterBaseModel, TDialogue extends DialogueBaseModel = DialogueBaseModel>(props: {
1116
- character: string | TCharacter;
1117
- text: string;
1118
- } | string | TDialogue): void;
1119
- /**
1120
- * Get the dialogue to be shown in the game
1121
- * @returns Dialogue to be shown in the game
1122
- */
1123
- declare function getDialogue<T extends DialogueBaseModel = DialogueBaseModel>(): T | undefined;
1124
- /**
1125
- * Clear the dialogue to be shown in the game
1126
- */
1127
- declare function clearDialogue(): void;
1128
- /**
1129
- * Set the options to be shown in the game
1130
- * @param options Options to be shown in the game
1131
- * @example
1132
- * ```typescript
1133
- * setChoiceMenuOptions([
1134
- * new ChoiceMenuOptionLabel("Events Test", EventsTestLabel),
1135
- * new ChoiceMenuOptionLabel("Show Image Test", ShowImageTest),
1136
- * new ChoiceMenuOptionLabel("Ticker Test", TickerTestLabel),
1137
- * new ChoiceMenuOptionLabel("Tinting Test", TintingTestLabel),
1138
- * new ChoiceMenuOptionLabel("Base Canvas Element Test Label", BaseCanvasElementTestLabel)
1139
- * ])
1140
- * ```
1141
- */
1142
- declare function setChoiceMenuOptions(options: ChoiceMenuOptionsType): void;
1143
- /**
1144
- * Get the options to be shown in the game
1145
- * @returns Options to be shown in the game
1146
- */
1147
- declare function getChoiceMenuOptions(): ChoiceMenuOptionsType | undefined;
1148
- /**
1149
- * Clear the options to be shown in the game
1150
- */
1151
- declare function clearChoiceMenuOptions(): void;
1152
- /**
1153
- * Get the history of the dialogues
1154
- * @returns the history of the dialogues
1155
- */
1156
- declare function getDialogueHistory<T extends DialogueBaseModel = DialogueBaseModel>(): IDialogueHistory<T>[];
1157
-
1158
- /**
1159
- * Set a flag to true or false.
1160
- * @param name The name of the flag
1161
- * @param value The value of the flag.
1162
- */
1163
- declare function setFlag(name: string, value: boolean): void;
1164
- /**
1165
- * Get the value of a flag
1166
- * @param name The name of the flag
1167
- * @returns The value of the flag
1168
- */
1169
- declare function getFlag(name: string): boolean;
1170
-
1171
- /**
1172
- * Clear all game data. This function is used to reset the game.
1173
- */
1174
- declare function clearAllGameDatas(): void;
1175
-
1176
- /**
1177
- * Add a image in the canvas.
1178
- * Is the same that showImage, but the image is not shown.
1179
- * If you want to show the image, then you need to use the function CanvasImage.load().
1180
- * @param tag is the unique tag of the image. You can use this tag to refer to this image
1181
- * @param imageUrl is the url of the image.
1182
- * @returns the container of the image.
1183
- * @example
1184
- * ```typescript
1185
- * let alien = addImage("bunny1", "https://pixijs.com/assets/eggHead.png")
1186
- * await alien.load()
1187
- * ```
1188
- */
1189
- declare function addImage(tag: string, imageUrl: string): CanvasImage;
1190
- /**
1191
- * Show a list of images in the canvas, at the same time.
1192
- * @param canvasImages is a list of images to show.
1193
- * @returns the list of images.
1194
- */
1195
- declare function loadImages(canvasImages: CanvasImage[] | CanvasImage): Promise<CanvasImage[]>;
1196
- /**
1197
- * Remove a image from the canvas.
1198
- * @param tag is the unique tag of the image. You can use this tag to refer to this image
1199
- */
1200
- declare function removeCanvasElement(tag: string | string[]): void;
1201
- /**
1202
- * Show a image in the canvas with a disolve effect.
1203
- * Disolve effect is a effect that the image is shown with a fade in.
1204
- * If exist a image with the same tag, then the image is replaced. And the first image is removed after the effect is done.
1205
- * @param tag The unique tag of the image. You can use this tag to refer to this image
1206
- * @param imageUrl The url of the image.
1207
- * @param args The arguments of the effect
1208
- * @param duration The duration of the effect
1209
- * @param priority The priority of the effect
1210
- * @returns The sprite of the image.
1211
- */
1212
- declare function showImageWithDissolveTransition(tag: string, imageUrl: string, speed: number, priority?: UPDATE_PRIORITY): Promise<void>;
1213
-
1214
- /**
1215
- * Get the save data
1216
- * @returns The save data
1217
- */
1218
- declare function getSaveData(): ISaveData;
1219
- /**
1220
- * Get the save data as a JSON string
1221
- * @returns The save data as a JSON string
1222
- * @example
1223
- * ```typescript
1224
- * export function saveGame() {
1225
- * const jsonString = getSaveJson()
1226
- * const blob = new Blob([jsonString], { type: "application/json" });
1227
- * const url = URL.createObjectURL(blob);
1228
- * const a = document.createElement('a');
1229
- * a.href = url;
1230
- * a.download = "save.json";
1231
- * a.click();
1232
- * }
1233
- * ```
1234
- */
1235
- declare function getSaveJson(): string;
1236
- /**
1237
- * Load the save data
1238
- * @param data The save data
1239
- * @param navigate The function to navigate to a path
1240
- */
1241
- declare function loadSaveData(data: ISaveData, navigate: (path: string) => void): void;
1242
- /**
1243
- * Load the save data from a JSON string
1244
- * @param dataString The save data as a JSON string
1245
- * @param navigate The function to navigate to a path
1246
- * @example
1247
- * ```typescript
1248
- * export function loadGameSave(navigate: (path: string) => void, afterLoad?: () => void) {
1249
- * // load the save data from a JSON file
1250
- * const input = document.createElement('input');
1251
- * input.type = 'file';
1252
- * input.accept = 'application/json';
1253
- * input.onchange = (e) => {
1254
- * const file = (e.target as HTMLInputElement).files?.[0];
1255
- * if (file) {
1256
- * const reader = new FileReader();
1257
- * reader.onload = (e) => {
1258
- * const jsonString = e.target?.result as string;
1259
- * // load the save data from the JSON string
1260
- * loadSaveJson(jsonString, navigate);
1261
- * afterLoad && afterLoad();
1262
- * };
1263
- * reader.readAsText(file);
1264
- * }
1265
- * };
1266
- * input.click();
1267
- * }
1268
- * ```
1269
- */
1270
- declare function loadSaveJson(dataString: string, navigate: (path: string) => void): void;
1271
-
1272
- /**
1273
- * Get a texture from a url.
1274
- * @param imageUrl is the url of the image.
1275
- * @returns the texture of the image, or a text with the error.
1276
- */
1277
- declare function getTexture(imageUrl: string): Promise<Texture | void>;
1278
-
1279
- /**
1280
- * GameStepManager is a class that manages the steps and labels of the game.
1281
- */
1282
- declare class GameStepManager {
1283
- private constructor();
1284
- /**
1285
- * stepHistory is a list of label events and steps that occurred during the progression of the steps.
1286
- */
1287
- private static _stepsHistory;
1288
- static get stepsHistory(): IHistoryStep<DialogueBaseModel<CharacterBaseModel>>[];
1289
- private static _lastStepIndex;
1290
- /**
1291
- * lastStepIndex is the last step index that occurred during the progression of the steps. **Not is the length of the stepsHistory - 1.**
1292
- */
1293
- static get lastStepIndex(): number;
1294
- /**
1295
- * Increase the last step index that occurred during the progression of the steps.
1296
- */
1297
- private static increaseLastStepIndex;
1298
- private static _openedLabels;
1299
- static get openedLabels(): IOpenedLabel[];
1300
- /**
1301
- * currentLabelId is the current label id that occurred during the progression of the steps.
1302
- */
1303
- private static get currentLabelId();
1304
- /**
1305
- * currentLabel is the current label that occurred during the progression of the steps.
1306
- */
1307
- static get currentLabel(): Label | undefined;
1308
- private static get currentLabelStepIndex();
1309
- /**
1310
- * currentLabelStep is the current step that occurred during the progression of the steps. It can used to determine the game end.
1311
- */
1312
- static get isLastGameStep(): boolean;
1313
- /**
1314
- * lastHistoryStep is the last history step that occurred during the progression of the steps.
1315
- */
1316
- private static get lastHistoryStep();
1317
- private static _originalStepData;
1318
- private static get originalStepData();
1319
- private static set originalStepData(value);
1320
- /**
1321
- * Add a label to the history.
1322
- * @param label The label to add to the history.
1323
- */
1324
- private static addStepHistory;
1325
- /**
1326
- * Add a label to the history.
1327
- * @param label The label to add to the history.
1328
- */
1329
- private static pushNewLabel;
1330
- /**
1331
- * Close the current label and add it to the history.
1332
- * @returns
1333
- */
1334
- static closeCurrentLabel(): void;
1335
- /**
1336
- * Close all labels and add them to the history.
1337
- */
1338
- static closeAllLabels(): void;
1339
- /**
1340
- * Increase the current step index of the current label.
1341
- */
1342
- private static increaseCurrentStepIndex;
1343
- /**
1344
- * Execute the next step and add it to the history.
1345
- * @returns StepLabelResultType or undefined.
1346
- * @example
1347
- * ```typescript
1348
- * function nextOnClick() {
1349
- * setLoading(true)
1350
- * GameStepManager.runNextStep()
1351
- * .then((result) => {
1352
- * setUpdate((p) => p + 1)
1353
- * setLoading(false)
1354
- * if (result) {
1355
- * // your code
1356
- * }
1357
- * })
1358
- * .catch((e) => {
1359
- * setLoading(false)
1360
- * console.error(e)
1361
- * })
1362
- * }
1363
- * ```
1364
- */
1365
- static runNextStep(): Promise<StepLabelResultType>;
1366
- /**
1367
- * Execute the current step and add it to the history.
1368
- * @returns StepLabelResultType or undefined.
1369
- */
1370
- private static runCurrentStep;
1371
- /**
1372
- * Execute the label and add it to the history.
1373
- * Is a call function in Ren'Py.
1374
- * @param label The label to execute.
1375
- * @returns StepLabelResultType or undefined.
1376
- * @example
1377
- * ```typescript
1378
- * GameStepManager.callLabel(StartLabel).then((result) => {
1379
- * if (result) {
1380
- * // your code
1381
- * }
1382
- * })
1383
- * ```
1384
- * @example
1385
- * ```typescript
1386
- * // if you use it in a step label you should return the result.
1387
- * return GameStepManager.callLabel(StartLabel).then((result) => {
1388
- * return result
1389
- * })
1390
- * ```
1391
- */
1392
- static callLabel(label: typeof Label | Label): Promise<StepLabelResultType>;
1393
- /**
1394
- * Execute the label, close all labels and add them to the history.
1395
- * Is a jump function in Ren'Py.
1396
- * @param label The label to execute.
1397
- * @returns StepLabelResultType or undefined.
1398
- * @example
1399
- * ```typescript
1400
- * GameStepManager.jumpLabel(StartLabel).then((result) => {
1401
- * if (result) {
1402
- * // your code
1403
- * }
1404
- * })
1405
- * ```
1406
- * @example
1407
- * ```typescript
1408
- * // if you use it in a step label you should return the result.
1409
- * return GameStepManager.jumpLabel(StartLabel).then((result) => {
1410
- * return result
1411
- * })
1412
- * ```
1413
- */
1414
- static jumpLabel(label: typeof Label | Label): Promise<StepLabelResultType>;
1415
- /**
1416
- * Go back to the last step and add it to the history.
1417
- * @param navigate The navigate function.
1418
- * @param steps The number of steps to go back.
1419
- * @returns
1420
- * @example
1421
- * ```typescript
1422
- * export function goBack(navigate: (path: string) => void, afterBack?: () => void) {
1423
- * GameStepManager.goBack(navigate)
1424
- * afterBack && afterBack()
1425
- * }
1426
- * ```
1427
- */
1428
- static goBack(navigate: (path: string) => void, steps?: number): void;
1429
- private static goBackInternal;
1430
- /**
1431
- * Return true if it is possible to go back.
1432
- */
1433
- static get canGoBack(): boolean;
1434
- /**
1435
- * Add a label to the history.
1436
- */
1437
- static clear(): void;
1438
- /**
1439
- * Export the history to a JSON string.
1440
- * @returns The history in a JSON string.
1441
- */
1442
- static exportJson(): string;
1443
- /**
1444
- * Export the history to an object.
1445
- * @returns The history in an object.
1446
- */
1447
- static export(): ExportedStep;
1448
- /**
1449
- * Import the history from a JSON string.
1450
- * @param dataString The history in a JSON string.
1451
- */
1452
- static importJson(dataString: string): void;
1453
- /**
1454
- * Import the history from an object.
1455
- * @param data The history in an object.
1456
- */
1457
- static import(data: object): void;
1458
- }
1459
-
1460
- declare class GameStorageManager {
1461
- private static storage;
1462
- private constructor();
1463
- static get keysSystem(): {
1464
- CURRENT_DIALOGUE_MEMORY_KEY: string;
1465
- LAST_DIALOGUE_ADDED_IN_STEP_MEMORY_KEY: string;
1466
- CURRENT_MENU_OPTIONS_MEMORY_KEY: string;
1467
- LAST_MENU_OPTIONS_ADDED_IN_STEP_MEMORY_KEY: string;
1468
- CHARACTER_CATEGORY_KEY: string;
1469
- FLAGS_CATEGORY_KEY: string;
1470
- };
1471
- /**
1472
- * Set a variable in the storage
1473
- * @param key The key of the variable
1474
- * @param value The value of the variable. If undefined, the variable will be removed
1475
- * @returns
1476
- */
1477
- static setVariable(key: string, value: StorageElementType): void;
1478
- /**
1479
- * Get a variable from the storage
1480
- * @param key The key of the variable
1481
- * @returns The value of the variable. If the variable does not exist, it will return undefined
1482
- */
1483
- static getVariable<T extends StorageElementType>(key: string): T | undefined;
1484
- /**
1485
- * Remove a variable from the storage
1486
- * @param key The key of the variable
1487
- * @returns
1488
- */
1489
- static removeVariable(key: string): void;
1490
- /**
1491
- * Clear the storage and the oidsUsed
1492
- * @returns
1493
- */
1494
- static clear(): void;
1495
- static exportJson(): string;
1496
- static export(): ExportedStorage;
1497
- static importJson(dataString: string): void;
1498
- static import(data: object): void;
1499
- }
1500
-
1501
- /**
1502
- * This class is responsible for managing the canvas, the tickers, the events, and the window size and the children of the window.
1503
- */
1504
- declare class GameWindowManager {
1505
- private constructor();
1506
- private static _app;
1507
- /**
1508
- * The PIXI Application instance.
1509
- * It not recommended to use this property directly.
1510
- */
1511
- static get app(): Application<pixi_js.Renderer>;
1512
- private static _isInitialized;
1513
- /**
1514
- * If the manager is initialized.
1515
- */
1516
- static get isInitialized(): boolean;
1517
- /**
1518
- * This is the div that have same size of the canvas.
1519
- * This is useful to put interface elements.
1520
- * You can use React or other framework to put elements in this div.
1521
- */
1522
- static htmlLayout: HTMLElement;
1523
- static canvasWidth: number;
1524
- static canvasHeight: number;
1525
- static get screen(): pixi_js.Rectangle;
1526
- /**
1527
- * Initialize the PIXI Application and the interface div.
1528
- * This method should be called before any other method.
1529
- * @param element The html element where I will put the canvas. Example: document.body
1530
- * @param width The width of the canvas
1531
- * @param height The height of the canvas
1532
- * @param options The options of PIXI Application
1533
- * @example
1534
- * ```typescript
1535
- * const body = document.body
1536
- * if (!body) {
1537
- * throw new Error('body element not found')
1538
- * }
1539
- * await GameWindowManager.initialize(body, 1920, 1080, {
1540
- * backgroundColor: "#303030"
1541
- * })
1542
- * ```
1543
- */
1544
- static initialize(element: HTMLElement, width: number, height: number, options?: Partial<ApplicationOptions>): Promise<void>;
1545
- /**
1546
- * Add the canvas into a html element.
1547
- * @param element it is the html element where I will put the canvas. Example: document.body
1548
- */
1549
- private static addCanvasIntoElement;
1550
- /**
1551
- * Initialize the interface div and add it into a html element.
1552
- * @param element it is the html element where I will put the interface div. Example: document.getElementById('root')
1553
- * @example
1554
- * ```typescript
1555
- * const root = document.getElementById('root')
1556
- * if (!root) {
1557
- * throw new Error('root element not found')
1558
- * }
1559
- * GameWindowManager.initializeHTMLLayout(root)
1560
- * const reactRoot = createRoot(GameWindowManager.htmlLayout)
1561
- * reactRoot.render(
1562
- * <App />
1563
- * )
1564
- * ```
1565
- */
1566
- static initializeHTMLLayout(element: HTMLElement): void;
1567
- /**
1568
- * This method returns the scale of the screen.
1569
- */
1570
- static get screenScale(): number;
1571
- /**
1572
- * This method returns the width of the screen enlarged by the scale.
1573
- */
1574
- static get screenWidth(): number;
1575
- /**
1576
- * This method returns the height of the screen enlarged by the scale.
1577
- */
1578
- static get screenHeight(): number;
1579
- /**
1580
- * This method returns the horizontal margin of the screen.
1581
- */
1582
- static get horizontalMargin(): number;
1583
- /**
1584
- * This method returns the vertical margin of the screen.
1585
- */
1586
- static get verticalMargin(): number;
1587
- /**
1588
- * This method is called when the screen is resized.
1589
- */
1590
- private static resize;
1591
- /**
1592
- * This is a dictionary that contains all Canvas Elements of Canvas, currently.
1593
- */
1594
- static get currentCanvasElements(): {
1595
- [tag: string]: CanvasBase<any>;
1596
- };
1597
- private static _children;
1598
- /**
1599
- * The order of the children tags.
1600
- */
1601
- private static childrenTagsOrder;
1602
- /**
1603
- * Add a canvas element to the canvas.
1604
- * If there is a canvas element with the same tag, it will be removed.
1605
- * @param tag The tag of the canvas element.
1606
- * @param canvasElement The canvas elements to be added.
1607
- * @example
1608
- * ```typescript
1609
- * const texture = await Assets.load('https://pixijs.com/assets/bunny.png');
1610
- * const sprite = CanvasSprite.from(texture);
1611
- * GameWindowManager.addCanvasElement("bunny", sprite);
1612
- * ```
1613
- */
1614
- static addCanvasElement(tag: string, canvasElement: CanvasBase<any>): void;
1615
- /**
1616
- * Remove a canvas element from the canvas.
1617
- * And remove all tickers that are not connected to any canvas element.
1618
- * @param tag The tag of the canvas element to be removed.
1619
- * @returns
1620
- * @example
1621
- * ```typescript
1622
- * GameWindowManager.removeCanvasElement("bunny");
1623
- * ```
1624
- */
1625
- static removeCanvasElement(tag: string | string[]): void;
1626
- /**
1627
- * Get a canvas element by the tag.
1628
- * @param tag The tag of the canvas element.
1629
- * @returns The canvas element.
1630
- * @example
1631
- * ```typescript
1632
- * const sprite = GameWindowManager.getCanvasElement<CanvasSprite>("bunny");
1633
- * ```
1634
- */
1635
- static getCanvasElement<T extends CanvasBase<any>>(tag: string): T | undefined;
1636
- /**
1637
- * Check if a DisplayObject is on the canvas.
1638
- * @param pixiElement The DisplayObject to be checked.
1639
- * @returns If the DisplayObject is on the canvas.
1640
- */
1641
- static canvasElementIsOnCanvas<T extends Container>(pixiElement: T): boolean;
1642
- /**
1643
- * Remove all canvas elements from the canvas.
1644
- * And remove all tickers that are not connected to any canvas element.
1645
- */
1646
- static removeCanvasElements(): void;
1647
- /**
1648
- * Edit the tag of a canvas element.
1649
- * @param oldTag The old tag of the canvas element.
1650
- * @param newTag The new tag of the canvas element.
1651
- */
1652
- static editTagCanvasElement(oldTag: string, newTag: string): void;
1653
- /** Edit Tickers Methods */
1654
- /**
1655
- * Currently tickers that are running.
1656
- */
1657
- static get currentTickers(): IClassWithArgsHistory<any>[];
1658
- private static _currentTickers;
1659
- /**
1660
- * The steps of the tickers
1661
- */
1662
- static get currentTickersSteps(): {
1663
- [tag: string]: ITickersSteps;
1664
- };
1665
- private static _currentTickersSteps;
1666
- static currentTickersTimeouts: {
1667
- [timeout: string]: {
1668
- tags: string[];
1669
- ticker: string;
1670
- };
1671
- };
1672
- /**
1673
- * Run a ticker.
1674
- * @param canvasEslementTag The tag of the canvas element that will use the ticker.
1675
- * @param ticker The ticker class to be run.
1676
- * @param args The arguments to be used in the ticker.
1677
- * @param duration The time to be used in the ticker. This number is in milliseconds. If it is undefined, the ticker will run forever.
1678
- * @param priority The priority to be used in the ticker.
1679
- * @returns
1680
- * @example
1681
- * ```typescript
1682
- * GameWindowManager.addTicker("alien", new TickerRotate({ speed: 0.2 }))
1683
- * ```
1684
- */
1685
- static addTicker<TArgs extends TickerArgsType>(canvasElementTag: string | string[], ticker: TickerBase<TArgs>): void;
1686
- private static pushTicker;
1687
- /**
1688
- * Run a sequence of tickers.
1689
- * @param tag The tag of canvas element that will use the tickers.
1690
- * @param steps The steps of the tickers.
1691
- * @returns
1692
- * @example
1693
- * ```typescript
1694
- * GameWindowManager.addTickersSteps("alien", [
1695
- * new TickerRotate({ speed: 0.1, clockwise: true }, 2000),
1696
- * Pause(500),
1697
- * new TickerRotate({ speed: 0.2, clockwise: false }, 2000),
1698
- * Repeat,
1699
- * ])
1700
- * ```
1701
- */
1702
- static addTickersSteps<TArgs extends TickerArgsType>(tag: string, steps: (ITicker<TArgs> | RepeatType | PauseType)[]): void;
1703
- private static runTickersSteps;
1704
- private static nextTickerStep;
1705
- /**
1706
- * Remove a connection between a canvas element and a ticker.
1707
- * And remove the ticker if there is no canvas element connected to it.
1708
- * @param tag The tag of the canvas element that will use the ticker.
1709
- * @param ticker The ticker class to be removed.
1710
- * @example
1711
- * ```typescript
1712
- * GameWindowManager.removeAssociationBetweenTickerCanvasElement("alien", TickerRotate)
1713
- * ```
1714
- */
1715
- static removeAssociationBetweenTickerCanvasElement(tag: string | string[], ticker: typeof TickerBase<any> | TickerBase<any>): void;
1716
- /**
1717
- * Remove all tickers that are not connected to any existing canvas element.
1718
- */
1719
- private static removeTickersWithoutAssociatedCanvasElement;
1720
- private static addTickerTimeoutInfo;
1721
- private static removeTickerTimeoutInfo;
1722
- /**
1723
- * Remove all tickers from the canvas.
1724
- */
1725
- static removeTickers(): void;
1726
- /**
1727
- * Clear the canvas and the tickers.
1728
- */
1729
- static clear(): void;
1730
- /**
1731
- * Export the canvas and the tickers to a JSON string.
1732
- * @returns The JSON string.
1733
- */
1734
- static exportJson(): string;
1735
- /**
1736
- * Export the canvas and the tickers to an object.
1737
- * @returns The object.
1738
- */
1739
- static export(): ExportedCanvas;
1740
- /**
1741
- * Import the canvas and the tickers from a JSON string.
1742
- * @param dataString The JSON string.
1743
- */
1744
- static importJson(dataString: string): void;
1745
- /**
1746
- * Import the canvas and the tickers from an object.
1747
- * @param data The object.
1748
- */
1749
- static import(data: object): void;
1750
- }
1751
-
1752
- export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelResultType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerFadeAlphaProps, TickerMove, type TickerProgrationType, TickerRotate, type TickerRotateProps, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadImages, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showImageWithDissolveTransition, tickerDecorator };
2
+ export { default as CanvasEvent } from './classes/CanvasEvent.js';
3
+ export { default as CharacterBaseModel, CharacterBaseModelProps } from './classes/CharacterBaseModel.js';
4
+ export { default as ChoiceMenuOptionLabel } from './classes/ChoiceMenuOptionLabel.js';
5
+ export { default as DialogueBaseModel } from './classes/DialogueBaseModel.js';
6
+ export { default as Label } from './classes/Label.js';
7
+ export { default as StoredClassModel } from './classes/StoredClassModel.js';
8
+ export { default as CanvasBase } from './classes/canvas/CanvasBase.js';
9
+ export { default as CanvasContainer } from './classes/canvas/CanvasContainer.js';
10
+ export { default as CanvasImage } from './classes/canvas/CanvasImage.js';
11
+ export { default as CanvasSprite } from './classes/canvas/CanvasSprite.js';
12
+ export { default as CanvasText } from './classes/canvas/CanvasText.js';
13
+ export { I as ITicker, T as TickerBase } from './TickerBase-CjfyD6j5.js';
14
+ export { default as TickerFadeAlpha } from './classes/ticker/TickerFadeAlpha.js';
15
+ export { default as TickerMove } from './classes/ticker/TickerMove.js';
16
+ export { default as TickerRotate } from './classes/ticker/TickerRotate.js';
17
+ export { default as canvasElementDecorator } from './decorators/CanvasElementDecorator.js';
18
+ export { getAllCharacters, getCharacterById, saveCharacter } from './decorators/CharacterDecorator.js';
19
+ export { default as eventDecorator } from './decorators/EventDecorator.js';
20
+ export { default as labelDecorator } from './decorators/LabelDecorator.js';
21
+ export { default as tickerDecorator } from './decorators/TickerDecorator.js';
22
+ export { LabelRunModeEnum } from './enums/LabelRunModeEnum.js';
23
+ export { clearChoiceMenuOptions, clearDialogue, getChoiceMenuOptions, getDialogue, getDialogueHistory, setChoiceMenuOptions, setDialogue } from './functions/DialogueUtility.js';
24
+ export { getFlag, setFlag } from './functions/FlagsUtility.js';
25
+ export { clearAllGameDatas } from './functions/GameUtility.js';
26
+ export { addImage, loadImages, removeCanvasElement, showWithDissolveTransition } from './functions/ImageUtility.js';
27
+ export { getSaveData, getSaveJson, loadSaveData, loadSaveJson } from './functions/SavesUtility.js';
28
+ export { getTexture } from './functions/TextureUtility.js';
29
+ export { IClassWithArgsHistory, IClassWithArgsHistoryForExport } from './interface/IClassWithArgsHistory.js';
30
+ export { IDialogueHistory } from './interface/IDialogueHistory.js';
31
+ export { default as IHistoryStep, IHistoryStepData } from './interface/IHistoryStep.js';
32
+ export { default as IOpenedLabel } from './interface/IOpenedLabel.js';
33
+ export { default as ISaveData } from './interface/ISaveData.js';
34
+ export { default as ITickersSteps } from './interface/ITickersSteps.js';
35
+ export { TickerProgrationType } from './interface/TickerProgrationType.js';
36
+ export { default as ICanvasBaseMemory } from './interface/canvas/ICanvasBaseMemory.js';
37
+ export { default as ICanvasContainerMemory } from './interface/canvas/ICanvasContainerMemory.js';
38
+ export { default as ICanvasImageMemory } from './interface/canvas/ICanvasImageMemory.js';
39
+ export { ICanvasSpriteBaseMemory, default as ICanvasSpriteMemory } from './interface/canvas/ICanvasSpriteMemory.js';
40
+ export { default as ICanvasTextTextMemory } from './interface/canvas/ICanvasTextTextMemory.js';
41
+ export { default as ITextureMemory } from './interface/canvas/ITextureMemory.js';
42
+ export { default as ExportedCanvas } from './interface/export/ExportedCanvas.js';
43
+ export { default as ExportedStep } from './interface/export/ExportedStep.js';
44
+ export { default as ExportedStorage } from './interface/export/ExportedStorage.js';
45
+ export { default as GameStepManager } from './managers/StepManager.js';
46
+ export { default as GameStorageManager } from './managers/StorageManager.js';
47
+ export { default as GameWindowManager } from './managers/WindowManager.js';
48
+ export { CanvasEventNamesType } from './types/CanvasEventNamesType.js';
49
+ export { ChoiceMenuOptionsType } from './types/ChoiceMenuOptionsType.js';
50
+ export { Pause, PauseType, PauseValueType } from './types/PauseType.js';
51
+ export { Repeat, RepeatType } from './types/RepeatType.js';
52
+ export { StepLabelType } from './types/StepLabelType.js';
53
+ export { StorageElementType } from './types/StorageElementType.js';
54
+ export { TickerFadeAlphaProps } from './types/ticker/TickerFadeAlphaProps.js';
55
+ export { TickerRotateProps } from './types/ticker/TickerRotateProps.js';
56
+ import './types/LabelIdType.js';
57
+ import './types/StepHistoryDataType.js';
58
+ import './types/ticker/TickerMoveProps.js';
59
+ import './types/CanvasElementTagType.js';
60
+ import './types/EventIdType.js';
61
+ import './types/TickerIdType.js';
62
+ import 'deep-diff';
63
+ import './override/StepLabelProps.js';
64
+ import './override/StepLabelResult.js';