Skip to content

anim-format (runtime format) / framingPose

Function: framingPose() ​

ts
function framingPose(
   pose, 
   view, 
   stage
): CameraPose;

What a camera-framed view shows (THE rule for the editor's exports and the player): pose = the scene's camera (null = a scene without one), drawn into a view frame (the first scene's camera frame, else the stage). A camera keeps its centre / turn / zoom and is stretched to nothing: its pixels are the view's. A scene without a camera = a camera of the view's size on the stage centre, not zoomed.

Parameters ​

ParameterType
pose| Omit<CameraPose, "width" | "height"> | null
view{ height: number; width: number; }
view.heightnumber
view.widthnumber
stage{ height: number; width: number; }
stage.heightnumber
stage.widthnumber

Returns ​

CameraPose

HereSplash — 2D animation for the web