incanto 0.57.0 → 0.58.0

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 (63) hide show
  1. package/README.md +6 -4
  2. package/bin/incanto-check.mjs +27 -0
  3. package/bin/incanto-new.mjs +29 -7
  4. package/bin/incanto-playtest.mjs +28 -2
  5. package/bin/incanto-verify.mjs +87 -15
  6. package/bin/incanto.mjs +106 -0
  7. package/dist/2d.js +2 -2
  8. package/dist/3d.js +2 -2
  9. package/dist/{create-game-DpbUrMOQ.js → create-game-BZwWJIns.js} +1 -1
  10. package/dist/{create-game-C5jQYPah.js → create-game-D10bU5_J.js} +56 -8
  11. package/dist/index.js +1 -1
  12. package/dist/{physics-2d-BLcvEFDR.js → physics-2d-EqA-jddf.js} +2 -1
  13. package/dist/{physics-3d-QBrfIT2Y.js → physics-3d-Dnz4fsXX.js} +2 -1
  14. package/dist/quiet-rapier-BAJ4K94N.js +46 -0
  15. package/dist/react.js +1 -1
  16. package/dist/{src-CGjmPw65.js → src-C1J09Op6.js} +1 -1
  17. package/dist/{test-it1VekWs.js → test-ZBga8kQ9.js} +36 -10
  18. package/dist/test.d.ts +1 -1
  19. package/dist/test.js +1 -1
  20. package/dist/vite.js +2 -2
  21. package/editor/assets/{agent8-CGT7r3Mb.js → agent8-BQQjE9UQ.js} +1 -1
  22. package/editor/assets/{debug-BxWSIHG3.js → debug-C9UCsXBS.js} +1 -1
  23. package/editor/assets/{index-CV1m-aX5.js → index-CBgfM3WD.js} +51 -51
  24. package/editor/index.html +1 -1
  25. package/package.json +2 -1
  26. package/skills/incanto-building-2d-games.md +13 -0
  27. package/skills/incanto-building-3d-games.md +3 -3
  28. package/skills/incanto-playtesting.md +19 -5
  29. package/skills/incanto-verifying-your-game.md +11 -4
  30. package/templates-app/beacon-isle-3d/package.json +1 -1
  31. package/templates-app/beacon-isle-3d/src/game.scene.json +7 -6
  32. package/templates-app/platformer-2d/PROJECT/Context.md +70 -0
  33. package/templates-app/platformer-2d/PROJECT/Requirements.md +63 -0
  34. package/templates-app/platformer-2d/PROJECT/Status.md +60 -0
  35. package/templates-app/platformer-2d/PROJECT/Structure.md +77 -0
  36. package/templates-app/platformer-2d/docs/project-2d-rules.md +61 -0
  37. package/templates-app/platformer-2d/index.html +99 -0
  38. package/templates-app/platformer-2d/package.json +23 -0
  39. package/templates-app/platformer-2d/src/behaviors.ts +541 -0
  40. package/templates-app/platformer-2d/src/game.scene.json +2061 -0
  41. package/templates-app/platformer-2d/src/main.ts +68 -0
  42. package/templates-app/platformer-2d/tsconfig.json +13 -0
  43. package/templates-app/platformer-2d/verify.ts +275 -0
  44. package/templates-app/platformer-2d/vite.config.ts +12 -0
  45. package/templates-app/star-survivor/PROJECT/Context.md +55 -0
  46. package/templates-app/star-survivor/PROJECT/Requirements.md +47 -0
  47. package/templates-app/star-survivor/PROJECT/Status.md +44 -0
  48. package/templates-app/star-survivor/PROJECT/Structure.md +63 -0
  49. package/templates-app/star-survivor/docs/project-2d-rules.md +53 -0
  50. package/templates-app/star-survivor/index.html +232 -0
  51. package/templates-app/star-survivor/package.json +23 -0
  52. package/templates-app/star-survivor/src/behaviors.ts +624 -0
  53. package/templates-app/star-survivor/src/game.scene.json +464 -0
  54. package/templates-app/star-survivor/src/main.ts +49 -0
  55. package/templates-app/star-survivor/tsconfig.json +13 -0
  56. package/templates-app/star-survivor/verify.ts +193 -0
  57. package/templates-app/star-survivor/vite.config.ts +12 -0
  58. package/templates-app/tps-3d/package.json +1 -1
  59. package/templates-app/tps-3d/src/game.scene.json +6 -3
  60. package/templates-app/tps-3d/verify.ts +17 -1
  61. package/templates-app/village-quest-3d/package.json +1 -1
  62. package/templates-app/village-quest-3d/src/grove.scene.json +14 -13
  63. package/templates-app/village-quest-3d/src/village.scene.json +5 -5
