Skip to content

Commit 87a1c08

Browse files
committed
Implement the initial vector geometry runtime aligned to the vector asset contract, with clean parsing, transform, bounds, and render-prep support for vector-native sample games.
1 parent 356aee4 commit 87a1c08

21 files changed

Lines changed: 1534 additions & 232 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 64 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2,121 +2,87 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
TASK:
5-
Create BUILD_PR_TOOLS_AND_VECTOR_CONTRACT_COMBINED in the HTML-JavaScript-Gaming repo.
5+
Create BUILD_PR_VECTOR_GEOMETRY_RUNTIME in the HTML-JavaScript-Gaming repo.
66

77
GOAL:
8-
In one pass:
9-
1. Consolidate duplicated/renamed tool folders under tools/
10-
2. Repair all affected references and loading paths
11-
3. Validate tool/sample/asset loading
12-
4. Produce the vector asset contract planning docs
8+
Implement the first production-ready vector geometry runtime that follows docs/specs/vector_asset_contract.md and is suitable for vector-native sample games.
139

1410
IMPORTANT SCOPE:
15-
- Ignore old SpriteEditor as legacy/out-of-scope
16-
- Do not spend effort preserving old SpriteEditor
17-
- Only touch old SpriteEditor if an active reference must be removed or redirected
18-
- Do not introduce unrelated feature work
19-
- Do not perform broad refactors outside tool-folder consolidation, path repair, validation, and vector contract planning
11+
- Build only the geometry/runtime layer needed to support vector-native rendering and geometry operations
12+
- Do not introduce unrelated gameplay work
13+
- Do not do broad engine refactors
14+
- Do not revive or depend on old SpriteEditor
15+
- Keep public boundaries clean and surgical
16+
- Respect docs-first repo workflow
17+
- Use approved/public selectors and contracts only
2018

2119
REPO TARGET:
2220
C:\Users\DavidQ\Documents\GitHub\HTML-JavaScript-Gaming
2321

24-
PHASE 1 — TOOLS FOLDER CONSOLIDATION
25-
- Inspect all folders directly under tools/
26-
- Identify duplicate/rename-drift tool folders
27-
- Select one canonical folder per active tool using the newer approved naming
28-
- Consolidate files into canonical folders
29-
- Merge subfolders too, including:
30-
- html
31-
- js
32-
- css
33-
- samples
34-
- assets
35-
- docs
36-
- config/json
37-
- shared helpers
38-
- Prefer git-aware moves where practical
39-
- When duplicate files exist in both locations:
40-
- keep the better/current version
41-
- manually merge if both contain meaningful changes
42-
- do not blindly overwrite
22+
PRIMARY OBJECTIVE:
23+
Create a geometry runtime that can support vector asset consumption and runtime operations for sample games and future vector-native tooling.
4324

44-
PHASE 2 — PATH / REFERENCE REPAIR
45-
Update all references across the repo to canonical tool paths, including:
46-
- imports
47-
- fetch/load paths
48-
- sample JSON paths
49-
- asset references
50-
- README references
51-
- launcher/index links
52-
- internal tool-to-tool references
25+
REQUIRED CAPABILITIES:
26+
1. Vector asset ingestion from the agreed vector asset contract
27+
2. Shape normalization / parsing
28+
3. Transform support:
29+
- translate
30+
- rotate
31+
- scale
32+
4. Geometry helpers:
33+
- bounds / bounding box
34+
- center/origin handling
35+
- point transformation
36+
5. Runtime-ready renderable output for supported primitives
37+
6. Collision-ready geometry primitives where appropriate
38+
7. Clear separation between:
39+
- asset contract parsing
40+
- geometry math
41+
- render preparation
42+
- runtime helpers
5343

54-
Pay special attention to:
55-
- Tile Map Editor
56-
- Parallax Editor
57-
- SVG Editor
58-
- vector/json loaders
59-
- sample asset paths
60-
- case consistency in folder names
44+
NON-GOALS:
45+
- no broad gameplay systems
46+
- no AI systems
47+
- no collaboration/multiplayer systems
48+
- no large engine rewrite
49+
- no unrelated tool redesign
50+
- no legacy SpriteEditor preservation
6151

