@drincs/pixi-vn-json 1.12.1 → 1.13.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 +40 -29
- package/dist/{importer.d.cts → PixiVNJsonLabelStep-C-9WKwTo.d.cts} +479 -77
- package/dist/{importer.d.ts → PixiVNJsonLabelStep-C-9WKwTo.d.ts} +479 -77
- package/dist/PixiVNJsonLabelStep-DQx6TBvZ.d.cts +999 -0
- package/dist/PixiVNJsonLabelStep-DQx6TBvZ.d.ts +999 -0
- package/dist/actions.cjs +3 -0
- package/dist/actions.d.cts +127 -0
- package/dist/actions.d.ts +127 -0
- package/dist/actions.mjs +3 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +33 -541
- package/dist/core.d.ts +33 -541
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +2 -3
- package/dist/index.d.cts +557 -21
- package/dist/index.d.ts +557 -21
- package/dist/index.mjs +2 -3
- package/dist/interpreter.cjs +1 -0
- package/dist/interpreter.d.cts +96 -0
- package/dist/interpreter.d.ts +96 -0
- package/dist/interpreter.mjs +1 -0
- package/dist/schema.cjs +1 -0
- package/dist/schema.d.cts +41 -0
- package/dist/schema.d.ts +41 -0
- package/dist/schema.mjs +0 -0
- package/dist/translator.cjs +1 -1
- package/dist/translator.d.cts +513 -13
- package/dist/translator.d.ts +513 -13
- package/dist/translator.mjs +1 -1
- package/package.json +33 -4
- package/dist/importer.cjs +0 -1
- package/dist/importer.mjs +0 -1
package/README.md
CHANGED
|
@@ -12,71 +12,82 @@
|
|
|
12
12
|
|
|
13
13
|
Pixi’VN can be integrated with JSON files to create a visual novel. This method is useful for:
|
|
14
14
|
|
|
15
|
-
* Add a new narrative to Pixi’VN (It was used to create the integration with
|
|
15
|
+
* Add a new narrative to Pixi’VN (It was used to create the integration with <DynamicLink href="/ink">***ink***</DynamicLink> and <DynamicLink href="/renpy">Ren'Py</DynamicLink>)
|
|
16
16
|
* Create a external tool to create visual novels with Pixi’VN
|
|
17
17
|
|
|
18
18
|
( In both these cases it is advisable to notify the developers of Pixi’VN to add the new feature to be helped )
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
```mermaid
|
|
21
|
+
flowchart LR;
|
|
22
|
+
K[RenPy] ---> Json;
|
|
23
|
+
H[ink] ---> Json;
|
|
24
|
+
I[Twine] ---> Json;
|
|
25
|
+
J[Yarn Spinner] ---> Json;
|
|
26
|
+
Json["Pixi’VN + Json"] ===> PixiVN;
|
|
27
|
+
PixiVN["Pixi’VN"]
|
|
28
|
+
```
|
|
21
29
|
|
|
22
30
|
## How use Pixi’VN + Json?
|
|
23
31
|
|
|
24
32
|
First of all you need to install the following library:
|
|
25
33
|
|
|
26
|
-
```
|
|
27
|
-
# npm
|
|
34
|
+
```sh tab="npm"
|
|
28
35
|
npm install @drincs/pixi-vn-json
|
|
36
|
+
```
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
```sh tab="yarn"
|
|
31
39
|
yarn add @drincs/pixi-vn-json
|
|
40
|
+
```
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
```sh tab="pnpm"
|
|
34
43
|
pnpm add @drincs/pixi-vn-json
|
|
44
|
+
```
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
```sh tab="bun"
|
|
37
47
|
bun add @drincs/pixi-vn-json
|
|
38
48
|
```
|
|
39
49
|
|
|
40
|
-
All you need to do to use this integration is create a object using the
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import { PixiVNJson, importPixiVNJson} from '@drincs/pixi-vn-json';
|
|
50
|
+
All you need to do to use this integration is create a object using the <DynamicLink href="/json/PixiVNJson">`PixiVNJson` Model</DynamicLink> and use the `importPixiVNJson()` function to import the object.
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
```ts title="labels.json"
|
|
53
|
+
{
|
|
54
|
+
"$schema": "https://pixi-vn.web.app/schemas/latest/schema.json",
|
|
55
|
+
"labels": {
|
|
56
|
+
"back_in_london": [
|
|
48
57
|
{
|
|
49
|
-
dialogue: "We arrived into London at 9.45pm exactly.",
|
|
58
|
+
"dialogue": "We arrived into London at 9.45pm exactly.",
|
|
50
59
|
},
|
|
51
60
|
{
|
|
52
|
-
labelToOpen: {
|
|
53
|
-
label: "hurry_home",
|
|
54
|
-
type: "jump",
|
|
61
|
+
"labelToOpen": {
|
|
62
|
+
"label": "hurry_home",
|
|
63
|
+
"type": "jump",
|
|
55
64
|
},
|
|
56
65
|
},
|
|
57
66
|
],
|
|
58
|
-
hurry_home: [
|
|
67
|
+
"hurry_home": [
|
|
59
68
|
{
|
|
60
|
-
dialogue: "We hurried home to Savile Row as fast as we could.",
|
|
69
|
+
"dialogue": "We hurried home to Savile Row as fast as we could.",
|
|
61
70
|
},
|
|
62
71
|
{
|
|
63
|
-
end: "label_end",
|
|
72
|
+
"end": "label_end",
|
|
64
73
|
},
|
|
65
74
|
]
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
|
-
|
|
69
|
-
importPixiVNJson(obj);
|
|
70
77
|
```
|
|
71
78
|
|
|
72
|
-
|
|
79
|
+
```ts title="main.ts"
|
|
80
|
+
import { PixiVNJson, importPixiVNJson} from '@drincs/pixi-vn-json';
|
|
81
|
+
import json from "./labels.json";
|
|
73
82
|
|
|
74
|
-
|
|
75
|
-
narration.callLabel(`back_in_london`, {})
|
|
83
|
+
importPixiVNJson(json);
|
|
76
84
|
```
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
After that you can run the `back_in_london` label with <DynamicLink href="/start/labels#run-a-label">Pixi’VN functions</DynamicLink>.
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
```ts title="main.ts"
|
|
89
|
+
import { narration } from '@drincs/pixi-vn'
|
|
90
|
+
|
|
91
|
+
narration.call(`back_in_london`, {})
|
|
92
|
+
```
|
|
81
93
|
|
|
82
|
-
Now `PixiVNJson` is currently in continuous change, more documentation will be written in the future.
|