@drincs/pixi-vn 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/dist/LabelProps-CFV-zRjG.d.ts +113 -0
- package/dist/LabelProps-CmRpvUJm.d.mts +113 -0
- package/dist/classes/CharacterBaseModel.js +42 -33
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs +42 -33
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOption.d.mts +68 -8
- package/dist/classes/ChoiceMenuOption.d.ts +68 -8
- package/dist/classes/ChoiceMenuOption.js +119 -53
- package/dist/classes/ChoiceMenuOption.js.map +1 -1
- package/dist/classes/ChoiceMenuOption.mjs +119 -53
- package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
- package/dist/classes/CloseLabel.d.mts +2 -2
- package/dist/classes/CloseLabel.d.ts +2 -2
- package/dist/classes/CloseLabel.js +53 -17
- package/dist/classes/CloseLabel.js.map +1 -1
- package/dist/classes/CloseLabel.mjs +53 -17
- package/dist/classes/CloseLabel.mjs.map +1 -1
- package/dist/classes/Label.d.mts +4 -72
- package/dist/classes/Label.d.ts +4 -72
- package/dist/classes/Label.js +50 -16
- package/dist/classes/Label.js.map +1 -1
- package/dist/classes/Label.mjs +50 -16
- package/dist/classes/Label.mjs.map +1 -1
- package/dist/classes/StoredClassModel.js +42 -33
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs +42 -33
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/canvas/CanvasContainer.js +2 -2
- package/dist/classes/canvas/CanvasContainer.js.map +1 -1
- package/dist/classes/canvas/CanvasContainer.mjs +2 -2
- package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
- package/dist/classes/canvas/CanvasImage.js +2 -2
- package/dist/classes/canvas/CanvasImage.js.map +1 -1
- package/dist/classes/canvas/CanvasImage.mjs +2 -2
- package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
- package/dist/classes/canvas/CanvasSprite.js +2 -2
- package/dist/classes/canvas/CanvasSprite.js.map +1 -1
- package/dist/classes/canvas/CanvasSprite.mjs +2 -2
- package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
- package/dist/classes/canvas/CanvasText.js +2 -2
- package/dist/classes/canvas/CanvasText.js.map +1 -1
- package/dist/classes/canvas/CanvasText.mjs +2 -2
- package/dist/classes/canvas/CanvasText.mjs.map +1 -1
- package/dist/classes/canvas/index.js +2 -2
- package/dist/classes/canvas/index.js.map +1 -1
- package/dist/classes/canvas/index.mjs +2 -2
- package/dist/classes/canvas/index.mjs.map +1 -1
- package/dist/classes/index.d.mts +2 -2
- package/dist/classes/index.d.ts +2 -2
- package/dist/classes/index.js +119 -53
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +119 -53
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.js +42 -33
- package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
- package/dist/classes/ticker/FadeAlphaTicker.mjs +42 -33
- package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
- package/dist/classes/ticker/MoveTicker.d.mts +1 -0
- package/dist/classes/ticker/MoveTicker.d.ts +1 -0
- package/dist/classes/ticker/MoveTicker.js +42 -33
- package/dist/classes/ticker/MoveTicker.js.map +1 -1
- package/dist/classes/ticker/MoveTicker.mjs +42 -33
- package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
- package/dist/classes/ticker/RotateTicker.d.mts +1 -0
- package/dist/classes/ticker/RotateTicker.d.ts +1 -0
- package/dist/classes/ticker/RotateTicker.js +42 -33
- package/dist/classes/ticker/RotateTicker.js.map +1 -1
- package/dist/classes/ticker/RotateTicker.mjs +42 -33
- package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
- package/dist/classes/ticker/ZoomTicker.d.mts +1 -0
- package/dist/classes/ticker/ZoomTicker.d.ts +1 -0
- package/dist/classes/ticker/ZoomTicker.js +42 -33
- package/dist/classes/ticker/ZoomTicker.js.map +1 -1
- package/dist/classes/ticker/ZoomTicker.mjs +42 -33
- package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
- package/dist/classes/ticker/index.js +42 -33
- package/dist/classes/ticker/index.js.map +1 -1
- package/dist/classes/ticker/index.mjs +42 -33
- 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/CanvasElementDecorator.js +2 -2
- package/dist/decorators/CanvasElementDecorator.js.map +1 -1
- package/dist/decorators/CanvasElementDecorator.mjs +2 -2
- package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
- package/dist/decorators/LabelDecorator.d.mts +3 -3
- package/dist/decorators/LabelDecorator.d.ts +3 -3
- package/dist/decorators/LabelDecorator.js +74 -50
- package/dist/decorators/LabelDecorator.js.map +1 -1
- package/dist/decorators/LabelDecorator.mjs +74 -50
- package/dist/decorators/LabelDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +2 -2
- package/dist/decorators/index.d.ts +2 -2
- package/dist/decorators/index.js +74 -50
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +74 -50
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/CanvasUtility.js +2 -2
- package/dist/functions/CanvasUtility.js.map +1 -1
- package/dist/functions/CanvasUtility.mjs +2 -2
- package/dist/functions/CanvasUtility.mjs.map +1 -1
- package/dist/functions/DialogueUtility.d.mts +9 -9
- package/dist/functions/DialogueUtility.d.ts +9 -9
- package/dist/functions/DialogueUtility.js +184 -106
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +184 -106
- package/dist/functions/DialogueUtility.mjs.map +1 -1
- package/dist/functions/FlagsUtility.js +42 -33
- package/dist/functions/FlagsUtility.js.map +1 -1
- package/dist/functions/FlagsUtility.mjs +42 -33
- package/dist/functions/FlagsUtility.mjs.map +1 -1
- package/dist/functions/GameUtility.js +42 -33
- package/dist/functions/GameUtility.js.map +1 -1
- package/dist/functions/GameUtility.mjs +42 -33
- package/dist/functions/GameUtility.mjs.map +1 -1
- package/dist/functions/ImageUtility.js +45 -36
- package/dist/functions/ImageUtility.js.map +1 -1
- package/dist/functions/ImageUtility.mjs +45 -36
- package/dist/functions/ImageUtility.mjs.map +1 -1
- package/dist/functions/SavesUtility.d.mts +4 -4
- package/dist/functions/SavesUtility.d.ts +4 -4
- package/dist/functions/SavesUtility.js +173 -111
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +173 -111
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/TickerUtility.d.mts +2 -1
- package/dist/functions/TickerUtility.d.ts +2 -1
- package/dist/functions/TickerUtility.js +19 -15
- package/dist/functions/TickerUtility.js.map +1 -1
- package/dist/functions/TickerUtility.mjs +19 -15
- package/dist/functions/TickerUtility.mjs.map +1 -1
- package/dist/functions/index.d.mts +3 -3
- package/dist/functions/index.d.ts +3 -3
- package/dist/functions/index.js +197 -115
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +197 -115
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +325 -190
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +326 -191
- package/dist/index.mjs.map +1 -1
- package/dist/interface/IHistoryStep.d.mts +1 -1
- package/dist/interface/IHistoryStep.d.ts +1 -1
- package/dist/interface/ISaveData.d.mts +2 -2
- package/dist/interface/ISaveData.d.ts +2 -2
- package/dist/interface/LabelProps.d.mts +5 -0
- package/dist/interface/LabelProps.d.ts +5 -0
- package/dist/interface/LabelProps.js +4 -0
- package/dist/interface/LabelProps.js.map +1 -0
- package/dist/interface/LabelProps.mjs +3 -0
- package/dist/interface/LabelProps.mjs.map +1 -0
- package/dist/interface/export/ExportedStep.d.mts +2 -2
- package/dist/interface/export/ExportedStep.d.ts +2 -2
- package/dist/interface/export/index.d.mts +2 -2
- package/dist/interface/export/index.d.ts +2 -2
- package/dist/interface/index.d.mts +4 -4
- package/dist/interface/index.d.ts +4 -4
- package/dist/labels/BaseCanvasElementTestLabel.d.mts +2 -2
- package/dist/labels/BaseCanvasElementTestLabel.d.ts +2 -2
- package/dist/labels/BaseCanvasElementTestLabel.js +175 -111
- package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/BaseCanvasElementTestLabel.mjs +176 -112
- package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.d.mts +3 -6
- package/dist/labels/CanvasEventsTestLabel.d.ts +3 -6
- package/dist/labels/CanvasEventsTestLabel.js +186 -128
- package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
- package/dist/labels/CanvasEventsTestLabel.mjs +187 -129
- package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +2 -2
- package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +2 -2
- package/dist/labels/CustomTickerCanvasElementTestLabel.js +166 -108
- package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +166 -108
- package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.d.mts +2 -2
- package/dist/labels/ImagesAnimationsTestLabel.d.ts +2 -2
- package/dist/labels/ImagesAnimationsTestLabel.js +253 -147
- package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
- package/dist/labels/ImagesAnimationsTestLabel.mjs +253 -147
- package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
- package/dist/labels/MarkdownTest.d.mts +2 -2
- package/dist/labels/MarkdownTest.d.ts +2 -2
- package/dist/labels/MarkdownTest.js +166 -108
- package/dist/labels/MarkdownTest.js.map +1 -1
- package/dist/labels/MarkdownTest.mjs +166 -108
- package/dist/labels/MarkdownTest.mjs.map +1 -1
- package/dist/labels/StartLabel.d.mts +2 -2
- package/dist/labels/StartLabel.d.ts +2 -2
- package/dist/labels/StartLabel.js +316 -184
- package/dist/labels/StartLabel.js.map +1 -1
- package/dist/labels/StartLabel.mjs +317 -185
- package/dist/labels/StartLabel.mjs.map +1 -1
- package/dist/labels/StepLabelTest.d.mts +9 -0
- package/dist/labels/StepLabelTest.d.ts +9 -0
- package/dist/labels/StepLabelTest.js +2758 -0
- package/dist/labels/StepLabelTest.js.map +1 -0
- package/dist/labels/StepLabelTest.mjs +2752 -0
- package/dist/labels/StepLabelTest.mjs.map +1 -0
- package/dist/labels/TestConstant.js +43 -34
- package/dist/labels/TestConstant.js.map +1 -1
- package/dist/labels/TestConstant.mjs +43 -34
- package/dist/labels/TestConstant.mjs.map +1 -1
- package/dist/labels/index.d.mts +2 -2
- package/dist/labels/index.d.ts +2 -2
- package/dist/labels/index.js +316 -184
- package/dist/labels/index.js.map +1 -1
- package/dist/labels/index.mjs +317 -185
- package/dist/labels/index.mjs.map +1 -1
- package/dist/managers/StepManager.d.mts +6 -5
- package/dist/managers/StepManager.d.ts +6 -5
- package/dist/managers/StepManager.js +163 -105
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +163 -105
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/WindowManager.js +2 -2
- package/dist/managers/WindowManager.js.map +1 -1
- package/dist/managers/WindowManager.mjs +2 -2
- package/dist/managers/WindowManager.mjs.map +1 -1
- package/dist/managers/index.d.mts +2 -2
- package/dist/managers/index.d.ts +2 -2
- package/dist/managers/index.js +163 -105
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +163 -105
- package/dist/managers/index.mjs.map +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.mts +2 -2
- package/dist/types/ChoiceMenuOptionsType.d.ts +2 -2
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, Sprite, Text, Assets, Texture, Application, FillGradient, Color,
|
|
1
|
+
import { Container, Sprite, Text, Assets, Texture, Application, TextStyle, FillGradient, Color, Rectangle } from 'pixi.js';
|
|
2
2
|
export { Assets } from 'pixi.js';
|
|
3
3
|
import { diff } from 'deep-diff';
|
|
4
4
|
import sha1 from 'crypto-js/sha1';
|
|
@@ -78,14 +78,15 @@ var Label = class {
|
|
|
78
78
|
/**
|
|
79
79
|
* @param id is the id of the label
|
|
80
80
|
* @param steps is the list of steps that the label will perform
|
|
81
|
-
* @param
|
|
82
|
-
* @param choiseIndex is the index of the choice that the label will perform
|
|
81
|
+
* @param props is the properties of the label
|
|
83
82
|
*/
|
|
84
|
-
constructor(id, steps,
|
|
83
|
+
constructor(id, steps, props) {
|
|
85
84
|
this._id = id;
|
|
86
85
|
this._steps = steps;
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
86
|
+
this._onStepStart = props == null ? void 0 : props.onStepStart;
|
|
87
|
+
this._onLoadStep = props == null ? void 0 : props.onLoadStep;
|
|
88
|
+
this._onStepEnd = props == null ? void 0 : props.onStepEnd;
|
|
89
|
+
this._choiseIndex = props == null ? void 0 : props.choiseIndex;
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
|
|
@@ -122,18 +123,32 @@ var Label = class {
|
|
|
122
123
|
return res;
|
|
123
124
|
}
|
|
124
125
|
/**
|
|
125
|
-
*
|
|
126
|
+
* Is a function that will be executed in {@link Label#onStepStart} and when the user goes back to it or when the user laods a save file.
|
|
127
|
+
* @returns Promise<void> or void
|
|
128
|
+
*/
|
|
129
|
+
get onStepStart() {
|
|
130
|
+
return (stepIndex, label) => __async(this, null, function* () {
|
|
131
|
+
if (this._onLoadStep) {
|
|
132
|
+
yield this._onLoadStep(stepIndex, label);
|
|
133
|
+
}
|
|
134
|
+
if (this._onStepStart) {
|
|
135
|
+
return yield this._onStepStart(stepIndex, label);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get the function that will be executed a old step is reloaded. A step is reloaded when the user goes back to it or when the user laods a save file.
|
|
141
|
+
* @returns Promise<void> or void
|
|
142
|
+
*/
|
|
143
|
+
get onLoadStep() {
|
|
144
|
+
return this._onLoadStep;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Is a function that will be executed when the step ends.
|
|
126
148
|
* @returns Promise<void> or void
|
|
127
|
-
* @example
|
|
128
|
-
* ```typescript
|
|
129
|
-
* newLabel("id", [], () => {
|
|
130
|
-
* Assets.load('path/to/image1.png')
|
|
131
|
-
* Assets.load('path/to/image2.png')
|
|
132
|
-
* })
|
|
133
|
-
* ```
|
|
134
149
|
*/
|
|
135
|
-
get
|
|
136
|
-
return this.
|
|
150
|
+
get onStepEnd() {
|
|
151
|
+
return this._onStepEnd;
|
|
137
152
|
}
|
|
138
153
|
get choiseIndex() {
|
|
139
154
|
return this._choiseIndex;
|
|
@@ -143,16 +158,18 @@ var Label = class {
|
|
|
143
158
|
// src/classes/CloseLabel.ts
|
|
144
159
|
var CLOSE_LABEL_ID = "__close-label-id__";
|
|
145
160
|
function newCloseLabel(choiseIndex) {
|
|
146
|
-
return new Label(CLOSE_LABEL_ID, [],
|
|
161
|
+
return new Label(CLOSE_LABEL_ID, [], {
|
|
162
|
+
choiseIndex
|
|
163
|
+
});
|
|
147
164
|
}
|
|
148
165
|
|
|
149
166
|
// src/decorators/LabelDecorator.ts
|
|
150
167
|
var registeredLabels = {};
|
|
151
|
-
function newLabel(id, steps,
|
|
168
|
+
function newLabel(id, steps, props) {
|
|
152
169
|
if (registeredLabels[id]) {
|
|
153
170
|
console.info(`[Pixi'VN] Label ${id} already exists, it will be overwritten`);
|
|
154
171
|
}
|
|
155
|
-
let label = new Label(id, steps,
|
|
172
|
+
let label = new Label(id, steps, props);
|
|
156
173
|
registeredLabels[id] = label;
|
|
157
174
|
return label;
|
|
158
175
|
}
|
|
@@ -262,8 +279,6 @@ function getMemoryContainer(element) {
|
|
|
262
279
|
};
|
|
263
280
|
}
|
|
264
281
|
function setMemoryContainer(element, memory) {
|
|
265
|
-
memory.width && (element.width = memory.width);
|
|
266
|
-
memory.height && (element.height = memory.height);
|
|
267
282
|
memory.isRenderGroup && (element.isRenderGroup = memory.isRenderGroup);
|
|
268
283
|
memory.blendMode && (element.blendMode = memory.blendMode);
|
|
269
284
|
memory.tint && (element.tint = memory.tint);
|
|
@@ -296,6 +311,8 @@ function setMemoryContainer(element, memory) {
|
|
|
296
311
|
memory.interactive && (element.interactive = memory.interactive);
|
|
297
312
|
memory.interactiveChildren && (element.interactiveChildren = memory.interactiveChildren);
|
|
298
313
|
memory.hitArea && (element.hitArea = memory.hitArea);
|
|
314
|
+
memory.width && (element.width = memory.width);
|
|
315
|
+
memory.height && (element.height = memory.height);
|
|
299
316
|
}
|
|
300
317
|
function getTexture(imageUrl) {
|
|
301
318
|
return __async(this, null, function* () {
|
|
@@ -757,12 +774,32 @@ var ChoiceMenuOption = class {
|
|
|
757
774
|
/**
|
|
758
775
|
* @param text Text to be displayed in the menu
|
|
759
776
|
* @param label Label to be opened when the option is selected or the id of the label
|
|
777
|
+
* @param props Properties to be passed to the label and olther parameters that you can use when get all the choice menu options. It be converted to a JSON string, so it cannot contain functions or classes.
|
|
760
778
|
* @param type Type of the label to be opened. @default "call"
|
|
761
|
-
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes. @default {}
|
|
762
779
|
*/
|
|
763
|
-
constructor(text, label, type = "call"
|
|
780
|
+
constructor(text, label, props, type = "call") {
|
|
764
781
|
/**
|
|
765
|
-
* Properties to be passed to the label
|
|
782
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
783
|
+
* @example
|
|
784
|
+
* ```tsx
|
|
785
|
+
* setChoiceMenuOptions([
|
|
786
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
787
|
+
* ])
|
|
788
|
+
* return <List>
|
|
789
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
790
|
+
* return (
|
|
791
|
+
* <ChoiceButton
|
|
792
|
+
* disabled={item.props.disabled}
|
|
793
|
+
* onClick={() => {
|
|
794
|
+
* afterSelectChoice(item)
|
|
795
|
+
* }}
|
|
796
|
+
* >
|
|
797
|
+
* {item.text}
|
|
798
|
+
* </ChoiceButton>
|
|
799
|
+
* )
|
|
800
|
+
* })}
|
|
801
|
+
* </List>
|
|
802
|
+
* ```
|
|
766
803
|
*/
|
|
767
804
|
this.props = {};
|
|
768
805
|
if (typeof label === "string") {
|
|
@@ -796,7 +833,27 @@ var ChoiceMenuOptionClose = class {
|
|
|
796
833
|
*/
|
|
797
834
|
this.type = Close;
|
|
798
835
|
/**
|
|
799
|
-
* Properties to be passed to the label
|
|
836
|
+
* Properties to be passed to the label and olther parameters that you can use when get all the choice menu options.
|
|
837
|
+
* @example
|
|
838
|
+
* ```tsx
|
|
839
|
+
* setChoiceMenuOptions([
|
|
840
|
+
* new ChoiceMenuOption("Hello", helloLabel, { disabled: true }),
|
|
841
|
+
* ])
|
|
842
|
+
* return <List>
|
|
843
|
+
* {getChoiceMenuOptions()?.map((item, index) => {
|
|
844
|
+
* return (
|
|
845
|
+
* <ChoiceButton
|
|
846
|
+
* disabled={item.props.disabled}
|
|
847
|
+
* onClick={() => {
|
|
848
|
+
* afterSelectChoice(item)
|
|
849
|
+
* }}
|
|
850
|
+
* >
|
|
851
|
+
* {item.text}
|
|
852
|
+
* </ChoiceButton>
|
|
853
|
+
* )
|
|
854
|
+
* })}
|
|
855
|
+
* </List>
|
|
856
|
+
* ```
|
|
800
857
|
*/
|
|
801
858
|
this.props = {};
|
|
802
859
|
this.text = text;
|
|
@@ -868,7 +925,10 @@ function getChoiceMenuOptions() {
|
|
|
868
925
|
}
|
|
869
926
|
let label = getLabelById(option.label);
|
|
870
927
|
if (label) {
|
|
871
|
-
let itemLabel = new Label(label.id, label.steps,
|
|
928
|
+
let itemLabel = new Label(label.id, label.steps, {
|
|
929
|
+
onStepStart: label.onStepStart,
|
|
930
|
+
choiseIndex: index
|
|
931
|
+
});
|
|
872
932
|
options.push(__spreadProps(__spreadValues({}, option), {
|
|
873
933
|
label: itemLabel
|
|
874
934
|
}));
|
|
@@ -1024,8 +1084,9 @@ FadeAlphaTicker = __decorateClass([
|
|
|
1024
1084
|
], FadeAlphaTicker);
|
|
1025
1085
|
|
|
1026
1086
|
// src/functions/TickerUtility.ts
|
|
1027
|
-
function updateTickerProgression(args, propertyName, progression) {
|
|
1028
|
-
|
|
1087
|
+
function updateTickerProgression(args, propertyName, progression, valueConvert) {
|
|
1088
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
1089
|
+
if (args[propertyName] === void 0 || !progression || args[propertyName] === limit) {
|
|
1029
1090
|
return;
|
|
1030
1091
|
}
|
|
1031
1092
|
if (typeof args[propertyName] === "number") {
|
|
@@ -1044,22 +1105,25 @@ function updateTickerProgression(args, propertyName, progression) {
|
|
|
1044
1105
|
}
|
|
1045
1106
|
}
|
|
1046
1107
|
}
|
|
1047
|
-
function getLinearProgression(number, progression) {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
return
|
|
1108
|
+
function getLinearProgression(number, progression, valueConvert) {
|
|
1109
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
1110
|
+
let amt = valueConvert ? valueConvert(progression.amt) : progression.amt;
|
|
1111
|
+
if (limit !== void 0) {
|
|
1112
|
+
if (number > limit && amt > 0) {
|
|
1113
|
+
return limit;
|
|
1114
|
+
} else if (number < limit && amt < 0) {
|
|
1115
|
+
return limit;
|
|
1053
1116
|
}
|
|
1054
1117
|
}
|
|
1055
|
-
return number +
|
|
1118
|
+
return number + amt;
|
|
1056
1119
|
}
|
|
1057
|
-
function getExponentialProgression(number, progression) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1120
|
+
function getExponentialProgression(number, progression, valueConvert) {
|
|
1121
|
+
let limit = valueConvert && progression.limit ? valueConvert(progression.limit) : progression.limit;
|
|
1122
|
+
if (limit !== void 0) {
|
|
1123
|
+
if (number > limit && progression.percentage > 0) {
|
|
1124
|
+
return limit;
|
|
1125
|
+
} else if (number < limit && progression.percentage < 0) {
|
|
1126
|
+
return limit;
|
|
1063
1127
|
}
|
|
1064
1128
|
}
|
|
1065
1129
|
return number + number * progression.percentage;
|
|
@@ -1072,15 +1136,13 @@ var MoveTicker = class extends TickerBase {
|
|
|
1072
1136
|
let ySpeed = 1;
|
|
1073
1137
|
if (args.speed) {
|
|
1074
1138
|
if (typeof args.speed === "number") {
|
|
1075
|
-
xSpeed = args.speed;
|
|
1076
|
-
ySpeed = args.speed;
|
|
1139
|
+
xSpeed = this.speedConvert(args.speed);
|
|
1140
|
+
ySpeed = this.speedConvert(args.speed);
|
|
1077
1141
|
} else {
|
|
1078
|
-
xSpeed = args.speed.x;
|
|
1079
|
-
ySpeed = args.speed.y;
|
|
1142
|
+
xSpeed = this.speedConvert(args.speed.x);
|
|
1143
|
+
ySpeed = this.speedConvert(args.speed.y);
|
|
1080
1144
|
}
|
|
1081
1145
|
}
|
|
1082
|
-
xSpeed /= 60;
|
|
1083
|
-
ySpeed /= 60;
|
|
1084
1146
|
let destination = args.destination;
|
|
1085
1147
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
1086
1148
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
@@ -1120,7 +1182,10 @@ var MoveTicker = class extends TickerBase {
|
|
|
1120
1182
|
}
|
|
1121
1183
|
});
|
|
1122
1184
|
if (args.speedProgression)
|
|
1123
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
1185
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
1186
|
+
}
|
|
1187
|
+
speedConvert(speed) {
|
|
1188
|
+
return speed / 6;
|
|
1124
1189
|
}
|
|
1125
1190
|
};
|
|
1126
1191
|
MoveTicker = __decorateClass([
|
|
@@ -1128,7 +1193,7 @@ MoveTicker = __decorateClass([
|
|
|
1128
1193
|
], MoveTicker);
|
|
1129
1194
|
var RotateTicker = class extends TickerBase {
|
|
1130
1195
|
fn(ticker, args, tags, tickerId) {
|
|
1131
|
-
let speed = (args.speed === void 0 ? 1 : args.speed)
|
|
1196
|
+
let speed = this.speedConvert(args.speed === void 0 ? 1 : args.speed);
|
|
1132
1197
|
let clockwise = args.clockwise === void 0 ? true : args.clockwise;
|
|
1133
1198
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
1134
1199
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
@@ -1156,7 +1221,10 @@ var RotateTicker = class extends TickerBase {
|
|
|
1156
1221
|
}
|
|
1157
1222
|
});
|
|
1158
1223
|
if (args.speedProgression)
|
|
1159
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
1224
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
1225
|
+
}
|
|
1226
|
+
speedConvert(speed) {
|
|
1227
|
+
return speed / 60;
|
|
1160
1228
|
}
|
|
1161
1229
|
};
|
|
1162
1230
|
RotateTicker = __decorateClass([
|
|
@@ -1168,15 +1236,13 @@ var ZoomTicker = class extends TickerBase {
|
|
|
1168
1236
|
let ySpeed = 0.1;
|
|
1169
1237
|
if (args.speed) {
|
|
1170
1238
|
if (typeof args.speed === "number") {
|
|
1171
|
-
xSpeed = args.speed;
|
|
1172
|
-
ySpeed = args.speed;
|
|
1239
|
+
xSpeed = this.speedConvert(args.speed);
|
|
1240
|
+
ySpeed = this.speedConvert(args.speed);
|
|
1173
1241
|
} else {
|
|
1174
|
-
xSpeed = args.speed.x;
|
|
1175
|
-
ySpeed = args.speed.y;
|
|
1242
|
+
xSpeed = this.speedConvert(args.speed.x);
|
|
1243
|
+
ySpeed = this.speedConvert(args.speed.y);
|
|
1176
1244
|
}
|
|
1177
1245
|
}
|
|
1178
|
-
xSpeed /= 60;
|
|
1179
|
-
ySpeed /= 60;
|
|
1180
1246
|
let tagToRemoveAfter2 = args.tagToRemoveAfter || [];
|
|
1181
1247
|
if (typeof tagToRemoveAfter2 === "string") {
|
|
1182
1248
|
tagToRemoveAfter2 = [tagToRemoveAfter2];
|
|
@@ -1243,7 +1309,10 @@ var ZoomTicker = class extends TickerBase {
|
|
|
1243
1309
|
}
|
|
1244
1310
|
});
|
|
1245
1311
|
if (args.speedProgression)
|
|
1246
|
-
updateTickerProgression(args, "speed", args.speedProgression);
|
|
1312
|
+
updateTickerProgression(args, "speed", args.speedProgression, this.speedConvert);
|
|
1313
|
+
}
|
|
1314
|
+
speedConvert(speed) {
|
|
1315
|
+
return speed / 60;
|
|
1247
1316
|
}
|
|
1248
1317
|
onEndOfTicker(tag, tickerId, _element, tagToRemoveAfter2) {
|
|
1249
1318
|
GameWindowManager.onEndOfTicker(tag, this, tagToRemoveAfter2, tickerId);
|
|
@@ -1266,7 +1335,7 @@ var ZoomInOutTicker = class extends ZoomTicker {
|
|
|
1266
1335
|
};
|
|
1267
1336
|
|
|
1268
1337
|
// src/constants.ts
|
|
1269
|
-
var PIXIVN_VERSION = "0.6.
|
|
1338
|
+
var PIXIVN_VERSION = "0.6.5";
|
|
1270
1339
|
var Repeat = "repeat";
|
|
1271
1340
|
function Pause(duration) {
|
|
1272
1341
|
return {
|
|
@@ -1451,14 +1520,14 @@ function zoomIn(_0, _1) {
|
|
|
1451
1520
|
} else {
|
|
1452
1521
|
canvasElement = image;
|
|
1453
1522
|
}
|
|
1454
|
-
if (canvasElement instanceof CanvasImage && ((_a = canvasElement.texture) == null ? void 0 : _a.label) == "EMPTY") {
|
|
1455
|
-
yield canvasElement.load();
|
|
1456
|
-
}
|
|
1457
1523
|
let container = new CanvasContainer();
|
|
1458
1524
|
container.addChild(canvasElement);
|
|
1459
1525
|
container.height = GameWindowManager.canvasHeight;
|
|
1460
1526
|
container.width = GameWindowManager.canvasWidth;
|
|
1461
1527
|
GameWindowManager.addCanvasElement(tag, container);
|
|
1528
|
+
if (canvasElement instanceof CanvasImage && ((_a = canvasElement.texture) == null ? void 0 : _a.label) == "EMPTY") {
|
|
1529
|
+
yield canvasElement.load();
|
|
1530
|
+
}
|
|
1462
1531
|
if (props.direction == "up") {
|
|
1463
1532
|
container.pivot.y = GameWindowManager.canvasHeight;
|
|
1464
1533
|
container.pivot.x = GameWindowManager.canvasWidth / 2;
|
|
@@ -1546,13 +1615,17 @@ function getSaveJson() {
|
|
|
1546
1615
|
return JSON.stringify(saveData);
|
|
1547
1616
|
}
|
|
1548
1617
|
function loadSaveData(data, navigate) {
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1618
|
+
return __async(this, null, function* () {
|
|
1619
|
+
yield GameStepManager.import(data.stepData);
|
|
1620
|
+
GameStorageManager.import(data.storageData);
|
|
1621
|
+
GameWindowManager.import(data.canvasData);
|
|
1622
|
+
navigate(data.path);
|
|
1623
|
+
});
|
|
1553
1624
|
}
|
|
1554
1625
|
function loadSaveJson(dataString, navigate) {
|
|
1555
|
-
|
|
1626
|
+
return __async(this, null, function* () {
|
|
1627
|
+
yield loadSaveData(jsonToSaveData(dataString), navigate);
|
|
1628
|
+
});
|
|
1556
1629
|
}
|
|
1557
1630
|
function jsonToSaveData(json) {
|
|
1558
1631
|
return JSON.parse(json);
|
|
@@ -2507,6 +2580,16 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2507
2580
|
static set originalStepData(value) {
|
|
2508
2581
|
_GameStepManager._originalStepData = createExportableElement(value);
|
|
2509
2582
|
}
|
|
2583
|
+
static get currentStepData() {
|
|
2584
|
+
let currentStepData = {
|
|
2585
|
+
path: window.location.pathname,
|
|
2586
|
+
storage: GameStorageManager.export(),
|
|
2587
|
+
canvas: GameWindowManager.export(),
|
|
2588
|
+
labelIndex: _GameStepManager.currentLabelStepIndex || 0,
|
|
2589
|
+
openedLabels: createExportableElement(_GameStepManager._openedLabels)
|
|
2590
|
+
};
|
|
2591
|
+
return currentStepData;
|
|
2592
|
+
}
|
|
2510
2593
|
/* Edit History Methods */
|
|
2511
2594
|
/**
|
|
2512
2595
|
* Add a label to the history.
|
|
@@ -2514,19 +2597,13 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2514
2597
|
*/
|
|
2515
2598
|
static addStepHistory(step, choiseMade) {
|
|
2516
2599
|
let stepHistory = getStepSha1(step);
|
|
2517
|
-
let
|
|
2518
|
-
path: window.location.pathname,
|
|
2519
|
-
storage: GameStorageManager.export(),
|
|
2520
|
-
canvas: GameWindowManager.export(),
|
|
2521
|
-
labelIndex: _GameStepManager.currentLabelStepIndex || 0,
|
|
2522
|
-
openedLabels: createExportableElement(_GameStepManager._openedLabels)
|
|
2523
|
-
};
|
|
2600
|
+
let currentStepData = _GameStepManager.currentStepData;
|
|
2524
2601
|
if (_GameStepManager.originalStepData) {
|
|
2525
|
-
if (_GameStepManager.originalStepData.openedLabels.length ===
|
|
2602
|
+
if (_GameStepManager.originalStepData.openedLabels.length === currentStepData.openedLabels.length) {
|
|
2526
2603
|
try {
|
|
2527
2604
|
let lastStepDataOpenedLabelsString = JSON.stringify(_GameStepManager.originalStepData.openedLabels);
|
|
2528
|
-
let historyStepOpenedLabelsString = JSON.stringify(
|
|
2529
|
-
if (lastStepDataOpenedLabelsString === historyStepOpenedLabelsString && _GameStepManager.originalStepData.path ===
|
|
2605
|
+
let historyStepOpenedLabelsString = JSON.stringify(currentStepData.openedLabels);
|
|
2606
|
+
if (lastStepDataOpenedLabelsString === historyStepOpenedLabelsString && _GameStepManager.originalStepData.path === currentStepData.path && _GameStepManager.originalStepData.labelIndex === currentStepData.labelIndex) {
|
|
2530
2607
|
return;
|
|
2531
2608
|
}
|
|
2532
2609
|
} catch (e) {
|
|
@@ -2534,7 +2611,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2534
2611
|
}
|
|
2535
2612
|
}
|
|
2536
2613
|
}
|
|
2537
|
-
let data = diff(_GameStepManager.originalStepData,
|
|
2614
|
+
let data = diff(_GameStepManager.originalStepData, currentStepData);
|
|
2538
2615
|
if (data) {
|
|
2539
2616
|
let dialoge = void 0;
|
|
2540
2617
|
let requiredChoices = void 0;
|
|
@@ -2553,7 +2630,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2553
2630
|
index: _GameStepManager.lastStepIndex,
|
|
2554
2631
|
choiceIndexMade: choiseMade
|
|
2555
2632
|
});
|
|
2556
|
-
_GameStepManager.originalStepData =
|
|
2633
|
+
_GameStepManager.originalStepData = currentStepData;
|
|
2557
2634
|
}
|
|
2558
2635
|
_GameStepManager.increaseLastStepIndex();
|
|
2559
2636
|
}
|
|
@@ -2644,6 +2721,9 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2644
2721
|
console.warn("[Pixi'VN] The player must make a choice");
|
|
2645
2722
|
return;
|
|
2646
2723
|
}
|
|
2724
|
+
if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
|
|
2725
|
+
yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
|
|
2726
|
+
}
|
|
2647
2727
|
_GameStepManager.increaseCurrentStepIndex();
|
|
2648
2728
|
return yield _GameStepManager.runCurrentStep(props, choiseMade);
|
|
2649
2729
|
});
|
|
@@ -2668,6 +2748,10 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2668
2748
|
return;
|
|
2669
2749
|
}
|
|
2670
2750
|
if (currentLabel.steps.length > currentLabelStepIndex) {
|
|
2751
|
+
let onStepRun = currentLabel.onStepStart;
|
|
2752
|
+
if (onStepRun) {
|
|
2753
|
+
yield onStepRun(currentLabelStepIndex, currentLabel);
|
|
2754
|
+
}
|
|
2671
2755
|
let step = currentLabel.steps[currentLabelStepIndex];
|
|
2672
2756
|
let result = yield step(props);
|
|
2673
2757
|
_GameStepManager.addStepHistory(step, choiseMade);
|
|
@@ -2732,6 +2816,9 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2732
2816
|
if (!tempLabel) {
|
|
2733
2817
|
throw new Error(`[Pixi'VN] Label ${labelId} not found`);
|
|
2734
2818
|
}
|
|
2819
|
+
if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
|
|
2820
|
+
yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
|
|
2821
|
+
}
|
|
2735
2822
|
_GameStepManager.pushNewLabel(tempLabel.id);
|
|
2736
2823
|
} catch (e) {
|
|
2737
2824
|
console.error("[Pixi'VN] Error calling label", e);
|
|
@@ -2790,6 +2877,9 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2790
2877
|
if (!tempLabel) {
|
|
2791
2878
|
throw new Error(`[Pixi'VN] Label ${labelId} not found`);
|
|
2792
2879
|
}
|
|
2880
|
+
if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onStepEnd) {
|
|
2881
|
+
yield _GameStepManager.currentLabel.onStepEnd(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
|
|
2882
|
+
}
|
|
2793
2883
|
_GameStepManager.pushNewLabel(tempLabel.id);
|
|
2794
2884
|
} catch (e) {
|
|
2795
2885
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
@@ -2895,24 +2985,29 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2895
2985
|
* ```
|
|
2896
2986
|
*/
|
|
2897
2987
|
static goBack(navigate, steps = 1) {
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2988
|
+
return __async(this, null, function* () {
|
|
2989
|
+
if (steps <= 0) {
|
|
2990
|
+
console.warn("[Pixi'VN] Steps must be greater than 0");
|
|
2991
|
+
return;
|
|
2992
|
+
}
|
|
2993
|
+
if (_GameStepManager._stepsHistory.length <= 1) {
|
|
2994
|
+
console.warn("[Pixi'VN] No steps to go back");
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
2997
|
+
let restoredStep = _GameStepManager.goBackInternal(steps, _GameStepManager.originalStepData);
|
|
2998
|
+
if (restoredStep) {
|
|
2999
|
+
_GameStepManager._originalStepData = restoredStep;
|
|
3000
|
+
_GameStepManager._openedLabels = createExportableElement(restoredStep.openedLabels);
|
|
3001
|
+
if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onLoadStep) {
|
|
3002
|
+
yield _GameStepManager.currentLabel.onLoadStep(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
|
|
3003
|
+
}
|
|
3004
|
+
GameStorageManager.import(createExportableElement(restoredStep.storage));
|
|
3005
|
+
GameWindowManager.import(createExportableElement(restoredStep.canvas));
|
|
3006
|
+
navigate(restoredStep.path);
|
|
3007
|
+
} else {
|
|
3008
|
+
console.error("[Pixi'VN] Error going back");
|
|
3009
|
+
}
|
|
3010
|
+
});
|
|
2916
3011
|
}
|
|
2917
3012
|
static goBackInternal(steps, restoredStep) {
|
|
2918
3013
|
if (steps <= 0) {
|
|
@@ -2974,38 +3069,45 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2974
3069
|
* @param dataString The history in a JSON string.
|
|
2975
3070
|
*/
|
|
2976
3071
|
static importJson(dataString) {
|
|
2977
|
-
|
|
3072
|
+
return __async(this, null, function* () {
|
|
3073
|
+
yield _GameStepManager.import(JSON.parse(dataString));
|
|
3074
|
+
});
|
|
2978
3075
|
}
|
|
2979
3076
|
/**
|
|
2980
3077
|
* Import the history from an object.
|
|
2981
3078
|
* @param data The history in an object.
|
|
2982
3079
|
*/
|
|
2983
3080
|
static import(data) {
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3081
|
+
return __async(this, null, function* () {
|
|
3082
|
+
_GameStepManager.clear();
|
|
3083
|
+
try {
|
|
3084
|
+
if (data.hasOwnProperty("stepsHistory")) {
|
|
3085
|
+
_GameStepManager._stepsHistory = data["stepsHistory"];
|
|
3086
|
+
} else {
|
|
3087
|
+
console.warn("[Pixi'VN] Could not import stepsHistory data, so will be ignored");
|
|
3088
|
+
}
|
|
3089
|
+
if (data.hasOwnProperty("openedLabels")) {
|
|
3090
|
+
_GameStepManager._openedLabels = data["openedLabels"];
|
|
3091
|
+
} else {
|
|
3092
|
+
console.warn("[Pixi'VN] Could not import openedLabels data, so will be ignored");
|
|
3093
|
+
}
|
|
3094
|
+
if (data.hasOwnProperty("lastStepIndex")) {
|
|
3095
|
+
_GameStepManager._lastStepIndex = data["lastStepIndex"];
|
|
3096
|
+
} else {
|
|
3097
|
+
console.warn("[Pixi'VN] Could not import lastStepIndex data, so will be ignored");
|
|
3098
|
+
}
|
|
3099
|
+
if (data.hasOwnProperty("originalStepData")) {
|
|
3100
|
+
_GameStepManager._originalStepData = data["originalStepData"];
|
|
3101
|
+
} else {
|
|
3102
|
+
console.warn("[Pixi'VN] Could not import originalStepData data, so will be ignored");
|
|
3103
|
+
}
|
|
3104
|
+
if (_GameStepManager.currentLabel && _GameStepManager.currentLabel.onLoadStep) {
|
|
3105
|
+
yield _GameStepManager.currentLabel.onLoadStep(_GameStepManager.currentLabelStepIndex || 0, _GameStepManager.currentLabel);
|
|
3106
|
+
}
|
|
3107
|
+
} catch (e) {
|
|
3108
|
+
console.error("[Pixi'VN] Error importing data", e);
|
|
3005
3109
|
}
|
|
3006
|
-
}
|
|
3007
|
-
console.error("[Pixi'VN] Error importing data", e);
|
|
3008
|
-
}
|
|
3110
|
+
});
|
|
3009
3111
|
}
|
|
3010
3112
|
};
|
|
3011
3113
|
/**
|
|
@@ -3181,7 +3283,7 @@ var DialogueBaseModel = class {
|
|
|
3181
3283
|
var juliette = new CharacterBaseModel2("___pixivn_juliette___", {
|
|
3182
3284
|
name: "Juliette",
|
|
3183
3285
|
age: 25,
|
|
3184
|
-
icon: "https://firebasestorage.googleapis.com/v0/b/pixi-vn.appspot.com/o/public%2Fcharacters%2Fjuliette-square.webp?alt=media
|
|
3286
|
+
icon: "https://firebasestorage.googleapis.com/v0/b/pixi-vn.appspot.com/o/public%2Fcharacters%2Fjuliette-square.webp?alt=media",
|
|
3185
3287
|
color: "#ac0086"
|
|
3186
3288
|
});
|
|
3187
3289
|
saveCharacter(juliette);
|
|
@@ -3226,10 +3328,16 @@ var baseCanvasElementTestLabel = newLabel(
|
|
|
3226
3328
|
removeCanvasElement("container");
|
|
3227
3329
|
setDialogue({
|
|
3228
3330
|
character: juliette,
|
|
3229
|
-
text: `Here's what's going to happen: I'm going to create some
|
|
3331
|
+
text: `Here's what's going to happen: I'm going to create some CanvasText with different styles and put them on the stage.
|
|
3230
3332
|
But it will generate a warn message, because the FillGradient or FillPattern has not yet been supported by the Pixi\u2019VN ( you can see the status of the issue here: [#76](https://github.com/DRincs-Productions/pixi-vn/issues/76)).`
|
|
3231
3333
|
});
|
|
3232
|
-
const
|
|
3334
|
+
const basicStyle = new TextStyle({
|
|
3335
|
+
fill: "#ffffff"
|
|
3336
|
+
});
|
|
3337
|
+
const basicText = new CanvasText({
|
|
3338
|
+
text: "Basic text in pixi",
|
|
3339
|
+
style: basicStyle
|
|
3340
|
+
});
|
|
3233
3341
|
basicText.x = 50;
|
|
3234
3342
|
basicText.y = 100;
|
|
3235
3343
|
GameWindowManager.addCanvasElement("basicText", basicText);
|
|
@@ -3247,7 +3355,7 @@ But it will generate a warn message, because the FillGradient or FillPattern has
|
|
|
3247
3355
|
fill: { fill },
|
|
3248
3356
|
stroke: { color: "#4a1850", width: 5, join: "round" },
|
|
3249
3357
|
dropShadow: {
|
|
3250
|
-
color: "#
|
|
3358
|
+
color: "#ff5f74",
|
|
3251
3359
|
blur: 4,
|
|
3252
3360
|
angle: Math.PI / 6,
|
|
3253
3361
|
distance: 6
|
|
@@ -3300,36 +3408,30 @@ EventTest1 = __decorateClass([
|
|
|
3300
3408
|
eventDecorator("___pixi_vn_canvas_events_test_event1___")
|
|
3301
3409
|
], EventTest1);
|
|
3302
3410
|
var EventTest2 = class extends CanvasEvent {
|
|
3303
|
-
constructor() {
|
|
3304
|
-
super(...arguments);
|
|
3305
|
-
this.textureButtonDown = Texture.from("https://pixijs.com/assets/button_down.png");
|
|
3306
|
-
this.textureButtonOver = Texture.from("https://pixijs.com/assets/button_over.png");
|
|
3307
|
-
this.textureButton = Texture.from("https://pixijs.com/assets/button.png");
|
|
3308
|
-
}
|
|
3309
3411
|
fn(event, sprite) {
|
|
3310
3412
|
if (event === "pointerdown") {
|
|
3311
3413
|
sprite.isdown = true;
|
|
3312
|
-
sprite.texture =
|
|
3414
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_down.png");
|
|
3313
3415
|
sprite.alpha = 1;
|
|
3314
3416
|
} else if (event === "pointerup" || event === "pointerupoutside") {
|
|
3315
3417
|
sprite.isdown = false;
|
|
3316
3418
|
if (sprite.isOver) {
|
|
3317
|
-
sprite.texture =
|
|
3419
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_over.png");
|
|
3318
3420
|
} else {
|
|
3319
|
-
sprite.texture =
|
|
3421
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button.png");
|
|
3320
3422
|
}
|
|
3321
3423
|
} else if (event === "pointerover") {
|
|
3322
3424
|
sprite.isOver = true;
|
|
3323
3425
|
if (sprite.isdown) {
|
|
3324
3426
|
return;
|
|
3325
3427
|
}
|
|
3326
|
-
sprite.texture =
|
|
3428
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button_over.png");
|
|
3327
3429
|
} else if (event === "pointerout") {
|
|
3328
3430
|
sprite.isOver = false;
|
|
3329
3431
|
if (sprite.isdown) {
|
|
3330
3432
|
return;
|
|
3331
3433
|
}
|
|
3332
|
-
sprite.texture =
|
|
3434
|
+
sprite.texture = Texture.from("https://pixijs.com/assets/button.png");
|
|
3333
3435
|
}
|
|
3334
3436
|
}
|
|
3335
3437
|
};
|
|
@@ -3351,6 +3453,7 @@ var canvasEventsTestLabel = newLabel(
|
|
|
3351
3453
|
});
|
|
3352
3454
|
const texture = yield Assets.load(bunnyImage);
|
|
3353
3455
|
const sprite = CanvasSprite.from(texture);
|
|
3456
|
+
sprite.scale.set(3);
|
|
3354
3457
|
sprite.anchor.set(0.5);
|
|
3355
3458
|
sprite.x = GameWindowManager.screen.width / 2;
|
|
3356
3459
|
sprite.y = GameWindowManager.screen.height / 2;
|
|
@@ -3365,17 +3468,12 @@ var canvasEventsTestLabel = newLabel(
|
|
|
3365
3468
|
character: juliette,
|
|
3366
3469
|
text: `This is the test of buttons in a canvas. (This example is from the official [PixiJS website](https://pixijs.com/8.x/examples/events/interactivity).)`
|
|
3367
3470
|
});
|
|
3368
|
-
yield Assets.load(
|
|
3369
|
-
|
|
3370
|
-
"https://pixijs.com/assets/button.png",
|
|
3371
|
-
"https://pixijs.com/assets/button_down.png",
|
|
3372
|
-
"https://pixijs.com/assets/button_over.png"
|
|
3373
|
-
]);
|
|
3374
|
-
const background = CanvasSprite.from("https://pixijs.com/assets/bg_button.jpg");
|
|
3471
|
+
const backgroundT = yield Assets.load("https://pixijs.com/assets/bg_button.jpg");
|
|
3472
|
+
const background = new CanvasSprite(backgroundT);
|
|
3375
3473
|
background.width = GameWindowManager.screen.width;
|
|
3376
3474
|
background.height = GameWindowManager.screen.height;
|
|
3377
3475
|
GameWindowManager.addCanvasElement("bg", background);
|
|
3378
|
-
const textureButton =
|
|
3476
|
+
const textureButton = yield Assets.load("https://pixijs.com/assets/button.png");
|
|
3379
3477
|
const buttons = [];
|
|
3380
3478
|
const buttonPositions = [175, 75, 655, 75, 410, 325, 150, 465, 685, 445];
|
|
3381
3479
|
for (let i = 0; i < 5; i++) {
|
|
@@ -3395,7 +3493,17 @@ var canvasEventsTestLabel = newLabel(
|
|
|
3395
3493
|
buttons[4].scale.set(0.8, 1.2);
|
|
3396
3494
|
buttons[4].rotation = Math.PI;
|
|
3397
3495
|
})
|
|
3398
|
-
]
|
|
3496
|
+
],
|
|
3497
|
+
{
|
|
3498
|
+
onLoadStep: () => __async(void 0, null, function* () {
|
|
3499
|
+
yield Assets.load([
|
|
3500
|
+
"https://pixijs.com/assets/bg_button.jpg",
|
|
3501
|
+
"https://pixijs.com/assets/button.png",
|
|
3502
|
+
"https://pixijs.com/assets/button_down.png",
|
|
3503
|
+
"https://pixijs.com/assets/button_over.png"
|
|
3504
|
+
]);
|
|
3505
|
+
})
|
|
3506
|
+
}
|
|
3399
3507
|
);
|
|
3400
3508
|
var AlienTintingTest = class extends CanvasSprite {
|
|
3401
3509
|
constructor() {
|
|
@@ -3515,13 +3623,13 @@ var imagesAnimationsTest = newLabel(IMAGE_ANIMAIONS_TEST_LABEL, [
|
|
|
3515
3623
|
() => __async(void 0, null, function* () {
|
|
3516
3624
|
setDialogue({ character: juliette, text: "Here's what they can do." });
|
|
3517
3625
|
setChoiceMenuOptions([
|
|
3518
|
-
new ChoiceMenuOption("Dissolve effect", imagesDissolveTest),
|
|
3519
|
-
new ChoiceMenuOption("Fade effect", imagesFadeTest),
|
|
3520
|
-
new ChoiceMenuOption("Rotate", imagesRotateTest),
|
|
3521
|
-
new ChoiceMenuOption("Move", imagesMoveTest),
|
|
3522
|
-
new ChoiceMenuOption("Zoom", imagesZoomTest),
|
|
3523
|
-
new ChoiceMenuOption("Move in/out", imagesMoveInOutTest),
|
|
3524
|
-
new ChoiceMenuOption("Zoom in/out", imagesZoomInOutTest),
|
|
3626
|
+
new ChoiceMenuOption("Dissolve effect", imagesDissolveTest, {}),
|
|
3627
|
+
new ChoiceMenuOption("Fade effect", imagesFadeTest, {}),
|
|
3628
|
+
new ChoiceMenuOption("Rotate", imagesRotateTest, {}),
|
|
3629
|
+
new ChoiceMenuOption("Move", imagesMoveTest, {}),
|
|
3630
|
+
new ChoiceMenuOption("Zoom", imagesZoomTest, {}),
|
|
3631
|
+
new ChoiceMenuOption("Move in/out", imagesMoveInOutTest, {}),
|
|
3632
|
+
new ChoiceMenuOption("Zoom in/out", imagesZoomInOutTest, {}),
|
|
3525
3633
|
new ChoiceMenuOptionClose("Cancel", true)
|
|
3526
3634
|
]);
|
|
3527
3635
|
}),
|
|
@@ -3631,8 +3739,8 @@ var imagesRotateTest = newLabel("___pixi_vn_images_rotate_test___", [
|
|
|
3631
3739
|
text: `Here's what's going to happen:
|
|
3632
3740
|
- ${eggHeadName} will rotate with a anchor set to 0.
|
|
3633
3741
|
- ${flowerTopName} will rotate with a anchor set to 0.5 and a exponential speed progression.
|
|
3634
|
-
- ${helmlokName} will rotate with a anchor set to 0.5, rotate 2
|
|
3635
|
-
- ${skullyName} will rotate with a anchor set to 1, rotate 3
|
|
3742
|
+
- ${helmlokName} will rotate with a anchor set to 0.5, rotate clockwise for 2 seconds, rotate counterclockwise with a exponential (-0.05) speed progression, and when it reaches 0, it will repeat.
|
|
3743
|
+
- ${skullyName} will rotate with a anchor set to 1, rotate 3 seconds clockwise, wait for 0.5 seconds, and rotate 7 seconds counterclockwise.`
|
|
3636
3744
|
});
|
|
3637
3745
|
let eggHead = GameWindowManager.getCanvasElement("eggHead");
|
|
3638
3746
|
if (eggHead)
|
|
@@ -3685,10 +3793,10 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
|
|
|
3685
3793
|
setDialogue({
|
|
3686
3794
|
character: juliette,
|
|
3687
3795
|
text: `Here's what's going to happen:
|
|
3688
|
-
- ${eggHeadName} will move to { x: 500, y: 100 } with a speed of
|
|
3689
|
-
- ${flowerTopName} will move to { x: 500, y: 300 } with a speed of
|
|
3690
|
-
- ${helmlokName} will move to
|
|
3691
|
-
- ${skullyName} will move to { x: 500, y: 500 } with a speed of
|
|
3796
|
+
- ${eggHeadName} will move to { x: 500, y: 100 } with a speed of 24.
|
|
3797
|
+
- ${flowerTopName} will move to { x: 500, y: 300 } with a speed of 18.
|
|
3798
|
+
- ${helmlokName} will move to { x: 100, y: 500 } with a speed of 150 and a linear speed progression of -2 ( limit 10 ), and then move to { x: 1700, y: 500 } with a speed of 10 and a linear speed progression of 2 ( limit 150 ), and repeat.
|
|
3799
|
+
- ${skullyName} will move to { x: 500, y: 500 } with a speed of 40, wait for 0.5 seconds, and move to { x: 100, y: 100 } with a speed of 40.`
|
|
3692
3800
|
});
|
|
3693
3801
|
GameWindowManager.addTicker("eggHead", new MoveTicker({
|
|
3694
3802
|
destination: { x: 500, y: 100 },
|
|
@@ -3701,25 +3809,25 @@ var imagesMoveTest = newLabel("___pixi_vn_images_move_test___", [
|
|
|
3701
3809
|
GameWindowManager.addTickersSteps("helmlok", [
|
|
3702
3810
|
new MoveTicker({
|
|
3703
3811
|
destination: { x: 100, y: 500 },
|
|
3704
|
-
speed:
|
|
3705
|
-
speedProgression: { type: "linear", amt: -
|
|
3812
|
+
speed: 150,
|
|
3813
|
+
speedProgression: { type: "linear", amt: -2, limit: 10 }
|
|
3706
3814
|
}),
|
|
3707
3815
|
new MoveTicker({
|
|
3708
3816
|
destination: { x: 1700, y: 500 },
|
|
3709
|
-
speed:
|
|
3710
|
-
speedProgression: { type: "linear", amt:
|
|
3817
|
+
speed: 10,
|
|
3818
|
+
speedProgression: { type: "linear", amt: 2, limit: 150 }
|
|
3711
3819
|
}),
|
|
3712
3820
|
Repeat
|
|
3713
3821
|
]);
|
|
3714
3822
|
GameWindowManager.addTickersSteps("skully", [
|
|
3715
3823
|
new MoveTicker({
|
|
3716
3824
|
destination: { x: 500, y: 500 },
|
|
3717
|
-
speed:
|
|
3825
|
+
speed: 40
|
|
3718
3826
|
}),
|
|
3719
3827
|
Pause(0.5),
|
|
3720
3828
|
new MoveTicker({
|
|
3721
3829
|
destination: { x: 100, y: 100 },
|
|
3722
|
-
speed:
|
|
3830
|
+
speed: 40
|
|
3723
3831
|
})
|
|
3724
3832
|
]);
|
|
3725
3833
|
}
|
|
@@ -3781,37 +3889,45 @@ var imagesMoveInOutTest = newLabel("___pixi_vn_images_move_in_out_test___", [
|
|
|
3781
3889
|
setDialogue({
|
|
3782
3890
|
character: juliette,
|
|
3783
3891
|
text: `Here's what's going to happen:
|
|
3784
|
-
- ${eggHeadName} will move in from the top with a speed of
|
|
3785
|
-
- ${flowerTopName} will move in from the right with a speed of
|
|
3786
|
-
- ${helmlokName} will move in from the left with a speed of
|
|
3787
|
-
- ${skullyName} will move in from the bottom with a speed of
|
|
3892
|
+
- ${eggHeadName} will move in from the top with a speed of 80. If you go next, ${eggHeadName} will move out from the bottom with a speed of 80.
|
|
3893
|
+
- ${flowerTopName} will move in from the right with a speed of 80 and a speed progression of 0.02. If you go next, ${flowerTopName} will move out from the left with a speed of 80 and a speed progression of 0.02.
|
|
3894
|
+
- ${helmlokName} will move in from the left with a speed of 80. If you go next, ${helmlokName} will move out from the right with a speed of 80.
|
|
3895
|
+
- ${skullyName} will move in from the bottom with a speed of 80 and a speed progression of 0.02. If you go next, ${skullyName} will move out from the top with a speed of 80 and a speed progression of 0.02.`
|
|
3788
3896
|
});
|
|
3789
3897
|
let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
|
|
3790
3898
|
let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
|
|
3791
3899
|
let helmlok = new CanvasImage({ x: 100, y: 300 }, helmlokImage);
|
|
3792
3900
|
let skully = new CanvasImage({ x: 300, y: 300 }, skullyImage);
|
|
3793
|
-
moveIn("eggHead", eggHead, { speed:
|
|
3901
|
+
moveIn("eggHead", eggHead, { speed: 80, direction: "down" });
|
|
3794
3902
|
moveIn("flowerTop", flowerTop, {
|
|
3795
|
-
speed:
|
|
3903
|
+
speed: 80,
|
|
3796
3904
|
direction: "left",
|
|
3797
3905
|
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
3798
3906
|
});
|
|
3799
|
-
moveIn("helmlok", helmlok, { speed:
|
|
3907
|
+
moveIn("helmlok", helmlok, { speed: 80, direction: "right" });
|
|
3800
3908
|
moveIn("skully", skully, {
|
|
3801
|
-
speed:
|
|
3909
|
+
speed: 80,
|
|
3802
3910
|
direction: "up",
|
|
3803
3911
|
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
3804
3912
|
});
|
|
3805
3913
|
}),
|
|
3806
3914
|
() => {
|
|
3807
|
-
moveOut("eggHead", { speed:
|
|
3808
|
-
moveOut("flowerTop", { speed:
|
|
3809
|
-
moveOut("helmlok", { speed:
|
|
3810
|
-
moveOut("skully", { speed:
|
|
3915
|
+
moveOut("eggHead", { speed: 80, direction: "down" });
|
|
3916
|
+
moveOut("flowerTop", { speed: 80, direction: "left" });
|
|
3917
|
+
moveOut("helmlok", { speed: 80, direction: "right" });
|
|
3918
|
+
moveOut("skully", { speed: 80, direction: "up" });
|
|
3811
3919
|
}
|
|
3812
3920
|
]);
|
|
3813
3921
|
var imagesZoomInOutTest = newLabel("___pixi_vn_images_zoom_in_out_test___", [
|
|
3814
3922
|
() => __async(void 0, null, function* () {
|
|
3923
|
+
setDialogue({
|
|
3924
|
+
character: juliette,
|
|
3925
|
+
text: `Here's what's going to happen:
|
|
3926
|
+
- ${eggHeadName} will zoom in with a speed of 3. If you go next, ${eggHeadName} will zoom out with a speed of 3.
|
|
3927
|
+
- ${flowerTopName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${flowerTopName} will zoom out with a speed of 3.
|
|
3928
|
+
- ${helmlokName} will zoom in with a speed of 3. If you go next, ${helmlokName} will zoom out with a speed of 1.
|
|
3929
|
+
- ${skullyName} will zoom in with a speed of 3 and a speed progression of 0.02. If you go next, ${skullyName} will zoom out with a speed of 3 and a speed progression of 0.02.`
|
|
3930
|
+
});
|
|
3815
3931
|
GameWindowManager.removeCanvasElements();
|
|
3816
3932
|
let eggHead = new CanvasImage({ x: 100, y: 100 }, eggHeadImage);
|
|
3817
3933
|
let flowerTop = new CanvasImage({ x: 300, y: 100 }, flowerTopImage);
|
|
@@ -3837,7 +3953,7 @@ var imagesZoomInOutTest = newLabel("___pixi_vn_images_zoom_in_out_test___", [
|
|
|
3837
3953
|
speedProgression: { type: "exponential", percentage: 0.02 }
|
|
3838
3954
|
});
|
|
3839
3955
|
zoomOut("flowerTop", { speed: 3, direction: "left" });
|
|
3840
|
-
zoomOut("helmlok", { speed:
|
|
3956
|
+
zoomOut("helmlok", { speed: 1, direction: "right" });
|
|
3841
3957
|
zoomOut("skully", {
|
|
3842
3958
|
speed: 3,
|
|
3843
3959
|
direction: "up",
|
|
@@ -3919,6 +4035,23 @@ Footer
|
|
|
3919
4035
|
})
|
|
3920
4036
|
]);
|
|
3921
4037
|
|
|
4038
|
+
// src/labels/StepLabelTest.ts
|
|
4039
|
+
var STEP_LABEL_TEST_LABEL = "___pixi_vn_step_label_test___";
|
|
4040
|
+
var stepLabelTestLAbel = newLabel(STEP_LABEL_TEST_LABEL, [
|
|
4041
|
+
() => __async(void 0, null, function* () {
|
|
4042
|
+
setDialogue({ character: juliette, text: `Pixi'VN manages the succession of "screens" with steps. Each step is a function that can be asynchronous.` });
|
|
4043
|
+
}),
|
|
4044
|
+
() => __async(void 0, null, function* () {
|
|
4045
|
+
setDialogue({ character: juliette, text: "The labels are containers of steps, they are used to organize the steps in a more readable way. For start a steps sequence, you must call or jump to a label." });
|
|
4046
|
+
}),
|
|
4047
|
+
() => __async(void 0, null, function* () {
|
|
4048
|
+
setDialogue({ character: juliette, text: "It is also possible to ask the player to make a choice." });
|
|
4049
|
+
}),
|
|
4050
|
+
() => __async(void 0, null, function* () {
|
|
4051
|
+
setDialogue({ character: juliette, text: "Browsing through available tests is one way to test the steps/labels system." });
|
|
4052
|
+
})
|
|
4053
|
+
]);
|
|
4054
|
+
|
|
3922
4055
|
// src/labels/StartLabel.ts
|
|
3923
4056
|
var pixivnTestStartLabel = newLabel(
|
|
3924
4057
|
"___pixi_vn_example_start_label___",
|
|
@@ -3927,25 +4060,25 @@ var pixivnTestStartLabel = newLabel(
|
|
|
3927
4060
|
let currentTimeName = "";
|
|
3928
4061
|
const hour = (/* @__PURE__ */ new Date()).getHours();
|
|
3929
4062
|
if (hour >= 5 && hour < 12) {
|
|
3930
|
-
currentTimeName = "morning";
|
|
4063
|
+
currentTimeName = "morning\u{1F505}";
|
|
3931
4064
|
} else if (hour >= 12 && hour < 18) {
|
|
3932
|
-
currentTimeName = "afternoon";
|
|
4065
|
+
currentTimeName = "afternoon\u{1F506}";
|
|
3933
4066
|
} else if (hour >= 18 && hour < 22) {
|
|
3934
|
-
currentTimeName = "evening";
|
|
4067
|
+
currentTimeName = "evening\u26C5";
|
|
3935
4068
|
} else {
|
|
3936
|
-
currentTimeName = "night";
|
|
4069
|
+
currentTimeName = "night\u{1F319}";
|
|
3937
4070
|
}
|
|
3938
4071
|
setDialogue({ character: juliette, text: `Good ${currentTimeName}! I'm ${juliette.name}, your virtual assistant. I'm here to help you with your tests.` });
|
|
3939
4072
|
},
|
|
3940
|
-
() => setDialogue({ character: juliette, text: `You are running the Pixi\u2019VN test. This test will guide you through the different features of the library.` }),
|
|
4073
|
+
() => setDialogue({ character: juliette, text: `You are running the Pixi\u2019VN v${PIXIVN_VERSION} test. This test will guide you through the different features of the library.` }),
|
|
3941
4074
|
(props) => GameStepManager.jumpLabel(pixivnTestStartLabel2, props)
|
|
3942
4075
|
]
|
|
3943
4076
|
);
|
|
3944
|
-
var
|
|
3945
|
-
"
|
|
4077
|
+
var openLink = newLabel(
|
|
4078
|
+
"___pixi_vn_open_link___",
|
|
3946
4079
|
[
|
|
3947
4080
|
(props) => {
|
|
3948
|
-
window.open(
|
|
4081
|
+
window.open(props.link);
|
|
3949
4082
|
GameStepManager.goNext(props);
|
|
3950
4083
|
}
|
|
3951
4084
|
]
|
|
@@ -3958,12 +4091,14 @@ var pixivnTestStartLabel2 = newLabel(
|
|
|
3958
4091
|
GameWindowManager.clear();
|
|
3959
4092
|
setDialogue({ character: juliette, text: "Which test would you like to start with?" });
|
|
3960
4093
|
setChoiceMenuOptions([
|
|
3961
|
-
new ChoiceMenuOption("Open Pixi\u2019VN Wiki",
|
|
3962
|
-
new ChoiceMenuOption("Images, Transitions and Animations Test", imagesAnimationsTest),
|
|
3963
|
-
new ChoiceMenuOption("Canvas Events Test
|
|
3964
|
-
new ChoiceMenuOption("Base Canvas Element Test", baseCanvasElementTestLabel),
|
|
3965
|
-
new ChoiceMenuOption("Custom Ticker Canvas Element Test", customTickerCanvasElementTestLabel),
|
|
3966
|
-
new ChoiceMenuOption("
|
|
4094
|
+
new ChoiceMenuOption("Open Pixi\u2019VN Wiki", openLink, { link: "https://pixi-vn.web.app/" }),
|
|
4095
|
+
new ChoiceMenuOption("Images, Transitions and Animations Test", imagesAnimationsTest, {}),
|
|
4096
|
+
new ChoiceMenuOption("Canvas Events Test", canvasEventsTestLabel, {}),
|
|
4097
|
+
new ChoiceMenuOption("Base Canvas Element Test", baseCanvasElementTestLabel, {}),
|
|
4098
|
+
new ChoiceMenuOption("Custom Ticker Canvas Element Test", customTickerCanvasElementTestLabel, {}),
|
|
4099
|
+
new ChoiceMenuOption("Steps and Labels Test", stepLabelTestLAbel, {}),
|
|
4100
|
+
new ChoiceMenuOption("Markdown Test", markdownTest, {}),
|
|
4101
|
+
new ChoiceMenuOption("Open Pixi\u2019VN Github Issues", openLink, { link: "https://github.com/DRincs-Productions/pixi-vn/issues" })
|
|
3967
4102
|
]);
|
|
3968
4103
|
},
|
|
3969
4104
|
(props) => GameStepManager.jumpLabel(RESTART_TEST_LABEL, props)
|