Skip to content

@modoki/engine / rendering / computeActiveFrameFit

Function: computeActiveFrameFit() ​

computeActiveFrameFit(world, camera, aspect, ortho): ActiveFrameFit | null

Compute where the given (already pose-synced) camera must sit to fit the active CameraFrame box for aspect. Returns null when no frame is active — the caller then leaves the authored camera untouched. ortho selects the ortho fit (orthoSize) vs perspective (dolly distance).

Parameters ​

world ​

World

camera ​

OrthographicCamera | PerspectiveCamera

aspect ​

number

ortho ​

boolean

Returns ​

ActiveFrameFit | null

Built with Modoki.