Build the visible-window indicator DrawCommand for the minimap.
DrawCommand
The main canvas's visible world rect is:
worldX = mainView.xworldY = mainView.yworldW = mainViewDims.width / mainView.scale.xworldH = mainViewDims.height / mainView.scale.y Copy
worldX = mainView.xworldY = mainView.yworldW = mainViewDims.width / mainView.scale.xworldH = mainViewDims.height / mainView.scale.y
That world rect is then transformed into the minimap's screen coordinates through minimapView.
minimapView
The returned command is a dashed-stroke path rect with no fill — matching the ViewportLayerDemo indicator math.
path
ViewportLayerDemo
Build the visible-window indicator
DrawCommandfor the minimap.The main canvas's visible world rect is:
That world rect is then transformed into the minimap's screen coordinates through
minimapView.The returned command is a dashed-stroke
pathrect with no fill — matching theViewportLayerDemoindicator math.