create-pixi-vn 0.1.4 → 0.1.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 (74) hide show
  1. package/package.json +2 -2
  2. package/template-react-vite-muijoy/README.md +61 -0
  3. package/template-react-vite-muijoy/_eslintrc.cjs +22 -0
  4. package/template-react-vite-muijoy/_gitignore +24 -0
  5. package/template-react-vite-muijoy/index.html +13 -0
  6. package/template-react-vite-muijoy/package-lock.json +9821 -0
  7. package/template-react-vite-muijoy/package.json +61 -0
  8. package/template-react-vite-muijoy/public/apple-touch-icon.png +0 -0
  9. package/template-react-vite-muijoy/public/favicon.ico +0 -0
  10. package/template-react-vite-muijoy/public/mask-icon.svg +890 -0
  11. package/template-react-vite-muijoy/public/pwa-192x192.png +0 -0
  12. package/template-react-vite-muijoy/public/pwa-512x512.png +0 -0
  13. package/template-react-vite-muijoy/public/robots.txt +3 -0
  14. package/template-react-vite-muijoy/public/vite.svg +23 -0
  15. package/template-react-vite-muijoy/src/App.css +42 -0
  16. package/template-react-vite-muijoy/src/App.tsx +16 -0
  17. package/template-react-vite-muijoy/src/AppRoutes.tsx +63 -0
  18. package/template-react-vite-muijoy/src/Home.tsx +14 -0
  19. package/template-react-vite-muijoy/src/Imports.tsx +30 -0
  20. package/template-react-vite-muijoy/src/atoms/autoInfoState.ts +50 -0
  21. package/template-react-vite-muijoy/src/atoms/canGoBackState.ts +13 -0
  22. package/template-react-vite-muijoy/src/atoms/choiceMenuState.ts +24 -0
  23. package/template-react-vite-muijoy/src/atoms/dialogDataState.ts +35 -0
  24. package/template-react-vite-muijoy/src/atoms/dialogueCardHeightState.ts +23 -0
  25. package/template-react-vite-muijoy/src/atoms/dialogueCardImageWidthState.ts +23 -0
  26. package/template-react-vite-muijoy/src/atoms/hideInterfaceState.ts +6 -0
  27. package/template-react-vite-muijoy/src/atoms/hideNextButtonState.ts +15 -0
  28. package/template-react-vite-muijoy/src/atoms/nextStepLoadingState.ts +6 -0
  29. package/template-react-vite-muijoy/src/atoms/openHistoryState.ts +6 -0
  30. package/template-react-vite-muijoy/src/atoms/openLoadAlertState.ts +6 -0
  31. package/template-react-vite-muijoy/src/atoms/openSettingsState.ts +6 -0
  32. package/template-react-vite-muijoy/src/atoms/quickSaveState.ts +22 -0
  33. package/template-react-vite-muijoy/src/atoms/reloadInterfaceDataEventState.ts +6 -0
  34. package/template-react-vite-muijoy/src/atoms/skipEnabledState.ts +6 -0
  35. package/template-react-vite-muijoy/src/atoms/typewriterDelayState.ts +23 -0
  36. package/template-react-vite-muijoy/src/atoms/typewriterIsAnimatedState.ts +6 -0
  37. package/template-react-vite-muijoy/src/components/ChoiceButton.tsx +19 -0
  38. package/template-react-vite-muijoy/src/components/DragHandleDivider.tsx +40 -0
  39. package/template-react-vite-muijoy/src/components/MenuButton.tsx +37 -0
  40. package/template-react-vite-muijoy/src/components/ModalDialog.tsx +101 -0
  41. package/template-react-vite-muijoy/src/components/SettingButton.tsx +44 -0
  42. package/template-react-vite-muijoy/src/components/SliderResizer.tsx +49 -0
  43. package/template-react-vite-muijoy/src/components/TextMenuButton.tsx +41 -0
  44. package/template-react-vite-muijoy/src/components/Typewriter.tsx +30 -0
  45. package/template-react-vite-muijoy/src/components/TypewriterMarkdown.tsx +335 -0
  46. package/template-react-vite-muijoy/src/i18n.ts +28 -0
  47. package/template-react-vite-muijoy/src/index.css +9 -0
  48. package/template-react-vite-muijoy/src/interceptors/DialogueDataEventInterceptor.tsx +47 -0
  49. package/template-react-vite-muijoy/src/interceptors/EventInterceptor.tsx +42 -0
  50. package/template-react-vite-muijoy/src/interceptors/SkipAutoInterceptor.tsx +67 -0
  51. package/template-react-vite-muijoy/src/main.tsx +27 -0
  52. package/template-react-vite-muijoy/src/pixi-vn.d.ts +29 -0
  53. package/template-react-vite-muijoy/src/providers/ThemeProvider.tsx +157 -0
  54. package/template-react-vite-muijoy/src/screens/ChoicesMenu.tsx +172 -0
  55. package/template-react-vite-muijoy/src/screens/Dialogue.tsx +238 -0
  56. package/template-react-vite-muijoy/src/screens/History.tsx +141 -0
  57. package/template-react-vite-muijoy/src/screens/LoadingPage.tsx +40 -0
  58. package/template-react-vite-muijoy/src/screens/MainMenu.tsx +78 -0
  59. package/template-react-vite-muijoy/src/screens/NextButton.tsx +91 -0
  60. package/template-react-vite-muijoy/src/screens/QuickActions.tsx +168 -0
  61. package/template-react-vite-muijoy/src/screens/QuickLoadAlert.tsx +82 -0
  62. package/template-react-vite-muijoy/src/screens/Settings.tsx +503 -0
  63. package/template-react-vite-muijoy/src/utility/ActionsUtility.ts +72 -0
  64. package/template-react-vite-muijoy/src/utility/ComponentUtility.ts +25 -0
  65. package/template-react-vite-muijoy/src/utility/useMyNavigate.ts +15 -0
  66. package/template-react-vite-muijoy/src/values/characters.ts +10 -0
  67. package/template-react-vite-muijoy/src/values/translations/strings_en.json +45 -0
  68. package/template-react-vite-muijoy/src/vite-env.d.ts +1 -0
  69. package/template-react-vite-muijoy/tsconfig.json +27 -0
  70. package/template-react-vite-muijoy/tsconfig.node.json +11 -0
  71. package/template-react-vite-muijoy/vite.config.ts +47 -0
  72. package/template-react-vite-muijoy/vscode/extensions.json +8 -0
  73. package/template-react-vite-muijoy/vscode/launch.json +23 -0
  74. package/template-react-vite-muijoy/vscode/settings.json +49 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pixi-vn",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "license": "GPL-3.0",
