@umicat/phaser-sdk 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -233,6 +233,17 @@ function installPauseEnforcement(game) {
|
|
|
233
233
|
if (!getEditorState(game).active)
|
|
234
234
|
return;
|
|
235
235
|
pauseActiveNonEditor(game);
|
|
236
|
+
// Late-boot completion (1.0.6). The boot-flag path (`umicatEdit=1`)
|
|
237
|
+
// runs enterEdit BEFORE any scene exists — the scene-dependent
|
|
238
|
+
// installs (editor cameras, canvas expand, void fill, overlay launch)
|
|
239
|
+
// all no-op'd, leaving an editor that is paused and snapshotted but
|
|
240
|
+
// can't pan/zoom or pick. Once the world scene appears, re-run the
|
|
241
|
+
// full idempotent enterEdit to install them. The editor-camera check
|
|
242
|
+
// makes this fire at most once per enter: after a successful install
|
|
243
|
+
// it's permanently truthy (cheap per-frame no-op otherwise).
|
|
244
|
+
if (!getEditorCamera(game) && findWorldScene(game)) {
|
|
245
|
+
enterEdit(game);
|
|
246
|
+
}
|
|
236
247
|
};
|
|
237
248
|
game.events.on(Phaser.Core.Events.PRE_STEP, handler);
|
|
238
249
|
bag[PAUSE_ENFORCER_FLAG] = handler;
|
|
@@ -304,12 +304,6 @@ export declare class EditorOverlayScene extends Phaser.Scene {
|
|
|
304
304
|
* replays the `before` patch through the normal applyEdit path.
|
|
305
305
|
*/
|
|
306
306
|
private commitEntityResize;
|
|
307
|
-
/**
|
|
308
|
-
* Render the 8 resize handles around the selected rect entity. No bounds
|
|
309
|
-
* outline (the blue selection rect already draws it) and no ghost rect
|
|
310
|
-
* (the live GO resizes in place during the drag).
|
|
311
|
-
*/
|
|
312
|
-
private drawEntityResizeOverlay;
|
|
313
307
|
update(): void;
|
|
314
308
|
/**
|
|
315
309
|
* Render the 8 resize handles (when paint mode is active) and the
|
|
@@ -1691,26 +1691,12 @@ export class EditorOverlayScene extends Phaser.Scene {
|
|
|
1691
1691
|
// The selection rect changed size — refresh the host's anchor rect.
|
|
1692
1692
|
postSelectionRect(this.game);
|
|
1693
1693
|
}
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
const info = this.entityResizeHandlePositions();
|
|
1701
|
-
if (!info)
|
|
1702
|
-
return;
|
|
1703
|
-
const cam = this.findActiveEditorCamera();
|
|
1704
|
-
const zoom = cam?.zoom ?? 1;
|
|
1705
|
-
const handleSize = 14 / zoom; // 14px on screen regardless of zoom
|
|
1706
|
-
const half = handleSize / 2;
|
|
1707
|
-
for (const h of info.handles) {
|
|
1708
|
-
this.graphics.fillStyle(0xffffff, 1);
|
|
1709
|
-
this.graphics.fillRect(h.x - half, h.y - half, handleSize, handleSize);
|
|
1710
|
-
this.graphics.fillStyle(SELECTION_COLOR, 1);
|
|
1711
|
-
this.graphics.fillRect(h.x - half + 1.5 / zoom, h.y - half + 1.5 / zoom, handleSize - 3 / zoom, handleSize - 3 / zoom);
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1694
|
+
// Rect entities draw NO handle squares at all (2026-06-11, user decision
|
|
1695
|
+
// after comparing with Figma) — the blue selection outline is the whole
|
|
1696
|
+
// visual. Resizability is communicated by the hover cursor: ns/ew-resize
|
|
1697
|
+
// along the edges, nwse/nesw-resize in the corner zones. Hit targets are
|
|
1698
|
+
// unchanged (entityResizeHandlePositions + hitTestResizeHandlesAt still
|
|
1699
|
+
// serve all 8 zones for the pointer logic).
|
|
1714
1700
|
update() {
|
|
1715
1701
|
this.graphics.clear();
|
|
1716
1702
|
// Slice 6 Phase B (fix): sync tilemap layer world positions to their
|
|
@@ -1834,9 +1820,9 @@ export class EditorOverlayScene extends Phaser.Scene {
|
|
|
1834
1820
|
// host Inspector). Ghost rect preview shows the new bounds during
|
|
1835
1821
|
// an active resize drag.
|
|
1836
1822
|
this.drawTilemapResizeOverlay();
|
|
1837
|
-
// Rect-entity resize handles
|
|
1838
|
-
//
|
|
1839
|
-
|
|
1823
|
+
// (Rect-entity resize handles draw nothing — resize affordance is the
|
|
1824
|
+
// hover cursor on the selection edges/corners. See the note above
|
|
1825
|
+
// entityResizeHandlePositions' draw section, 2026-06-11.)
|
|
1840
1826
|
// Snap-to-align guide lines — render while a drag is snapped (2026-06-11).
|
|
1841
1827
|
this.drawSnapGuides();
|
|
1842
1828
|
}
|