Skip to content

Commit 72eec54

Browse files
author
DavidQ
committed
Fix Object Vector Studio V2 canvas origin/palette behavior and restore game audio playback - PR_26132_011-object-vector-view-and-audio-fixes
1 parent 9d81680 commit 72eec54

8 files changed

Lines changed: 491 additions & 93 deletions

File tree

docs/dev/reports/playwright_v8_coverage.txt

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

2222
Changed runtime JS files covered:
23+
(84%) src/engine/audio/GaplessLoopPlayer.js - executed lines 187/187; executed functions 16/19
2324
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - executed lines 963/963; executed functions 42/49
2425
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1598/1598; executed functions 145/159
25-
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
26-
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1595/1595; executed functions 174/189
26+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1618/1618; executed functions 176/191
2727
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 137/137; executed functions 14/15
2828

2929
Files with executed line/function counts where available:
@@ -47,7 +47,6 @@ Files with executed line/function counts where available:
4747
(14%) src/engine/runtime/BrowserDownloadService.js - executed lines 38/38; executed functions 1/7
4848
(14%) src/engine/scene/TransitionScene.js - executed lines 58/58; executed functions 1/7
4949
(15%) games/Asteroids/game/AsteroidsAttractAdapter.js - executed lines 229/229; executed functions 3/20
50-
(15%) src/engine/audio/MediaTrackService.js - executed lines 139/139; executed functions 2/13
5150
(16%) src/engine/audio/AudioService.js - executed lines 258/258; executed functions 4/25
5251
(17%) src/engine/camera/Camera2D.js - executed lines 44/44; executed functions 1/6
5352
(17%) src/engine/collision/polygon.js - executed lines 73/73; executed functions 1/6
@@ -68,7 +67,6 @@ Files with executed line/function counts where available:
6867
(20%) src/shared/math/numberNormalization.js - executed lines 35/35; executed functions 2/10
6968
(20%) src/shared/utils/objectUtils.js - executed lines 20/20; executed functions 1/5
7069
(20%) tools/shared/toolBootContract.js - executed lines 34/34; executed functions 1/5
71-
(25%) src/engine/audio/GaplessLoopPlayer.js - executed lines 165/165; executed functions 3/12
7270
(25%) src/engine/release/ReleaseValidationChecklist.js - executed lines 43/43; executed functions 1/4
7371
(25%) src/engine/release/SettingsSystem.js - executed lines 94/94; executed functions 3/12
7472
(25%) src/engine/rendering/ResolutionScaler.js - executed lines 22/22; executed functions 1/4
@@ -81,7 +79,6 @@ Files with executed line/function counts where available:
8179
(29%) src/engine/audio/WebAudioToneBackend.js - executed lines 65/65; executed functions 2/7
8280
(32%) tools/shared/assetUsageIntegration.js - executed lines 301/301; executed functions 8/25
8381
(32%) tools/shared/platformShell.js - executed lines 2159/2159; executed functions 38/120
84-
(33%) games/Asteroids/systems/AsteroidsAudio.js - executed lines 106/106; executed functions 3/9
8582
(33%) src/engine/audio/FrequencyPlayer.js - executed lines 25/25; executed functions 1/3
8683
(33%) src/engine/audio/Synthesizer.js - executed lines 24/24; executed functions 1/3
8784
(33%) src/engine/camera/CameraSystem.js - executed lines 21/21; executed functions 1/3
@@ -103,7 +100,6 @@ Files with executed line/function counts where available:
103100
(37%) tools/asset-manager-v2/js/assetManagerMetadata.js - executed lines 331/331; executed functions 10/27
104101
(38%) src/engine/camera/Camera3D.js - executed lines 48/48; executed functions 3/8
105102
(39%) games/Asteroids/game/AsteroidsWorld.js - executed lines 756/756; executed functions 19/49
106-
(40%) src/engine/audio/HtmlAudioMediaBackend.js - executed lines 22/22; executed functions 2/5
107103
(40%) src/engine/input/MouseState.js - executed lines 57/57; executed functions 4/10
108104
(40%) src/shared/utils/mathUtils.js - executed lines 29/29; executed functions 2/5
109105
(41%) games/Asteroids/game/AsteroidsGameScene.js - executed lines 788/788; executed functions 18/44
@@ -129,6 +125,7 @@ Files with executed line/function counts where available:
129125
(50%) src/shared/utils/stringifyValueUtils.js - executed lines 8/8; executed functions 1/2
130126
(50%) tools/common/PaletteUsageService.js - executed lines 5/5; executed functions 1/2
131127
(50%) tools/world-vector-studio-v2/js/ToolStarterApp.js - executed lines 98/98; executed functions 8/16
128+
(54%) src/engine/audio/MediaTrackService.js - executed lines 139/139; executed functions 7/13
132129
(54%) tools/preview-generator-v2/PreviewGeneratorV2Capture.js - executed lines 497/497; executed functions 14/26
133130
(55%) tools/palette-manager-v2/modules/PaletteManagerApp.js - executed lines 975/975; executed functions 63/115
134131
(56%) src/engine/logging/Logger.js - executed lines 56/56; executed functions 5/9
@@ -142,6 +139,7 @@ Files with executed line/function counts where available:
142139
(62%) tools/palette-manager-v2/modules/SwatchRow.js - executed lines 115/115; executed functions 8/13
143140
(63%) src/shared/string/stringHelpers.js - executed lines 26/26; executed functions 5/8
144141
(63%) tools/asset-manager-v2/js/AssetManagerV2App.js - executed lines 643/643; executed functions 36/57
142+
(64%) games/Asteroids/systems/AsteroidsAudio.js - executed lines 134/134; executed functions 9/14
145143
(64%) games/Pong/game/PongScene.js - executed lines 521/521; executed functions 21/33
146144
(65%) tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js - executed lines 121/121; executed functions 15/23
147145
(67%) games/Asteroids/utils/math.js - executed lines 14/14; executed functions 2/3
@@ -186,12 +184,13 @@ Files with executed line/function counts where available:
186184
(82%) tools/session-inspector-v2/js/controls/EntryListControl.js - executed lines 59/59; executed functions 9/11
187185
(83%) tools/palette-manager-v2/main.js - executed lines 227/227; executed functions 15/18
188186
(83%) tools/session-inspector-v2/js/controls/AccordionSection.js - executed lines 41/41; executed functions 5/6
187+
(84%) src/engine/audio/GaplessLoopPlayer.js - executed lines 187/187; executed functions 16/19
189188
(86%) games/shared/gameSkinLoader.js - executed lines 352/352; executed functions 18/21
190-
(86%) games/shared/workspaceGameAssetCatalog.js - executed lines 253/253; executed functions 18/21
191189
(86%) tools/asset-manager-v2/js/controls/AssetCatalogControl.js - executed lines 134/134; executed functions 12/14
192190
(86%) tools/workspace-manager-v2/js/controls/RepoDestinationControl.js - executed lines 25/25; executed functions 6/7
193191
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - executed lines 963/963; executed functions 42/49
194192
(88%) games/Pong/game/PongInputController.js - executed lines 77/77; executed functions 7/8
193+
(88%) games/shared/workspaceGameAssetCatalog.js - executed lines 311/311; executed functions 23/26
195194
(88%) tools/preview-generator-v2/PreviewGeneratorV2App.js - executed lines 1498/1498; executed functions 107/121
196195
(88%) tools/shared/toolLaunchSSoTData.js - executed lines 112/112; executed functions 14/16
197196
(88%) tools/text2speech-V2/js/controls/TextInputControl.js - executed lines 24/24; executed functions 7/8
@@ -207,7 +206,7 @@ Files with executed line/function counts where available:
207206
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - executed lines 1598/1598; executed functions 145/159
208207
(92%) tools/object-vector-studio-v2/js/controls/ToolStarterShellControl.js - executed lines 112/112; executed functions 11/12
209208
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 286/286; executed functions 33/36
210-
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1595/1595; executed functions 174/189
209+
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 1618/1618; executed functions 176/191
211210
(93%) tools/asset-manager-v2/js/services/WorkspaceBridge.js - executed lines 305/305; executed functions 25/27
212211
(93%) tools/session-inspector-v2/js/SessionInspectorV2App.js - executed lines 337/337; executed functions 42/45
213212
(93%) tools/text2speech-V2/js/controls/QueueControl.js - executed lines 122/122; executed functions 26/28
@@ -224,6 +223,7 @@ Files with executed line/function counts where available:
224223
(100%) games/shared/workspaceGameBoot.js - executed lines 15/15; executed functions 3/3
225224
(100%) samples/phase-19/1903/main.js - executed lines 33/33; executed functions 5/5
226225
(100%) samples/shared/numberUtils.js - executed lines 7/7; executed functions 1/1
226+
(100%) src/engine/audio/HtmlAudioMediaBackend.js - executed lines 22/22; executed functions 5/5
227227
(100%) src/engine/audio/index.js - executed lines 17/17; executed functions 1/1
228228
(100%) src/engine/audio/TextToSpeechDefaults.js - executed lines 108/108; executed functions 1/1
229229
(100%) src/engine/camera/index.js - executed lines 10/10; executed functions 1/1
@@ -295,9 +295,10 @@ Uncovered or low-coverage changed JS files:
295295

