@drincs/pixi-vn 1.9.5 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +186 -170
  2. package/dist/{ContainerMemory-DNqSVzLY.d.cts → ContainerMemory-De04YSUc.d.cts} +2 -1
  3. package/dist/{ContainerMemory-DNqSVzLY.d.ts → ContainerMemory-De04YSUc.d.ts} +2 -1
  4. package/dist/canvas.cjs +2 -2
  5. package/dist/canvas.d.cts +8 -3
  6. package/dist/canvas.d.ts +8 -3
  7. package/dist/canvas.mjs +1 -1
  8. package/dist/characters.cjs +1 -1
  9. package/dist/characters.d.cts +3 -2
  10. package/dist/characters.d.ts +3 -2
  11. package/dist/characters.mjs +1 -1
  12. package/dist/{chunk-S7HZUIEI.mjs → chunk-A5FN4SNI.mjs} +1 -1
  13. package/dist/chunk-B46NFIFC.mjs +1 -0
  14. package/dist/chunk-FPMP2OWB.mjs +1 -0
  15. package/dist/{chunk-6OABTG5R.mjs → chunk-OJKUK6GL.mjs} +1 -1
  16. package/dist/{chunk-5MVDNAT4.mjs → chunk-WYGKBGMH.mjs} +1 -1
  17. package/dist/core.d.cts +4 -3
  18. package/dist/core.d.ts +4 -3
  19. package/dist/filters.cjs +1 -1
  20. package/dist/filters.d.cts +2 -1
  21. package/dist/filters.d.ts +2 -1
  22. package/dist/filters.mjs +1 -1
  23. package/dist/history.cjs +1 -1
  24. package/dist/history.d.cts +10 -5
  25. package/dist/history.d.ts +10 -5
  26. package/dist/history.mjs +1 -1
  27. package/dist/index.cjs +2 -2
  28. package/dist/index.d.cts +16 -7
  29. package/dist/index.d.ts +16 -7
  30. package/dist/index.mjs +2 -2
  31. package/dist/motion.cjs +1 -1
  32. package/dist/motion.d.cts +2 -1
  33. package/dist/motion.d.ts +2 -1
  34. package/dist/motion.mjs +1 -1
  35. package/dist/narration.cjs +2 -2
  36. package/dist/narration.d.cts +7 -2
  37. package/dist/narration.d.ts +7 -2
  38. package/dist/narration.mjs +1 -1
  39. package/dist/pixi/browser.js +182 -148
  40. package/dist/sound.cjs +1 -1
  41. package/dist/sound.d.cts +3 -2
  42. package/dist/sound.d.ts +3 -2
  43. package/dist/sound.mjs +1 -1
  44. package/dist/storage.cjs +1 -1
  45. package/dist/storage.d.cts +7 -2
  46. package/dist/storage.d.ts +7 -2
  47. package/dist/storage.mjs +1 -1
  48. package/dist/tickers.cjs +1 -1
  49. package/dist/tickers.d.cts +2 -1
  50. package/dist/tickers.d.ts +2 -1
  51. package/dist/tickers.mjs +1 -1
  52. package/dist/vite-listener.mjs +1 -1
  53. package/dist/vite.cjs +1 -1
  54. package/dist/vite.d.cts +2 -1
  55. package/dist/vite.d.ts +2 -1
  56. package/dist/vite.mjs +1 -1
  57. package/dist/worker.d.cts +2 -1
  58. package/dist/worker.d.ts +2 -1
  59. package/package.json +11 -10
  60. package/dist/chunk-AW5XWF24.mjs +0 -1
  61. package/dist/chunk-K7JIC2F2.mjs +0 -1