6
6
  "author": "DRincs-Productions",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "index.js",
13
- "template-*",
13
+ "template-react-vite-muijoy",
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
@@ -0,0 +1,61 @@
1
+ # Pixi'VN template (React + Vite + MUI joy)
2
+
3
+ This is a template for creating visual novels in React. It uses the Pixi'VN library and Vite as a build tool.
4
+ This Template contains basic functionality inspired by the widespread Visual Noval engine Ren'Py.
5
+
6
+ ## Overview
7
+
8
+ The first page that appears is the main menu. From there, you can start the game, load a saved game, or go to the settings.
9
+
10
+ The game page is in `/game` route. It contains the text box, character avatar, and canvas for the background image. The text box displays the text of the current dialogue. The character avatar displays the character speaking the dialogue. The background image is the background of the scene.
11
+ When a choice has to be made, the choices are displayed at the top of the screen.
12
+
13
+ When you are in the game page, you can access with many features through a list of buttons located at the bottom. In this list you can save the game, load a saved game, skip the dialogue, auto play the dialogue, access to the history modal, and access to the settings modal.
14
+
15
+ The history modal is a list of all the dialogues and choices that have been displayed.
16
+
17
+ The settings modal allows you to change the text speed, go to full screen, edit theme colors, and change go to main menu. The settings for the audio have not been added nor the libraries to manage it, but I recommend adding them.
18
+
19
+ ## How can I use this template to create a new project?
20
+
21
+ If you have GitHub account, you can use this template to create a new repository. To do this, click on the "Use this template" button located at the top of the repository.
22
+
23
+ ![image](https://github.com/user-attachments/assets/fc77dd71-1fa5-4532-a1d2-31eb83ffedec)
24
+
25
+ If you don't have a GitHub account, you can download the repository as a zip file. To do this, click on the "Code" button located at the top of the repository and then click on "Download ZIP".
26
+
27
+ ![image](https://github.com/user-attachments/assets/2e72d6cf-c1c6-441e-875d-1779b4f27d36)
28
+
29
+ ## Keyboard shortcuts (hotkeys)
30
+
31
+ * `Space` or `Enter`: Continue the dialogue.
32
+ * `Keep Space` or `Keep Enter`: Skip the dialogue.
33
+ * `Shift` + `S`: Quick save the game.
34
+ * `Shift` + `L`: Quick load the game.
35
+ * `Shift` + `H`: Open the history modal.
36
+ * `Esc`: Open the settings modal.
37
+ * `Shift` + `V`: Hide the Interface (Show only the canvas).
38
+
39
+ ## Used libraries
40
+
41
+ This template uses the following libraries:
42
+
43
+ Core libraries:
44
+
45
+ * [Pixi'VN](https://www.npmjs.com/package/@drincs/pixi-vn): A visual novel library for PixiJS.
46
+ * [Vite](https://vitejs.dev/): A build tool that aims to provide a faster and leaner development experience for modern web projects.
47
+ * [Vite Checker](https://www.npmjs.com/package/vite-plugin-checker): A Vite plugin that checks TypeScript types and ESLint on each build.
48
+ * [PWA Vite Plugin](https://vite-pwa-org.netlify.app): A Vite plugin that provides PWA support. This allows the possibility of installing the game as a Progressive Web App.
49
+ * [Recoil](https://recoiljs.org/): A state management library for React.
50
+ * [React Router](https://reactrouter.com/): A library that provides routing for React applications.
51
+
52
+ UI libraries:
53
+
54
+ * [Mui Joy](https://mui.com/joy-ui/getting-started/): A React UI framework that provides a set of components and styles for building a website.
55
+ * [Framer Motion](https://www.framer.com/motion/): A simple yet powerful motion library for React.
56
+ * [Notistack](https://iamhosseindhv.com/notistack): A library that provides snackbar notifications for React.
57
+
58
+ Text libraries:
59
+
60
+ * [i18next](https://www.i18next.com/): A library that gives the possibility to manage multiple translations in the application.
61
+ * [Reacr Markdown](https://www.npmjs.com/package/react-markdown): A library that allows you to render markdown in React components.
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: { browser: true, es2020: true },
4
+ extends: [
5
+ 'eslint:recommended',
6
+ 'plugin:@typescript-eslint/recommended',
7
+ 'plugin:react-hooks/recommended',
8
+ ],
9
+ ignorePatterns: ['dist', '.eslintrc.cjs'],
10
+ parser: '@typescript-eslint/parser',
11
+ plugins: ['react-refresh'],
12
+ rules: {
13
+ 'react-refresh/only-export-components': [
14
+ 'warn',
15
+ { allowConstantExport: true },
16
+ ],
17
+ },
18
+ "prefer-const": ["error", {
19
+ "destructuring": "all",
20
+ "ignoreReadBeforeAssign": true
21
+ }],
22
+ }
@@ -0,0 +1,24 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist
12
+ dist-ssr
13
+ *.local
14
+
15
+ # Editor directories and files
16
+ .vscode/*
17
+ !.vscode/extensions.json
18
+ .idea
19
+ .DS_Store
20
+ *.suo
21
+ *.ntvs*
22
+ *.njsproj
23
+ *.sln
24
+ *.sw?
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>My App</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>