@@ -0,0 +1,232 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect width=%22100%22 height=%22100%22 rx=%2220%22 fill=%22%236ee7dc%22/><text x=%2250%22 y=%2268%22 font-size=%2255%22 text-anchor=%22middle%22 font-family=%22Arial%22 font-weight=%22bold%22 fill=%22%230b0d14%22>in</text></svg>" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
7
+ <title>Hollow Horde — Incanto survivors</title>
8
+ <style>
9
+ html,
10
+ body {
11
+ margin: 0;
12
+ padding: 0;
13
+ height: 100%;
14
+ overflow: hidden;
15
+ font-family: Arial, sans-serif;
16
+ background: #0d1022;
17
+ color: #f4f4f4;
18
+ }
19
+ canvas {
20
+ display: block;
21
+ width: 100%;
22
+ height: 100%;
23
+ }
24
+ .loading-container {
25
+ position: fixed;
26
+ inset: 0;
27
+ z-index: 50;
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ background: #0d1022;
33
+ color: white;
34
+ }
35
+ .loading-title {
36
+ font-size: 1.5rem;
37
+ font-weight: bold;
38
+ margin-bottom: 1rem;
39
+ }
40
+ .spinner {
41
+ width: 30px;
42
+ height: 30px;
43
+ border: 3px solid rgba(255, 255, 255, 0.3);
44
+ border-radius: 50%;
45
+ border-top-color: white;
46
+ animation: spin 1s ease-in-out infinite;
47
+ }
48
+ @keyframes spin {
49
+ to {
50
+ transform: rotate(360deg);
51
+ }
52
+ }
53
+ /* ---- HUD ---- */
54
+ #hud {
55
+ position: fixed;
56
+ inset: 0;
57
+ z-index: 40;
58
+ pointer-events: none;
59
+ font-weight: bold;
60
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
61
+ }
62
+ .bar-track {
63
+ position: absolute;
64
+ height: 16px;
65
+ background: rgba(255, 255, 255, 0.12);
66
+ border-radius: 9999px;
67
+ overflow: hidden;
68
+ }
69
+ .bar-fill {
70
+ height: 100%;
71
+ width: 100%;
72
+ border-radius: 9999px;
73
+ transition: width 0.1s linear;
74
+ }
75
+ #hp-track {
76
+ left: 16px;
77
+ top: 16px;
78
+ width: 280px;
79
+ }
80
+ #hp-fill {
81
+ background: #6ee7dc;
82
+ }
83
+ #hp-text {
84
+ position: absolute;
85
+ left: 24px;
86
+ top: 15px;
87
+ font-size: 13px;
88
+ color: #06231f;
89
+ }
90
+ #xp-track {
91
+ left: 16px;
92
+ top: 40px;
93
+ width: 280px;
94
+ height: 10px;
95
+ }
96
+ #xp-fill {
97
+ background: #ffd166;
98
+ }
99
+ #level-text {
100
+ position: absolute;
101
+ left: 306px;
102
+ top: 14px;
103
+ font-size: 20px;
104
+ color: #ffd166;
105
+ }
106
+ #kills-text {
107
+ position: absolute;
108
+ left: 306px;
109
+ top: 38px;
110
+ font-size: 15px;
111
+ color: #ff8fa3;
112
+ }
113
+ #timer-text {
114
+ position: absolute;
115
+ top: 14px;
116
+ left: 50%;
117
+ transform: translateX(-50%);
118
+ font-size: 30px;
119
+ color: #eaf6ff;
120
+ }
121
+ #hint {
122
+ position: absolute;
123
+ bottom: 12px;
124
+ left: 50%;
125
+ transform: translateX(-50%);
126
+ font-size: 13px;
127
+ font-weight: normal;
128
+ color: rgba(255, 255, 255, 0.6);
129
+ }
130
+ /* ---- level-up overlay ---- */
131
+ #levelup {
132
+ position: fixed;
133
+ inset: 0;
134
+ z-index: 60;
135
+ display: none;
136
+ flex-direction: column;
137
+ align-items: center;
138
+ justify-content: center;
139
+ gap: 1.4rem;
140
+ background: rgba(8, 10, 22, 0.78);
141
+ }
142
+ #levelup-title {
143
+ font-size: 2rem;
144
+ font-weight: bold;
145
+ color: #ffd166;
146
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
147
+ }
148
+ #levelup-level {
149
+ font-size: 1rem;
150
+ color: #9fb6d8;
151
+ margin-top: -1rem;
152
+ }
153
+ #levelup-cards {
154
+ display: flex;
155
+ gap: 1rem;
156
+ flex-wrap: wrap;
157
+ justify-content: center;
158
+ max-width: 720px;
159
+ }
160
+ .lvl-card {
161
+ width: 200px;
162
+ padding: 1.4rem 1rem;
163
+ font-size: 1.05rem;
164
+ font-weight: bold;
165
+ color: #eaf6ff;
166
+ background: #1b2247;
167
+ border: 2px solid #3a4a86;
168
+ border-radius: 14px;
169
+ cursor: pointer;
170
+ transition: transform 0.08s, border-color 0.08s, background 0.08s;
171
+ }
172
+ .lvl-card:hover {
173
+ transform: translateY(-4px);
174
+ border-color: #ffd166;
175
+ background: #233063;
176
+ }
177
+ /* ---- banner ---- */
178
+ #banner {
179
+ position: fixed;
180
+ inset: 0;
181
+ z-index: 55;
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ pointer-events: none;
186
+ font-size: 58px;
187
+ font-weight: bold;
188
+ color: #fff;
189
+ opacity: 0;
190
+ text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
191
+ transition: opacity 0.3s;
192
+ }
193
+ </style>
194
+ </head>
195
+ <body>
196
+ <div class="loading-container" id="loading">
197
+ <h2 class="loading-title">Hollow Horde</h2>
198
+ <div class="spinner"></div>
199
+ </div>
200
+ <canvas id="game"></canvas>
201
+ <div id="hud">
202
+ <div class="bar-track" id="hp-track"><div class="bar-fill" id="hp-fill"></div></div>
203
+ <div id="hp-text">100</div>
204
+ <div class="bar-track" id="xp-track"><div class="bar-fill" id="xp-fill" style="width: 0%"></div></div>
205
+ <div id="level-text">LV 1</div>
206
+ <div id="kills-text">☠ 0</div>
207
+ <div id="timer-text">1:30</div>
208
+ <div id="hint">WASD / arrows to move · you auto-attack · grab XP · survive 90s</div>
209
+ </div>
210
+ <div id="levelup">
211
+ <div id="levelup-title">LEVEL UP!</div>
212
+ <div id="levelup-level">Level 2</div>
213
+ <div id="levelup-cards"></div>
214
+ </div>
215
+ <div id="banner"></div>
216
+ <script>
217
+ // agent8 embed harness: report the game size to a hosting iframe parent.
218
+ function postGameSize() {
219
+ window.parent.postMessage(
220
+ { type: 'GAME_SIZE_RESPONSE', width: document.body.scrollWidth, height: document.body.scrollHeight },
221
+ '*',
222
+ );
223
+ }
224
+ window.addEventListener('load', postGameSize);
225
+ window.addEventListener('resize', postGameSize);
226
+ window.addEventListener('message', (e) => {
227
+ if (e.data && e.data.type === 'REQUEST_GAME_SIZE') postGameSize();
228
+ });
229
+ </script>
230
+ <script type="module" src="/src/main.ts"></script>
231
+ </body>
232
+ </html>
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "star-survivor",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "typecheck": "tsc --noEmit",
9
+ "check": "incanto-check src",
10
+ "verify": "bun verify.ts"
11
+ },
12
+ "dependencies": {
13
+ "@dimforge/rapier2d-compat": "0.19.3",
14
+ "incanto": "^0.58.0",
15
+ "three": "^0.184.0"
16
+ },
17
+ "devDependencies": {
18
+ "@types/node": "^24.0.0",
19
+ "@types/three": "^0.184.1",
20
+ "typescript": "^6.0.3",
21
+ "vite": "^8.0.16"
22
+ }
23
+ }