Skip to content

Commit 5ede947

Browse files
author
DavidQ
committed
Clean up Object Vector V2 transform behavior to use a single object origin and remove shape-origin state - PR_26133_104-object-vector-transform-ui-cleanup
1 parent 8d95c36 commit 5ede947

8 files changed

Lines changed: 431 additions & 634 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# PR_26133_104-object-vector-transform-ui-cleanup
2+
3+
## Summary
4+
- Removed active Shape Transform origin controls and shape-origin behavior from Object Vector Studio V2.
5+
- Kept Shape Transform controls, but Shape Rotate now rewrites selected shape geometry around the selected object origin instead of persisting shape rotation/origin state.
6+
- Kept Object Transform in the left column; Object Rotate continues to use objectOrigin and may persist transform rotation on object shapes.
7+
- Kept Resize as a geometry rewrite path; Object Transform scale input no longer persists object-scale preview transforms and object shape scales remain 1 until Resize bakes geometry.
8+
- Removed shapeOrigin from Object Vector schema defaults/required transform contracts and from the Asteroids object-vector manifest payload.
9+
- Added loader compatibility that strips legacy shapeOrigin from imported Object Vector V2 shape transforms before validation/storage.
10+
- Updated the runtime Object Vector asset renderer to use objectOrigin as the transform pivot when rendering transforms without shapeOrigin.
11+
12+
## Scope Notes
13+
- Workspace manifest/schema structures were preserved.
14+
- No start_of_day folders were modified.
15+
- No files were written under tmp except the final required ZIP package.
16+
- PR_26133_103 delta ZIP was not available in tmp, so the current integrated clean repo state was used as baseline.
17+
18+
## Targeted Verification
19+
- Shape Transform origin inputs/buttons are absent.
20+
- Shape Transform rotate changes selected shape geometry and does not persist transform.rotation or shapeOrigin.
21+
- Object Transform rotate affects all shapes in the selected object and uses objectOrigin.
22+
- Object Transform scale step/input changes do not persist scale to object shapes; Resize rewrites geometry and resets scale to 1.
23+
- Runtime Object Vector rendering works with transforms that do not include shapeOrigin.
24+
25+
## Validation Results
26+
- PASS `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`
27+
- PASS `node --check tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js`
28+
- PASS `node --check src/engine/rendering/ObjectVectorRuntimeAssetService.js`
29+
- PASS JSON parse for Object Vector schema, game manifest schema, and `games/Asteroids/game.manifest.json`
30+
- PASS `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --grep "Object Vector Studio V2" --workers=1 --reporter=list` (16 passed)
31+
- PASS `npm run test:workspace-v2` (56 passed)
32+
- PASS `git diff --check`
33+
- Full samples smoke test skipped as requested.

games/Asteroids/game.manifest.json

