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