@pix3/cli 1.6.0 → 1.6.2
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/LICENSE +201 -201
- package/README.md +788 -754
- package/dist/index.js +208 -203
- package/dist/runtime-types.json +1 -1
- package/dist/smoke/prebuilt/{chunk-J2SJVMDO.mjs → chunk-7MZGPAUK.mjs} +1 -1
- package/dist/smoke/prebuilt/chunk-7WOFGLW3.mjs +239 -0
- package/dist/smoke/prebuilt/runtime.mjs +1 -1
- package/dist/smoke/prebuilt/smoke-worker.mjs +1 -1
- package/dist/smoke/prebuilt/tree-defaults.mjs +1 -1
- package/dist/validate/prebuilt/bundle-main.js +13 -13
- package/dist/validate/prebuilt/chunk-HKG6YI6Y.js +239 -0
- package/dist/validate/prebuilt/runtime.js +1 -1
- package/kit/files/.claude/skills/pix3-nodes/SKILL.md +210 -210
- package/kit/files/.claude/skills/pix3-nodes/reference.md +32 -24
- package/kit/files/.claude/skills/pix3-scene-format/SKILL.md +238 -235
- package/kit/files/.claude/skills/pix3-scene-format/reference.md +28 -28
- package/kit/files/.claude/skills/pix3-scripts/SKILL.md +285 -281
- package/kit/files/.claude/skills/pix3-scripts/reference.md +69 -52
- package/kit/files/.claude/skills/pix3-verify/SKILL.md +298 -256
- package/kit/files/.claude/skills/pix3-verify/reference.md +21 -21
- package/kit/files/AGENTS.md +203 -203
- package/kit/files/CLAUDE.md +1 -1
- package/kit/kit.json +2 -2
- package/package.json +54 -54
- package/templates/empty-2d/files/README.md +20 -20
- package/templates/empty-2d/files/scenes/main.pix3scene +68 -68
- package/templates/empty-2d/template.yaml +7 -7
- package/templates/empty-3d/files/README.md +20 -20
- package/templates/empty-3d/files/scenes/main.pix3scene +108 -108
- package/templates/empty-3d/template.yaml +7 -7
- package/templates/idea-blank/files/README.md +22 -22
- package/templates/idea-blank/files/scenes/main.pix3scene +37 -37
- package/templates/idea-blank/template.yaml +10 -10
- package/templates/minigame-2d/files/README.md +44 -44
- package/templates/minigame-2d/files/design/tests/reachability.json +1 -1
- package/templates/minigame-2d/files/design/tests/routines/mute-music.json +44 -44
- package/templates/minigame-2d/files/scenes/main.pix3scene +84 -84
- package/templates/minigame-2d/files/scenes/menu.pix3scene +118 -118
- package/templates/minigame-2d/files/scenes/ui/settings-window.pix3scene +138 -138
- package/templates/minigame-2d/files/scripts/GameFlow.ts +133 -133
- package/templates/minigame-2d/files/scripts/MenuFlow.ts +217 -217
- package/templates/minigame-2d/files/scripts/SettingsWindow.ts +198 -198
- package/templates/minigame-2d/template.yaml +10 -10
- package/templates/playable-2d/files/README.md +30 -30
- package/templates/playable-2d/files/design/recipe.md +83 -83
- package/templates/playable-2d/files/design/tests/reachability.json +4 -4
- package/templates/playable-2d/files/design/tests/routines/intro-to-cta.json +32 -32
- package/templates/playable-2d/files/scenes/main.pix3scene +111 -111
- package/templates/playable-2d/files/scenes/ui/end-screen.pix3scene +91 -91
- package/templates/playable-2d/files/scenes/ui/intro.pix3scene +65 -65
- package/templates/playable-2d/files/scripts/GameFlow.ts +256 -256
- package/templates/playable-2d/template.yaml +9 -9
- package/templates/playable-3d/files/README.md +32 -32
- package/templates/playable-3d/files/design/recipe.md +127 -127
- package/templates/playable-3d/files/design/tests/reachability.json +4 -4
- package/templates/playable-3d/files/design/tests/routines/intro-to-cta.json +32 -32
- package/templates/playable-3d/files/scenes/main.pix3scene +230 -230
- package/templates/playable-3d/files/scenes/ui/end-screen.pix3scene +91 -91
- package/templates/playable-3d/files/scenes/ui/intro.pix3scene +65 -65
- package/templates/playable-3d/files/scripts/GameFlow.ts +309 -309
- package/templates/playable-3d/files/scripts/GameRules.ts +290 -290
- package/templates/playable-3d/files/scripts/ScoreHud.ts +113 -113
- package/templates/playable-3d/template.yaml +9 -9
- package/templates/recipe-arena-2d/files/README.md +48 -48
- package/templates/recipe-arena-2d/files/design/recipe.md +127 -127
- package/templates/recipe-arena-2d/files/scenes/main.pix3scene +292 -292
- package/templates/recipe-arena-2d/files/scenes/menu.pix3scene +100 -100
- package/templates/recipe-arena-2d/files/scenes/prefabs/hazard.pix3scene +42 -42
- package/templates/recipe-arena-2d/files/scenes/prefabs/pickup.pix3scene +45 -45
- package/templates/recipe-arena-2d/files/scenes/ui/result.pix3scene +85 -85
- package/templates/recipe-arena-2d/files/scripts/GameRules.ts +368 -368
- package/templates/recipe-arena-2d/files/scripts/MenuFlow.ts +106 -106
- package/templates/recipe-arena-2d/files/scripts/PlayerController.ts +151 -151
- package/templates/recipe-arena-2d/files/scripts/ScoreHud.ts +94 -94
- package/templates/recipe-arena-2d/files/scripts/Spawner.ts +214 -214
- package/templates/recipe-arena-2d/files/scripts/TouchRules.ts +174 -174
- package/templates/recipe-arena-2d/template.yaml +10 -10
- package/templates/recipe-blank-2d/files/README.md +61 -61
- package/templates/recipe-blank-2d/files/design/recipe.md +148 -148
- package/templates/recipe-blank-2d/files/design/tests/reachability.json +4 -4
- package/templates/recipe-blank-2d/files/design/tests/routines/restart.json +27 -27
- package/templates/recipe-blank-2d/files/scenes/main.pix3scene +224 -224
- package/templates/recipe-blank-2d/files/scenes/ui/result.pix3scene +85 -85
- package/templates/recipe-blank-2d/files/scripts/GameRules.ts +350 -350
- package/templates/recipe-blank-2d/files/scripts/ScoreHud.ts +110 -110
- package/templates/recipe-blank-2d/template.yaml +10 -10
- package/templates/recipe-bouncer-2d/files/README.md +81 -81
- package/templates/recipe-bouncer-2d/files/design/recipe.md +146 -146
- package/templates/recipe-bouncer-2d/files/scenes/main.pix3scene +615 -615
- package/templates/recipe-bouncer-2d/files/scenes/menu.pix3scene +191 -191
- package/templates/recipe-bouncer-2d/files/scenes/ui/result.pix3scene +87 -87
- package/templates/recipe-bouncer-2d/files/scripts/BallBody.ts +298 -298
- package/templates/recipe-bouncer-2d/files/scripts/GameRules.ts +377 -377
- package/templates/recipe-bouncer-2d/files/scripts/MenuFlow.ts +109 -109
- package/templates/recipe-bouncer-2d/files/scripts/PaddleController.ts +112 -112
- package/templates/recipe-bouncer-2d/files/scripts/ScoreHud.ts +94 -94
- package/templates/recipe-bouncer-2d/files/scripts/TouchRules.ts +263 -263
- package/templates/recipe-bouncer-2d/files/scripts/ball-collision.ts +307 -307
- package/templates/recipe-bouncer-2d/template.yaml +10 -10
- package/templates/recipe-grid-3d/files/README.md +22 -22
- package/templates/recipe-grid-3d/files/design/recipe.md +110 -110
- package/templates/recipe-grid-3d/files/scenes/main.pix3scene +169 -169
- package/templates/recipe-grid-3d/files/scenes/menu.pix3scene +100 -100
- package/templates/recipe-grid-3d/files/scenes/ui/result.pix3scene +105 -105
- package/templates/recipe-grid-3d/files/scripts/GridBoard.ts +319 -319
- package/templates/recipe-grid-3d/files/scripts/GridRules.ts +278 -278
- package/templates/recipe-grid-3d/files/scripts/MenuFlow.ts +106 -106
- package/templates/recipe-grid-3d/files/scripts/ScoreHud.ts +94 -94
- package/templates/recipe-grid-3d/template.yaml +10 -10
- package/templates/recipe-tapper-2d/files/README.md +39 -39
- package/templates/recipe-tapper-2d/files/design/recipe.md +132 -132
- package/templates/recipe-tapper-2d/files/design/tests/reachability.json +4 -4
- package/templates/recipe-tapper-2d/files/design/tests/routines/terminal-retry.json +23 -23
- package/templates/recipe-tapper-2d/files/scenes/main.pix3scene +269 -269
- package/templates/recipe-tapper-2d/files/scenes/menu.pix3scene +100 -100
- package/templates/recipe-tapper-2d/files/scenes/prefabs/hazard.pix3scene +42 -42
- package/templates/recipe-tapper-2d/files/scenes/prefabs/target.pix3scene +45 -45
- package/templates/recipe-tapper-2d/files/scenes/ui/result.pix3scene +85 -85
- package/templates/recipe-tapper-2d/files/scripts/GameRules.ts +368 -368
- package/templates/recipe-tapper-2d/files/scripts/MenuFlow.ts +106 -106
- package/templates/recipe-tapper-2d/files/scripts/ScoreHud.ts +94 -94
- package/templates/recipe-tapper-2d/files/scripts/Spawner.ts +214 -214
- package/templates/recipe-tapper-2d/files/scripts/TouchRules.ts +192 -192
- package/templates/recipe-tapper-2d/template.yaml +10 -10
- package/dist/smoke/prebuilt/chunk-OJXQXIIQ.mjs +0 -239
- package/dist/validate/prebuilt/chunk-BS2OZM7U.js +0 -239
|
@@ -1,224 +1,224 @@
|
|
|
1
|
-
# Pix3 Scene File (YAML)
|
|
2
|
-
# Blank 2D — the GAME scene, and the one to build in. There is no menu scene on
|
|
3
|
-
# purpose: nothing should stand between opening the project and the gameplay
|
|
4
|
-
# while the mechanic is still being found.
|
|
5
|
-
#
|
|
6
|
-
# What is already wired: score / lives / timer bookkeeping, the HUD that shows
|
|
7
|
-
# them, and a win/lose overlay with RETRY. What is NOT here: any mechanic at all,
|
|
8
|
-
# including controls. That is your first increment — build it inside `board`.
|
|
9
|
-
#
|
|
10
|
-
# Stable node ids (design/recipe.md is the contract — do not rename these):
|
|
11
|
-
# post-fx, game-root, game-background, bg-glow, board, board-floor,
|
|
12
|
-
# hud, score-label, time-label, lives-bar,
|
|
13
|
-
# result-overlay, result-dim, result-label, retry-button (scenes/ui/result.pix3scene)
|
|
14
|
-
#
|
|
15
|
-
# The look is two cheap ingredients, the same ones the bouncer recipe uses:
|
|
16
|
-
# 1. `post-fx` (PostProcess, affect2D) — bloom picks up whatever is bright, so
|
|
17
|
-
# a bright sprite glows for free. `bloomIntensity` is a recipe tunable the
|
|
18
|
-
# Flow theme pack turns up for neon and down for pastel.
|
|
19
|
-
# 2. `bg-glow` — a near-white radial-gradient placeholder (`sprites/ph-bg.png`)
|
|
20
|
-
# tinted with the palette background, over the darkest ColorRect. It is what
|
|
21
|
-
# keeps an empty field from reading as a grey slab.
|
|
22
|
-
#
|
|
23
|
-
# The win/lose overlay lives in its own file under scenes/ui/ and is instanced
|
|
24
|
-
# here hidden (`visible: false` = editor only), so opening this scene shows the
|
|
25
|
-
# field rather than a GAME OVER card.
|
|
26
|
-
#
|
|
27
|
-
# 2D coordinates: origin at the canvas centre, X right, Y UP. Node order in the
|
|
28
|
-
# tree is paint order (later/deeper draws on top).
|
|
29
|
-
version: 1.0.0
|
|
30
|
-
metadata:
|
|
31
|
-
author: Pix3 Recipe
|
|
32
|
-
description: Blank gameplay field — bookkeeping, HUD and win/lose only; the mechanic is yours
|
|
33
|
-
root:
|
|
34
|
-
- id: post-fx
|
|
35
|
-
type: PostProcess
|
|
36
|
-
name: Post FX
|
|
37
|
-
properties:
|
|
38
|
-
affect2D: true
|
|
39
|
-
bloomEnabled: true
|
|
40
|
-
bloomIntensity: 0.8
|
|
41
|
-
bloomThreshold: 0.6
|
|
42
|
-
bloomSmoothing: 0.2
|
|
43
|
-
bloomRadius: 0.75
|
|
44
|
-
vignetteEnabled: true
|
|
45
|
-
vignetteOffset: 0.3
|
|
46
|
-
vignetteDarkness: 0.45
|
|
47
|
-
chromaticAberrationEnabled: false
|
|
48
|
-
children: []
|
|
49
|
-
- id: game-root
|
|
50
|
-
type: Group2D
|
|
51
|
-
name: Game Root
|
|
52
|
-
properties:
|
|
53
|
-
width: 1080
|
|
54
|
-
height: 1920
|
|
55
|
-
layout:
|
|
56
|
-
enabled: true
|
|
57
|
-
horizontalAlign: stretch
|
|
58
|
-
verticalAlign: stretch
|
|
59
|
-
components:
|
|
60
|
-
- id: game-rules
|
|
61
|
-
type: user:GameRules
|
|
62
|
-
enabled: true
|
|
63
|
-
config:
|
|
64
|
-
winMode: score
|
|
65
|
-
targetScore: 10
|
|
66
|
-
timeLimitSec: 0
|
|
67
|
-
startingLives: 3
|
|
68
|
-
resultNode: result-overlay
|
|
69
|
-
resultLabel: result-label
|
|
70
|
-
winText: "YOU WIN!"
|
|
71
|
-
loseText: "GAME OVER"
|
|
72
|
-
retryButton: retry-button
|
|
73
|
-
gameScene: res://scenes/main.pix3scene
|
|
74
|
-
# Add your mechanic's nodes here (comma-separated) so they stop on game over.
|
|
75
|
-
freezeNodes: ""
|
|
76
|
-
children:
|
|
77
|
-
- id: game-background
|
|
78
|
-
type: ColorRect2D
|
|
79
|
-
name: Game Background
|
|
80
|
-
properties:
|
|
81
|
-
width: 1080
|
|
82
|
-
height: 1920
|
|
83
|
-
color: "#12141c"
|
|
84
|
-
transform:
|
|
85
|
-
position: [0, 0]
|
|
86
|
-
scale: [1, 1]
|
|
87
|
-
rotation: 0
|
|
88
|
-
layout:
|
|
89
|
-
enabled: true
|
|
90
|
-
horizontalAlign: stretch
|
|
91
|
-
verticalAlign: stretch
|
|
92
|
-
children: []
|
|
93
|
-
# Radial glow over the flat background. Near-white PNG + core:tint, so the
|
|
94
|
-
# T0 palette recolours it (role `background` in design/recipe.md).
|
|
95
|
-
- id: bg-glow
|
|
96
|
-
type: Sprite2D
|
|
97
|
-
name: Background Glow
|
|
98
|
-
properties:
|
|
99
|
-
texture: { type: 'texture', url: 'res://sprites/ph-bg.png' }
|
|
100
|
-
width: 1080
|
|
101
|
-
height: 1920
|
|
102
|
-
opacity: 0.85
|
|
103
|
-
effects:
|
|
104
|
-
- type: core:tint
|
|
105
|
-
params: { color: "#3a2f7a", amount: 1 }
|
|
106
|
-
transform:
|
|
107
|
-
position: [0, 0]
|
|
108
|
-
scale: [1, 1]
|
|
109
|
-
rotation: 0
|
|
110
|
-
layout:
|
|
111
|
-
enabled: true
|
|
112
|
-
horizontalAlign: stretch
|
|
113
|
-
verticalAlign: stretch
|
|
114
|
-
children: []
|
|
115
|
-
- id: board
|
|
116
|
-
type: Group2D
|
|
117
|
-
name: Board
|
|
118
|
-
properties:
|
|
119
|
-
width: 980
|
|
120
|
-
height: 1480
|
|
121
|
-
transform:
|
|
122
|
-
position: [0, -80]
|
|
123
|
-
scale: [1, 1]
|
|
124
|
-
rotation: 0
|
|
125
|
-
children:
|
|
126
|
-
- id: board-floor
|
|
127
|
-
type: ColorRect2D
|
|
128
|
-
name: Board Floor
|
|
129
|
-
properties:
|
|
130
|
-
width: 980
|
|
131
|
-
height: 1480
|
|
132
|
-
color: "#1d212e"
|
|
133
|
-
transform:
|
|
134
|
-
position: [0, 0]
|
|
135
|
-
scale: [1, 1]
|
|
136
|
-
rotation: 0
|
|
137
|
-
children: []
|
|
138
|
-
- id: hud
|
|
139
|
-
type: CanvasLayer2D
|
|
140
|
-
name: HUD
|
|
141
|
-
properties:
|
|
142
|
-
width: 1080
|
|
143
|
-
height: 1920
|
|
144
|
-
layout:
|
|
145
|
-
enabled: true
|
|
146
|
-
horizontalAlign: stretch
|
|
147
|
-
verticalAlign: stretch
|
|
148
|
-
components:
|
|
149
|
-
- id: score-hud
|
|
150
|
-
type: user:ScoreHud
|
|
151
|
-
enabled: true
|
|
152
|
-
config:
|
|
153
|
-
sourceNode: game-root
|
|
154
|
-
scoreLabel: score-label
|
|
155
|
-
scoreFormat: "SCORE {value}"
|
|
156
|
-
timeLabel: time-label
|
|
157
|
-
timeFormat: "{value}"
|
|
158
|
-
livesBar: lives-bar
|
|
159
|
-
children:
|
|
160
|
-
- id: score-label
|
|
161
|
-
type: Label2D
|
|
162
|
-
name: Score Label
|
|
163
|
-
properties:
|
|
164
|
-
label: "SCORE 0"
|
|
165
|
-
labelFontSize: 44
|
|
166
|
-
labelColor: "#ffffff"
|
|
167
|
-
labelAlign: left
|
|
168
|
-
transform:
|
|
169
|
-
position: [-340, 850]
|
|
170
|
-
scale: [1, 1]
|
|
171
|
-
rotation: 0
|
|
172
|
-
layout:
|
|
173
|
-
enabled: true
|
|
174
|
-
horizontalAlign: left
|
|
175
|
-
verticalAlign: top
|
|
176
|
-
children: []
|
|
177
|
-
- id: time-label
|
|
178
|
-
type: Label2D
|
|
179
|
-
name: Time Label
|
|
180
|
-
properties:
|
|
181
|
-
label: "0"
|
|
182
|
-
labelFontSize: 44
|
|
183
|
-
labelColor: "#f5ae39"
|
|
184
|
-
labelAlign: center
|
|
185
|
-
transform:
|
|
186
|
-
position: [0, 850]
|
|
187
|
-
scale: [1, 1]
|
|
188
|
-
rotation: 0
|
|
189
|
-
layout:
|
|
190
|
-
enabled: true
|
|
191
|
-
horizontalAlign: center
|
|
192
|
-
verticalAlign: top
|
|
193
|
-
children: []
|
|
194
|
-
- id: lives-bar
|
|
195
|
-
type: Bar2D
|
|
196
|
-
name: Lives Bar
|
|
197
|
-
properties:
|
|
198
|
-
width: 240
|
|
199
|
-
height: 28
|
|
200
|
-
minValue: 0
|
|
201
|
-
maxValue: 3
|
|
202
|
-
value: 3
|
|
203
|
-
barColor: "#ff4d6d"
|
|
204
|
-
backBackgroundColor: "#2a3352"
|
|
205
|
-
showBorder: false
|
|
206
|
-
transform:
|
|
207
|
-
position: [340, 855]
|
|
208
|
-
scale: [1, 1]
|
|
209
|
-
rotation: 0
|
|
210
|
-
layout:
|
|
211
|
-
enabled: true
|
|
212
|
-
horizontalAlign: right
|
|
213
|
-
verticalAlign: top
|
|
214
|
-
children: []
|
|
215
|
-
# Win/lose screen — authored in scenes/ui/result.pix3scene so this
|
|
216
|
-
# scene opens on the GAME, not on a GAME OVER card. `visible: false`
|
|
217
|
-
# hides it in the EDITOR only; `initiallyVisible` (in the overlay
|
|
218
|
-
# file) is what play mode reads, and GameRules reveals it on the
|
|
219
|
-
# win/lose transition. Tick the eye to preview it over the field.
|
|
220
|
-
- id: result-overlay
|
|
221
|
-
name: Result Overlay
|
|
222
|
-
instance: res://scenes/ui/result.pix3scene
|
|
223
|
-
properties:
|
|
224
|
-
visible: false
|
|
1
|
+
# Pix3 Scene File (YAML)
|
|
2
|
+
# Blank 2D — the GAME scene, and the one to build in. There is no menu scene on
|
|
3
|
+
# purpose: nothing should stand between opening the project and the gameplay
|
|
4
|
+
# while the mechanic is still being found.
|
|
5
|
+
#
|
|
6
|
+
# What is already wired: score / lives / timer bookkeeping, the HUD that shows
|
|
7
|
+
# them, and a win/lose overlay with RETRY. What is NOT here: any mechanic at all,
|
|
8
|
+
# including controls. That is your first increment — build it inside `board`.
|
|
9
|
+
#
|
|
10
|
+
# Stable node ids (design/recipe.md is the contract — do not rename these):
|
|
11
|
+
# post-fx, game-root, game-background, bg-glow, board, board-floor,
|
|
12
|
+
# hud, score-label, time-label, lives-bar,
|
|
13
|
+
# result-overlay, result-dim, result-label, retry-button (scenes/ui/result.pix3scene)
|
|
14
|
+
#
|
|
15
|
+
# The look is two cheap ingredients, the same ones the bouncer recipe uses:
|
|
16
|
+
# 1. `post-fx` (PostProcess, affect2D) — bloom picks up whatever is bright, so
|
|
17
|
+
# a bright sprite glows for free. `bloomIntensity` is a recipe tunable the
|
|
18
|
+
# Flow theme pack turns up for neon and down for pastel.
|
|
19
|
+
# 2. `bg-glow` — a near-white radial-gradient placeholder (`sprites/ph-bg.png`)
|
|
20
|
+
# tinted with the palette background, over the darkest ColorRect. It is what
|
|
21
|
+
# keeps an empty field from reading as a grey slab.
|
|
22
|
+
#
|
|
23
|
+
# The win/lose overlay lives in its own file under scenes/ui/ and is instanced
|
|
24
|
+
# here hidden (`visible: false` = editor only), so opening this scene shows the
|
|
25
|
+
# field rather than a GAME OVER card.
|
|
26
|
+
#
|
|
27
|
+
# 2D coordinates: origin at the canvas centre, X right, Y UP. Node order in the
|
|
28
|
+
# tree is paint order (later/deeper draws on top).
|
|
29
|
+
version: 1.0.0
|
|
30
|
+
metadata:
|
|
31
|
+
author: Pix3 Recipe
|
|
32
|
+
description: Blank gameplay field — bookkeeping, HUD and win/lose only; the mechanic is yours
|
|
33
|
+
root:
|
|
34
|
+
- id: post-fx
|
|
35
|
+
type: PostProcess
|
|
36
|
+
name: Post FX
|
|
37
|
+
properties:
|
|
38
|
+
affect2D: true
|
|
39
|
+
bloomEnabled: true
|
|
40
|
+
bloomIntensity: 0.8
|
|
41
|
+
bloomThreshold: 0.6
|
|
42
|
+
bloomSmoothing: 0.2
|
|
43
|
+
bloomRadius: 0.75
|
|
44
|
+
vignetteEnabled: true
|
|
45
|
+
vignetteOffset: 0.3
|
|
46
|
+
vignetteDarkness: 0.45
|
|
47
|
+
chromaticAberrationEnabled: false
|
|
48
|
+
children: []
|
|
49
|
+
- id: game-root
|
|
50
|
+
type: Group2D
|
|
51
|
+
name: Game Root
|
|
52
|
+
properties:
|
|
53
|
+
width: 1080
|
|
54
|
+
height: 1920
|
|
55
|
+
layout:
|
|
56
|
+
enabled: true
|
|
57
|
+
horizontalAlign: stretch
|
|
58
|
+
verticalAlign: stretch
|
|
59
|
+
components:
|
|
60
|
+
- id: game-rules
|
|
61
|
+
type: user:GameRules
|
|
62
|
+
enabled: true
|
|
63
|
+
config:
|
|
64
|
+
winMode: score
|
|
65
|
+
targetScore: 10
|
|
66
|
+
timeLimitSec: 0
|
|
67
|
+
startingLives: 3
|
|
68
|
+
resultNode: result-overlay
|
|
69
|
+
resultLabel: result-label
|
|
70
|
+
winText: "YOU WIN!"
|
|
71
|
+
loseText: "GAME OVER"
|
|
72
|
+
retryButton: retry-button
|
|
73
|
+
gameScene: res://scenes/main.pix3scene
|
|
74
|
+
# Add your mechanic's nodes here (comma-separated) so they stop on game over.
|
|
75
|
+
freezeNodes: ""
|
|
76
|
+
children:
|
|
77
|
+
- id: game-background
|
|
78
|
+
type: ColorRect2D
|
|
79
|
+
name: Game Background
|
|
80
|
+
properties:
|
|
81
|
+
width: 1080
|
|
82
|
+
height: 1920
|
|
83
|
+
color: "#12141c"
|
|
84
|
+
transform:
|
|
85
|
+
position: [0, 0]
|
|
86
|
+
scale: [1, 1]
|
|
87
|
+
rotation: 0
|
|
88
|
+
layout:
|
|
89
|
+
enabled: true
|
|
90
|
+
horizontalAlign: stretch
|
|
91
|
+
verticalAlign: stretch
|
|
92
|
+
children: []
|
|
93
|
+
# Radial glow over the flat background. Near-white PNG + core:tint, so the
|
|
94
|
+
# T0 palette recolours it (role `background` in design/recipe.md).
|
|
95
|
+
- id: bg-glow
|
|
96
|
+
type: Sprite2D
|
|
97
|
+
name: Background Glow
|
|
98
|
+
properties:
|
|
99
|
+
texture: { type: 'texture', url: 'res://sprites/ph-bg.png' }
|
|
100
|
+
width: 1080
|
|
101
|
+
height: 1920
|
|
102
|
+
opacity: 0.85
|
|
103
|
+
effects:
|
|
104
|
+
- type: core:tint
|
|
105
|
+
params: { color: "#3a2f7a", amount: 1 }
|
|
106
|
+
transform:
|
|
107
|
+
position: [0, 0]
|
|
108
|
+
scale: [1, 1]
|
|
109
|
+
rotation: 0
|
|
110
|
+
layout:
|
|
111
|
+
enabled: true
|
|
112
|
+
horizontalAlign: stretch
|
|
113
|
+
verticalAlign: stretch
|
|
114
|
+
children: []
|
|
115
|
+
- id: board
|
|
116
|
+
type: Group2D
|
|
117
|
+
name: Board
|
|
118
|
+
properties:
|
|
119
|
+
width: 980
|
|
120
|
+
height: 1480
|
|
121
|
+
transform:
|
|
122
|
+
position: [0, -80]
|
|
123
|
+
scale: [1, 1]
|
|
124
|
+
rotation: 0
|
|
125
|
+
children:
|
|
126
|
+
- id: board-floor
|
|
127
|
+
type: ColorRect2D
|
|
128
|
+
name: Board Floor
|
|
129
|
+
properties:
|
|
130
|
+
width: 980
|
|
131
|
+
height: 1480
|
|
132
|
+
color: "#1d212e"
|
|
133
|
+
transform:
|
|
134
|
+
position: [0, 0]
|
|
135
|
+
scale: [1, 1]
|
|
136
|
+
rotation: 0
|
|
137
|
+
children: []
|
|
138
|
+
- id: hud
|
|
139
|
+
type: CanvasLayer2D
|
|
140
|
+
name: HUD
|
|
141
|
+
properties:
|
|
142
|
+
width: 1080
|
|
143
|
+
height: 1920
|
|
144
|
+
layout:
|
|
145
|
+
enabled: true
|
|
146
|
+
horizontalAlign: stretch
|
|
147
|
+
verticalAlign: stretch
|
|
148
|
+
components:
|
|
149
|
+
- id: score-hud
|
|
150
|
+
type: user:ScoreHud
|
|
151
|
+
enabled: true
|
|
152
|
+
config:
|
|
153
|
+
sourceNode: game-root
|
|
154
|
+
scoreLabel: score-label
|
|
155
|
+
scoreFormat: "SCORE {value}"
|
|
156
|
+
timeLabel: time-label
|
|
157
|
+
timeFormat: "{value}"
|
|
158
|
+
livesBar: lives-bar
|
|
159
|
+
children:
|
|
160
|
+
- id: score-label
|
|
161
|
+
type: Label2D
|
|
162
|
+
name: Score Label
|
|
163
|
+
properties:
|
|
164
|
+
label: "SCORE 0"
|
|
165
|
+
labelFontSize: 44
|
|
166
|
+
labelColor: "#ffffff"
|
|
167
|
+
labelAlign: left
|
|
168
|
+
transform:
|
|
169
|
+
position: [-340, 850]
|
|
170
|
+
scale: [1, 1]
|
|
171
|
+
rotation: 0
|
|
172
|
+
layout:
|
|
173
|
+
enabled: true
|
|
174
|
+
horizontalAlign: left
|
|
175
|
+
verticalAlign: top
|
|
176
|
+
children: []
|
|
177
|
+
- id: time-label
|
|
178
|
+
type: Label2D
|
|
179
|
+
name: Time Label
|
|
180
|
+
properties:
|
|
181
|
+
label: "0"
|
|
182
|
+
labelFontSize: 44
|
|
183
|
+
labelColor: "#f5ae39"
|
|
184
|
+
labelAlign: center
|
|
185
|
+
transform:
|
|
186
|
+
position: [0, 850]
|
|
187
|
+
scale: [1, 1]
|
|
188
|
+
rotation: 0
|
|
189
|
+
layout:
|
|
190
|
+
enabled: true
|
|
191
|
+
horizontalAlign: center
|
|
192
|
+
verticalAlign: top
|
|
193
|
+
children: []
|
|
194
|
+
- id: lives-bar
|
|
195
|
+
type: Bar2D
|
|
196
|
+
name: Lives Bar
|
|
197
|
+
properties:
|
|
198
|
+
width: 240
|
|
199
|
+
height: 28
|
|
200
|
+
minValue: 0
|
|
201
|
+
maxValue: 3
|
|
202
|
+
value: 3
|
|
203
|
+
barColor: "#ff4d6d"
|
|
204
|
+
backBackgroundColor: "#2a3352"
|
|
205
|
+
showBorder: false
|
|
206
|
+
transform:
|
|
207
|
+
position: [340, 855]
|
|
208
|
+
scale: [1, 1]
|
|
209
|
+
rotation: 0
|
|
210
|
+
layout:
|
|
211
|
+
enabled: true
|
|
212
|
+
horizontalAlign: right
|
|
213
|
+
verticalAlign: top
|
|
214
|
+
children: []
|
|
215
|
+
# Win/lose screen — authored in scenes/ui/result.pix3scene so this
|
|
216
|
+
# scene opens on the GAME, not on a GAME OVER card. `visible: false`
|
|
217
|
+
# hides it in the EDITOR only; `initiallyVisible` (in the overlay
|
|
218
|
+
# file) is what play mode reads, and GameRules reveals it on the
|
|
219
|
+
# win/lose transition. Tick the eye to preview it over the field.
|
|
220
|
+
- id: result-overlay
|
|
221
|
+
name: Result Overlay
|
|
222
|
+
instance: res://scenes/ui/result.pix3scene
|
|
223
|
+
properties:
|
|
224
|
+
visible: false
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# Pix3 Scene File (YAML)
|
|
2
|
-
# Blank 2D — the RESULT overlay (win/lose), in its own file so the gameplay
|
|
3
|
-
# scene opens clean. `main.pix3scene` carries it as a one-line
|
|
4
|
-
# `instance:` reference marked `visible: false`, which hides it in the EDITOR
|
|
5
|
-
# only; `user:GameRules` reveals it at run time by setting `visible`.
|
|
6
|
-
#
|
|
7
|
-
# Edit it here, full-screen, in its own tab. To preview it composited over the
|
|
8
|
-
# field, tick the eye on `result-overlay` in main.pix3scene — just do not commit
|
|
9
|
-
# that tick, or every iteration starts behind a GAME OVER screen again.
|
|
10
|
-
#
|
|
11
|
-
# Stable node ids (design/recipe.md is the contract — do not rename these):
|
|
12
|
-
# result-overlay, result-dim, result-label, retry-button
|
|
13
|
-
version: 1.0.0
|
|
14
|
-
metadata:
|
|
15
|
-
author: Pix3 Recipe
|
|
16
|
-
description: Result overlay — dim, win/lose headline and a RETRY button
|
|
17
|
-
root:
|
|
18
|
-
- id: result-overlay
|
|
19
|
-
type: Group2D
|
|
20
|
-
name: Result Overlay
|
|
21
|
-
properties:
|
|
22
|
-
width: 1080
|
|
23
|
-
height: 1920
|
|
24
|
-
initiallyVisible: false
|
|
25
|
-
layout:
|
|
26
|
-
enabled: true
|
|
27
|
-
horizontalAlign: stretch
|
|
28
|
-
verticalAlign: stretch
|
|
29
|
-
children:
|
|
30
|
-
- id: result-dim
|
|
31
|
-
type: ColorRect2D
|
|
32
|
-
name: Result Dim
|
|
33
|
-
properties:
|
|
34
|
-
width: 1080
|
|
35
|
-
height: 1920
|
|
36
|
-
color: "#000000"
|
|
37
|
-
opacity: 0.7
|
|
38
|
-
transform:
|
|
39
|
-
position: [0, 0]
|
|
40
|
-
scale: [1, 1]
|
|
41
|
-
rotation: 0
|
|
42
|
-
layout:
|
|
43
|
-
enabled: true
|
|
44
|
-
horizontalAlign: stretch
|
|
45
|
-
verticalAlign: stretch
|
|
46
|
-
children: []
|
|
47
|
-
- id: result-label
|
|
48
|
-
type: Label2D
|
|
49
|
-
name: Result Label
|
|
50
|
-
properties:
|
|
51
|
-
label: "GAME OVER"
|
|
52
|
-
labelFontSize: 88
|
|
53
|
-
labelColor: "#ffffff"
|
|
54
|
-
labelAlign: center
|
|
55
|
-
transform:
|
|
56
|
-
position: [0, 160]
|
|
57
|
-
scale: [1, 1]
|
|
58
|
-
rotation: 0
|
|
59
|
-
layout:
|
|
60
|
-
enabled: true
|
|
61
|
-
horizontalAlign: center
|
|
62
|
-
verticalAlign: center
|
|
63
|
-
children: []
|
|
64
|
-
- id: retry-button
|
|
65
|
-
type: Button2D
|
|
66
|
-
name: Retry Button
|
|
67
|
-
properties:
|
|
68
|
-
width: 420
|
|
69
|
-
height: 130
|
|
70
|
-
label: "RETRY"
|
|
71
|
-
labelFontSize: 50
|
|
72
|
-
labelColor: "#12141c"
|
|
73
|
-
backgroundColor: "#f5ae39"
|
|
74
|
-
hoverColor: "#ffc862"
|
|
75
|
-
pressedColor: "#d4922a"
|
|
76
|
-
buttonAction: retry
|
|
77
|
-
transform:
|
|
78
|
-
position: [0, -60]
|
|
79
|
-
scale: [1, 1]
|
|
80
|
-
rotation: 0
|
|
81
|
-
layout:
|
|
82
|
-
enabled: true
|
|
83
|
-
horizontalAlign: center
|
|
84
|
-
verticalAlign: center
|
|
85
|
-
children: []
|
|
1
|
+
# Pix3 Scene File (YAML)
|
|
2
|
+
# Blank 2D — the RESULT overlay (win/lose), in its own file so the gameplay
|
|
3
|
+
# scene opens clean. `main.pix3scene` carries it as a one-line
|
|
4
|
+
# `instance:` reference marked `visible: false`, which hides it in the EDITOR
|
|
5
|
+
# only; `user:GameRules` reveals it at run time by setting `visible`.
|
|
6
|
+
#
|
|
7
|
+
# Edit it here, full-screen, in its own tab. To preview it composited over the
|
|
8
|
+
# field, tick the eye on `result-overlay` in main.pix3scene — just do not commit
|
|
9
|
+
# that tick, or every iteration starts behind a GAME OVER screen again.
|
|
10
|
+
#
|
|
11
|
+
# Stable node ids (design/recipe.md is the contract — do not rename these):
|
|
12
|
+
# result-overlay, result-dim, result-label, retry-button
|
|
13
|
+
version: 1.0.0
|
|
14
|
+
metadata:
|
|
15
|
+
author: Pix3 Recipe
|
|
16
|
+
description: Result overlay — dim, win/lose headline and a RETRY button
|
|
17
|
+
root:
|
|
18
|
+
- id: result-overlay
|
|
19
|
+
type: Group2D
|
|
20
|
+
name: Result Overlay
|
|
21
|
+
properties:
|
|
22
|
+
width: 1080
|
|
23
|
+
height: 1920
|
|
24
|
+
initiallyVisible: false
|
|
25
|
+
layout:
|
|
26
|
+
enabled: true
|
|
27
|
+
horizontalAlign: stretch
|
|
28
|
+
verticalAlign: stretch
|
|
29
|
+
children:
|
|
30
|
+
- id: result-dim
|
|
31
|
+
type: ColorRect2D
|
|
32
|
+
name: Result Dim
|
|
33
|
+
properties:
|
|
34
|
+
width: 1080
|
|
35
|
+
height: 1920
|
|
36
|
+
color: "#000000"
|
|
37
|
+
opacity: 0.7
|
|
38
|
+
transform:
|
|
39
|
+
position: [0, 0]
|
|
40
|
+
scale: [1, 1]
|
|
41
|
+
rotation: 0
|
|
42
|
+
layout:
|
|
43
|
+
enabled: true
|
|
44
|
+
horizontalAlign: stretch
|
|
45
|
+
verticalAlign: stretch
|
|
46
|
+
children: []
|
|
47
|
+
- id: result-label
|
|
48
|
+
type: Label2D
|
|
49
|
+
name: Result Label
|
|
50
|
+
properties:
|
|
51
|
+
label: "GAME OVER"
|
|
52
|
+
labelFontSize: 88
|
|
53
|
+
labelColor: "#ffffff"
|
|
54
|
+
labelAlign: center
|
|
55
|
+
transform:
|
|
56
|
+
position: [0, 160]
|
|
57
|
+
scale: [1, 1]
|
|
58
|
+
rotation: 0
|
|
59
|
+
layout:
|
|
60
|
+
enabled: true
|
|
61
|
+
horizontalAlign: center
|
|
62
|
+
verticalAlign: center
|
|
63
|
+
children: []
|
|
64
|
+
- id: retry-button
|
|
65
|
+
type: Button2D
|
|
66
|
+
name: Retry Button
|
|
67
|
+
properties:
|
|
68
|
+
width: 420
|
|
69
|
+
height: 130
|
|
70
|
+
label: "RETRY"
|
|
71
|
+
labelFontSize: 50
|
|
72
|
+
labelColor: "#12141c"
|
|
73
|
+
backgroundColor: "#f5ae39"
|
|
74
|
+
hoverColor: "#ffc862"
|
|
75
|
+
pressedColor: "#d4922a"
|
|
76
|
+
buttonAction: retry
|
|
77
|
+
transform:
|
|
78
|
+
position: [0, -60]
|
|
79
|
+
scale: [1, 1]
|
|
80
|
+
rotation: 0
|
|
81
|
+
layout:
|
|
82
|
+
enabled: true
|
|
83
|
+
horizontalAlign: center
|
|
84
|
+
verticalAlign: center
|
|
85
|
+
children: []
|