62-
PHASE 3 — VALIDATION
63-
Validate all of the following:
64-
- launcher/index links resolve
65-
- Tile Map Editor loads
66-
- Parallax Editor loads
67-
- SVG Editor loads
68-
- sample loading works
69-
- assets render/load correctly
70-
- no required references remain to deprecated duplicate folders
71-
- no required runtime references remain to old SpriteEditor
72-
- no obvious broken paths remain after consolidation
73-
74-
PHASE 4 — VECTOR ASSET CONTRACT PLAN
75-
Create planning/spec documentation for the vector asset contract.
76-
77-
Required new spec target:
78-
docs/specs/vector_asset_contract.md
79-
80-
The spec must define at minimum:
81-
- purpose and scope
82-
- canonical vector asset file role
83-
- coordinate system
84-
- origin conventions
85-
- transform expectations
86-
- stroke behavior
87-
- fill/color rules
88-
- palette strategy
89-
- shape primitives supported
90-
- layering expectations
91-
- naming conventions
92-
- runtime expectations
93-
- what the future geometry runtime must support
94-
- explicit non-goals / out-of-scope items
95-
96-
REQUIRED DELIVERABLES:
97-
1. docs/pr/BUILD_PR_TOOLS_AND_VECTOR_CONTRACT_COMBINED.md
52+
REQUIRED FILES / DELIVERABLES:
53+
1. docs/pr/BUILD_PR_VECTOR_GEOMETRY_RUNTIME.md
9854
2. docs/dev/codex_commands.md
9955
3. docs/dev/commit_comment.txt
10056
4. docs/dev/reports/file_tree.txt
10157
5. docs/dev/reports/change_summary.txt
10258
6. docs/dev/reports/validation_checklist.txt
103-
7. docs/specs/vector_asset_contract.md
59+
60+
IMPLEMENTATION EXPECTATIONS:
61+
- follow vector_asset_contract.md exactly
62+
- keep modules small and composable
63+
- prefer pure geometry utilities where possible
64+
- keep boundaries clean between parsing/math/runtime usage
65+
- expose only what sample games need now
66+
- avoid premature abstraction beyond this runtime slice
67+
68+
VALIDATION MUST COVER:
69+
- vector assets parse successfully
70+
- transforms behave correctly
71+
- bounds compute correctly
72+
- supported primitives produce usable runtime output
73+
- sample-game integration path is clear
74+
- no broken imports/paths introduced
10475

10576
BUILD PR DOC MUST INCLUDE:
106-
- canonical tool folders selected
107-
- duplicate folders discovered
108-
- files/folders moved or merged
109-
- references updated
110-
- obsolete folders removed
111-
- explicit note that old SpriteEditor was intentionally excluded except for active reference cleanup
112-
- summary of validation performed
113-
- summary of vector asset contract outputs
77+
- runtime scope
78+
- modules created or changed
79+
- public/runtime boundaries
80+
- validation performed
81+
- follow-up recommendations for next PR
11482

115-
OUTPUT RULES:
116-
- Docs-first repo workflow
117-
- Keep changes surgical
118-
- No unrelated implementation work
119-
- Preserve exact repo-relative structure
120-
- Package result as a repo-structured ZIP at:
83+
ZIP REQUIREMENT:
84+
Package as a repo-structured ZIP at:
85+
<project folder>/tmp/BUILD_PR_VECTOR_GEOMETRY_RUNTIME.zip
12186

122-
<project folder>/tmp/BUILD_PR_TOOLS_AND_VECTOR_CONTRACT_COMBINED.zip
87+
COMMIT COMMENT:
88+
Implement the initial vector geometry runtime aligned to the vector asset contract, with clean parsing, transform, bounds, and render-prep support for vector-native sample games.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build(tools): complete combined tools consolidation and vector contract docs
1+
Implement the initial vector geometry runtime aligned to the vector asset contract, with clean parsing, transform, bounds, and render-prep support for vector-native sample games.
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
Change Summary
22
==============
33

4-
Combined build outcome
5-
----------------------
6-
- finalized the canonical active tool folders under `tools/`
7-
- repaired active path and reference drift caused by prior rename/consolidation work
8-
- validated canonical loading surfaces and syntax
9-
- produced the vector asset contract spec in `docs/specs/vector_asset_contract.md`
4+
Build outcome
5+
-------------
6+
- implemented the initial shared vector geometry runtime aligned to `docs/specs/vector_asset_contract.md`
7+
- kept the runtime split across contract parsing, pure geometry math, render preparation, and the public runtime facade
8+
- integrated vector runtime preparation into packaged runtime loading without changing engine core APIs
109

