Skip to content

Commit f473647

Browse files
committed
chore: limpar artefactos e assets duplicados no simple-rpg
Remove .playwright-mcp, .sisyphus e estado .cursor/hooks do tracking; deduplica GLB/PNG em public (só models/textures + áudio/céu/terreno); .gitignore para meshes/images locais e screenshots; normaliza gameassets_handoff.json; handoff ignora cópia quando origem=destino; teste em GameAssets. Made-with: Cursor
1 parent 0789927 commit f473647

25 files changed

Lines changed: 185 additions & 172 deletions

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,13 @@ Text3D/testdata/baseline_meshes_raw/*
8888
# Agent tool artifacts
8989
.sisyphus/
9090
.playwright-mcp/
91+
92+
# Cursor — estado local dos hooks (não versionar)
93+
.cursor/hooks/
94+
95+
# VibeGame simple-rpg — saída intermédia do batch (duplica models/textures)
96+
VibeGame/examples/simple-rpg/public/assets/meshes/
97+
VibeGame/examples/simple-rpg/public/assets/images/
98+
99+
# Screenshots de teste no exemplo
100+
VibeGame/examples/simple-rpg/screenshot*.png

GameAssets/src/gameassets/handoff_export.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ def _safe_public_id(row_id: str) -> str:
2323

2424

2525
def _install_file(src: Path, dst: Path, *, copy: bool) -> None:
26+
try:
27+
if src.resolve() == dst.resolve():
28+
return
29+
except OSError:
30+
pass
2631
dst.parent.mkdir(parents=True, exist_ok=True)
2732
if dst.exists() or dst.is_symlink():
2833
dst.unlink()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Tests for handoff_export helpers."""
2+
3+
from __future__ import annotations
4+
5+
from pathlib import Path
6+
7+
from gameassets.handoff_export import _install_file
8+
9+
10+
def test_install_file_noop_when_src_and_dst_identical(tmp_path: Path) -> None:
11+
"""When output_dir is under public/, audio source and handoff dest can be the same path."""
12+
p = tmp_path / "clip.wav"
13+
p.write_bytes(b"wavdata")
14+
_install_file(p, p, copy=True)
15+
assert p.read_bytes() == b"wavdata"

VibeGame/examples/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ examples/
2626
├── index.html
2727
├── src/main.ts
2828
├── public/assets/ # After handoff / batch
29-
└── sample-gameassets/ # Optional gameassets dream + batch profile
29+
└── sample-gameassets/ # game.yaml + manifest (sem GLB/PNG; saída em public/assets/)
3030
```
3131

3232
## Deterministic terrain placement (entity-centric)

VibeGame/examples/simple-rpg/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ The scene layout and assets were generated by **`gameassets dream`** (dry-run, n
5555
```
5656
sample-gameassets/
5757
dream_plan.json # LLM-generated plan (or fallback)
58-
game.yaml # GameAssets batch profile
58+
game.yaml # GameAssets batch profile (output_dir → ../public/assets/)
5959
manifest.csv # Asset list (ids, prompts, flags)
6060
world.xml # VibeGame scene (for reference)
6161
main.ts # Bootstrap code (for reference)
6262
index.html # Full page (for reference)
63+
# GLB/PNG/WAV gerados pelo batch: `public/assets/{meshes,images,audio}/` (local; não versionados no Git).
64+
# No repositório mantêm-se só `public/assets/{models,textures,audio,sky,terrain}/`.
6365
```
6466

6567
### 2. Generate assets (requires GPU)
@@ -72,8 +74,8 @@ cd VibeGame/examples/simple-rpg/sample-gameassets
7274
# 2D images + 3D meshes + PBR textures + rigging
7375
gameassets batch --profile game.yaml --manifest manifest.csv --with-3d --with-rig
7476

75-
# Sky (separate CLI)
76-
skymap2d generate "bright blue sky with soft clouds over green plains, equirectangular 360" -o sky.png
77+
# Sky (separate CLI) — escrever directamente em public/assets/sky/
78+
skymap2d generate "bright blue sky with soft clouds over green plains, equirectangular 360" -o ../public/assets/sky/sky.png
7779
```
7880

7981
### 3. Handoff into public/
@@ -85,19 +87,19 @@ gameassets handoff \
8587
--public-dir ../public \
8688
--with-textures
8789

88-
# Copy sky manually (not part of handoff yet)
89-
mkdir -p ../public/assets/sky
90-
cp sky.png ../public/assets/sky/sky.png
90+
# Se usaste -o sky.png na pasta antiga, move: mkdir -p ../public/assets/sky && mv sky.png ../public/assets/sky/
9191
```
9292

93-
This creates:
93+
This creates (or refreshes):
9494

9595
```
9696
public/
9797
assets/
98-
models/hero.glb, wooden_crate.glb, crystal_blue.glb, stone_pillar.glb, tree_lowpoly.glb
99-
audio/bgm_field.wav, sfx_jump.wav, sfx_save.wav, sfx_load.wav
100-
textures/hero.png, ... (optional diffuse images)
98+
meshes/ # saída intermédia do batch (GLB por id) — só local, .gitignore
99+
images/ # PNG 2D do Text2D — só local, .gitignore
100+
models/ # GLB servidos pelo Vite (handoff)
101+
textures/ # PNG difusos (handoff)
102+
audio/ # WAV do Text2Sound
101103
sky/sky.png
102104
gameassets_handoff.json
103105
```
10.5 KB
Binary file not shown.
Binary file not shown.
170 KB
Binary file not shown.
197 KB
Binary file not shown.
282 KB
Binary file not shown.

0 commit comments

Comments
 (0)