Skip to main content

Type Alias: EnterTopView

EnterTopView = (options?) => Promise<void>

Function

Enters top-down orthographic plan view on the modular canvas.

The current perspective camera (mode, angles, target, radius, orbit limits) is saved and restored when ExitTopView runs. While the plan is active, orbit is locked and a drag moves the plan exactly with the pointer: a left or right mouse drag, or one finger on a touch screen. The cursor is an open hand, and a closed hand while dragging. Two fingers still pinch to zoom, and a press on an item the shopper can move (a free item, such as a pillow) drags that item instead. The existing zoom controls keep working, and ZoomOut (zoom all) refits the plan to the canvas. Calling this again while already in plan view is a no-op.

Custom UI typically calls this when the shopper enters Add Module, and ExitTopView when they leave that flow. Replace / edit views should stay in the normal 3D camera. Stock Mimeeq modular UI also exposes a 2D/3D canvas button; the product setting startInTopView opens that stock canvas in plan view (Custom UI ignores it).

By default the plan keeps the right-angle turn nearest to the current camera. Pass { fitToCanvas: true } to turn it so the scene's longest side runs along the canvas's longest side: vertical on a tall (mobile) canvas, horizontal on a wide one. A square canvas or a square plan keeps the nearest turn. While that plan is open, a canvas resize that moves its long side to the other axis (a stage that grows taller after entering, or a device rotation) turns and refits it again.

Dispatches mimeeq-3d-top-view-change.

Parameters​

options?​

Optional plan-view options.

fitToCanvas?​

boolean

Turn the plan so its longest side runs along the canvas's longest side. Defaults to false.

Returns​

Promise<void>

Examples​

await window.mimeeqApp.actions.enterTopView();
// Lay the sofa along the long side of a tall mobile canvas.
await window.mimeeqApp.actions.enterTopView({ fitToCanvas: true });