added documentation for Focusable Zones
This commit is contained in:
parent
0f1378c069
commit
960c247b20
15 changed files with 101 additions and 31 deletions
|
@ -793,7 +793,10 @@ export class GameScene extends DirtyScene {
|
|||
const focusable = zone.properties?.find((property) => property.name === "focusable");
|
||||
if (focusable && focusable.value === true) {
|
||||
const zoomMargin = zone.properties?.find((property) => property.name === "zoom_margin");
|
||||
this.cameraManager.enterFocusMode(zone, Number(zoomMargin?.value));
|
||||
this.cameraManager.enterFocusMode(
|
||||
zone,
|
||||
zoomMargin ? Math.max(0, Number(zoomMargin.value)) : undefined
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue