Skip to content

Commit e484513

Browse files
author
DavidQ
committed
Integrate Object Vector Studio V2 assets into gameplay runtime and Asteroids rendering - PR_26132_015-object-vector-runtime-integration
1 parent 74feb99 commit e484513

11 files changed

Lines changed: 1282 additions & 46 deletions

File tree

docs/dev/reports/playwright_v8_coverage.txt

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ Exercised tool entry points detected:
2020
(0%) Workspace Manager - not exercised by this Playwright run
2121

2222
Changed runtime JS files covered:
23-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 90/90; executed functions 4/5
24-
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2553/2553; executed functions 293/317
23+
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 91/91; executed functions 4/5
24+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2595/2595; executed functions 295/319
2525
(93%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 307/307; executed functions 37/40
26+
(99%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 752/752; executed functions 88/89
27+
(100%) src/engine/rendering/index.js - executed lines 12/12; executed functions 1/1
2628

2729
Files with executed line/function counts where available:
2830
(2%) src/engine/input/ActionInputService.js - executed lines 397/397; executed functions 1/51
@@ -37,7 +39,6 @@ Files with executed line/function counts where available:
3739
(10%) tools/shared/schemaOnlyToolPresetValidation.js - executed lines 317/317; executed functions 1/10
3840
(11%) src/engine/audio/PlaylistManager.js - executed lines 70/70; executed functions 1/9
3941
(11%) tools/Sprite Editor/modules/colorUtils.js - executed lines 71/71; executed functions 1/9
40-
(13%) games/Asteroids/entities/Ufo.js - executed lines 110/110; executed functions 1/8
4142
(13%) src/engine/persistence/SaveSlotManager.js - executed lines 45/45; executed functions 1/8
4243
(13%) tools/shared/projectSystem.js - executed lines 391/391; executed functions 1/8
4344
(14%) games/Asteroids/debug/asteroidsShowcaseDebug.js - executed lines 252/252; executed functions 2/14
@@ -46,7 +47,6 @@ Files with executed line/function counts where available:
4647
(14%) src/engine/scene/TransitionScene.js - executed lines 58/58; executed functions 1/7
4748
(15%) games/Asteroids/game/AsteroidsAttractAdapter.js - executed lines 229/229; executed functions 3/20
4849
(17%) src/engine/camera/Camera2D.js - executed lines 44/44; executed functions 1/6
49-
(17%) src/engine/collision/polygon.js - executed lines 73/73; executed functions 1/6
5050
(17%) src/engine/input/ActionInputMap.js - executed lines 24/24; executed functions 1/6
5151
(17%) src/engine/input/InputContextService.js - executed lines 48/48; executed functions 1/6
5252
(17%) src/engine/persistence/CookieStorageService.js - executed lines 42/42; executed functions 1/6
@@ -61,7 +61,6 @@ Files with executed line/function counts where available:
6161
(20%) src/engine/persistence/CompressionService.js - executed lines 18/18; executed functions 1/5
6262
(20%) src/engine/scene/Scene.js - executed lines 12/12; executed functions 1/5
6363
(20%) src/engine/scene/SceneManager.js - executed lines 33/33; executed functions 1/5
64-
(20%) src/shared/math/numberNormalization.js - executed lines 35/35; executed functions 2/10
6564
(20%) src/shared/utils/objectUtils.js - executed lines 20/20; executed functions 1/5
6665
(20%) tools/shared/toolBootContract.js - executed lines 34/34; executed functions 1/5
6766
(25%) src/engine/release/ReleaseValidationChecklist.js - executed lines 43/43; executed functions 1/4
@@ -73,6 +72,7 @@ Files with executed line/function counts where available:
7372
(27%) src/engine/scene/AttractModeController.js - executed lines 143/143; executed functions 3/11
7473
(28%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 7/25
7574
(28%) tools/preview-generator-v2/PreviewGeneratorV2RepoAccess.js - executed lines 273/273; executed functions 7/25
75+
(30%) src/shared/math/numberNormalization.js - executed lines 35/35; executed functions 3/10
7676
(32%) tools/shared/assetUsageIntegration.js - executed lines 301/301; executed functions 8/25
7777
(32%) tools/shared/platformShell.js - executed lines 2159/2159; executed functions 38/120
7878
(33%) src/engine/audio/FrequencyPlayer.js - executed lines 25/25; executed functions 1/3
@@ -93,20 +93,15 @@ Files with executed line/function counts where available:
9393
(36%) tools/palette-manager-v2/controls/PaletteImportExportControl.js - executed lines 67/67; executed functions 4/11
9494
(37%) tools/asset-manager-v2/js/assetManagerMetadata.js - executed lines 331/331; executed functions 10/27
9595
(38%) src/engine/camera/Camera3D.js - executed lines 48/48; executed functions 3/8
96-
(39%) games/Asteroids/game/AsteroidsWorld.js - executed lines 756/756; executed functions 19/49
9796
(40%) src/engine/input/MouseState.js - executed lines 57/57; executed functions 4/10
98-
(40%) src/shared/utils/mathUtils.js - executed lines 29/29; executed functions 2/5
99-
(41%) games/Asteroids/game/AsteroidsGameScene.js - executed lines 788/788; executed functions 18/44
10097
(43%) games/Asteroids/systems/AsteroidsInitialsEntry.js - executed lines 71/71; executed functions 3/7
10198
(43%) games/Pong/game/PongAudio.js - executed lines 57/57; executed functions 3/7
102-
(44%) games/Asteroids/game/AsteroidsSession.js - executed lines 246/246; executed functions 7/16
10399
(44%) games/Asteroids/systems/ShipDebrisSystem.js - executed lines 84/84; executed functions 4/9
104100
(44%) src/engine/runtime/fullscreenBezel.js - executed lines 1034/1034; executed functions 29/66
105-
(45%) games/Asteroids/index.js - executed lines 179/179; executed functions 5/11
106101
(47%) src/engine/input/InputService.js - executed lines 185/185; executed functions 14/30
107102
(47%) src/engine/runtime/backgroundImage.js - executed lines 205/205; executed functions 8/17
108103
(47%) src/engine/runtime/RuntimeMonitoringHooks.js - executed lines 191/191; executed functions 8/17
109-
(50%) games/Asteroids/entities/Ship.js - executed lines 67/67; executed functions 3/6
104+
(50%) games/Asteroids/index.js - executed lines 206/206; executed functions 6/12
110105
(50%) src/engine/camera/ZoneCameraSystem.js - executed lines 26/26; executed functions 1/2
111106
(50%) src/engine/collision/aabb.js - executed lines 14/14; executed functions 1/2
112107
(50%) src/engine/config/ConfigStore.js - executed lines 46/46; executed functions 3/6
@@ -122,23 +117,28 @@ Files with executed line/function counts where available:
122117
(50%) src/shared/utils/stringifyValueUtils.js - executed lines 8/8; executed functions 1/2
123118
(50%) tools/common/PaletteUsageService.js - executed lines 5/5; executed functions 1/2
124119
(50%) tools/world-vector-studio-v2/js/ToolStarterApp.js - executed lines 98/98; executed functions 8/16
120+
(52%) games/Asteroids/game/AsteroidsGameScene.js - executed lines 845/845; executed functions 25/48
125121
(54%) src/engine/audio/MediaTrackService.js - executed lines 139/139; executed functions 7/13
126122
(54%) tools/preview-generator-v2/PreviewGeneratorV2Capture.js - executed lines 497/497; executed functions 14/26
127123
(55%) tools/palette-manager-v2/modules/PaletteManagerApp.js - executed lines 975/975; executed functions 63/115
128124
(56%) src/engine/logging/Logger.js - executed lines 56/56; executed functions 5/9
129125
(56%) tools/palette-manager-v2/controls/PaletteEditorControl.js - executed lines 225/225; executed functions 18/32
126+
(57%) games/Asteroids/game/AsteroidsWorld.js - executed lines 756/756; executed functions 34/60
130127
(57%) src/engine/fx/ParticleSystem.js - executed lines 119/119; executed functions 4/7
131128
(57%) tools/object-vector-studio-v2/js/controls/StatusLogControl.js - executed lines 24/24; executed functions 4/7
132129
(57%) tools/world-vector-studio-v2/js/controls/StatusLogControl.js - executed lines 24/24; executed functions 4/7
133130
(58%) src/shared/utils/createNoopDevConsoleIntegration.js - executed lines 25/25; executed functions 7/12
134131
(60%) games/Pong/main.js - executed lines 58/58; executed functions 3/5
132+
(60%) src/shared/utils/mathUtils.js - executed lines 29/29; executed functions 3/5
135133
(62%) tools/palette-manager-v2/modules/SwatchRow.js - executed lines 115/115; executed functions 8/13
134+
(63%) games/Asteroids/entities/Ufo.js - executed lines 110/110; executed functions 5/8
136135
(63%) src/shared/string/stringHelpers.js - executed lines 26/26; executed functions 5/8
137136
(63%) tools/asset-manager-v2/js/AssetManagerV2App.js - executed lines 643/643; executed functions 36/57
138-
(64%) games/Asteroids/systems/AsteroidsAudio.js - executed lines 134/134; executed functions 9/14
139137
(64%) games/Pong/game/PongScene.js - executed lines 521/521; executed functions 21/33
140138
(65%) tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js - executed lines 121/121; executed functions 15/23
141-
(67%) games/Asteroids/utils/math.js - executed lines 14/14; executed functions 2/3
139+
(67%) games/Asteroids/entities/Ship.js - executed lines 67/67; executed functions 4/6
140+
(67%) games/Asteroids/game/AsteroidsSession.js - executed lines 246/246; executed functions 12/18
141+
(67%) src/engine/collision/polygon.js - executed lines 73/73; executed functions 4/6
142142
(67%) src/shared/number/numberUtils.js - executed lines 14/14; executed functions 2/3
143143
(67%) tools/asset-manager-v2/js/controls/AssetManagerShellControl.js - executed lines 100/100; executed functions 8/12
144144
(67%) tools/palette-manager-v2/modules/paletteUtils.js - executed lines 41/41; executed functions 6/9
@@ -170,7 +170,7 @@ Files with executed line/function counts where available:
170170
(80%) src/engine/persistence/StorageService.js - executed lines 49/49; executed functions 4/5
171171
(80%) tools/asset-manager-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
172172
(80%) tools/asset-manager-v2/js/controls/AssetFormControl.js - executed lines 563/563; executed functions 49/61
173-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 90/90; executed functions 4/5
173+
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 91/91; executed functions 4/5
174174
(80%) tools/palette-manager-v2/modules/PaletteHistoryStack.js - executed lines 54/54; executed functions 8/10
175175
(80%) tools/preview-generator-v2/controls/AccordionSection.js - executed lines 31/31; executed functions 4/5
176176
(80%) tools/preview-generator-v2/PreviewGeneratorV2Logger.js - executed lines 19/19; executed functions 4/5
@@ -181,7 +181,8 @@ Files with executed line/function counts where available:
181181
(82%) tools/session-inspector-v2/js/controls/EntryListControl.js - executed lines 59/59; executed functions 9/11
182182
(83%) tools/palette-manager-v2/main.js - executed lines 227/227; executed functions 15/18
183183
(83%) tools/session-inspector-v2/js/controls/AccordionSection.js - executed lines 41/41; executed functions 5/6
184-
(84%) src/engine/audio/GaplessLoopPlayer.js - executed lines 187/187; executed functions 16/19
184+
(85%) src/engine/audio/GaplessLoopPlayer.js - executed lines 187/187; executed functions 17/20
185+
(86%) games/Asteroids/systems/AsteroidsAudio.js - executed lines 134/134; executed functions 12/14
185186
(86%) games/shared/gameSkinLoader.js - executed lines 352/352; executed functions 18/21
186187
(86%) src/engine/audio/WebAudioToneBackend.js - executed lines 65/65; executed functions 6/7
187188
(86%) tools/asset-manager-v2/js/controls/AssetCatalogControl.js - executed lines 134/134; executed functions 12/14
@@ -198,12 +199,11 @@ Files with executed line/function counts where available:
198199
(90%) tools/palette-manager-v2/modules/PaletteValidationService.js - executed lines 88/88; executed functions 9/10
199200
(90%) tools/text2speech-V2/js/controls/ActionNavControl.js - executed lines 117/117; executed functions 19/21
200201
(90%) tools/text2speech-V2/js/TextToSpeechToolApp.js - executed lines 807/807; executed functions 62/69
201-
(91%) games/Asteroids/entities/Asteroid.js - executed lines 72/72; executed functions 10/11
202202
(91%) tools/object-vector-studio-v2/js/controls/ActionNavControl.js - executed lines 75/75; executed functions 10/11
203203
(91%) tools/toolRegistry.js - executed lines 526/526; executed functions 10/11
204204
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1598/1598; executed functions 145/159
205205
(92%) tools/object-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 112/112; executed functions 11/12
206-
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2553/2553; executed functions 293/317
206+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2595/2595; executed functions 295/319
207207
(93%) tools/asset-manager-v2/js/services/WorkspaceBridge.js - executed lines 305/305; executed functions 25/27
208208
(93%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 307/307; executed functions 37/40
209209
(93%) tools/session-inspector-v2/js/SessionInspectorV2App.js - executed lines 337/337; executed functions 42/45
@@ -213,11 +213,14 @@ Files with executed line/function counts where available:
213213
(94%) games/shared/workspaceGameMetadataHydrator.js - executed lines 106/106; executed functions 16/17
214214
(94%) tools/common/PaletteSortService.js - executed lines 103/103; executed functions 17/18
215215
(95%) tools/session-inspector-v2/js/services/SessionInspectorV2StorageService.js - executed lines 142/142; executed functions 18/19
216+
(99%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 752/752; executed functions 88/89
217+
(100%) games/Asteroids/entities/Asteroid.js - executed lines 72/72; executed functions 11/11
216218
(100%) games/Asteroids/flow/attract.js - executed lines 17/17; executed functions 1/1
217219
(100%) games/Asteroids/flow/highscore.js - executed lines 16/16; executed functions 1/1
218220
(100%) games/Asteroids/flow/intro.js - executed lines 18/18; executed functions 1/1
219221
(100%) games/Asteroids/rules/flowContent.js - executed lines 2/2; executed functions 1/1
220222
(100%) games/Asteroids/rules/flowRules.js - executed lines 5/5; executed functions 1/1
223+
(100%) games/Asteroids/utils/math.js - executed lines 14/14; executed functions 3/3
221224
(100%) games/shared/workspaceGameBoot.js - executed lines 15/15; executed functions 3/3
222225
(100%) samples/phase-19/1903/main.js - executed lines 33/33; executed functions 5/5
223226
(100%) samples/shared/numberUtils.js - executed lines 7/7; executed functions 1/1
@@ -236,7 +239,7 @@ Files with executed line/function counts where available:
236239
(100%) src/engine/paletteList.js - executed lines 1205/1205; executed functions 15/15
237240
(100%) src/engine/persistence/index.js - executed lines 11/11; executed functions 1/1
238241
(100%) src/engine/release/index.js - executed lines 12/12; executed functions 1/1
239-
(100%) src/engine/rendering/index.js - executed lines 11/11; executed functions 1/1
242+
(100%) src/engine/rendering/index.js - executed lines 12/12; executed functions 1/1
240243
(100%) src/engine/runtime/index.js - executed lines 13/13; executed functions 1/1
241244
(100%) src/engine/scene/index.js - executed lines 13/13; executed functions 1/1
242245
(100%) src/engine/theme/accordionV2/accordionV2.js - executed lines 26/26; executed functions 5/5
@@ -293,6 +296,10 @@ Uncovered or low-coverage changed JS files:
293296

294297
Changed JS files considered:
295298
(0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - changed JS file not collected as browser runtime coverage
299+
(50%) games/Asteroids/index.js - changed JS file with browser V8 coverage
300+
(52%) games/Asteroids/game/AsteroidsGameScene.js - changed JS file with browser V8 coverage
296301
(80%) tools/object-vector-studio-v2/js/bootstrap.js - changed JS file with browser V8 coverage
297302
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
298303
(93%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - changed JS file with browser V8 coverage
304+
(99%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - changed JS file with browser V8 coverage
305+
(100%) src/engine/rendering/index.js - changed JS file with browser V8 coverage
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# PR_26132_015-object-vector-runtime-integration
2+
3+
## Scope
4+
5+
Integrates Object Vector Studio V2 durable object assets into runtime rendering and Asteroids gameplay only. The change stays within Object Vector Studio V2 runtime preview, Asteroids object rendering, the shared Object Vector runtime asset service, and targeted Workspace V2 Playwright coverage.
6+
7+
## Changes
8+
9+
- Added `ObjectVectorRuntimeAssetService` for runtime Object Vector Studio V2 asset validation, caching, state/frame resolution, Canvas rendering, and SVG preview generation.
10+
- Exported the runtime asset service from `src/engine/rendering/index.js`.
11+
- Loaded Asteroids Object Vector Studio V2 manifest payloads through the runtime asset service.
12+
- Rendered the Asteroids ship, asteroids, and UFOs through Object Vector Studio V2 runtime assets.
13+
- Added Asteroids object states/frames for ship idle/thrust and active asteroid/UFO assets.
14+
- Added runtime diagnostics for asset load results, cache state, render attempts, and state/frame playback events.
15+
- Added actionable FAIL logging when runtime asset validation or rendering blocks gameplay rendering.
16+
- Added Object Vector Studio V2 runtime preview action for the selected object/state/frame.
17+
- Preserved palette as workspace/session runtime input and kept palette data out of Object Vector Studio V2 object JSON.
18+
19+
## Validation
20+
21+
Playwright impacted: Yes.
22+
23+
Commands run:
24+
25+
- `node --check src/engine/rendering/ObjectVectorRuntimeAssetService.js`
26+
- `node --check src/engine/rendering/index.js`
27+
- `node --check games/Asteroids/index.js`
28+
- `node --check games/Asteroids/game/AsteroidsGameScene.js`
29+
- `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`
30+
- `node --check tools/object-vector-studio-v2/js/bootstrap.js`
31+
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "Object Vector Studio V2 animation|loads Object Vector Studio V2 runtime"`
32+
- `npm run test:workspace-v2`
33+
34+
Result:
35+
36+
- Targeted Object Vector Studio V2 and Asteroids runtime validation passed: 2 passed.
37+
- Full Workspace Manager V2 suite passed: 44 passed.
38+
- Playwright V8 coverage report generated and copied to `docs/dev/reports/playwright_v8_coverage.txt`.
39+
- Full samples smoke test skipped per request; this PR targets Object Vector runtime integration and Asteroids gameplay validation only.
40+
41+
## Playwright Coverage
42+
43+
Validates:
44+
45+
- Object Vector Studio V2 runtime preview launches for the selected state/frame.
46+
- Runtime preview validates the object payload through the runtime asset service.
47+
- Runtime preview uses workspace/session palette without embedding palette data in object JSON.
48+
- Runtime invalid assets are rejected with schema validation failures.
49+
- Asteroids loads Object Vector Studio V2 runtime assets from `game.manifest.json`.
50+
- Asteroids renders ship, asteroid, and UFO objects through the runtime asset renderer.
51+
- State/frame playback hooks emit runtime events for gameplay objects.
52+
53+
Expected pass behavior:
54+
55+
- Valid Object Vector Studio V2 assets load, cache, resolve selected state/frame data, and render through the runtime vector pipeline.
56+
57+
Expected fail behavior:
58+
59+
- Invalid runtime asset payloads fail validation before render and log actionable FAIL entries without silent fallback rendering.
60+
61+
## Manual Validation
62+
63+
1. Open `tools/object-vector-studio-v2/index.html`.
64+
2. Load a schema-valid Object Vector Studio V2 payload and runtime palette.
65+
3. Select an object, state, and frame, then click `Runtime Preview`.
66+
4. Open Asteroids and start gameplay.
67+
5. Confirm the ship, asteroids, and UFOs render from Object Vector Studio V2 assets.
68+
69+
Expected outcome:
70+
71+
- Runtime preview displays the selected state/frame, Asteroids renders Object Vector assets in-game, and logs show runtime load, cache, state/frame, and render events.
72+
73+
## Out Of Scope
74+
75+
- No World Vector Studio V2 changes.
76+
- No sample JSON changes.
77+
- No full samples smoke test.

0 commit comments

Comments
 (0)