@umicat/phaser-sdk 1.0.5 → 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,20 +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 CORNER resize handles around the selected rect entity —
|
|
309
|
-
* Figma convention (2026-06-11): no edge-midpoint squares. On a small
|
|
310
|
-
* entity 8 handles visually swallowed the rect (a 3×3 grid of squares
|
|
311
|
-
* with the entity peeking through the middle). Edges stay fully
|
|
312
|
-
* resizable — the entire selection edge is a hit target and the cursor
|
|
313
|
-
* flips to ns/ew-resize on hover, which is affordance enough. No bounds
|
|
314
|
-
* outline (the blue selection rect already draws it) and no ghost rect
|
|
315
|
-
* (the live GO resizes in place during the drag).
|
|
316
|
-
*
|
|
317
|
-
* Visual is 10px; the hit target stays 14px (see hitTestResizeHandlesAt)
|
|
318
|
-
* — bigger-than-visible click zones are standard.
|
|
319
|
-
*/
|
|
320
|
-
private drawEntityResizeOverlay;
|
|
321
307
|
update(): void;
|
|
322
308
|
/**
|
|
323
309
|
* Render the 8 resize handles (when paint mode is active) and the
|
|
@@ -1691,36 +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
|
-
* flips to ns/ew-resize on hover, which is affordance enough. No bounds
|
|
1701
|
-
* outline (the blue selection rect already draws it) and no ghost rect
|
|
1702
|
-
* (the live GO resizes in place during the drag).
|
|
1703
|
-
*
|
|
1704
|
-
* Visual is 10px; the hit target stays 14px (see hitTestResizeHandlesAt)
|
|
1705
|
-
* — bigger-than-visible click zones are standard.
|
|
1706
|
-
*/
|
|
1707
|
-
drawEntityResizeOverlay() {
|
|
1708
|
-
const info = this.entityResizeHandlePositions();
|
|
1709
|
-
if (!info)
|
|
1710
|
-
return;
|
|
1711
|
-
const cam = this.findActiveEditorCamera();
|
|
1712
|
-
const zoom = cam?.zoom ?? 1;
|
|
1713
|
-
const handleSize = 10 / zoom; // 10px on screen regardless of zoom
|
|
1714
|
-
const half = handleSize / 2;
|
|
1715
|
-
for (const h of info.handles) {
|
|
1716
|
-
if (h.id !== 'nw' && h.id !== 'ne' && h.id !== 'sw' && h.id !== 'se')
|
|
1717
|
-
continue;
|
|
1718
|
-
this.graphics.fillStyle(0xffffff, 1);
|
|
1719
|
-
this.graphics.fillRect(h.x - half, h.y - half, handleSize, handleSize);
|
|
1720
|
-
this.graphics.fillStyle(SELECTION_COLOR, 1);
|
|
1721
|
-
this.graphics.fillRect(h.x - half + 1.5 / zoom, h.y - half + 1.5 / zoom, handleSize - 3 / zoom, handleSize - 3 / zoom);
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
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).
|
|
1724
1700
|
update() {
|
|
1725
1701
|
this.graphics.clear();
|
|
1726
1702
|
// Slice 6 Phase B (fix): sync tilemap layer world positions to their
|
|
@@ -1844,9 +1820,9 @@ export class EditorOverlayScene extends Phaser.Scene {
|
|
|
1844
1820
|
// host Inspector). Ghost rect preview shows the new bounds during
|
|
1845
1821
|
// an active resize drag.
|
|
1846
1822
|
this.drawTilemapResizeOverlay();
|
|
1847
|
-
// Rect-entity resize handles
|
|
1848
|
-
//
|
|
1849
|
-
|
|
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.)
|
|
1850
1826
|
// Snap-to-align guide lines — render while a drag is snapped (2026-06-11).
|
|
1851
1827
|
this.drawSnapGuides();
|
|
1852
1828
|
}
|