@drincs/pixi-vn 0.3.6 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,23 +9,40 @@ Pixi'VN is based on [Pixi.js](https://pixijs.com/), a modern 2D rendering engine
9
9
  In addition to managing the Pixi.js "Canvas", Pixi'VN offers the possibility of adding an HTML Element with the same dimensions as the "Canvas" to add interactions with the user.
10
10
  This allows the use of systems such as React, Vue, Angular, etc. to create much more complex interfaces with excellent performance.
11
11
 
12
- ## Why Pixi'VN?
12
+ ## Wiki
13
+
14
+ For more information, visit the [Web Page](https://pixi-vn.web.app/)
15
+
16
+ * [Why Pixi’VN?](https://pixi-vn.web.app/start/why.html)
17
+ * [Get Started](https://pixi-vn.web.app/start/getting-started.html)
18
+ * [Interface with JavaScript Framework](https://pixi-vn.web.app/start/interface.html)
13
19
 
14
- The reason why Pixi'VN was born is that current systems for creating a visual novel are based on dated systems and have many shortcomings.
20
+ ### First steps
15
21
 
16
- ## Pivi'VN Templates
22
+ * [Characters](https://pixi-vn.web.app/start/character.html)
23
+ * [Dialogue and Narration](https://pixi-vn.web.app/start/narration.html)
24
+ * [Choice Menus](https://pixi-vn.web.app/start/choices.html)
25
+ * [Label and Game Step](https://pixi-vn.web.app/start/labels.html)
26
+ * [Game Storage](https://pixi-vn.web.app/start/storage.html)
27
+ * [Flags Management](https://pixi-vn.web.app/start/flags.html)
28
+ * [Save and Load](https://pixi-vn.web.app/start/save.html)
29
+ * [Images and Animations](https://pixi-vn.web.app/start/images.html)
17
30
 
18
- * [Pixi’VN template (React + Vite + MUI joy)](https://github.com/DRincs-Productions/pixi-vn-react-template)
31
+ ### Advanced topics
19
32
 
20
- ## Get Started
33
+ * [Canvas Elements](https://pixi-vn.web.app/advanced/canvas-elements.html)
34
+ * [Animations and Effects](https://pixi-vn.web.app/advanced/animations-effects.html)
35
+ * [Tickers](https://pixi-vn.web.app/advanced/tickers.html)
36
+ * [Stored Classes](https://pixi-vn.web.app/advanced/stored-classes.html)
37
+ * [Intecept Events](https://pixi-vn.web.app/advanced/intercept-events.html)
21
38
 
22
- ### Installation
39
+ ## Installation
23
40
 
24
41
  ```bash
25
42
  npm install @drincs/pixi-vn
26
43
  ```
27
44
 
28
- ### Usage
45
+ ## Usage
29
46
 
30
47
  For the following example, we will use React to create the interface and Pixi'VN to manage the visual novel.
31
48
 
@@ -91,7 +108,3 @@ body {
91
108
  display: flex;
92
109
  }
93
110
  ```
94
-
95
- ## Wiki
96
-
97
- For more information, visit the [Wiki](https://pixivn.readthedocs.io/)
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
3
+ export { Assets } from 'pixi.js';
3
4
  import deepDiff from 'deep-diff';
4
5
 
5
6
  /**
@@ -300,8 +301,24 @@ type StorageElementInternalType = StorageElementPrimaryType | Record<string | nu
300
301
  /**
301
302
  * StorageElementType are all the types that can be stored in the storage
302
303
  */
303
- type StorageElementType = StorageElementInternalType | Record<string | number | symbol, StorageElementInternalType>;
304
+ type StorageElementType = StorageElementInternalType | Record<string | number | symbol, StorageElementInternalType> | {
305
+ [key: string | number | symbol]: StorageElementType;
306
+ };
304
307
 
308
+ type DialogueData = {
309
+ /**
310
+ * The text of the dialogue.
311
+ */
312
+ text: string;
313
+ /**
314
+ * The id of the character that is speaking.
315
+ */
316
+ characterId?: string;
317
+ /**
318
+ * Other parameters that can be stored in the dialogue.
319
+ */
320
+ oltherParams?: Record<string | number | symbol, StorageElementType>;
321
+ };
305
322
  /**
306
323
  * Base class for all dialogue models.
307
324
  * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.
@@ -310,13 +327,13 @@ type StorageElementType = StorageElementInternalType | Record<string | number |
310
327
  * setDialogue(new DialogueBaseModel("Hello World", character))
311
328
  * ```
312
329
  */
313
- declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> {
330
+ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {
314
331
  /**
315
332
  * @param text The text of the dialogue.
316
333
  * @param character The id of the character that is speaking.
317
334
  * @param oltherParams Other parameters that can be stored in the dialogue.
318
335
  */
319
- constructor(text: string, character: string | TCharacter | undefined, oltherParams?: {
336
+ constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams?: {
320
337
  [key: string]: StorageElementType;
321
338
  });
322
339
  /**
@@ -333,6 +350,12 @@ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = Characte
333
350
  oltherParams: {
334
351
  [key: string]: StorageElementType;
335
352
  };
353
+ /**
354
+ * Export the dialogue to a DialogueBaseData object.
355
+ *
356
+ * @returns The data of the dialogue.
357
+ */
358
+ export(): DialogueData;
336
359
  }
337
360
 
338
361
  /**
@@ -521,11 +544,26 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
521
544
  static from(source: Texture | TextureSourceLike, skipCache?: boolean): CanvasSprite<any>;
522
545
  }
523
546
 
547
+ interface CanvasImageOptions extends SpriteOptions {
548
+ /**
549
+ * The image link to load in the canvas.
550
+ */
551
+ textureImage?: string;
552
+ }
524
553
  /**
525
554
  * This class is a extension of the CanvasSprite class, it has the same properties and methods,
526
555
  * but it has some features that make texture management easier.
527
556
  * You need to use CanvasImage.load() to show the image in the canvas.
528
- * This class is used for functions like addImage, showCanvasImages and showImageWithDissolveTransition.
557
+ * This class is used for functions like addImage, loadImages and showImageWithDissolveTransition.
558
+ * @example
559
+ * ```typescript
560
+ * let alien = new CanvasImage({ textureImage: 'https://pixijs.com/assets/eggHead.png' })
561
+ * alien.anchor.set(0.5);
562
+ * alien.x = 100
563
+ * alien.y = 100
564
+ * await alien.load()
565
+ * GameWindowManager.addCanvasElement("alien", alien)
566
+ * ```
529
567
  * @example
530
568
  * ```typescript
531
569
  * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
@@ -536,6 +574,7 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
536
574
  * ```
537
575
  */
538
576
  declare class CanvasImage extends CanvasSprite<ICanvasImageMemory> {
577
+ constructor(options?: CanvasImageOptions | Texture | undefined);
539
578
  get memory(): ICanvasImageMemory;
540
579
  set memory(memory: ICanvasImageMemory);
541
580
  imageLink: string;
@@ -688,7 +727,7 @@ type TickerFadeAlphaProps = {
688
727
  /**
689
728
  * The speed of the fade
690
729
  */
691
- speed: number;
730
+ speed?: number;
692
731
  /**
693
732
  * The type of the fade
694
733
  * @default "hide"
@@ -731,27 +770,9 @@ declare class TickerFadeAlpha extends TickerBase<TickerFadeAlphaProps> {
731
770
  * @param args The arguments that are passed to the ticker
732
771
  * @param tags The tags of the canvas element that are connected to this ticker
733
772
  */
734
- fn(t: Ticker, args: {
735
- speed?: number;
736
- type?: "hide" | "show";
737
- limit?: number;
738
- tagToRemoveAfter?: string[] | string;
739
- startOnlyIfHaveTexture?: boolean;
740
- }, tags: string[]): void;
773
+ fn(t: Ticker, args: TickerFadeAlphaProps, tags: string[]): void;
741
774
  }
742
775
 
743
- type TickerProgrationType = ITickerProgrationLinear | ITickerProgrationExponential;
744
- type ITickerProgrationLinear = {
745
- amt: number;
746
- limit?: number;
747
- type: "linear";
748
- };
749
- type ITickerProgrationExponential = {
750
- percentage: number;
751
- limit?: number;
752
- type: "exponential";
753
- };
754
-
755
776
  /**
756
777
  * is a string that represents a ticker id.
757
778
  * It is used to GameWindowManager.tickers to get the ticker class.
@@ -913,6 +934,63 @@ interface ITickersSteps {
913
934
  steps: (ITickersStep<any> | RepeatType | PauseType)[];
914
935
  }
915
936
 
937
+ type TickerProgrationType = ITickerProgrationLinear | ITickerProgrationExponential;
938
+ type ITickerProgrationLinear = {
939
+ amt: number;
940
+ limit?: number;
941
+ type: "linear";
942
+ };
943
+ type ITickerProgrationExponential = {
944
+ percentage: number;
945
+ limit?: number;
946
+ type: "exponential";
947
+ };
948
+
949
+ type TickerMoveProps = {
950
+ /**
951
+ * The speed of the movement
952
+ * @default 0.1
953
+ */
954
+ speed?: number;
955
+ /**
956
+ * The destination of the movement
957
+ */
958
+ destination: {
959
+ y: number;
960
+ x: number;
961
+ };
962
+ /**
963
+ * The progression of the speed
964
+ */
965
+ speedProgression?: TickerProgrationType;
966
+ /**
967
+ * If true, the rotation only starts if the canvas element have a texture
968
+ */
969
+ startOnlyIfHaveTexture?: boolean;
970
+ };
971
+
972
+ /**
973
+ * A ticker that moves the canvas element of the canvas.
974
+ * @example
975
+ * ```typescript
976
+ * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
977
+ * GameWindowManager.addCanvasElement("alien", alien);
978
+ * const ticker = new TickerMove({
979
+ * speed: 0.1,
980
+ * destination: { x: 100, y: 100 },
981
+ * }),
982
+ * ```
983
+ */
984
+ declare class TickerMove extends TickerBase<TickerMoveProps> {
985
+ /**
986
+ * The method that will be called every frame to move the canvas element of the canvas.
987
+ * @param t The ticker that is calling this method
988
+ * @param args The arguments that are passed to the ticker
989
+ * @param tags The tags of the canvas element that are connected to this ticker
990
+ */
991
+ fn(t: Ticker, args: TickerMoveProps, tags: string[]): void;
992
+ }
993
+
916
994
  type TickerRotateProps = {
917
995
  /**
918
996
  * The speed of the rotation
@@ -945,6 +1023,7 @@ type TickerRotateProps = {
945
1023
  * clockwise: true,
946
1024
  * }),
947
1025
  * GameWindowManager.addTicker("alien", ticker)
1026
+ * ```
948
1027
  */
949
1028
  declare class TickerRotate extends TickerBase<TickerRotateProps> {
950
1029
  /**
@@ -953,12 +1032,7 @@ declare class TickerRotate extends TickerBase<TickerRotateProps> {
953
1032
  * @param args The arguments that are passed to the ticker
954
1033
  * @param tags The tags of the canvas element that are connected to this ticker
955
1034
  */
956
- fn(t: Ticker, args: {
957
- speed?: number;
958
- clockwise?: boolean;
959
- speedProgression?: TickerProgrationType;
960
- startOnlyIfHaveTexture?: boolean;
961
- }, tags: string[]): void;
1035
+ fn(t: Ticker, args: TickerRotateProps, tags: string[]): void;
962
1036
  }
963
1037
 
964
1038
  type CanvasElementTagType = string;
@@ -1122,7 +1196,7 @@ declare function addImage(tag: string, imageUrl: string): CanvasImage;
1122
1196
  * @param canvasImages is a list of images to show.
1123
1197
  * @returns the list of images.
1124
1198
  */
1125
- declare function showCanvasImages(canvasImages: CanvasImage[] | CanvasImage): Promise<CanvasImage[]>;
1199
+ declare function loadImages(canvasImages: CanvasImage[] | CanvasImage): Promise<CanvasImage[]>;
1126
1200
  /**
1127
1201
  * Remove a image from the canvas.
1128
1202
  * @param tag is the unique tag of the image. You can use this tag to refer to this image
@@ -1679,4 +1753,4 @@ declare class GameWindowManager {
1679
1753
  static import(data: object): void;
1680
1754
  }
1681
1755
 
1682
- export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelResultType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerFadeAlphaProps, type TickerProgrationType, TickerRotate, type TickerRotateProps, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
1756
+ export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelResultType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerFadeAlphaProps, TickerMove, type TickerProgrationType, TickerRotate, type TickerRotateProps, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadImages, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showImageWithDissolveTransition, tickerDecorator };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as pixi_js from 'pixi.js';
2
2
  import { ContainerOptions, SpriteOptions, TextOptions, Container, Sprite, ContainerEvents, EventEmitter, Texture, TextureSourceLike, Text, UPDATE_PRIORITY, Ticker, TickerCallback, Application, ApplicationOptions } from 'pixi.js';
3
+ export { Assets } from 'pixi.js';
3
4
  import deepDiff from 'deep-diff';
4
5
 
5
6
  /**
@@ -300,8 +301,24 @@ type StorageElementInternalType = StorageElementPrimaryType | Record<string | nu
300
301
  /**
301
302
  * StorageElementType are all the types that can be stored in the storage
302
303
  */
303
- type StorageElementType = StorageElementInternalType | Record<string | number | symbol, StorageElementInternalType>;
304
+ type StorageElementType = StorageElementInternalType | Record<string | number | symbol, StorageElementInternalType> | {
305
+ [key: string | number | symbol]: StorageElementType;
306
+ };
304
307
 
308
+ type DialogueData = {
309
+ /**
310
+ * The text of the dialogue.
311
+ */
312
+ text: string;
313
+ /**
314
+ * The id of the character that is speaking.
315
+ */
316
+ characterId?: string;
317
+ /**
318
+ * Other parameters that can be stored in the dialogue.
319
+ */
320
+ oltherParams?: Record<string | number | symbol, StorageElementType>;
321
+ };
305
322
  /**
306
323
  * Base class for all dialogue models.
307
324
  * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.
@@ -310,13 +327,13 @@ type StorageElementType = StorageElementInternalType | Record<string | number |
310
327
  * setDialogue(new DialogueBaseModel("Hello World", character))
311
328
  * ```
312
329
  */
313
- declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> {
330
+ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {
314
331
  /**
315
332
  * @param text The text of the dialogue.
316
333
  * @param character The id of the character that is speaking.
317
334
  * @param oltherParams Other parameters that can be stored in the dialogue.
318
335
  */
319
- constructor(text: string, character: string | TCharacter | undefined, oltherParams?: {
336
+ constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams?: {
320
337
  [key: string]: StorageElementType;
321
338
  });
322
339
  /**
@@ -333,6 +350,12 @@ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = Characte
333
350
  oltherParams: {
334
351
  [key: string]: StorageElementType;
335
352
  };
353
+ /**
354
+ * Export the dialogue to a DialogueBaseData object.
355
+ *
356
+ * @returns The data of the dialogue.
357
+ */
358
+ export(): DialogueData;
336
359
  }
337
360
 
338
361
  /**
@@ -521,11 +544,26 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
521
544
  static from(source: Texture | TextureSourceLike, skipCache?: boolean): CanvasSprite<any>;
522
545
  }
523
546
 
547
+ interface CanvasImageOptions extends SpriteOptions {
548
+ /**
549
+ * The image link to load in the canvas.
550
+ */
551
+ textureImage?: string;
552
+ }
524
553
  /**
525
554
  * This class is a extension of the CanvasSprite class, it has the same properties and methods,
526
555
  * but it has some features that make texture management easier.
527
556
  * You need to use CanvasImage.load() to show the image in the canvas.
528
- * This class is used for functions like addImage, showCanvasImages and showImageWithDissolveTransition.
557
+ * This class is used for functions like addImage, loadImages and showImageWithDissolveTransition.
558
+ * @example
559
+ * ```typescript
560
+ * let alien = new CanvasImage({ textureImage: 'https://pixijs.com/assets/eggHead.png' })
561
+ * alien.anchor.set(0.5);
562
+ * alien.x = 100
563
+ * alien.y = 100
564
+ * await alien.load()
565
+ * GameWindowManager.addCanvasElement("alien", alien)
566
+ * ```
529
567
  * @example
530
568
  * ```typescript
531
569
  * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
@@ -536,6 +574,7 @@ declare class CanvasSprite<Memory extends SpriteOptions & ICanvasBaseMemory = IC
536
574
  * ```
537
575
  */
538
576
  declare class CanvasImage extends CanvasSprite<ICanvasImageMemory> {
577
+ constructor(options?: CanvasImageOptions | Texture | undefined);
539
578
  get memory(): ICanvasImageMemory;
540
579
  set memory(memory: ICanvasImageMemory);
541
580
  imageLink: string;
@@ -688,7 +727,7 @@ type TickerFadeAlphaProps = {
688
727
  /**
689
728
  * The speed of the fade
690
729
  */
691
- speed: number;
730
+ speed?: number;
692
731
  /**
693
732
  * The type of the fade
694
733
  * @default "hide"
@@ -731,27 +770,9 @@ declare class TickerFadeAlpha extends TickerBase<TickerFadeAlphaProps> {
731
770
  * @param args The arguments that are passed to the ticker
732
771
  * @param tags The tags of the canvas element that are connected to this ticker
733
772
  */
734
- fn(t: Ticker, args: {
735
- speed?: number;
736
- type?: "hide" | "show";
737
- limit?: number;
738
- tagToRemoveAfter?: string[] | string;
739
- startOnlyIfHaveTexture?: boolean;
740
- }, tags: string[]): void;
773
+ fn(t: Ticker, args: TickerFadeAlphaProps, tags: string[]): void;
741
774
  }
742
775
 
743
- type TickerProgrationType = ITickerProgrationLinear | ITickerProgrationExponential;
744
- type ITickerProgrationLinear = {
745
- amt: number;
746
- limit?: number;
747
- type: "linear";
748
- };
749
- type ITickerProgrationExponential = {
750
- percentage: number;
751
- limit?: number;
752
- type: "exponential";
753
- };
754
-
755
776
  /**
756
777
  * is a string that represents a ticker id.
757
778
  * It is used to GameWindowManager.tickers to get the ticker class.
@@ -913,6 +934,63 @@ interface ITickersSteps {
913
934
  steps: (ITickersStep<any> | RepeatType | PauseType)[];
914
935
  }
915
936
 
937
+ type TickerProgrationType = ITickerProgrationLinear | ITickerProgrationExponential;
938
+ type ITickerProgrationLinear = {
939
+ amt: number;
940
+ limit?: number;
941
+ type: "linear";
942
+ };
943
+ type ITickerProgrationExponential = {
944
+ percentage: number;
945
+ limit?: number;
946
+ type: "exponential";
947
+ };
948
+
949
+ type TickerMoveProps = {
950
+ /**
951
+ * The speed of the movement
952
+ * @default 0.1
953
+ */
954
+ speed?: number;
955
+ /**
956
+ * The destination of the movement
957
+ */
958
+ destination: {
959
+ y: number;
960
+ x: number;
961
+ };
962
+ /**
963
+ * The progression of the speed
964
+ */
965
+ speedProgression?: TickerProgrationType;
966
+ /**
967
+ * If true, the rotation only starts if the canvas element have a texture
968
+ */
969
+ startOnlyIfHaveTexture?: boolean;
970
+ };
971
+
972
+ /**
973
+ * A ticker that moves the canvas element of the canvas.
974
+ * @example
975
+ * ```typescript
976
+ * let alien = addImage("alien", 'https://pixijs.com/assets/eggHead.png')
977
+ * GameWindowManager.addCanvasElement("alien", alien);
978
+ * const ticker = new TickerMove({
979
+ * speed: 0.1,
980
+ * destination: { x: 100, y: 100 },
981
+ * }),
982
+ * ```
983
+ */
984
+ declare class TickerMove extends TickerBase<TickerMoveProps> {
985
+ /**
986
+ * The method that will be called every frame to move the canvas element of the canvas.
987
+ * @param t The ticker that is calling this method
988
+ * @param args The arguments that are passed to the ticker
989
+ * @param tags The tags of the canvas element that are connected to this ticker
990
+ */
991
+ fn(t: Ticker, args: TickerMoveProps, tags: string[]): void;
992
+ }
993
+
916
994
  type TickerRotateProps = {
917
995
  /**
918
996
  * The speed of the rotation
@@ -945,6 +1023,7 @@ type TickerRotateProps = {
945
1023
  * clockwise: true,
946
1024
  * }),
947
1025
  * GameWindowManager.addTicker("alien", ticker)
1026
+ * ```
948
1027
  */
949
1028
  declare class TickerRotate extends TickerBase<TickerRotateProps> {
950
1029
  /**
@@ -953,12 +1032,7 @@ declare class TickerRotate extends TickerBase<TickerRotateProps> {
953
1032
  * @param args The arguments that are passed to the ticker
954
1033
  * @param tags The tags of the canvas element that are connected to this ticker
955
1034
  */
956
- fn(t: Ticker, args: {
957
- speed?: number;
958
- clockwise?: boolean;
959
- speedProgression?: TickerProgrationType;
960
- startOnlyIfHaveTexture?: boolean;
961
- }, tags: string[]): void;
1035
+ fn(t: Ticker, args: TickerRotateProps, tags: string[]): void;
962
1036
  }
963
1037
 
964
1038
  type CanvasElementTagType = string;
@@ -1122,7 +1196,7 @@ declare function addImage(tag: string, imageUrl: string): CanvasImage;
1122
1196
  * @param canvasImages is a list of images to show.
1123
1197
  * @returns the list of images.
1124
1198
  */
1125
- declare function showCanvasImages(canvasImages: CanvasImage[] | CanvasImage): Promise<CanvasImage[]>;
1199
+ declare function loadImages(canvasImages: CanvasImage[] | CanvasImage): Promise<CanvasImage[]>;
1126
1200
  /**
1127
1201
  * Remove a image from the canvas.
1128
1202
  * @param tag is the unique tag of the image. You can use this tag to refer to this image
@@ -1679,4 +1753,4 @@ declare class GameWindowManager {
1679
1753
  static import(data: object): void;
1680
1754
  }
1681
1755
 
1682
- export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelResultType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerFadeAlphaProps, type TickerProgrationType, TickerRotate, type TickerRotateProps, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
1756
+ export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelResultType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerFadeAlphaProps, TickerMove, type TickerProgrationType, TickerRotate, type TickerRotateProps, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadImages, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showImageWithDissolveTransition, tickerDecorator };