296296
Changed JS files considered:
297297
(0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - changed JS file not collected as browser runtime coverage
298-
(0%) tools/object-vector-studio-v2/tests/playwright/FirstClassToolStarter.spec.mjs - changed JS file not collected as browser runtime coverage
298+
(64%) games/Asteroids/systems/AsteroidsAudio.js - changed JS file with browser V8 coverage
299+
(84%) src/engine/audio/GaplessLoopPlayer.js - changed JS file with browser V8 coverage
299300
(86%) tools/workspace-manager-v2/js/WorkspaceManagerV2App.js - changed JS file with browser V8 coverage
301+
(88%) games/shared/workspaceGameAssetCatalog.js - changed JS file with browser V8 coverage
300302
(91%) tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js - changed JS file with browser V8 coverage
301-
(92%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - changed JS file with browser V8 coverage
302303
(92%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
303304
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - changed JS file with browser V8 coverage
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# PR_26132_011-object-vector-view-and-audio-fixes
2+
3+
## Scope
4+
5+
Fixes Object Vector Studio V2 centered viewport behavior, palette swatch rendering, Asteroids object-vector manifest validation, and the shared game audio path/playback regression.
6+
7+
## Changes
8+
9+
- Object Vector Studio V2 now treats canvas origin `0,0` as the center of the SVG work surface.
10+
- Reset View restores the viewport origin to `0,0` and logs the exact reset state.
11+
- A visible center-origin dot is drawn at `0,0` in loaded, empty, and palette-blocked render states.
12+
- Primitive default geometry now lands inside the centered viewport.
13+
- Palette colors render as square swatches only, with hover/title and aria details for the color label/value.
14+
- The Object Vector work-area row sizing was tightened so render summary text does not overlap or intercept SVG shape clicks.
15+
- Asteroids audio now resolves current `asset-manager-v2` manifest IDs directly.
16+
- Shared game asset catalog loading now reads `game.workspace.tools.asset-manager-v2.assets` and resolves `assets/...` paths against `game.workspace.assetsPath`.
17+
- Gapless loop playback now records actionable load/play errors instead of failing silently.
18+
19+
## Asteroids Object Assets
20+
21+
Reviewed `games/Asteroids/game.manifest.json` Object Vector Studio V2 payload:
22+
23+
- `object.asteroids.ship`
24+
- `object.asteroids.asteroid.large`
25+
- `object.asteroids.asteroid.medium`
26+
- `object.asteroids.asteroid.small`
27+
- `object.asteroids.ufo.large`
28+
- `object.asteroids.ufo.small`
29+
30+
Schema check passed against `tools/schemas/tools/object-vector-studio-v2.schema.json` with 6 objects and no validation errors.
31+
32+
## Validation
33+
34+
Playwright impacted: Yes.
35+
36+
Commands run:
37+
38+
- `node --check games/shared/workspaceGameAssetCatalog.js`
39+
- `node --check games/Asteroids/systems/AsteroidsAudio.js`
40+
- `node --check src/engine/audio/GaplessLoopPlayer.js`
41+
- `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`
42+
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "resolves asset-manager-v2 audio catalog paths"`
43+
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "shows Object Vector Studio V2 layout shell and schema-only palette gate"`
44+
- `npm run test:workspace-v2`
45+
- Object Vector Studio V2 Asteroids manifest schema validation via `ObjectVectorStudioV2SchemaService`
46+
47+
Result:
48+
49+
- `npm run test:workspace-v2`: 40 passed.
50+
- Targeted audio/game validation passed for wav playback and wav/mp3 manifest path resolution.
51+
- Full samples smoke test skipped because this PR is scoped to Workspace Manager V2/Object Vector Studio V2 and affected Asteroids audio path validation; broad sample-loader behavior was not changed.
52+
53+
## Manual Validation
54+
55+
1. Open Object Vector Studio V2, load a valid object payload and runtime palette, and confirm Reset View returns the work surface to centered origin `0,0`.
56+
2. Confirm the center dot remains visible and shape clicks work near the center of the surface.
57+
3. Hover palette swatches and confirm color details are visible.
58+
4. Launch Asteroids and verify fire/loop sounds play from `game.manifest.json` asset-manager-v2 audio entries.
59+
60+
## Out Of Scope
61+
62+
- No unrelated gameplay changes.
63+
- No full samples smoke test.
64+
- No `start_of_day` changes.

0 commit comments

Comments
 (0)