@benjos/create-boilerplate 1.5.1 → 1.5.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 (147) hide show
  1. package/README.md +0 -4
  2. package/dist/constants.d.ts +8 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/constants.js +18 -0
  5. package/dist/constants.js.map +1 -0
  6. package/dist/constants.test.d.ts +2 -0
  7. package/dist/constants.test.d.ts.map +1 -0
  8. package/dist/constants.test.js +30 -0
  9. package/dist/constants.test.js.map +1 -0
  10. package/dist/createProject.d.ts +2 -0
  11. package/dist/createProject.d.ts.map +1 -0
  12. package/dist/createProject.js +52 -0
  13. package/dist/createProject.js.map +1 -0
  14. package/dist/createProject.test.d.ts +2 -0
  15. package/dist/createProject.test.d.ts.map +1 -0
  16. package/dist/createProject.test.js +85 -0
  17. package/dist/createProject.test.js.map +1 -0
  18. package/dist/index.js +16 -69
  19. package/dist/index.js.map +1 -1
  20. package/dist/prompts.d.ts +4 -0
  21. package/dist/prompts.d.ts.map +1 -0
  22. package/dist/prompts.js +26 -0
  23. package/dist/prompts.js.map +1 -0
  24. package/dist/prompts.test.d.ts +2 -0
  25. package/dist/prompts.test.d.ts.map +1 -0
  26. package/dist/prompts.test.js +50 -0
  27. package/dist/prompts.test.js.map +1 -0
  28. package/dist/types.d.ts +13 -0
  29. package/dist/types.d.ts.map +1 -0
  30. package/dist/types.js +7 -0
  31. package/dist/types.js.map +1 -0
  32. package/package.json +10 -8
  33. package/template-vanilla/package-lock.json +1000 -1476
  34. package/template-vanilla/package.json +11 -11
  35. package/template-vanilla/src/experiences/Experience.ts +1 -1
  36. package/template-vanilla/src/experiences/constants/experiences/ViewId.ts +2 -7
  37. package/template-vanilla/src/experiences/engines/threes/app/MainThreeApp.ts +8 -5
  38. package/template-vanilla/src/experiences/managers/LoaderManager.ts +4 -5
  39. package/template-vanilla/src/experiences/materials/threes/loaders/LoaderMaterial.ts +8 -5
  40. package/template-vanilla/src/experiences/views/threes/bases/ThreeViewBase.ts +1 -1
  41. package/template-vanilla/src/experiences/views/threes/{worlds/components/actors/bases → bases/components}/ThreeAnimatedModelBase.ts +3 -3
  42. package/template-vanilla/src/experiences/views/threes/{worlds/components/actors/bases → bases/components}/ThreeModelBase.ts +3 -3
  43. package/template-vanilla/src/experiences/views/threes/loaders/components/TemplateLoaderThreeActor.ts +1 -1
  44. package/template-vanilla/src/experiences/views/threes/worlds/World2ThreeView.ts +5 -5
  45. package/template-vanilla/src/experiences/views/threes/worlds/WorldThreeView.ts +5 -5
  46. package/template-vanilla/src/experiences/views/threes/worlds/components/Environment.ts +1 -1
  47. package/template-vanilla/src/experiences/views/threes/worlds/components/{actors/TemplateFont.ts → TemplateFont.ts} +3 -3
  48. package/template-vanilla/src/experiences/views/threes/worlds/components/{actors/TemplateMesh.ts → TemplateMesh.ts} +3 -3
  49. package/template-vanilla/src/experiences/views/threes/worlds/components/{actors/TemplateMesh2.ts → TemplateMesh2.ts} +3 -3
  50. package/template-vanilla/src/experiences/views/threes/worlds/components/{actors/TemplateModel.ts → TemplateModel.ts} +4 -4
  51. package/template-vanilla/tsconfig.json +3 -3
  52. package/template-vue/eslint.config.js +130 -0
  53. package/template-vue/index.html +17 -0
  54. package/{template-react → template-vue}/package-lock.json +1260 -2121
  55. package/template-vue/package.json +43 -0
  56. package/template-vue/readme.md +34 -0
  57. package/template-vue/src/experiences/Experience.ts +27 -0
  58. package/template-vue/src/experiences/cameras/threes/DebugThreeCameraController.ts +55 -0
  59. package/template-vue/src/experiences/cameras/threes/LoaderThreeCameraController.ts +25 -0
  60. package/template-vue/src/experiences/cameras/threes/MainThreeCameraController.ts +24 -0
  61. package/template-vue/src/experiences/cameras/threes/bases/ThreeCameraControllerBase.ts +90 -0
  62. package/template-vue/src/experiences/commands/InitCommand.ts +50 -0
  63. package/template-vue/src/experiences/constants/experiences/AnimationId.ts +3 -0
  64. package/template-vue/src/experiences/constants/experiences/AssetId.ts +8 -0
  65. package/template-vue/src/experiences/constants/experiences/CameraId.ts +7 -0
  66. package/template-vue/src/experiences/constants/experiences/DebugGuiTitle.ts +6 -0
  67. package/template-vue/src/experiences/constants/experiences/Object3dId.ts +3 -0
  68. package/template-vue/src/experiences/constants/experiences/ViewId.ts +11 -0
  69. package/template-vue/src/experiences/constants/experiences/ViewType.ts +6 -0
  70. package/template-vue/src/experiences/engines/threes/MainThree.ts +11 -0
  71. package/template-vue/src/experiences/engines/threes/app/LoaderThreeApp.ts +49 -0
  72. package/template-vue/src/experiences/engines/threes/app/MainThreeApp.ts +112 -0
  73. package/template-vue/src/experiences/engines/threes/app/bases/ThreeAppBase.ts +128 -0
  74. package/template-vue/src/experiences/engines/vues/MainVue.vue +9 -0
  75. package/template-vue/src/experiences/managers/DebugManager.ts +87 -0
  76. package/template-vue/src/experiences/managers/LoaderManager.ts +176 -0
  77. package/template-vue/src/experiences/managers/threes/ThreeAssetsManager.ts +263 -0
  78. package/template-vue/src/experiences/managers/threes/ThreeCameraControllerManager.ts +46 -0
  79. package/template-vue/src/experiences/managers/threes/ThreeRaycasterManager.ts +21 -0
  80. package/template-vue/src/experiences/materials/threes/loaders/LoaderMaterial.ts +47 -0
  81. package/template-vue/src/experiences/renderers/threes/LoaderRenderer.ts +18 -0
  82. package/template-vue/src/experiences/renderers/threes/Renderer.ts +71 -0
  83. package/template-vue/src/experiences/renderers/threes/bases/WebGLRendererBase.ts +29 -0
  84. package/template-vue/src/experiences/shaders/threes/loaders/LoaderFragmentShader.glsl +8 -0
  85. package/template-vue/src/experiences/shaders/threes/loaders/LoaderVertexShader.glsl +3 -0
  86. package/template-vue/src/experiences/styles/abstracts/_import.scss +5 -0
  87. package/template-vue/src/experiences/styles/abstracts/functions.scss +3 -0
  88. package/template-vue/src/experiences/styles/abstracts/variables.scss +7 -0
  89. package/template-vue/src/experiences/styles/commons/fonts.scss +10 -0
  90. package/template-vue/src/experiences/styles/commons/main.scss +59 -0
  91. package/template-vue/src/experiences/styles/commons/texts.scss +1 -0
  92. package/template-vue/src/experiences/styles/style.scss +7 -0
  93. package/template-vue/src/experiences/styles/views/loader.scss +70 -0
  94. package/template-vue/src/experiences/types/assetTypes.ts +8 -0
  95. package/template-vue/src/experiences/types/cameraTypes.ts +37 -0
  96. package/template-vue/src/experiences/types/global.d.ts +9 -0
  97. package/template-vue/src/experiences/types/shaders.d.ts +4 -0
  98. package/template-vue/src/experiences/views/threes/bases/ThreeViewBase.ts +49 -0
  99. package/template-vue/src/experiences/views/threes/bases/components/ThreeActorBase.ts +44 -0
  100. package/template-vue/src/experiences/views/threes/bases/components/ThreeAnimatedModelBase.ts +63 -0
  101. package/template-vue/src/experiences/views/threes/bases/components/ThreeModelBase.ts +48 -0
  102. package/template-vue/src/experiences/views/threes/loaders/LoaderThreeView.ts +28 -0
  103. package/template-vue/src/experiences/views/threes/loaders/components/TemplateLoaderThreeActor.ts +49 -0
  104. package/template-vue/src/experiences/views/threes/worlds/World2ThreeView.ts +35 -0
  105. package/template-vue/src/experiences/views/threes/worlds/WorldThreeView.ts +35 -0
  106. package/template-vue/src/experiences/views/threes/worlds/components/Environment.ts +89 -0
  107. package/template-vue/src/experiences/views/threes/worlds/components/TemplateFont.ts +58 -0
  108. package/template-vue/src/experiences/views/threes/worlds/components/TemplateMesh.ts +65 -0
  109. package/template-vue/src/experiences/views/threes/worlds/components/TemplateMesh2.ts +71 -0
  110. package/template-vue/src/experiences/views/threes/worlds/components/TemplateModel.ts +33 -0
  111. package/template-vue/src/experiences/views/vues/LoaderView.vue +55 -0
  112. package/template-vue/src/main.ts +7 -0
  113. package/template-vue/tsconfig.app.json +8 -0
  114. package/template-vue/tsconfig.json +7 -0
  115. package/template-vue/tsconfig.node.json +16 -0
  116. package/template-vue/vite.config.ts +16 -0
  117. package/template-react/eslint.config.js +0 -23
  118. package/template-react/index.html +0 -17
  119. package/template-react/package.json +0 -46
  120. package/template-react/readme.md +0 -31
  121. package/template-react/src/App.css +0 -42
  122. package/template-react/src/App.tsx +0 -10
  123. package/template-react/src/index.css +0 -68
  124. package/template-react/src/main.tsx +0 -10
  125. package/template-react/tsconfig.app.json +0 -34
  126. package/template-react/tsconfig.json +0 -7
  127. package/template-react/tsconfig.node.json +0 -26
  128. package/template-react/vite.config.ts +0 -29
  129. /package/template-vanilla/src/experiences/views/threes/{worlds/components/actors/bases → bases/components}/ThreeActorBase.ts +0 -0
  130. /package/{template-react → template-vue}/.prettierignore +0 -0
  131. /package/{template-react → template-vue}/.prettierrc +0 -0
  132. /package/{template-react → template-vue}/public/assets/fonts/LICENSE +0 -0
  133. /package/{template-react → template-vue}/public/assets/fonts/template.typeface.json +0 -0
  134. /package/{template-react → template-vue}/public/assets/hdrs/template.hdr +0 -0
  135. /package/{template-react → template-vue}/public/assets/icons/benjosLogoBlack.svg +0 -0
  136. /package/{template-react → template-vue}/public/assets/loaders/draco/README.md +0 -0
  137. /package/{template-react → template-vue}/public/assets/loaders/draco/draco_decoder.js +0 -0
  138. /package/{template-react → template-vue}/public/assets/loaders/draco/draco_decoder.wasm +0 -0
  139. /package/{template-react → template-vue}/public/assets/loaders/draco/draco_encoder.js +0 -0
  140. /package/{template-react → template-vue}/public/assets/loaders/draco/draco_wasm_wrapper.js +0 -0
  141. /package/{template-react → template-vue}/public/assets/loaders/draco/gltf/draco_decoder.js +0 -0
  142. /package/{template-react → template-vue}/public/assets/loaders/draco/gltf/draco_decoder.wasm +0 -0
  143. /package/{template-react → template-vue}/public/assets/loaders/draco/gltf/draco_encoder.js +0 -0
  144. /package/{template-react → template-vue}/public/assets/loaders/draco/gltf/draco_wasm_wrapper.js +0 -0
  145. /package/{template-react → template-vue}/public/assets/models/template.glb +0 -0
  146. /package/{template-react → template-vue}/public/assets/textures/template.jpg +0 -0
  147. /package/{template-react/assets_source/.gitkeep → template-vue/src/experiences/styles/abstracts/mixins.scss} +0 -0
