ui/phase-9: revert premature done-mark, reuse minScaleNoWrap
Previous Phase 9 commit pre-marked PLAN.md with "Status: done" before the local-ci gate ran green. Project rule (galaxy/CLAUDE.md "Per-stage CI gate") allows the marker only after the run is success; revert to "Status: pending". Also folds the inline minScale formula in the playground page into a call to map/no-wrap.ts:minScaleNoWrap so the playground and the renderer share one source of truth for the floor. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -952,9 +952,9 @@ Targeted tests (delivered):
|
|||||||
invitation removes card and adds the game to My Games. Phase 7
|
invitation removes card and adds the game to My Games. Phase 7
|
||||||
auth flow now also runs over the FlatBuffers wire.
|
auth flow now also runs over the FlatBuffers wire.
|
||||||
|
|
||||||
## ~~Phase 9. Map Renderer with Fixture Data~~
|
## Phase 9. Map Renderer with Fixture Data
|
||||||
|
|
||||||
Status: done.
|
Status: pending.
|
||||||
|
|
||||||
Goal: stand up the PixiJS map renderer with pan/zoom, primitive
|
Goal: stand up the PixiJS map renderer with pan/zoom, primitive
|
||||||
drawing, torus wrap behaviour and bounded-plane (no-wrap) mode against
|
drawing, torus wrap behaviour and bounded-plane (no-wrap) mode against
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import { page } from "$app/state";
|
import { page } from "$app/state";
|
||||||
import {
|
import {
|
||||||
createRenderer,
|
createRenderer,
|
||||||
|
minScaleNoWrap,
|
||||||
sampleWorld,
|
sampleWorld,
|
||||||
type RendererHandle,
|
type RendererHandle,
|
||||||
type RendererPreference,
|
type RendererPreference,
|
||||||
@@ -60,12 +61,13 @@
|
|||||||
}
|
}
|
||||||
backend = handle.getBackend();
|
backend = handle.getBackend();
|
||||||
|
|
||||||
// Initial camera: place world centre.
|
// Initial camera: world centre, zoomed slightly past the
|
||||||
|
// fits-the-viewport floor so neighbouring torus copies are
|
||||||
|
// visible too.
|
||||||
handle.viewport.moveCenter(world.width / 2, world.height / 2);
|
handle.viewport.moveCenter(world.width / 2, world.height / 2);
|
||||||
// Initial zoom: fit-ish (slight zoom-in from minScale).
|
const minScale = minScaleNoWrap(
|
||||||
const minScale = Math.max(
|
{ widthPx: containerEl.clientWidth, heightPx: containerEl.clientHeight },
|
||||||
containerEl.clientWidth / world.width,
|
world,
|
||||||
containerEl.clientHeight / world.height,
|
|
||||||
);
|
);
|
||||||
handle.viewport.setZoom(minScale * 1.2, true);
|
handle.viewport.setZoom(minScale * 1.2, true);
|
||||||
if (mode === "no-wrap") handle.setMode("no-wrap"); // re-clamp post zoom
|
if (mode === "no-wrap") handle.setMode("no-wrap"); // re-clamp post zoom
|
||||||
|
|||||||
Reference in New Issue
Block a user