create-three-blocks-starter 0.0.14 → 0.3.0-alpha.176.g8ff8a72e6369

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 (71) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +39 -270
  3. package/NOTICE +32 -0
  4. package/README.md +39 -60
  5. package/dist/artifacts.d.ts +54 -0
  6. package/dist/artifacts.js +349 -0
  7. package/dist/bin/index.d.ts +2 -0
  8. package/dist/bin/index.js +8 -0
  9. package/dist/catalog.d.ts +5 -0
  10. package/dist/catalog.js +80 -0
  11. package/dist/cli.d.ts +16 -0
  12. package/dist/cli.js +122 -0
  13. package/dist/compose.d.ts +10 -0
  14. package/dist/compose.js +331 -0
  15. package/dist/constants.d.ts +5 -0
  16. package/dist/constants.js +15 -0
  17. package/dist/generate.d.ts +21 -0
  18. package/dist/generate.js +225 -0
  19. package/dist/index.d.ts +6 -0
  20. package/dist/index.js +5 -0
  21. package/dist/layers.d.ts +2 -0
  22. package/dist/layers.js +103 -0
  23. package/dist/shader-inputs.d.ts +6 -0
  24. package/dist/shader-inputs.js +184 -0
  25. package/dist/types.d.ts +125 -0
  26. package/dist/types.js +3 -0
  27. package/dist/ui.d.ts +97 -0
  28. package/dist/ui.js +606 -0
  29. package/package.json +50 -9
  30. package/template-assets/shaders/scene/meta.json +67 -0
  31. package/template-assets/shaders/scene/scene.webgpu.ts +895 -0
  32. package/template-assets/shaders/text/meta.json +67 -0
  33. package/template-assets/shaders/text/text.webgpu.ts +1843 -0
  34. package/template-assets/shaders/website/meta.json +67 -0
  35. package/template-assets/shaders/website/website.webgpu.ts +894 -0
  36. package/template-assets/text/public/fonts/OFL-1.1.txt +92 -0
  37. package/template-assets/text/public/fonts/geist.msdf.json +1 -0
  38. package/template-assets/text/public/fonts/geist.msdf.ktx2 +0 -0
  39. package/template-assets/text/public/fonts/geist.msdf.meta.json +1 -0
  40. package/template-assets/text/public/fonts/geist.woff2 +0 -0
  41. package/template-assets/text/public/fonts/noto-jp.msdf.json +1 -0
  42. package/template-assets/text/public/fonts/noto-jp.msdf.ktx2 +0 -0
  43. package/template-assets/text/public/fonts/noto-jp.msdf.meta.json +1 -0
  44. package/template-assets/text/public/fonts/noto-jp.woff2 +0 -0
  45. package/templates/core/.editorconfig +13 -0
  46. package/templates/core/.gitattributes +1 -0
  47. package/templates/core/.vscode/extensions.json +5 -0
  48. package/templates/core/.vscode/settings.json +8 -0
  49. package/templates/core/NOTICE +20 -0
  50. package/templates/core/eslint.config.js +45 -0
  51. package/templates/core/gitignore +6 -0
  52. package/templates/core/public/icon.svg +8 -0
  53. package/templates/core/src/assets.ts +4 -0
  54. package/templates/core/src/look.ts +54 -0
  55. package/templates/core/src/main.ts +106 -0
  56. package/templates/core/src/protocol.ts +100 -0
  57. package/templates/core/src/render.worker.ts +239 -0
  58. package/templates/core/src/shaders.d.ts +6 -0
  59. package/templates/core/src/style.css +119 -0
  60. package/templates/core/src/vite-env.d.ts +11 -0
  61. package/templates/core/tsconfig.json +23 -0
  62. package/templates/core/vite.config.ts +12 -0
  63. package/templates/scene/index.html +16 -0
  64. package/templates/scene/src/scene.ts +66 -0
  65. package/templates/text/index.html +37 -0
  66. package/templates/text/src/scene.ts +61 -0
  67. package/templates/text/three-blocks.text.ts +31 -0
  68. package/templates/text/vite.config.ts +14 -0
  69. package/templates/website/index.html +30 -0
  70. package/templates/website/src/scene.ts +62 -0
  71. package/bin/index.js +0 -2016
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # create-three-blocks-starter
2
+
3
+ ## 0.3.0-alpha.176.g8ff8a72e6369
4
+
5
+ - ci: keep alpha readiness release-scoped (`8ff8a72e6369`).
6
+
7
+ This changelog is generated from Changesets.
8
+
9
+ ## 0.2.0
10
+
11
+ - Typed worker-first starter templates and project generator.
package/LICENSE CHANGED
@@ -1,307 +1,76 @@
1
- Three.js Blocks Software License Agreement
2
- Version 2.0 Effective January 2026
3
-
4
- Proprietary Software — All Rights Reserved
5
- Copyright (c) 2026 three-blocks
6
-
7
- Full License Terms: https://threejs-blocks.com/license
8
-
9
- ================================================================================
10
-
11
- LICENSE NOTICE
12
-
13
- This software and all associated packages, including but not limited to:
14
- - @three-blocks/core
15
- - @three-blocks/pro
16
- - @three-blocks/starter
17
- - create-three-blocks-starter
18
- - All related tools, examples, and documentation code
19
-
20
- are licensed exclusively to active, paid subscribers of the Three.js Blocks
21
- project. Without a valid and current subscription, you are NOT permitted to
22
- use this software.
23
-
24
- ================================================================================
25
-
26
- PERMITTED USAGE (Active Subscribers Only)
27
-
28
- Subject to maintaining an active, paid subscription, you are granted a
29
- non-exclusive, non-transferable, non-sublicensable license to:
30
-
31
- + Use the software in personal and commercial projects via the public API
32
- + Deploy applications incorporating the software to production environments
33
- + Integrate the software into your applications as a functional component
34
- + Access updates, bug fixes, and new features during active subscription
35
-
36
- ================================================================================
37
-
38
- RESTRICTIONS
39
-
40
- You may NOT:
41
-
42
- - Reverse engineer, decompile, disassemble, or attempt to derive the source
43
- code, underlying algorithms, or techniques employed in this software
44
- - Study, analyze, inspect, or learn from the implementation details, code
45
- structure, or internal workings of this software
46
- - Modify, adapt, translate, or create derivative works
47
- - Copy, share, distribute, publish, or resell any part of the software
48
- - Sublicense or transfer rights to any third party
49
- - Remove, alter, or obscure this license header or any copyright notices
50
- - Use this software after your subscription has expired or been terminated
51
-
52
- ================================================================================
53
-
54
- SUBLICENSING AND REDISTRIBUTION PROHIBITION
55
-
56
- This license is strictly non-transferable and non-sublicensable. You may NOT:
57
-
58
- - Sublicense, relicense, or transfer any rights granted herein to any third
59
- party under any circumstances
60
- - Create any SDK, library, framework, plugin, extension, or middleware that
61
- redistributes, bundles, or incorporates this software for use by third
62
- parties
63
- - Bundle this software into products, applications, or services where
64
- end-users do not hold their own valid subscription to Three.js Blocks
65
- - Offer this software as part of any hosted service, software-as-a-service
66
- (SaaS), platform-as-a-service (PaaS), or similar cloud-based offering
67
- where third parties access the software's functionality
68
- - Create wrapper libraries, abstraction layers, or integration packages that
69
- obscure, circumvent, or eliminate the subscription requirement from
70
- downstream users
71
- - Include this software in any product, template, boilerplate, starter kit,
72
- code generator, or scaffolding tool intended for distribution to third
73
- parties
74
- - Provide access to this software through any API, service endpoint, or
75
- programmatic interface that enables third-party usage
76
- - License, sell, rent, lease, or otherwise commercially exploit access to
77
- this software to any third party
78
-
79
- THIRD-PARTY INTEGRATION REQUIREMENT:
80
- If you develop any software, SDK, library, framework, application, or service
81
- that incorporates, depends upon, or integrates with this software, each
82
- end-user of your software must independently hold their own valid, active
83
- subscription to Three.js Blocks. You may not use your subscription to provide,
84
- enable, or facilitate access to this software to any third party. Any attempt
85
- to circumvent this requirement through technical or contractual means is
86
- expressly prohibited and constitutes a material breach of this license.
87
-
88
- ================================================================================
89
-
90
- AI, MACHINE LEARNING, AND AUTOMATED ANALYSIS PROHIBITION
91
-
92
- The use of this software, source code, compiled code, documentation, outputs,
93
- or any data generated by this software for artificial intelligence, machine
94
- learning, or automated analysis purposes is strictly prohibited. You may NOT:
95
-
96
- - Use this code, in whole or in part, to train, fine-tune, pre-train, or
97
- develop any artificial intelligence models, machine learning systems,
98
- neural networks, or large language models (LLMs)
99
- - Use this code for reinforcement learning from human feedback (RLHF),
100
- constitutional AI training, or any similar AI alignment or training
101
- methodology
102
- - Create embeddings, vector representations, semantic indices, or any other
103
- mathematical or computational representations of this code
104
- - Store this code in vector databases, retrieval systems, knowledge bases,
105
- or any storage mechanism intended for AI/ML retrieval-augmented generation
106
- (RAG) or similar AI-assisted retrieval
107
- - Generate synthetic data, pseudocode, paraphrased code, or derivative
108
- representations from this codebase for any purpose
109
- - Use automated tools, scripts, or AI systems to extract patterns,
110
- algorithms, architectural knowledge, or implementation techniques from
111
- this software
112
- - Input this code into AI coding assistants, code completion tools, or
113
- any AI-powered development environment for the purpose of analysis,
114
- learning, pattern extraction, or code generation
115
- - Use this code as context, examples, few-shot prompts, or reference
116
- material for AI code generation, code completion, or code suggestion
117
- - Feed this code into any automated transformation tool, transpiler, or
118
- code converter that uses AI/ML techniques
119
- - Use any output, behavior, or data generated by this software to train
120
- or improve any AI/ML system
121
-
122
- This prohibition applies to all AI/ML systems including but not limited to:
123
- large language models (LLMs), code completion tools (e.g., GitHub Copilot,
124
- Amazon CodeWhisperer, and similar tools), code generation systems, neural
125
- networks, transformer models, diffusion models, and any future AI technologies
126
- regardless of their architecture or methodology.
127
-
128
- This prohibition is perpetual and survives any termination or expiration of
129
- this license agreement.
130
-
131
- ================================================================================
132
-
133
- SUBSCRIPTION REQUIREMENT
134
-
135
- This license is valid only while you maintain an active, paid subscription to
136
- the Three.js Blocks service. Upon expiration or termination of your
137
- subscription:
138
-
139
- 1. Your license to use this software immediately and automatically terminates
140
- 2. You must immediately cease all use of the software
141
- 3. You must remove the software from all projects, systems, and deployments
142
- 4. You must not deploy, distribute, or make available any applications
143
- containing this software
144
- 5. You must delete all copies of this software in your possession or control
145
-
146
- Failure to comply with these requirements constitutes copyright infringement
147
- and breach of contract, and may result in legal action.
148
-
149
- ================================================================================
150
-
151
- PACKAGE-SPECIFIC NOTES
152
-
153
- @three-blocks/core:
154
- - Core library with proprietary algorithms and implementations
155
- - Protected by code obfuscation and this license
156
- - Subscription required
157
-
158
- @three-blocks/pro:
159
- - Advanced physics engine with proprietary implementations
160
- - Worker-based architecture with SharedArrayBuffer
161
- - Protected by code obfuscation and this license
162
- - Subscription required
163
-
164
- @three-blocks/starter:
165
- - Starter template for building Three.js applications
166
- - Includes licensed code and dependencies on @three-blocks/core
167
- - Subscription required
168
-
169
- create-three-blocks-starter:
170
- - Scaffolding tool for creating new projects
171
- - Publicly available for convenience but proprietary
172
- - Creates projects that require subscription
173
-
174
- ================================================================================
175
-
176
- ENFORCEMENT
177
-
178
- Unauthorized use, reproduction, distribution, reverse engineering, sublicensing,
179
- or violation of the AI/ML prohibition is strictly prohibited and may result in:
180
-
181
- * Immediate termination of your license and subscription without refund
182
- * Legal action for copyright infringement
183
- * Legal action for breach of contract
184
- * Claims for damages, including actual damages, lost profits, and statutory
185
- damages where available
186
- * Recovery of attorneys' fees and costs of enforcement
187
- * Injunctive relief to prevent further unauthorized use
188
- * Civil liability under applicable copyright, trade secret, and contract law
189
- * Criminal penalties under applicable law, including but not limited to the
190
- Computer Fraud and Abuse Act (CFAA) and equivalent international statutes
1
+ Required Notice: Copyright (c) 2025-2026 Three Blocks https://threejs-blocks.com
2
+ Required Notice: AI/ML training and dataset use are not licensed; text-and-data-mining rights reserved (EU 2019/790 Art. 4(3)). See NOTICE.
191
3
 