11-
Canonical active tool folders
12-
-----------------------------
13-
- `tools/Sprite Editor V3/`
14-
- `tools/Tilemap Studio/`
15-
- `tools/Parallax Scene Studio/`
16-
- `tools/Vector Asset Studio/`
17-
- `tools/Vector Map Editor/`
10+
Runtime modules
11+
---------------
12+
- added `tools/shared/vector/vectorGeometryMath.js`
13+
- added `tools/shared/vector/vectorAssetContract.js`
14+
- added `tools/shared/vector/vectorRenderPrep.js`
15+
- added `tools/shared/vectorGeometryRuntime.js`
1816

19-
Legacy and exclusions
20-
---------------------
21-
- `tools/SpriteEditor_old_keep/` remains parked as legacy
22-
- old SpriteEditor stayed out of scope except for active reference cleanup
17+
Compatibility and integration updates
18+
-------------------------------------
19+
- updated `tools/shared/vector/vectorAssetBridge.js` to emit contract-aligned vector assets while preserving legacy bridge fields
20+
- updated `tools/shared/projectAssetValidation.js` to validate vectors against the contract through stable finding families
21+
- updated `tools/shared/runtimeAssetLoader.js` to promote packaged vector assets into `runtimeKind: "vector-geometry"` output
22+
- updated vector-native template, sample-game, and Asteroids demo runtime fixtures to provide real vector asset documents to the runtime
2323

24-
Validation and repair highlights
25-
--------------------------------
26-
- launcher/index links verified
27-
- canonical sample-manifest paths verified
28-
- canonical JS entry files validated with `node --check`
29-
- no required refs remain to deprecated duplicate folders in active surfaces
30-
- no required refs remain to legacy old SpriteEditor in active surfaces
24+
Validation highlights
25+
---------------------
26+
- syntax checks passed for all new and touched shared runtime files
27+
- targeted vector/runtime tests passed
28+
- Asteroids platform demo runtime integration passed after vector fixture repair
29+
- full node test runner passed with `110/110` explicit `run()` tests passing
3130

32-
Vector contract output
33-
----------------------
34-
- created `docs/specs/vector_asset_contract.md`
35-
- defined purpose, scope, coordinate rules, origin/transform rules, stroke/fill/palette strategy, primitives, layering, naming, runtime expectations, future geometry runtime support, and non-goals
31+
Next-slice recommendations
32+
--------------------------
33+
- migrate checked-in vector asset files from legacy bridge shape to canonical contract documents
34+
- extend supported path commands only when a consumer requires them
35+
- add geometry-runtime-specific debug and profiler surfacing when dynamic vector transforms become active

docs/dev/reports/file_tree.txt

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
1+
docs/
2+
pr/
3+
BUILD_PR_VECTOR_GEOMETRY_RUNTIME.md
4+
specs/
5+
vector_asset_contract.md
16
tools/
2-
Parallax Scene Studio/
3-
index.html
4-
main.js
5-
parallaxEditor.css
6-
README.md
7-
samples/
8-
Sprite Editor V3/
9-
index.html
10-
main.js
11-
spriteEditor.css
12-
README.md
13-
modules/
14-
Tilemap Studio/
15-
index.html
16-
main.js
17-
tileMapEditor.css
18-
README.md
19-
samples/
20-
Vector Asset Studio/
21-
index.html
22-
main.js
23-
svgBackgroundEditor.css
24-
README.md
25-
samples/
26-
Vector Map Editor/
27-
index.html
28-
main.js
29-
vectorMapEditor.css
30-
README.md
31-
how_to_use.html
32-
assets/
33-
editor/
347
shared/
35-
SpriteEditor_old_keep/
8+
asteroidsPlatformDemo.js
9+
projectAssetValidation.js
10+
runtimeAssetLoader.js
11+
vectorGeometryRuntime.js
12+
vectorNativeTemplate.js
13+
vectorTemplateSampleGame.js
14+
vector/
15+
vectorAssetBridge.js
16+
vectorAssetContract.js
17+
vectorGeometryMath.js
18+
vectorRenderPrep.js
19+
tests/
20+
run-tests.mjs
21+
tools/
22+
VectorAssetSystem.test.mjs
23+
VectorGeometryRuntime.test.mjs
24+
VectorNativeTemplate.test.mjs
25+
VectorTemplateSampleGame.test.mjs

0 commit comments

Comments
 (0)