@drincs/pixi-vn 0.6.5 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -3
- package/dist/classes/CharacterBaseModel.js +57 -57
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs +57 -57
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOption.d.mts +5 -2
- package/dist/classes/ChoiceMenuOption.d.ts +5 -2
- package/dist/classes/ChoiceMenuOption.js +42 -25
- package/dist/classes/ChoiceMenuOption.js.map +1 -1
- package/dist/classes/ChoiceMenuOption.mjs +42 -25
- package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
- package/dist/classes/CloseLabel.d.mts +3 -1
- package/dist/classes/CloseLabel.d.ts +3 -1
- package/dist/classes/CloseLabel.js +25 -16
- package/dist/classes/CloseLabel.js.map +1 -1
- package/dist/classes/CloseLabel.mjs +25 -16
- package/dist/classes/CloseLabel.mjs.map +1 -1
- package/dist/classes/Label.d.mts +45 -4
- package/dist/classes/Label.d.ts +45 -4
- package/dist/classes/Label.js +25 -16
- package/dist/classes/Label.js.map +1 -1
- package/dist/classes/Label.mjs +25 -16
- package/dist/classes/Label.mjs.map +1 -1
- package/dist/classes/LabelAbstract.d.mts +50 -0
- package/dist/classes/LabelAbstract.d.ts +50 -0
- package/dist/classes/LabelAbstract.js +100 -0
- package/dist/classes/LabelAbstract.js.map +1 -0
- package/dist/classes/LabelAbstract.mjs +98 -0
- package/dist/classes/LabelAbstract.mjs.map +1 -0
- package/dist/classes/LabelJson.d.mts +30 -0
- package/dist/classes/LabelJson.d.ts +30 -0
- package/dist/classes/LabelJson.js +2766 -0
- package/dist/classes/LabelJson.js.map +1 -0
- package/dist/classes/LabelJson.mjs +2760 -0
- package/dist/classes/LabelJson.mjs.map +1 -0
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/index.d.mts +6 -1
- package/dist/classes/index.d.ts +6 -1
- package/dist/classes/index.js +827 -26
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +827 -27
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
- package/dist/classes/ticker/MoveTicker.js.map +1 -1
- package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
- package/dist/classes/ticker/RotateTicker.js.map +1 -1
- package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
- package/dist/classes/ticker/ZoomTicker.js.map +1 -1
- package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
- package/dist/classes/ticker/index.js.map +1 -1
- package/dist/classes/ticker/index.mjs.map +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/constants.mjs.map +1 -1
- package/dist/decorators/LabelDecorator.d.mts +19 -5
- package/dist/decorators/LabelDecorator.d.ts +19 -5
- package/dist/decorators/LabelDecorator.js +29 -16
- package/dist/decorators/LabelDecorator.js.map +1 -1
- package/dist/decorators/LabelDecorator.mjs +29 -17
- package/dist/decorators/LabelDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +10 -2
- package/dist/decorators/index.d.ts +10 -2
- package/dist/decorators/index.js +25 -16
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +25 -16
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/DialogueUtility.d.mts +3 -1
- package/dist/functions/DialogueUtility.d.ts +3 -1
- package/dist/functions/DialogueUtility.js +85 -26
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +85 -26
- package/dist/functions/DialogueUtility.mjs.map +1 -1
- package/dist/functions/FlagsUtility.js.map +1 -1
- package/dist/functions/FlagsUtility.mjs.map +1 -1
- package/dist/functions/GameUtility.js.map +1 -1
- package/dist/functions/GameUtility.mjs.map +1 -1
- package/dist/functions/ImageUtility.js.map +1 -1
- package/dist/functions/ImageUtility.mjs.map +1 -1
- package/dist/functions/Importer.d.mts +24 -0
- package/dist/functions/Importer.d.ts +24 -0
- package/dist/functions/Importer.js +2804 -0
- package/dist/functions/Importer.js.map +1 -0
- package/dist/functions/Importer.mjs +2798 -0
- package/dist/functions/Importer.mjs.map +1 -0
- package/dist/functions/SavesUtility.d.mts +3 -1
- package/dist/functions/SavesUtility.d.ts +3 -1
- package/dist/functions/SavesUtility.js +139 -36
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +139 -36
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/index.d.mts +6 -1
- package/dist/functions/index.d.ts +6 -1
- package/dist/functions/index.js +169 -27
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +169 -28
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +131 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -37
- package/dist/index.mjs.map +1 -1
- package/dist/interface/IHistoryStep.d.mts +3 -1
- package/dist/interface/IHistoryStep.d.ts +3 -1
- package/dist/interface/ISaveData.d.mts +3 -1
- package/dist/interface/ISaveData.d.ts +3 -1
- package/dist/interface/LabelProps.d.mts +38 -5
- package/dist/interface/LabelProps.d.ts +38 -5
- package/dist/interface/export/ExportedStep.d.mts +3 -1
- package/dist/interface/export/ExportedStep.d.ts +3 -1
- package/dist/interface/export/index.d.mts +3 -1
- package/dist/interface/export/index.d.ts +3 -1
- package/dist/interface/index.d.mts +6 -4
- package/dist/interface/index.d.ts +6 -4
- package/dist/labels/BaseCanvasElementTestLabel.d.mts +3 -1
- package/dist/labels/BaseCanvasElementTestLabel.d.ts +3 -1
- package/dist/labels/BaseCanvasElementTestLabel.js +129 -26
- package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.mjs +130 -27
- package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.d.mts +3 -1
- package/dist/labels/CanvasEventsTestLabel.d.ts +3 -1
- package/dist/labels/CanvasEventsTestLabel.js +129 -26
- package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.mjs +129 -26
- package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +3 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +3 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +129 -26
- package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +130 -27
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.mts +3 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.ts +3 -1
- package/dist/labels/ImagesAnimationsTestLabel.js +46 -35
- package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.mjs +47 -36
- package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
- package/dist/labels/MarkdownTest.d.mts +3 -1
- package/dist/labels/MarkdownTest.d.ts +3 -1
- package/dist/labels/MarkdownTest.js +129 -26
- package/dist/labels/MarkdownTest.js.map +1 -1
- package/dist/labels/MarkdownTest.mjs +129 -26
- package/dist/labels/MarkdownTest.mjs.map +1 -1
- package/dist/labels/StartLabel.d.mts +3 -1
- package/dist/labels/StartLabel.d.ts +3 -1
- package/dist/labels/StartLabel.js +47 -36
- package/dist/labels/StartLabel.js.map +1 -1
- package/dist/labels/StartLabel.mjs +47 -36
- package/dist/labels/StartLabel.mjs.map +1 -1
- package/dist/labels/StepLabelTest.d.mts +3 -1
- package/dist/labels/StepLabelTest.d.ts +3 -1
- package/dist/labels/StepLabelTest.js +129 -26
- package/dist/labels/StepLabelTest.js.map +1 -1
- package/dist/labels/StepLabelTest.mjs +129 -26
- package/dist/labels/StepLabelTest.mjs.map +1 -1
- package/dist/labels/TestConstant.js.map +1 -1
- package/dist/labels/TestConstant.mjs.map +1 -1
- package/dist/labels/index.d.mts +3 -1
- package/dist/labels/index.d.ts +3 -1
- package/dist/labels/index.js +47 -36
- package/dist/labels/index.js.map +1 -1
- package/dist/labels/index.mjs +47 -36
- package/dist/labels/index.mjs.map +1 -1
- package/dist/managers/StepManager.d.mts +5 -3
- package/dist/managers/StepManager.d.ts +5 -3
- package/dist/managers/StepManager.js +138 -35
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +138 -35
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/WindowManager.js.map +1 -1
- package/dist/managers/WindowManager.mjs.map +1 -1
- package/dist/managers/index.d.mts +7 -5
- package/dist/managers/index.d.ts +7 -5
- package/dist/managers/index.js +138 -35
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +138 -35
- package/dist/managers/index.mjs.map +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.mts +3 -1
- package/dist/types/ChoiceMenuOptionsType.d.ts +3 -1
- package/dist/types/LabelJsonType.d.mts +22 -0
- package/dist/types/LabelJsonType.d.ts +22 -0
- package/dist/types/LabelJsonType.js +4 -0
- package/dist/types/LabelJsonType.js.map +1 -0
- package/dist/types/LabelJsonType.mjs +3 -0
- package/dist/types/LabelJsonType.mjs.map +1 -0
- package/dist/types/StepLabelJsonType.d.mts +30 -0
- package/dist/types/StepLabelJsonType.d.ts +30 -0
- package/dist/types/StepLabelJsonType.js +4 -0
- package/dist/types/StepLabelJsonType.js.map +1 -0
- package/dist/types/StepLabelJsonType.mjs +3 -0
- package/dist/types/StepLabelJsonType.mjs.map +1 -0
- package/dist/types/index.d.mts +5 -1
- package/dist/types/index.d.ts +5 -1
- package/package.json +3 -2
- package/dist/LabelProps-CFV-zRjG.d.ts +0 -113
- package/dist/LabelProps-CmRpvUJm.d.mts +0 -113
package/dist/constants.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PauseType } from './types/PauseType.mjs';
|
|
2
2
|
import { RepeatType } from './types/RepeatType.mjs';
|
|
3
3
|
|
|
4
|
-
declare const PIXIVN_VERSION = "0.6.
|
|
4
|
+
declare const PIXIVN_VERSION = "0.6.7";
|
|
5
5
|
declare const Repeat: RepeatType;
|
|
6
6
|
/**
|
|
7
7
|
* Pause the tickers for a duration.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PauseType } from './types/PauseType.js';
|
|
2
2
|
import { RepeatType } from './types/RepeatType.js';
|
|
3
3
|
|
|
4
|
-
declare const PIXIVN_VERSION = "0.6.
|
|
4
|
+
declare const PIXIVN_VERSION = "0.6.7";
|
|
5
5
|
declare const Repeat: RepeatType;
|
|
6
6
|
/**
|
|
7
7
|
* Pause the tickers for a duration.
|
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";;;AAEO,IAAM,cAAiB,GAAA,QAAA;AACvB,IAAM,MAAqB,GAAA,SAAA;AAM3B,SAAS,MAAM,QAA6B,EAAA;AAC/C,EAAO,OAAA;AAAA,IACH,IAAM,EAAA,OAAA;AAAA,IACN,QAAA;AAAA,GACJ,CAAA;AACJ","file":"constants.js","sourcesContent":["import { PauseType, RepeatType } from \"./types\"\n\nexport const PIXIVN_VERSION = '0.6.
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";;;AAEO,IAAM,cAAiB,GAAA,QAAA;AACvB,IAAM,MAAqB,GAAA,SAAA;AAM3B,SAAS,MAAM,QAA6B,EAAA;AAC/C,EAAO,OAAA;AAAA,IACH,IAAM,EAAA,OAAA;AAAA,IACN,QAAA;AAAA,GACJ,CAAA;AACJ","file":"constants.js","sourcesContent":["import { PauseType, RepeatType } from \"./types\"\n\nexport const PIXIVN_VERSION = '0.6.7'\nexport const Repeat: RepeatType = \"repeat\"\n/**\n * Pause the tickers for a duration.\n * @param duration Duration in seconds\n * @returns The pause object\n */\nexport function Pause(duration: number): PauseType {\n return {\n type: \"pause\",\n duration: duration,\n }\n}\n"]}
|
package/dist/constants.mjs
CHANGED
package/dist/constants.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";AAEO,IAAM,cAAiB,GAAA,QAAA;AACvB,IAAM,MAAqB,GAAA,SAAA;AAM3B,SAAS,MAAM,QAA6B,EAAA;AAC/C,EAAO,OAAA;AAAA,IACH,IAAM,EAAA,OAAA;AAAA,IACN,QAAA;AAAA,GACJ,CAAA;AACJ","file":"constants.mjs","sourcesContent":["import { PauseType, RepeatType } from \"./types\"\n\nexport const PIXIVN_VERSION = '0.6.
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":";AAEO,IAAM,cAAiB,GAAA,QAAA;AACvB,IAAM,MAAqB,GAAA,SAAA;AAM3B,SAAS,MAAM,QAA6B,EAAA;AAC/C,EAAO,OAAA;AAAA,IACH,IAAM,EAAA,OAAA;AAAA,IACN,QAAA;AAAA,GACJ,CAAA;AACJ","file":"constants.mjs","sourcesContent":["import { PauseType, RepeatType } from \"./types\"\n\nexport const PIXIVN_VERSION = '0.6.7'\nexport const Repeat: RepeatType = \"repeat\"\n/**\n * Pause the tickers for a duration.\n * @param duration Duration in seconds\n * @returns The pause object\n */\nexport function Pause(duration: number): PauseType {\n return {\n type: \"pause\",\n duration: duration,\n }\n}\n"]}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { LabelIdType } from '../types/LabelIdType.mjs';
|
|
2
|
-
import
|
|
2
|
+
import Label from '../classes/Label.mjs';
|
|
3
3
|
import { StepLabelType } from '../types/StepLabelType.mjs';
|
|
4
|
-
import '../
|
|
4
|
+
import LabelProps from '../interface/LabelProps.mjs';
|
|
5
|
+
import LabelJson from '../classes/LabelJson.mjs';
|
|
6
|
+
import LabelAbstract from '../classes/LabelAbstract.mjs';
|
|
5
7
|
import '@drincs/pixi-vn/dist/override';
|
|
8
|
+
import '../types/StepLabelJsonType.mjs';
|
|
9
|
+
import '../types/ChoiceMenuOptionsType.mjs';
|
|
10
|
+
import '../classes/ChoiceMenuOption.mjs';
|
|
11
|
+
import '../types/StorageElementType.mjs';
|
|
12
|
+
import '../types/CloseType.mjs';
|
|
13
|
+
import '../types/LabelRunModeType.mjs';
|
|
14
|
+
import '../types/StepHistoryDataType.mjs';
|
|
6
15
|
|
|
7
16
|
declare const registeredLabels: {
|
|
8
|
-
[key: LabelIdType]: Label<any
|
|
17
|
+
[key: LabelIdType]: (LabelAbstract<any> | Label<any> | LabelJson<any>);
|
|
9
18
|
};
|
|
10
19
|
/**
|
|
11
20
|
* Creates a new label and registers it in the system.
|
|
@@ -15,12 +24,17 @@ declare const registeredLabels: {
|
|
|
15
24
|
* @param props The properties of the label
|
|
16
25
|
* @returns The created label
|
|
17
26
|
*/
|
|
18
|
-
declare function newLabel<T extends {} = {}>(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), props?: Omit<LabelProps<T
|
|
27
|
+
declare function newLabel<T extends {} = {}>(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), props?: Omit<LabelProps<Label<T>>, "choiseIndex">): Label<T>;
|
|
19
28
|
/**
|
|
20
29
|
* Gets a label by its id
|
|
21
30
|
* @param id The id of the label
|
|
22
31
|
* @returns The label or undefined if it does not exist
|
|
23
32
|
*/
|
|
24
33
|
declare function getLabelById<T = Label<any>>(id: LabelIdType): T | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Saves a label in the system
|
|
36
|
+
* @param label The label to be saved
|
|
37
|
+
*/
|
|
38
|
+
declare function saveLabel<T extends LabelAbstract<any>>(label: T): void;
|
|
25
39
|
|
|
26
|
-
export { getLabelById, newLabel, registeredLabels };
|
|
40
|
+
export { getLabelById, newLabel, registeredLabels, saveLabel };
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { LabelIdType } from '../types/LabelIdType.js';
|
|
2
|
-
import
|
|
2
|
+
import Label from '../classes/Label.js';
|
|
3
3
|
import { StepLabelType } from '../types/StepLabelType.js';
|
|
4
|
-
import '../
|
|
4
|
+
import LabelProps from '../interface/LabelProps.js';
|
|
5
|
+
import LabelJson from '../classes/LabelJson.js';
|
|
6
|
+
import LabelAbstract from '../classes/LabelAbstract.js';
|
|
5
7
|
import '@drincs/pixi-vn/dist/override';
|
|
8
|
+
import '../types/StepLabelJsonType.js';
|
|
9
|
+
import '../types/ChoiceMenuOptionsType.js';
|
|
10
|
+
import '../classes/ChoiceMenuOption.js';
|
|
11
|
+
import '../types/StorageElementType.js';
|
|
12
|
+
import '../types/CloseType.js';
|
|
13
|
+
import '../types/LabelRunModeType.js';
|
|
14
|
+
import '../types/StepHistoryDataType.js';
|
|
6
15
|
|
|
7
16
|
declare const registeredLabels: {
|
|
8
|
-
[key: LabelIdType]: Label<any
|
|
17
|
+
[key: LabelIdType]: (LabelAbstract<any> | Label<any> | LabelJson<any>);
|
|
9
18
|
};
|
|
10
19
|
/**
|
|
11
20
|
* Creates a new label and registers it in the system.
|
|
@@ -15,12 +24,17 @@ declare const registeredLabels: {
|
|
|
15
24
|
* @param props The properties of the label
|
|
16
25
|
* @returns The created label
|
|
17
26
|
*/
|
|
18
|
-
declare function newLabel<T extends {} = {}>(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), props?: Omit<LabelProps<T
|
|
27
|
+
declare function newLabel<T extends {} = {}>(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), props?: Omit<LabelProps<Label<T>>, "choiseIndex">): Label<T>;
|
|
19
28
|
/**
|
|
20
29
|
* Gets a label by its id
|
|
21
30
|
* @param id The id of the label
|
|
22
31
|
* @returns The label or undefined if it does not exist
|
|
23
32
|
*/
|
|
24
33
|
declare function getLabelById<T = Label<any>>(id: LabelIdType): T | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Saves a label in the system
|
|
36
|
+
* @param label The label to be saved
|
|
37
|
+
*/
|
|
38
|
+
declare function saveLabel<T extends LabelAbstract<any>>(label: T): void;
|
|
25
39
|
|
|
26
|
-
export { getLabelById, newLabel, registeredLabels };
|
|
40
|
+
export { getLabelById, newLabel, registeredLabels, saveLabel };
|
|
@@ -60,16 +60,14 @@ function checkIfStepsIsEqual(step1, step2) {
|
|
|
60
60
|
return step1 === step2;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
// src/classes/
|
|
64
|
-
var
|
|
63
|
+
// src/classes/LabelAbstract.ts
|
|
64
|
+
var LabelAbstract = class {
|
|
65
65
|
/**
|
|
66
66
|
* @param id is the id of the label
|
|
67
|
-
* @param steps is the list of steps that the label will perform
|
|
68
67
|
* @param props is the properties of the label
|
|
69
68
|
*/
|
|
70
|
-
constructor(id,
|
|
69
|
+
constructor(id, props) {
|
|
71
70
|
this._id = id;
|
|
72
|
-
this._steps = steps;
|
|
73
71
|
this._onStepStart = props == null ? void 0 : props.onStepStart;
|
|
74
72
|
this._onLoadStep = props == null ? void 0 : props.onLoadStep;
|
|
75
73
|
this._onStepEnd = props == null ? void 0 : props.onStepEnd;
|
|
@@ -81,17 +79,6 @@ var Label = class {
|
|
|
81
79
|
get id() {
|
|
82
80
|
return this._id;
|
|
83
81
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Get the steps of the label.
|
|
86
|
-
* This class should be extended and the steps method should be overridden.
|
|
87
|
-
* Every time you update this list will also be updated when the other game versions load.
|
|
88
|
-
*/
|
|
89
|
-
get steps() {
|
|
90
|
-
if (typeof this._steps === "function") {
|
|
91
|
-
return this._steps();
|
|
92
|
-
}
|
|
93
|
-
return this._steps;
|
|
94
|
-
}
|
|
95
82
|
/**
|
|
96
83
|
* Get the corresponding steps number
|
|
97
84
|
* @param externalSteps
|
|
@@ -142,6 +129,28 @@ var Label = class {
|
|
|
142
129
|
}
|
|
143
130
|
};
|
|
144
131
|
|
|
132
|
+
// src/classes/Label.ts
|
|
133
|
+
var Label = class extends LabelAbstract {
|
|
134
|
+
/**
|
|
135
|
+
* @param id is the id of the label
|
|
136
|
+
* @param steps is the list of steps that the label will perform
|
|
137
|
+
* @param props is the properties of the label
|
|
138
|
+
*/
|
|
139
|
+
constructor(id, steps, props) {
|
|
140
|
+
super(id, props);
|
|
141
|
+
this._steps = steps;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get the steps of the label.
|
|
145
|
+
*/
|
|
146
|
+
get steps() {
|
|
147
|
+
if (typeof this._steps === "function") {
|
|
148
|
+
return this._steps();
|
|
149
|
+
}
|
|
150
|
+
return this._steps;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
145
154
|
// src/functions/CanvasUtility.ts
|
|
146
155
|
function getTextureMemory(texture) {
|
|
147
156
|
let sourceTexture = texture.source;
|
|
@@ -1738,9 +1747,13 @@ function getLabelById(id) {
|
|
|
1738
1747
|
}
|
|
1739
1748
|
return label;
|
|
1740
1749
|
}
|
|
1750
|
+
function saveLabel(label) {
|
|
1751
|
+
registeredLabels[label.id] = label;
|
|
1752
|
+
}
|
|
1741
1753
|
|
|
1742
1754
|
exports.getLabelById = getLabelById;
|
|
1743
1755
|
exports.newLabel = newLabel;
|
|
1744
1756
|
exports.registeredLabels = registeredLabels;
|
|
1757
|
+
exports.saveLabel = saveLabel;
|
|
1745
1758
|
//# sourceMappingURL=LabelDecorator.js.map
|
|
1746
1759
|
//# sourceMappingURL=LabelDecorator.js.map
|