create-threejs-game 1.0.4 → 1.0.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.
- package/README.md +58 -52
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,70 +2,67 @@
|
|
|
2
2
|
|
|
3
3
|
Scaffold a Three.js game project with AI-assisted design documents.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx create-threejs-game my-game
|
|
9
|
-
cd my-game
|
|
10
|
-
# Add assets to public/assets/my_game/
|
|
11
|
-
node scripts/pipeline.js
|
|
12
|
-
```
|
|
5
|
+
## Prerequisites
|
|
13
6
|
|
|
14
|
-
|
|
7
|
+
Before running the CLI, have these ready:
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
### 1. 3D Assets (Required)
|
|
10
|
+
Download a GLTF asset pack from:
|
|
11
|
+
- [itch.io](https://itch.io/game-assets/tag-3d)
|
|
12
|
+
- [Kenney.nl](https://kenney.nl/assets)
|
|
13
|
+
- [Quaternius](https://quaternius.com/)
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
- **Automation scripts** to generate:
|
|
20
|
-
- Asset index (assets.json)
|
|
21
|
-
- Concept mockup (via Google AI Studio)
|
|
22
|
-
- Product Requirements Document (PRD)
|
|
23
|
-
- Technical Design Document (TDD)
|
|
24
|
-
- Implementation plan
|
|
25
|
-
- **Prompt templates** for each generation step
|
|
15
|
+
The CLI will ask for the path to your downloaded assets folder and validate it contains `.gltf` or `.glb` files.
|
|
26
16
|
|
|
27
|
-
|
|
17
|
+
### 2. Preview Image (Recommended)
|
|
18
|
+
Most asset packs include a `Preview.jpg`. If not, take a screenshot of your assets. This is used by the AI to generate concept mockups.
|
|
28
19
|
|
|
29
|
-
|
|
20
|
+
### 3. API Keys (Required for automation)
|
|
21
|
+
Set these as environment variables for the smoothest experience:
|
|
30
22
|
|
|
31
23
|
```bash
|
|
32
|
-
|
|
24
|
+
export GOOGLE_API_KEY="your-key" # or GOOGLE_AI_STUDIO_API_KEY
|
|
25
|
+
export ANTHROPIC_API_KEY="your-key"
|
|
33
26
|
```
|
|
34
27
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
3. API keys (only if not found in environment)
|
|
39
|
-
|
|
40
|
-
**Supported environment variables:**
|
|
41
|
-
- `GOOGLE_API_KEY` or `GOOGLE_AI_STUDIO_API_KEY`
|
|
42
|
-
- `ANTHROPIC_API_KEY`
|
|
43
|
-
|
|
44
|
-
## Manual Steps
|
|
28
|
+
Get keys from:
|
|
29
|
+
- [Google AI Studio](https://aistudio.google.com/) - free tier available
|
|
30
|
+
- [Anthropic Console](https://console.anthropic.com/)
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
If not set, the CLI will prompt for them.
|
|
47
33
|
|
|
48
|
-
|
|
49
|
-
- Download from itch.io, Kenney.nl, Quaternius, etc.
|
|
50
|
-
- GLTF format preferred
|
|
51
|
-
|
|
52
|
-
2. **Add Preview.jpg** to the assets folder
|
|
53
|
-
- Most asset packs include one
|
|
54
|
-
- Or screenshot your assets
|
|
34
|
+
## Quick Start
|
|
55
35
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
36
|
+
```bash
|
|
37
|
+
npx create-threejs-game
|
|
38
|
+
```
|
|
59
39
|
|
|
60
|
-
|
|
40
|
+
The CLI will:
|
|
41
|
+
1. Ask for your **project name**
|
|
42
|
+
2. Ask for a **game description** (1-3 sentences describing your game)
|
|
43
|
+
3. Check for **API keys** (from env vars, or prompt if missing)
|
|
44
|
+
4. Ask for **path to your assets folder** (required for automation)
|
|
45
|
+
5. Validate everything and tell you if anything is missing
|
|
46
|
+
6. Create your project with assets copied in
|
|
61
47
|
|
|
62
|
-
|
|
48
|
+
Then run the automation:
|
|
63
49
|
|
|
64
50
|
```bash
|
|
51
|
+
cd my-game
|
|
65
52
|
node scripts/pipeline.js
|
|
66
53
|
```
|
|
67
54
|
|
|
68
|
-
|
|
55
|
+
## What Gets Generated
|
|
56
|
+
|
|
57
|
+
The automation pipeline creates:
|
|
58
|
+
|
|
59
|
+
| Step | Output | AI Service |
|
|
60
|
+
|------|--------|------------|
|
|
61
|
+
| Asset Index | `public/assets/{game}/assets.json` | Local script |
|
|
62
|
+
| Concept Mockup | `public/{game}/concept.jpg` | Google AI Studio |
|
|
63
|
+
| PRD | `docs/prd.md` | Claude (Anthropic) |
|
|
64
|
+
| TDD | `docs/tdd.md` | Claude (Anthropic) |
|
|
65
|
+
| Execution Plan | `plans/plan.md` | Claude (Anthropic) |
|
|
69
66
|
|
|
70
67
|
## Project Structure
|
|
71
68
|
|
|
@@ -75,22 +72,31 @@ my-game/
|
|
|
75
72
|
├── .codex/skills/ # Three.js skills for Codex
|
|
76
73
|
├── docs/ # Generated PRD and TDD
|
|
77
74
|
├── plans/ # Generated implementation plans
|
|
78
|
-
├── prompts/ #
|
|
75
|
+
├── prompts/ # Prompt templates (fallback/reference)
|
|
79
76
|
├── public/
|
|
80
|
-
│
|
|
77
|
+
│ ├── {game}/
|
|
78
|
+
│ │ └── concept.jpg # Generated mockup
|
|
79
|
+
│ └── assets/{game}/ # Your 3D assets (copied by CLI)
|
|
81
80
|
├── scripts/
|
|
82
|
-
│ ├── config.json #
|
|
81
|
+
│ ├── config.json # API keys and game config
|
|
83
82
|
│ ├── pipeline.js # Run full automation
|
|
84
83
|
│ └── generate-*.js # Individual generators
|
|
85
|
-
└── README.md
|
|
84
|
+
└── README.md
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Final Step
|
|
88
|
+
|
|
89
|
+
After the pipeline completes, open your project in Claude Code or Cursor and follow the generated execution plan:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Please proceed with implementing based on the plan in plans/plan.md
|
|
86
93
|
```
|
|
87
94
|
|
|
88
95
|
## Requirements
|
|
89
96
|
|
|
90
97
|
- Node.js 18+
|
|
91
|
-
- API keys (
|
|
92
|
-
|
|
93
|
-
- [Anthropic](https://console.anthropic.com/) - API access required
|
|
98
|
+
- API keys (see Prerequisites)
|
|
99
|
+
- 3D assets in GLTF format
|
|
94
100
|
|
|
95
101
|
## License
|
|
96
102
|
|