Lines changed: 44 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@
211211
"locked": false,
212212
"geometry": {
213213
"point1": {
214-
"x": 4,
215-
"y": 10
214+
"x": 5,
215+
"y": 11
216216
},
217217
"point2": {
218218
"x": 0,
219-
"y": 16
219+
"y": 19
220220
}
221221
},
222222
"style": {
@@ -227,15 +227,11 @@
227227
"strokeOpacity": 1
228228
},
229229
"transform": {
230-
"x": 0,
231-
"y": 0,
232230
"rotation": 0,
233231
"scaleX": 1,
234232
"scaleY": 1,
235-
"shapeOrigin": {
236-
"x": 3,
237-
"y": 10
238-
}
233+
"x": 0,
234+
"y": 0
239235
},
240236
"groupId": "group-1"
241237
},
@@ -246,12 +242,12 @@
246242
"locked": false,
247243
"geometry": {
248244
"point1": {
249-
"x": -4,
250-
"y": 10
245+
"x": -5.002,
246+
"y": 11
251247
},
252248
"point2": {
253-
"x": 0,
254-
"y": 16
249+
"x": -0.002,
250+
"y": 19
255251
}
256252
},
257253
"style": {
@@ -262,15 +258,11 @@
262258
"strokeOpacity": 1
263259
},
264260
"transform": {
265-
"x": 0,
266-
"y": 0,
267261
"rotation": 0,
268262
"scaleX": 1,
269263
"scaleY": 1,
270-
"shapeOrigin": {
271-
"x": -3,
272-
"y": 10
273-
}
264+
"x": 0,
265+
"y": 0
274266
},
275267
"groupId": "group-1"
276268
},
@@ -282,16 +274,16 @@
282274
"geometry": {
283275
"points": [
284276
{
285-
"x": -0.694,
286-
"y": -17.218
277+
"x": 0,
278+
"y": -16
287279
},
288280
{
289281
"x": 14,
290282
"y": 16
291283
},
292284
{
293285
"x": 0,
294-
"y": 7.5
286+
"y": 8
295287
},
296288
{
297289
"x": -14,
@@ -300,22 +292,27 @@
300292
]
301293
},
302294
"style": {
303-
"fill": "#05070D",
295+
"fill": "#00000000",
304296
"stroke": "#FFFFFF",
305297
"strokeWidth": 2,
306298
"fillOpacity": 1,
307-
"strokeOpacity": 1
299+
"strokeOpacity": 1,
300+
"pointRounding": [
301+
false,
302+
false,
303+
true,
304+
false
305+
],
306+
"startPointStyle": "square",
307+
"endPointStyle": "square",
308+
"pointStyle": "square"
308309
},
309310
"transform": {
310-
"x": 0,
311-
"y": 0,
312311
"rotation": 0,
313312
"scaleX": 1,
314313
"scaleY": 1,
315-
"shapeOrigin": {
316-
"x": 0,
317-
"y": 0
318-
}
314+
"x": 0,
315+
"y": 0
319316
}
320317
}
321318
],
@@ -333,44 +330,32 @@
333330
"visible": true,
334331
"shapeIndex": 1,
335332
"transform": {
336-
"x": 0.002,
337-
"y": 0,
338333
"rotation": 0,
339334
"scaleX": 1,
340335
"scaleY": 1,
341-
"shapeOrigin": {
342-
"x": -3,
343-
"y": 10
344-
}
336+
"x": 0.002,
337+
"y": 0
345338
}
346339
},
347340
{
348341
"visible": true,
349342
"shapeIndex": 0,
350343
"transform": {
351-
"x": 0,
352-
"y": 0,
353344
"rotation": 0,
354345
"scaleX": 1,
355346
"scaleY": 1,
356-
"shapeOrigin": {
357-
"x": 0,
358-
"y": 0
359-
}
347+
"x": 0,
348+
"y": 0
360349
}
361350
},
362351
{
363352
"shapeIndex": 2,
364353
"transform": {
365-
"x": 0,
366-
"y": 0,
367354
"rotation": 0,
368355
"scaleX": 1,
369356
"scaleY": 1,
370-
"shapeOrigin": {
371-
"x": 0,
372-
"y": 0
373-
}
357+
"x": 0,
358+
"y": 0
374359
},
375360
"visible": true
376361
}
@@ -413,11 +398,7 @@
413398
"y": 0,
414399
"rotation": 0,
415400
"scaleX": 1,
416-
"scaleY": 1,
417-
"shapeOrigin": {
418-
"x": 0,
419-
"y": 0
420-
}
401+
"scaleY": 1
421402
},
422403
"visible": true
423404
},
@@ -428,11 +409,7 @@
428409
"y": 0,
429410
"rotation": 0,
430411
"scaleX": 1,
431-
"scaleY": 1,
432-
"shapeOrigin": {
433-
"x": -3,
434-
"y": 10
435-
}
412+
"scaleY": 1
436413
},
437414
"visible": true
438415
},
@@ -443,11 +420,7 @@
443420
"y": 0,
444421
"rotation": 0,
445422
"scaleX": 1,
446-
"scaleY": 1,
447-
"shapeOrigin": {
448-
"x": 3,
449-
"y": 10
450-
}
423+
"scaleY": 1
451424
},
452425
"visible": true
453426
}
@@ -540,11 +513,7 @@
540513
"y": 0,
541514
"rotation": 0,
542515
"scaleX": 1,
543-
"scaleY": 1,
544-
"shapeOrigin": {
545-
"x": -1,
546-
"y": 1
547-
}
516+
"scaleY": 1
548517
}
549518
}
550519
],
@@ -620,11 +589,7 @@
620589
"y": 0,
621590
"rotation": 0,
622591
"scaleX": 1,
623-
"scaleY": 1,
624-
"shapeOrigin": {
625-
"x": -1,
626-
"y": -1
627-
}
592+
"scaleY": 1
628593
}
629594
}
630595
],
@@ -678,11 +643,7 @@
678643
"y": 0,
679644
"rotation": 0,
680645
"scaleX": 1,
681-
"scaleY": 1,
682-
"shapeOrigin": {
683-
"x": 0,
684-
"y": 6
685-
}
646+
"scaleY": 1
686647
}
687648
},
688649
{
@@ -708,11 +669,7 @@
708669
"y": 0,
709670
"rotation": 0,
710671
"scaleX": 1,
711-
"scaleY": 1,
712-
"shapeOrigin": {
713-
"x": 0,
714-
"y": -2
715-
}
672+
"scaleY": 1
716673
}
717674
}
718675
],
@@ -766,11 +723,7 @@
766723
"y": 0,
767724
"rotation": 0,
768725
"scaleX": 1,
769-
"scaleY": 1,
770-
"shapeOrigin": {
771-
"x": 0,
772-
"y": 4
773-
}
726+
"scaleY": 1
774727
}
775728
},
776729
{
@@ -796,11 +749,7 @@
796749
"y": 0,
797750
"rotation": 0,
798751
"scaleX": 1,
799-
"scaleY": 1,
800-
"shapeOrigin": {
801-
"x": 0,
802-
"y": -2
803-
}
752+
"scaleY": 1
804753
}
805754
}
806755
],
@@ -880,11 +829,7 @@
880829
"y": 0,
881830
"rotation": 0,
882831
"scaleX": 1,
883-
"scaleY": 1,
884-
"shapeOrigin": {
885-
"x": 0,
886-
"y": 0
887-
}
832+
"scaleY": 1
888833
}
889834
}
890835
],
@@ -964,11 +909,7 @@
964909
"y": 0,
965910
"rotation": 0,
966911
"scaleX": 1,
967-
"scaleY": 1,
968-
"shapeOrigin": {
969-
"x": 0,
970-
"y": 0
971-
}
912+
"scaleY": 1
972913
}
973914
}
974915
],

0 commit comments

Comments
 (0)