192
- We employ various technical and legal measures to detect unauthorized use,
193
- including but not limited to code fingerprinting, license validation, usage
194
- analytics, and regular compliance audits. We reserve the right to pursue all
195
- available legal remedies against violators.
4
+ # PolyForm Noncommercial License 1.0.0
196
5
 
197
- ================================================================================
6
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
198
7
 
199
- INDEMNIFICATION
8
+ ## Acceptance
200
9
 
201
- You agree to indemnify, defend, and hold harmless three-blocks, its affiliates,
202
- officers, directors, employees, and agents from and against any and all claims,
203
- damages, obligations, losses, liabilities, costs, and expenses (including
204
- reasonable attorneys' fees) arising from: (a) your use of the software;
205
- (b) your violation of any term of this license; (c) your violation of any
206
- third-party right, including any intellectual property or privacy right; or
207
- (d) any claim that your use of the software caused damage to a third party.
10
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
208
11
 
209
- ================================================================================
12
+ ## Copyright License
210
13
 
211
- ACCEPTANCE OF TERMS
14
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
212
15
 
213
- By downloading, installing, copying, accessing, or otherwise using this
214
- software, you acknowledge that you have read, understood, and agree to be
215
- bound by the complete terms of this license agreement.
16
+ ## Distribution License
216
17
 
217
- If you do not agree to these terms, you are not authorized to use, access,
218
- download, install, or copy this software.
18
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
219
19
 
220
- If you are accepting these terms on behalf of an organization, you represent
221
- and warrant that you have the authority to bind that organization to these
222
- terms.
20
+ ## Notices
223
21
 
224
- ================================================================================
22
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
225
23
 
226
- DISCLAIMER OF WARRANTY
24
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
227
25
 
228
- THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
229
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
230
- FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NONINFRINGEMENT.
26
+ ## Changes and New Works License
231
27
 
232
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU.
233
- SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
234
- SERVICING, REPAIR, OR CORRECTION.
28
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
235
29
 
236
- ================================================================================
30
+ ## Patent License
237
31
 
238
- LIMITATION OF LIABILITY
32
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
239
33
 
240
- IN NO EVENT SHALL THREE-BLOCKS, ITS AFFILIATES, LICENSORS, OR SUPPLIERS BE
241
- LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE, OR
242
- EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF PROFITS,
243
- GOODWILL, USE, DATA, OR OTHER INTANGIBLE LOSSES, ARISING OUT OF OR IN
244
- CONNECTION WITH THIS LICENSE OR THE USE OR INABILITY TO USE THE SOFTWARE,
245
- EVEN IF THREE-BLOCKS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
34
+ ## Noncommercial Purposes
246
35
 
247
- IN NO EVENT SHALL THREE-BLOCKS'S TOTAL CUMULATIVE LIABILITY TO YOU FOR ALL
248
- CLAIMS ARISING OUT OF OR RELATED TO THIS LICENSE OR THE SOFTWARE EXCEED THE
249
- AMOUNTS PAID BY YOU TO THREE-BLOCKS FOR THE SOFTWARE DURING THE TWELVE (12)
250
- MONTHS IMMEDIATELY PRECEDING THE EVENT GIVING RISE TO LIABILITY.
36
+ Any noncommercial purpose is a permitted purpose.
251
37
 
252
- SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
253
- CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
38
+ ## Personal Uses
254
39
 
255
- ================================================================================
40
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
256
41
 
257
- SEVERABILITY
42
+ ## Noncommercial Organizations
258
43
 
259
- If any provision of this license is held to be unenforceable or invalid, that
260
- provision shall be enforced to the maximum extent possible, and the other
261
- provisions shall remain in full force and effect.
44
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
262
45
 
263
- ================================================================================
46
+ ## Fair Use
264
47
 
265
- WAIVER
48
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
266
49
 
267
- The failure of three-blocks to enforce any right or provision of this license
268
- shall not constitute a waiver of such right or provision. No waiver of any
269
- term of this license shall be deemed a further or continuing waiver of such
270
- term or any other term.
50
+ ## No Other Rights
271
51
 
272
- ================================================================================
52
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
273
53
 
274
- ENTIRE AGREEMENT
54
+ ## Patent Defense
275
55
 
276
- This license constitutes the entire agreement between you and three-blocks
277
- regarding the software and supersedes all prior agreements, understandings,
278
- and communications, whether written or oral, regarding the subject matter
279
- hereof.
56
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
280
57
 
281
- ================================================================================
58
+ ## Violations
282
59
 
283
- CONTACT AND COMPLIANCE
60
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
284
61
 
285
- For licensing inquiries, subscription management, and compliance questions:
62
+ ## No Liability
286
63
 
287
- Web: https://threejs-blocks.com/license
288
- Email: support@threejs-blocks.com
64
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
289
65
 
290
- For license violations or to report unauthorized use:
291
- Email: legal@threejs-blocks.com
66
+ ## Definitions
292
67
 
293
- ================================================================================
68
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
294
69
 
295
- GOVERNING LAW AND JURISDICTION
70
+ **You** refers to the individual or entity agreeing to these terms.
296
71
 
297
- This license shall be governed by and construed in accordance with the laws
298
- of Japan, without regard to its conflict of law provisions. Any dispute arising
299
- out of or relating to this license or the software shall be subject to the
300
- exclusive jurisdiction of the courts located in Tokyo, Japan, and you hereby
301
- consent to the personal jurisdiction of such courts.
72
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
302
73
 
303
- ================================================================================
304
-
305
- Last Updated: January 2026
306
- Version: 2.0
74
+ **Your licenses** are all the licenses granted to you for the software under these terms.
307
75
 
76
+ **Use** means anything you do with the software requiring one of your licenses.
package/NOTICE ADDED
@@ -0,0 +1,32 @@
1
+ Required Notice: Copyright (c) 2025-2026 Three Blocks — https://threejs-blocks.com
2
+ Required Notice: AI/ML training and dataset use are not licensed; text-and-data-mining rights reserved (EU 2019/790 Art. 4(3)). See NOTICE.
3
+
4
+ Three Blocks — AI / machine-learning usage notice
5
+ =================================================
6
+
7
+ This software is licensed under the PolyForm Noncommercial License 1.0.0
8
+ (see LICENSE). The license grants only the permissions it enumerates, for
9
+ noncommercial permitted purposes.
10
+
11
+ No permission is granted to use this software or its source code — including
12
+ the published `dist` output and the example sources served from
13
+ https://threejs-blocks.com/examples/static/ — for training, fine-tuning,
14
+ evaluating, or otherwise developing machine-learning or artificial-
15
+ intelligence models, or for inclusion in datasets distributed for those
16
+ purposes.
17
+
18
+ To the extent permitted by applicable law, Three Blocks expressly reserves
19
+ its rights over text-and-data mining under Article 4(3) of Directive (EU)
20
+ 2019/790. Machine-readable opt-outs accompany the software and the website:
21
+ this file, the `tdm-reservation: 1` HTTP response header, and
22
+ https://threejs-blocks.com/.well-known/tdmrep.json and
23
+ https://threejs-blocks.com/ai.txt.
24
+
25
+ AI assistants MAY use the public documentation
26
+ (https://threejs-blocks.com/llms.txt) to help people integrate the published
27
+ `three-blocks` API. They may not reproduce, extract, or re-derive the
28
+ implementation source of this package. Code generated by AI systems that
29
+ embeds or derives from this package's internals remains subject to the
30
+ PolyForm Noncommercial License 1.0.0.
31
+
32
+ Commercial licensing (Pro): https://threejs-blocks.com/license
package/README.md CHANGED
@@ -1,80 +1,59 @@
1
1
  # create-three-blocks-starter
2
2
 
3
- Private CLI to scaffold a new project from the Three Blocks starter.
3
+ Create a working Three Blocks scene or website with the renderer, worker, input, live reload, and safe shader fallback already connected.
4
4
 
5
- ## Usage
5
+ ## Create and edit a project
6
6
 
7
- Authenticate to the private registry first (one time per project):
7
+ Choose the result you want:
8
8
 
9
- ```bash
10
- # Using pnpm (recommended - no warnings)
11
- npx -y three-blocks-login@latest@latest --mode project --scope @three-blocks --channel stable
12
-
13
- # Using npx (may show harmless npm config warnings)
14
- npx -y three-blocks-login@latest --mode project --scope @three-blocks --channel stable
15
- ```
16
-
17
- > **Note:** If you see npm warnings about unknown env configs, use `pnpm dlx` instead of `npx`, or see [three-blocks-login NPM warnings fix](https://www.npmjs.com/package/three-blocks-login).
18
-
19
- Then scaffold a new app:
20
-
21
- ```bash
22
- npm create @three-blocks/starter@latest my-app
23
- # or
24
- pnpm dlx create-three-blocks-starter my-app
9
+ ```sh
10
+ npm create three-blocks-starter my-app -- --template scene --yes
11
+ npm create three-blocks-starter my-site -- --template website --yes
12
+ npm create three-blocks-starter my-text-site -- --template text --yes
25
13
  ```
26
14
 
27
- Next steps:
28
-
29
- ```bash
30
- cd my-app
31
- pnpm i
32
- pnpm dev
33
- ```
15
+ The completion message prints the exact command for your package manager. Start the development server, open `http://localhost:5173` unless Vite prints another port, then edit `src/scene.ts`. The browser updates the visible scene while the renderer stays mounted.
34
16
 
35
- ## CI/CD & Vercel Setup
17
+ Use `scene` for one pointer-reactive canvas, `website` for scroll choreography with semantic Hypertext Markup Language (HTML), or `text` for selectable page copy mirrored as multi-channel signed distance field (MSDF) text. The [starter guide](https://threejs-blocks.com/docs/start/starter) shows the visible states and first deployment.
36
18
 
37
- The CLI now automatically generates the correct setup, but if you need to configure it manually:
19
+ ## Reference
38
20
 
39
- ### Quick Setup (3 steps)
21
+ `--mode` remains as a compatibility spelling for `--template`. Legacy `starter` and `minimal` values resolve to `scene`.
40
22
 
41
- 1. **Commit `.npmrc`** to your repository (generated automatically by create-three-blocks-starter):
42
- ```
43
- @three-blocks:registry=https://three-blocks-196905988268.d.codeartifact.ap-northeast-1.amazonaws.com/npm/core/
44
- ```
23
+ Release templates include their shader capture. The generated app uses it only while it matches the scene and installed runtime. A changed or missing capture falls back to normal live shader building, while a strict production build can require a fresh capture.
45
24
 
46
- 2. **Preinstall script** (added automatically by create-three-blocks-starter):
47
- ```json
48
- {
49
- "scripts": {
50
- "preinstall": "npx -y three-blocks-login@latest"
51
- }
52
- }
53
- ```
25
+ The text template includes Geist and Noto Sans JP browser and MSDF assets. Generated projects also configure Draco, KTX2, and lazy Meshopt support from the compatible installed Three.js package.
54
26
 
55
- 3. **Set environment variable** in your CI/CD platform:
56
- - **Vercel**: Project Settings → Environment Variables → Add `THREE_BLOCKS_SECRET_KEY`
57
- - **GitHub Actions**: Repository Settings → Secrets → Add `THREE_BLOCKS_SECRET_KEY`
58
- - **Other CI**: Add `THREE_BLOCKS_SECRET_KEY` secret with your license key
27
+ ## Development
59
28
 
60
- ### How It Works
29
+ ```bash
30
+ bun run typecheck
31
+ bun run test
32
+ bun run build
33
+ ```
61
34
 
62
- - Committed `.npmrc` tells pnpm WHERE to find packages (no auth needed yet)
63
- - Preinstall script fetches a short-lived token and adds it to `.npmrc`
64
- - This solves pnpm's timing issue (it resolves packages before running preinstall)
35
+ The repository CLI sandbox sets `THREE_BLOCKS_LINK_DEPS` to the monorepo's
36
+ `packages` directory and supplies a freshly packed runtime through
37
+ `THREE_BLOCKS_LOCAL_TARBALL`. In that development-only mode, generated projects
38
+ install the working-tree `three-blocks` archive through an absolute `file:`
39
+ dependency. The archive mirrors a registry install and avoids external symlinks;
40
+ release scaffolds continue to emit the catalog's exact published version.
65
41
 
66
- ## Development (monorepo)
42
+ ## Generated handoff
67
43
 
68
- - The CLI pulls the template from `packages/three-blocks-starter/` during `prepack`.
69
- - To sync locally without publishing:
44
+ Every project begins with the same visible proof: rendered in a worker, shaders
45
+ precompiled, and `src/scene.ts` identified as the first edit. Its README lists
46
+ the live-development, capture, strict-build, text, status, and browser-smoke
47
+ commands, and the generated root includes `NOTICE` without inventing a second
48
+ license file.
70
49
 
71
- ```bash
72
- pnpm --filter create-three-blocks-starter run dev:sync
73
- ```
50
+ ## License
74
51
 
75
- ## Publish
52
+ Free for personal and noncommercial projects. Commercial projects are covered
53
+ by the Pro plan's lifetime license — each project you start while your plan is
54
+ active is licensed forever, for the versions released while it was active. No
55
+ runtime gating.
76
56
 
77
- ```bash
78
- npx -y three-blocks-login@latest --mode project --scope @three-blocks
79
- pnpm --filter create-three-blocks-starter publish --access restricted
80
- ```
57
+ The scaffolder and template source use the
58
+ [PolyForm Noncommercial 1.0.0 license](./LICENSE). Full commercial terms are at
59
+ [threejs-blocks.com/license](https://threejs-blocks.com/license).
@@ -0,0 +1,54 @@
1
+ import { type ArtifactStatus, type CompatibilityVersions, type GeneratedFile, type TemplateName } from './types.js';
2
+ declare const SHADER_COMPATIBILITY: "three-webgpu-r185-v1";
3
+ declare const SHADER_ADDRESS_VERSION: 2;
4
+ declare const SHADER_RECIPE_VERSION: 1;
5
+ declare const SHADER_HYDRATION_VERSION: 2;
6
+ declare const SHADER_TRANSFORM_VERSION: 3;
7
+ interface ShaderCoverage {
8
+ readonly render: number;
9
+ readonly vertex: number;
10
+ readonly fragment: number;
11
+ readonly compute: number;
12
+ }
13
+ interface ShaderSceneReceipt {
14
+ readonly artifact: string;
15
+ readonly artifactHash: string;
16
+ readonly bytes: number;
17
+ readonly inputs: Readonly<Record<string, string>>;
18
+ readonly coverage: ShaderCoverage;
19
+ readonly skipped: {
20
+ readonly render: number;
21
+ readonly compute: number;
22
+ };
23
+ }
24
+ interface ShaderReceipt {
25
+ readonly schemaVersion: 2;
26
+ readonly runtime: Pick<CompatibilityVersions, 'three' | 'threeBlocks'> & {
27
+ readonly threeBlocksShaderClosure: string;
28
+ };
29
+ readonly tool: {
30
+ readonly name: '@three-blocks/devtools';
31
+ readonly version: string;
32
+ readonly compatibility: typeof SHADER_COMPATIBILITY;
33
+ readonly transform: typeof SHADER_TRANSFORM_VERSION;
34
+ readonly address: typeof SHADER_ADDRESS_VERSION;
35
+ readonly recipe: typeof SHADER_RECIPE_VERSION;
36
+ readonly hydration: typeof SHADER_HYDRATION_VERSION;
37
+ };
38
+ readonly scenes: Readonly<Record<string, ShaderSceneReceipt>>;
39
+ }
40
+ interface LoadedShaderArtifact {
41
+ readonly status: ArtifactStatus;
42
+ readonly files: readonly GeneratedFile[];
43
+ readonly note: string;
44
+ }
45
+ /** Validate the exact pair emitted by public shader capture before it can become a fresh catalog payload. */
46
+ export declare function validateShaderArtifactPayload(template: TemplateName, manifest: string | Uint8Array, metadata: string | Uint8Array, versions?: Pick<CompatibilityVersions, 'three' | 'threeBlocks'>): ShaderReceipt;
47
+ export declare function shaderArtifactPaths(template: TemplateName): readonly string[];
48
+ export declare function shaderArtifactFiles(template: TemplateName): readonly GeneratedFile[];
49
+ export declare function shaderArtifactState(template: TemplateName): Pick<LoadedShaderArtifact, 'status' | 'note'>;
50
+ /** Prove that a fresh payload was captured from the exact fully composed generated template. */
51
+ export declare function validateShaderArtifactProject(template: TemplateName, files: ReadonlyMap<string, GeneratedFile>, versions: Pick<CompatibilityVersions, 'three' | 'threeBlocks'>): void;
52
+ export declare function textArtifactFiles(): readonly GeneratedFile[];
53
+ export declare const textArtifactPaths: readonly string[];
54
+ export {};