-
-
Notifications
You must be signed in to change notification settings - Fork 2
getting started
You can start using Pixi’VN by initializing a new project or installing the package in an existing project.
Before starting, you must have the following tools installed:
- Node.js version 18 or higher.
- Text Editor with TypeScript support.
- (Recommended) Git
- Have a GitHub account
If you want to start a new project, you can use the following command to initialize a new project with the Pixi’VN template:
:::tabs == npm
npm create pixi-vn@latest
== yarn
yarn create pixi-vn
== pnpm
pnpm create pixi-vn
== bun
bun create pixi-vn
== bun
deno init --npm pixi-vn
:::
The supported template presets are:
Visual Novel - React:
<iframe src="https://pixi-vn-react-template.web.app/" title="Visual Novel - React" style="width:100%; height:400px; border:0; border-radius:4px; overflow:hidden;" ></iframe>- Visual Novel - React - Typescript - Web page
- Visual Novel - React - Typescript - Web page + Desktop + Mobile
- Visual Novel - React - Ink + Typescript - Web page
- Visual Novel - React - Ink + Typescript - Web page + Desktop + Mobile
( More templates will be added in the future, see this issue for more information )
After the project is initialized, you can open the project directory with your text editor (VSCode is recommended) and start developing your visual novel.
Into all templates there is a README.md
file with more information about the project.
For installing the Pixi’VN package in an existing (node.js) project, you can use the following command:
:::tabs == npm
npm install @drincs/pixi-vn
== yarn
yarn add @drincs/pixi-vn
== pnpm
pnpm add @drincs/pixi-vn
== bun
bun add @drincs/pixi-vn
:::
For using the Pixi’VN package in a browser, you can use the following script tag:
:::tabs == script tag
<script src="https://cdn.jsdelivr.net/npm/@drincs/pixi-vn/+esm"></script>
== import map
<script type="importmap">
{ "imports": {
"@drincs/pixi-vn": "https://cdn.jsdelivr.net/npm/@drincs/pixi-vn/+esm"
} }
</script>
== js import
import pixivn from "https://cdn.jsdelivr.net/npm/@drincs/pixi-vn/+esm";
:::
Now you must initialize the Pixi’VN window before using the engine.
For example, you add the following code to the main.ts
or index.ts
(It depends on your project configuration):
In Pixi’VN, in some advanced features, it is necessary to use decorators.
By default, TypeScript does not enable the use of decorators. To enable the use of decorators in TypeScript, you must add the following configuration to the tsconfig.json
file:
{
"compilerOptions": {
// ...
"experimentalDecorators": true
}
}