create-threenative 0.2.4 → 0.2.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 (58) hide show
  1. package/README.md +23 -1
  2. package/agent-docs/references/assertion-reference.md +40 -1
  3. package/agent-docs/references/capability-reference.md +972 -66
  4. package/agent-docs/references/finding-assets.md +8 -1
  5. package/agent-docs/references/performance-basics.md +114 -0
  6. package/agent-docs/references/rigging-characters.md +51 -0
  7. package/agent-docs/references/webview-ui.md +3 -2
  8. package/agent-files/.agents/skills/ponytail/SKILL.md +68 -0
  9. package/agent-files/.agents/skills/threenative-assets/SKILL.md +8 -0
  10. package/agent-files/.agents/skills/threenative-context/SKILL.md +8 -0
  11. package/agent-files/.agents/skills/threenative-performance/SKILL.md +26 -10
  12. package/agent-files/.claude/hooks/ponytail-context.mjs +51 -0
  13. package/agent-files/.claude/settings.json +38 -0
  14. package/agent-files/.claude/skills/ponytail/SKILL.md +68 -0
  15. package/agent-files/.claude/skills/threenative-assets/SKILL.md +8 -0
  16. package/agent-files/.claude/skills/threenative-context/SKILL.md +8 -0
  17. package/agent-files/.claude/skills/threenative-performance/SKILL.md +26 -10
  18. package/agent-files/.codex/hooks.json +40 -0
  19. package/capabilities.json +1344 -88
  20. package/dist/index.d.ts +10 -1
  21. package/dist/index.js +186 -1
  22. package/dist/threenative.js +660 -150
  23. package/package.json +6 -6
  24. package/template-assets/patches/three@0.185.1.patch +179 -19
  25. package/templates/action-rpg/AGENTS.md +5 -5
  26. package/templates/action-rpg/CLAUDE.md +5 -5
  27. package/templates/action-rpg/package.json +8 -8
  28. package/templates/defense/AGENTS.md +5 -5
  29. package/templates/defense/CLAUDE.md +5 -5
  30. package/templates/defense/package.json +8 -8
  31. package/templates/minimal/AGENTS.md +5 -5
  32. package/templates/minimal/CLAUDE.md +5 -5
  33. package/templates/minimal/package.json +7 -7
  34. package/templates/minimal/threenative.config.ts +1 -0
  35. package/templates/platformer/AGENTS.md +5 -5
  36. package/templates/platformer/CLAUDE.md +5 -5
  37. package/templates/platformer/package.json +9 -9
  38. package/templates/puzzle/AGENTS.md +5 -5
  39. package/templates/puzzle/CLAUDE.md +5 -5
  40. package/templates/puzzle/package.json +8 -8
  41. package/templates/racing/AGENTS.md +5 -5
  42. package/templates/racing/CLAUDE.md +5 -5
  43. package/templates/racing/package.json +8 -8
  44. package/templates/runner/AGENTS.md +5 -5
  45. package/templates/runner/CLAUDE.md +5 -5
  46. package/templates/runner/package.json +8 -8
  47. package/templates/sailing/AGENTS.md +6 -6
  48. package/templates/sailing/CLAUDE.md +6 -6
  49. package/templates/sailing/package.json +8 -8
  50. package/templates/shooter/AGENTS.md +5 -5
  51. package/templates/shooter/CLAUDE.md +5 -5
  52. package/templates/shooter/package.json +8 -8
  53. package/templates/starter/AGENTS.md +8 -8
  54. package/templates/starter/CLAUDE.md +8 -8
  55. package/templates/starter/package.json +9 -9
  56. package/templates/starter/playtests/production-readiness.playtest.json +96 -0
  57. package/templates/starter/src/ui/Hud.tsx +2 -2
  58. package/templates/starter/src/ui/Menu.tsx +5 -1
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "starter-production-readiness",
3
+ "target": "web",
4
+ "schemaVersion": 1,
5
+ "viewport": {
6
+ "width": 1280,
7
+ "height": 720
8
+ },
9
+ "warmupFrames": 10,
10
+ "subject": "player",
11
+ "steps": [
12
+ {
13
+ "kind": "wait",
14
+ "label": "play-scene-loads",
15
+ "waitTicks": 600,
16
+ "release": true
17
+ },
18
+ {
19
+ "kind": "input",
20
+ "label": "collected",
21
+ "press": "ArrowRight",
22
+ "holdTicks": 100,
23
+ "release": true
24
+ },
25
+ {
26
+ "kind": "input",
27
+ "label": "restart",
28
+ "press": "KeyR",
29
+ "holdTicks": 1,
30
+ "release": true
31
+ },
32
+ {
33
+ "kind": "wait",
34
+ "label": "restarted",
35
+ "waitTicks": 120,
36
+ "release": true
37
+ },
38
+ {
39
+ "kind": "input",
40
+ "label": "moved-after-restart",
41
+ "press": "ArrowUp",
42
+ "holdTicks": 120,
43
+ "release": true
44
+ }
45
+ ],
46
+ "assert": {
47
+ "diagnostics": {
48
+ "noConsoleErrors": true,
49
+ "runtimeReady": true
50
+ },
51
+ "movement": {
52
+ "entity": "player",
53
+ "minAxisDelta": {
54
+ "axis": "-z",
55
+ "min": 0.5
56
+ }
57
+ },
58
+ "resources": [
59
+ {
60
+ "id": "state",
61
+ "path": "score",
62
+ "atSteps": [
63
+ {
64
+ "label": "collected",
65
+ "equals": 1
66
+ },
67
+ {
68
+ "label": "restarted",
69
+ "equals": 0
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "id": "state",
75
+ "path": "entityCount",
76
+ "atSteps": [
77
+ {
78
+ "label": "collected",
79
+ "equals": 3
80
+ },
81
+ {
82
+ "label": "restarted",
83
+ "equals": 4
84
+ }
85
+ ]
86
+ }
87
+ ],
88
+ "visibility": [
89
+ {
90
+ "allowTrivial": "The starter scene begins with the player visible and in frame; this held visibility row accompanies the movement and restart assertions.",
91
+ "entity": "player",
92
+ "minProjectedPixels": 20
93
+ }
94
+ ]
95
+ }
96
+ }
@@ -8,8 +8,8 @@ import type { GameState } from "../state.js";
8
8
  * phone or a desktop the same bundle renders in the platform's own web view over the game surface.
9
9
  * Style it however you like; nothing here is a vocabulary the framework has to understand.
10
10
  *
11
- * `useUiState` reads the game's *published* state, which moves at about 10 Hz rather than at the
12
- * frame rate, and is undefined until the game publishes its first snapshot.
11
+ * `useUiState` reads the game's *published* state, published once per rendered game frame by default,
12
+ * and is undefined until the game publishes its first snapshot.
13
13
  */
14
14
  export function Hud() {
15
15
  const state = useUiState<GameState>();
@@ -22,7 +22,10 @@ export function Menu() {
22
22
 
23
23
  return (
24
24
  <div className="pointer-events-none absolute bottom-6 left-6 flex items-center gap-3 border border-line bg-panel/75 px-4 py-3 text-[11px] uppercase tracking-[0.14em] text-dim">
25
- <span>WASD / arrows to move · space to jump the gap · reach the flag</span>
25
+ {/* The buttons lead the row so their positions are anchored to the panel's left edge, not to
26
+ the width the instruction text happens to render at on a given platform. The round-9
27
+ native HUD input proof pressed a fraction computed from this layout, and that fraction
28
+ landed on `restart` on Windows and `pause` on macOS because the text width differed. */}
26
29
  <button
27
30
  aria-pressed={paused}
28
31
  className="pointer-events-auto border border-line px-2 py-1 text-text hover:border-lume"
@@ -40,6 +43,7 @@ export function Menu() {
40
43
  >
41
44
  restart
42
45
  </button>
46
+ <span>WASD / arrows to move · space to jump the gap · reach the flag</span>
43
47
  </div>
44
48
  );
45
49
  }