package/README.md CHANGED
@@ -1,170 +1,186 @@
1
- # Pixi’VN - PixiJS Game Engine
2
-
3
- ![pixi-vn-cover](https://github.com/user-attachments/assets/9bd54406-f41a-4d2c-959c-96a773a6103c)
4
-
5
- <p align="center">
6
- <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/v/@drincs/pixi-vn?label=version" alt="npm version"></a>
7
- <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/@drincs/pixi-vn" alt="npm downloads per month"></a>
8
- <a target="_blank" href="https://www.jsdelivr.com/package/npm/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/@drincs/pixi-vn?logo=jsdeliver"></a>
9
- <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img alt="NPM License" src="https://img.shields.io/npm/l/@drincs/pixi-vn"></a>
10
- <a target="_blank" href="https://discord.gg/E95FZWakzp" rel="noopener noreferrer nofollow"><img alt="Discord" src="https://img.shields.io/discord/1263071210011496501?color=7289da&label=discord"></a>
11
- </p>
12
-
13
- Pixi’VN is a very versatile and powerful story-driven engine. It is based on JavaScript/TypeScript and [PixiJS](https://pixijs.com/), and supports animated characters through [Spine 2D](https://esotericsoftware.com/) and [Live2D](https://www.live2d.com/).
14
-
15
- Pixi’VN aims to be an innovative and fast engine, and puts a strong emphasis on AI-assisted development: an AI agent can start your game, gain all the knowledge it needs about your project through [Agent Skills](#agent-skills), and test the game by launching it in a browser — with the ability to keep driving it from the outside while it plays.
16
-
17
- You can use narrative languages that are able to take full advantage of the engine's features, as well as any custom features you add to your project. Currently supported:
18
-
19
- - [_ink_](https://pixi-vn.com/ink/ink)
20
-
21
- ## Templates
22
-
23
- For a quick start, various project templates are available, built with React. Less experienced developers can use these templates without much knowledge of JavaScript/TypeScript.
24
-
25
- - **[Visual Novel](https://pixi-vn.com/start/make-visual-novel)**: a classic dialogue-driven experience, with characters, backgrounds, and choices.
26
- - **[Point & Click Adventure](https://pixi-vn.com/nqtr/make-point-and-click)**: an adventure game where the player explores scenes and interacts with objects and characters.
27
- - **[Interactive Fiction](https://pixi-vn.com/start/make-interactive-fiction)**: feels like reading a book. Unlike a visual novel, images are shown as vignettes, just as illustrations would appear on a page.
28
-
29
- To create a new project from a template, run:
30
-
31
- ```npm
32
- npm create pixi-vn@latest
33
- ```
34
-
35
- ### Distribution
36
-
37
- Pixi’VN is independent of any distribution technology, but strong emphasis is being placed on [Roves](https://roves.pixi-vn.com/), built by the same team behind Pixi’VN.
38
-
39
- | Platform | [Roves](https://roves.pixi-vn.com/) | [Tauri](https://v2.tauri.app/) | [Electron](https://www.electronjs.org/) |
40
- | ----------- | ----------------------------------- | ------------------------------ | --------------------------------------- |
41
- | Windows | ✅ | ✅ | ✅ |
42
- | macOS | ✅ | ✅ | ✅ |
43
- | Linux | ✅ | ✅ | ✅ |
44
- | Android | ✅ | ✅ | ❌ |
45
- | iOS | 🚧 | ✅ | ❌ |
46
- | Nintendo | 🚧 | ❌ | ❌ |
47
- | PlayStation | 🚧 | ❌ | ❌ |
48
- | Xbox | 🚧 | ❌ | ❌ |
49
-
50
- ## Wiki
51
-
52
- - [Quick Start](https://pixi-vn.com/start/getting-started)
53
- - [Templates](https://pixi-vn.com/start/templates)
54
- - Features:
55
- - [Characters](https://pixi-vn.com/start/character)
56
- - [Narration](https://pixi-vn.com/start/narration)
57
- - [Assets](https://pixi-vn.com/start/assets)
58
- - [Canvas WebGL/WebGPU](https://pixi-vn.com/start/canvas)
59
- - [Sounds and music](https://pixi-vn.com/start/sound)
60
- - [Storage](https://pixi-vn.com/start/storage)
61
- - [User Interface (UI)](https://pixi-vn.com/start/interface)
62
- - [Minigames](https://pixi-vn.com/start/minigames)
63
- - [AI-Generated Content](https://pixi-vn.com/start/ai-generated-content)
64
- - [Save and load](https://pixi-vn.com/start/save)
65
- - [Distribution](https://pixi-vn.com/start/distribution)
66
-
67
- ## Prerequisites
68
-
69
- Before starting, you must have the following tools installed:
70
-
71
- - [Node.js](https://nodejs.org/) version 18 or higher.
72
- - Text editor with TypeScript support, such as:
73
- - [Visual Studio Code](https://code.visualstudio.com/)
74
- - [Cursor](https://www.cursor.com/)
75
- - [VSCodium](https://vscodium.com/)
76
-
77
- ## Installation
78
-
79
- To install the Pixi’VN package in an existing JavaScript project, use one of the following commands:
80
-
81
- ```npm
82
- npm install @drincs/pixi-vn
83
- ```
84
-
85
- ## Initialize
86
-
87
- Before using the Pixi’VN engine, you must initialize the game. You can do this by calling the `Game.init` method.
88
-
89
- ```ts title="src/main.tsx"
90
- import { Game } from "@drincs/pixi-vn";
91
-
92
- const body = document.body;
93
- if (!body) {
94
- throw new Error("body element not found");
95
- }
96
-
97
- Game.init(body, {
98
- height: 1080,
99
- width: 1920,
100
- backgroundColor: "#303030",
101
- }).then(() => {
102
- // ...
103
- Game.start("start", {});
104
- });
105
-
106
- // read more here: https://pixi-vn.com/start/other-narrative-features.html#how-manage-the-end-of-the-game
107
- Game.onEnd(async (props) => {
108
- Game.clear();
109
- // navigate to main menu
110
- });
111
-
112
- Game.addOnError((error, props) => {
113
- console.error(`Error occurred`, error);
114
- });
115
-
116
- Game.onNavigate((path) => navigateTo(path));
117
- ```
118
-
119
- ```html title="index.html"
120
- <!doctype html>
121
- <html lang="en">
122
- <head>
123
- <meta charset="UTF-8" />
124
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
125
- <title>Game</title>
126
- </head>
127
- <body>
128
- <div id="root"></div>
129
- <script type="module" src="/src/main.ts"></script>
130
- </body>
131
- </html>
132
- ```
133
-
134
- ```css title="styles.css"
135
- html,
136
- body {
137
- background-color: #242424;
138
- height: 100%;
139
- }
140
-
141
- body {
142
- margin: 0;
143
- min-height: 100vh;
144
- display: flex;
145
- overflow: hidden;
146
- }
147
- ```
148
-
149
- ## Agent Skills
150
-
151
- Pixi'VN ships a set of [Agent Skills](https://www.skills.sh/) that teach AI coding assistants (like Claude Code) how to correctly use each part of the engine. If you use Claude Code, you can install all of them into your project with:
152
-
153
- ```npm
154
- npx skills add DRincs-Productions/pixi-vn --all
155
- ```
156
-
157
- This installs every skill below and prompts you to pick which ones to keep. To install only specific ones, add `--skill <name>` (repeat the flag to install several, e.g. `--skill canvas --skill sound`). Use `--list` instead of installing to just see what's available. Available skills:
158
-
159
- - `getting-started` — installing the package and initializing the `Game`
160
- - `assets` — local vs. online assets, the manifest/bundle/alias system, and loading strategy
161
- - `canvas` — images, sprites, text, video, transitions and effects
162
- - `characters` — defining and registering characters
163
- - `history` — going back/rewinding and reading the narration backlog
164
- - `narration` — labels, dialogue and choices
165
- - `saves` — exporting/restoring game state and persisting save files
166
- - `sound` — music, sound effects and audio channels
167
- - `storage` — game variables, flags and stored classes
168
- - `testing` — driving/inspecting a running game from an AI agent or script via `Game.testing`, for automated play-testing
169
- - `ui` — mounting HTML/PixiJS UI layers over the canvas, screen navigation, theming, and connecting UI to storage
170
- - `migration` — upgrading an existing project to the current version
1
+ # Pixi’VN - PixiJS Game Engine
2
+
3
+ ![pixi-vn-cover](https://github.com/user-attachments/assets/9bd54406-f41a-4d2c-959c-96a773a6103c)
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/v/@drincs/pixi-vn?label=version" alt="npm version"></a>
7
+ <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/@drincs/pixi-vn" alt="npm downloads per month"></a>
8
+ <a target="_blank" href="https://www.jsdelivr.com/package/npm/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/@drincs/pixi-vn?logo=jsdeliver"></a>
9
+ <a href="https://www.npmjs.com/package/@drincs/pixi-vn" rel="noopener noreferrer nofollow"><img alt="NPM License" src="https://img.shields.io/npm/l/@drincs/pixi-vn"></a>
10
+ <a target="_blank" href="https://discord.gg/E95FZWakzp" rel="noopener noreferrer nofollow"><img alt="Discord" src="https://img.shields.io/discord/1263071210011496501?color=7289da&label=discord"></a>
11
+ </p>
12
+
13
+ Pixi’VN is a very versatile and powerful story-driven engine. It is based on JavaScript/TypeScript and [PixiJS](https://pixijs.com/), and supports animated characters through [Spine 2D](https://esotericsoftware.com) and [Live2D](https://www.live2d.com/).
14
+
15
+ Pixi’VN aims to be an innovative and fast engine, and puts a strong emphasis on AI-assisted development: an AI agent can start your game, gain all the knowledge it needs about your project through [Agent Skills](#agent-skills), and test the game by launching it in a browser — with the ability to keep driving it from the outside while it plays.
16
+
17
+ You can use narrative languages that are able to take full advantage of the engine's features, as well as any custom features you add to your project. Currently supported:
18
+
19
+ - [_ink_](https://pixi-vn.com/ink/ink)
20
+
21
+ ## Templates
22
+
23
+ For a quick start, various project templates are available, built with React. Less experienced developers can use these templates without much knowledge of JavaScript/TypeScript.
24
+
25
+ - **[Visual Novel](https://pixi-vn.com/start/make-visual-novel)**: a classic dialogue-driven experience, with characters, backgrounds, and choices.
26
+ - **[Point & Click Adventure](https://pixi-vn.com/nqtr/make-point-and-click)**: an adventure game where the player explores scenes and interacts with objects and characters.
27
+ - **[Interactive Fiction](https://pixi-vn.com/start/make-interactive-fiction)**: feels like reading a book. Unlike a visual novel, images are shown as vignettes, just as illustrations would appear on a page.
28
+
29
+ To create a new project from a template, run:
30
+
31
+ ```npm
32
+ npm create pixi-vn@latest
33
+ ```
34
+
35
+ ### Distribution
36
+
37
+ Pixi’VN is independent of any distribution technology, but strong emphasis is being placed on [Roves](https://roves.pixi-vn.com/), built by the same team behind Pixi’VN.
38
+
39
+ | Platform | [Roves](https://roves.pixi-vn.com/) | [Tauri](https://v2.tauri.app/) | [Electron](https://www.electronjs.org/) |
40
+ | ----------- | ----------------------------------- | ------------------------------ | --------------------------------------- |
41
+ | Windows | ✅ | ✅ | ✅ |
42
+ | macOS | ✅ | ✅ | ✅ |
43
+ | Linux | ✅ | ✅ | ✅ |
44
+ | Android | ✅ | ✅ | ❌ |
45
+ | iOS | 🚧 | ✅ | ❌ |
46
+ | Nintendo | 🚧 | ❌ | ❌ |
47
+ | PlayStation | 🚧 | ❌ | ❌ |
48
+ | Xbox | 🚧 | ❌ | ❌ |
49
+
50
+ ## Wiki
51
+
52
+ - [Quick Start](https://pixi-vn.com/start/getting-started)
53
+ - [Templates](https://pixi-vn.com/start/templates)
54
+ - Features:
55
+ - [Characters](https://pixi-vn.com/start/character)
56
+ - [Narration](https://pixi-vn.com/start/narration)
57
+ - [Assets](https://pixi-vn.com/start/assets)
58
+ - [Canvas WebGL/WebGPU](https://pixi-vn.com/start/canvas)
59
+ - [Sounds and music](https://pixi-vn.com/start/sound)
60
+ - [Storage](https://pixi-vn.com/start/storage)
61
+ - [User Interface (UI)](https://pixi-vn.com/start/interface)
62
+ - [Minigames](https://pixi-vn.com/start/minigames)
63
+ - [AI-Generated Content](https://pixi-vn.com/start/ai-generated-content)
64
+ - [Save and load](https://pixi-vn.com/start/save)
65
+ - [Distribution](https://pixi-vn.com/start/distribution)
66
+
67
+ ## Prerequisites
68
+
69
+ Before starting, you must have the following tools installed:
70
+
71
+ - [Node.js](https://nodejs.org/) version 20.19.0 or higher.
72
+ - Text editor with TypeScript support, such as:
73
+ - [Visual Studio Code](https://code.visualstudio.com/)
74
+ - [Cursor](https://www.cursor.com/)
75
+ - [VSCodium](https://vscodium.com/)
76
+
77
+ ## Installation
78
+
79
+ To install the Pixi’VN package in an existing JavaScript project, use one of the following commands:
80
+
81
+ ```npm
82
+ npm install @drincs/pixi-vn
83
+ ```
84
+
85
+ ## Initialize
86
+
87
+ Before using the Pixi’VN engine, you must initialize the game. You can do this by calling the `Game.init` method.
88
+
89
+ ```ts title="src/main.tsx"
90
+ import { Game } from "@drincs/pixi-vn";
91
+
92
+ const body = document.body;
93
+ if (!body) {
94
+ throw new Error("body element not found");
95
+ }
96
+
97
+ Game.init(body, {
98
+ height: 1080,
99
+ width: 1920,
100
+ backgroundColor: "#303030",
101
+ }).then(() => {
102
+ // ...
103
+ Game.start("start", {});
104
+ });
105
+
106
+ // read more here: https://pixi-vn.com/start/other-narrative-features.html#how-manage-the-end-of-the-game
107
+ Game.onEnd(async (props) => {
108
+ Game.clear();
109
+ // navigate to main menu
110
+ });
111
+
112
+ Game.addOnError((error, props) => {
113
+ console.error(`Error occurred`, error);
114
+ });
115
+
116
+ Game.onNavigate((path) => navigateTo(path));
117
+ ```
118
+
119
+ ```html title="index.html"
120
+ <!doctype html>
121
+ <html lang="en">
122
+ <head>
123
+ <meta charset="UTF-8" />
124
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
125
+ <title>Game</title>
126
+ </head>
127
+ <body>
128
+ <div id="root"></div>
129
+ <script type="module" src="/src/main.ts"></script>
130
+ </body>
131
+ </html>
132
+ ```
133
+
134
+ ```css title="styles.css"
135
+ html,
136
+ body {
137
+ background-color: #242424;
138
+ height: 100%;
139
+ }
140
+
141
+ body {
142
+ margin: 0;
143
+ min-height: 100vh;
144
+ display: flex;
145
+ overflow: hidden;
146
+ }
147
+ ```
148
+
149
+ ## Agent Skills
150
+
151
+ Pixi'VN ships a set of [Agent Skills](https://www.skills.sh/) that teach AI coding assistants how to correctly use each part of the engine.
152
+
153
+ > In LM Studio Bionic, ask the agent to install skills from `https://github.com/DRincs-Productions/pixi-vn`, or add the skill files in **Settings → Skills**. To reuse skills installed for Codex or Claude Code, enable **Settings → Skills → Use skills found in other apps**.
154
+
155
+ **Codex**:
156
+
157
+ ```npm
158
+ npx skills@latest add DRincs-Productions/pixi-vn@latest --skill '*' --agent codex -g -y
159
+ ```
160
+
161
+ **Claude Code**:
162
+
163
+ ```npm
164
+ npx skills@latest add DRincs-Productions/pixi-vn@latest --skill '*' --agent claude-code -g -y
165
+ ```
166
+
167
+ **Other agents**:
168
+
169
+ ```npm
170
+ npx skills@latest add DRincs-Productions/pixi-vn@latest --all -y
171
+ ```
172
+
173
+ Available skills:
174
+
175
+ - `pixi-vn` — the index/entry point of the skill set: skill map, installing the package and initializing the `Game`
176
+ - `pixi-vn-assets` — local vs. online assets, the manifest/bundle/alias system, and loading strategy
177
+ - `pixi-vn-canvas` — images, sprites, text, video, transitions and effects
178
+ - `pixi-vn-characters` — defining and registering characters
179
+ - `pixi-vn-history` — going back/rewinding and reading the narration backlog
180
+ - `pixi-vn-narration` — labels, dialogue and choices
181
+ - `pixi-vn-saves` — exporting/restoring game state and persisting save files
182
+ - `pixi-vn-sound` — music, sound effects and audio channels
183
+ - `pixi-vn-storage` — game variables, flags and stored classes
184
+ - `pixi-vn-testing` — driving/inspecting a running game from an AI agent or script via `Game.testing`, for automated play-testing
185
+ - `pixi-vn-ui` — mounting HTML/PixiJS UI layers over the canvas, screen navigation, theming, and connecting UI to storage
186
+ - `pixi-vn-migration` — upgrading an existing project to the current version
@@ -272,4 +272,5 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
272
272
  elements: CanvasBaseItemMemory[];
273
273
  }
274
274
 
275
- export { type AdditionalPositionsExtensionProps as A, type CanvasBaseItemMemory as C, type ListenerExtensionMemory as L, type OnEventsHandlers as O, CanvasBaseItem as a, type CanvasGameState as b, type ContainerChild as c, type ListenerExtension as d, type AdditionalPositionsExtension as e, type ContainerMemory as f, addListenerHandler as g, analizePositionsExtensionProps as h };
275
+ export { CanvasBaseItem as a, addListenerHandler as g, analizePositionsExtensionProps as h };
276
+ export type { AdditionalPositionsExtensionProps as A, CanvasBaseItemMemory as C, ListenerExtensionMemory as L, OnEventsHandlers as O, CanvasGameState as b, ContainerChild as c, ListenerExtension as d, AdditionalPositionsExtension as e, ContainerMemory as f };
@@ -272,4 +272,5 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
272
272
  elements: CanvasBaseItemMemory[];
273
273
  }
274
274
 
275
- export { type AdditionalPositionsExtensionProps as A, type CanvasBaseItemMemory as C, type ListenerExtensionMemory as L, type OnEventsHandlers as O, CanvasBaseItem as a, type CanvasGameState as b, type ContainerChild as c, type ListenerExtension as d, type AdditionalPositionsExtension as e, type ContainerMemory as f, addListenerHandler as g, analizePositionsExtensionProps as h };
275
+ export { CanvasBaseItem as a, addListenerHandler as g, analizePositionsExtensionProps as h };
276
+ export type { AdditionalPositionsExtensionProps as A, CanvasBaseItemMemory as C, ListenerExtensionMemory as L, OnEventsHandlers as O, CanvasGameState as b, ContainerChild as c, ListenerExtension as d, AdditionalPositionsExtension as e, ContainerMemory as f };