@@ -1,17 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="./assets/icons/benjosLogoBlack.svg" />
6
- <meta
7
- name="viewport"
8
- content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, height=device-height, user-scalable=no, viewport-fit=cover, shrink-to-fit=no, minimal-ui"
9
- />
10
- <title>Boilerplate</title>
11
- </head>
12
-
13
- <body>
14
- <div id="root"></div>
15
- <script type="module" src="/src/main.tsx"></script>
16
- </body>
17
- </html>
@@ -1,46 +0,0 @@
1
- {
2
- "name": "template-react",
3
- "private": true,
4
- "version": "1.5.1",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite",
8
- "build": "tsc && vite build",
9
- "preview": "vite preview",
10
- "lint": "eslint . --max-warnings 0",
11
- "lint:fix": "eslint . --fix",
12
- "format": "prettier --write .",
13
- "format:check": "prettier --check ."
14
- },
15
- "dependencies": {
16
- "@dimforge/rapier3d": "^0.19.3",
17
- "gsap": "^3.14.2",
18
- "howler": "^2.2.4",
19
- "lil-gui": "^0.21.0",
20
- "react": "^19.2.3",
21
- "react-dom": "^19.2.3",
22
- "three": "^0.182.0"
23
- },
24
- "devDependencies": {
25
- "@eslint/js": "^9.39.2",
26
- "@types/howler": "^2.2.12",
27
- "@types/node": "^25.0.3",
28
- "@types/react": "^19.2.7",
29
- "@types/react-dom": "^19.2.3",
30
- "@types/three": "^0.182.0",
31
- "@vitejs/plugin-react": "^5.1.2",
32
- "eslint": "^9.39.2",
33
- "eslint-config-prettier": "^10.1.8",
34
- "eslint-plugin-prettier": "^5.5.4",
35
- "eslint-plugin-react-hooks": "^7.0.1",
36
- "eslint-plugin-react-refresh": "^0.4.26",
37
- "globals": "^16.5.0",
38
- "prettier": "^3.7.4",
39
- "sass-embedded": "^1.97.1",
40
- "three-perf": "^1.0.11",
41
- "typescript": "~5.9.3",
42
- "typescript-eslint": "^8.50.1",
43
- "vite": "^7.3.0",
44
- "vite-plugin-glsl": "^1.5.5"
45
- }
46
- }
@@ -1,31 +0,0 @@
1
- # 🎨 Three.js Boilerplate
2
-
3
- Custom boilerplate for Three.js projects with CLI scaffolding.
4
-
5
- ## 🚀 Quick Start
6
-
7
- ```bash
8
- npm i
9
- npm run dev
10
- ```
11
-
12
- ## ✨ Features
13
-
14
- - Three.js + React + Vite + TypeScript
15
- - GLSL shaders support
16
- - Debug mode with lil-gui
17
- - Manager-based architecture
18
- - ESLint + Prettier
19
-
20
- ## 🐛 Debug Mode
21
-
22
- Add `#debug` to URL: `http://localhost:5173/#debug`
23
-
24
- - `Shift + H` → Toggle UI
25
- - `Shift + C` → Debug Camera
26
- - `Shift + W` → Wireframe
27
- - `Ctrl + Click` → Center on object
28
-
29
- ## 📄 License
30
-
31
- MIT
@@ -1,42 +0,0 @@
1
- #root {
2
- max-width: 1280px;
3
- margin: 0 auto;
4
- padding: 2rem;
5
- text-align: center;
6
- }
7
-
8
- .logo {
9
- height: 6em;
10
- padding: 1.5em;
11
- will-change: filter;
12
- transition: filter 300ms;
13
- }
14
- .logo:hover {
15
- filter: drop-shadow(0 0 2em #646cffaa);
16
- }
17
- .logo.react:hover {
18
- filter: drop-shadow(0 0 2em #61dafbaa);
19
- }
20
-
21
- @keyframes logo-spin {
22
- from {
23
- transform: rotate(0deg);
24
- }
25
- to {
26
- transform: rotate(360deg);
27
- }
28
- }
29
-
30
- @media (prefers-reduced-motion: no-preference) {
31
- a:nth-of-type(2) .logo {
32
- animation: logo-spin infinite 20s linear;
33
- }
34
- }
35
-
36
- .card {
37
- padding: 2em;
38
- }
39
-
40
- .read-the-docs {
41
- color: #888;
42
- }
@@ -1,10 +0,0 @@
1
- import { useState } from 'react';
2
- import './App.css';
3
-
4
- function App() {
5
- const [count, setCount] = useState(0);
6
-
7
- return <>Hello boilerplate react!</>;
8
- }
9
-
10
- export default App;
@@ -1,68 +0,0 @@
1
- :root {
2
- font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
- line-height: 1.5;
4
- font-weight: 400;
5
-
6
- color-scheme: light dark;
7
- color: rgba(255, 255, 255, 0.87);
8
- background-color: #242424;
9
-
10
- font-synthesis: none;
11
- text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- a {
17
- font-weight: 500;
18
- color: #646cff;
19
- text-decoration: inherit;
20
- }
21
- a:hover {
22
- color: #535bf2;
23
- }
24
-
25
- body {
26
- margin: 0;
27
- display: flex;
28
- place-items: center;
29
- min-width: 320px;
30
- min-height: 100vh;
31
- }
32
-
33
- h1 {
34
- font-size: 3.2em;
35
- line-height: 1.1;
36
- }
37
-
38
- button {
39
- border-radius: 8px;
40
- border: 1px solid transparent;
41
- padding: 0.6em 1.2em;
42
- font-size: 1em;
43
- font-weight: 500;
44
- font-family: inherit;
45
- background-color: #1a1a1a;
46
- cursor: pointer;
47
- transition: border-color 0.25s;
48
- }
49
- button:hover {
50
- border-color: #646cff;
51
- }
52
- button:focus,
53
- button:focus-visible {
54
- outline: 4px auto -webkit-focus-ring-color;
55
- }
56
-
57
- @media (prefers-color-scheme: light) {
58
- :root {
59
- color: #213547;
60
- background-color: #ffffff;
61
- }
62
- a:hover {
63
- color: #747bff;
64
- }
65
- button {
66
- background-color: #f9f9f9;
67
- }
68
- }
@@ -1,10 +0,0 @@
1
- import { StrictMode } from 'react';
2
- import { createRoot } from 'react-dom/client';
3
- import './index.css';
4
- import App from './App.tsx';
5
-
6
- createRoot(document.getElementById('root')!).render(
7
- <StrictMode>
8
- <App />
9
- </StrictMode>
10
- );
@@ -1,34 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "ES2022",
5
- "useDefineForClassFields": true,
6
- "lib": [
7
- "ES2022",
8
- "DOM",
9
- "DOM.Iterable"
10
- ],
11
- "module": "ESNext",
12
- "types": [
13
- "vite/client"
14
- ],
15
- "skipLibCheck": true,
16
- /* Bundler mode */
17
- "moduleResolution": "bundler",
18
- "allowImportingTsExtensions": true,
19
- "verbatimModuleSyntax": true,
20
- "moduleDetection": "force",
21
- "noEmit": true,
22
- "jsx": "react-jsx",
23
- /* Linting */
24
- "strict": true,
25
- "noUnusedLocals": true,
26
- "noUnusedParameters": true,
27
- "erasableSyntaxOnly": true,
28
- "noFallthroughCasesInSwitch": true,
29
- "noUncheckedSideEffectImports": true
30
- },
31
- "include": [
32
- "src"
33
- ]
34
- }
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["vite.config.ts"]
26
- }
@@ -1,29 +0,0 @@
1
- import react from '@vitejs/plugin-react';
2
- import { defineConfig } from 'vite';
3
- import glsl from 'vite-plugin-glsl';
4
-
5
- export default defineConfig({
6
- base: './',
7
- server: {
8
- host: true,
9
- watch: {
10
- usePolling: true,
11
- },
12
- },
13
- build: {
14
- outDir: './dist',
15
- emptyOutDir: true,
16
- sourcemap: true,
17
- },
18
- plugins: [
19
- react(),
20
- glsl(),
21
- {
22
- name: 'full-reload',
23
- handleHotUpdate({ server }) {
24
- server.ws.send({ type: 'full-reload' });
25
- return [];
26
- },
27
- },
28
- ],
29
- });
File without changes