CutShots beta
Class of @v12-engine/client
export declare class CutShotsThe camera of a cut (cut.shots): shots to poses and views, the dolly, zoom, orbit, pan and tilt, a group framed, a unit followed, focused or looked at, a handheld wander, a shake, and the transitions between shots. The cut's camera, shot, follow and the rest are this, under the names the docs give them
Members
constructor
constructor(cut: Cut);Constructs a new instance of the CutShots class
camera
camera(key: CameraKey | string, seconds?: number, ease?: Ease | string): Promise<void>;Moves the camera to a key in seconds, along a curve; at once with none. Stops following. A key leaves what it does not say as it is. A name is a view of the map saved under it in the editor: cut.camera('gate', 2). The short form of shot
dolly
dolly(by: number, seconds?: number, ease?: Ease | string): Promise<void>;Dollies: the camera closer by by units of its distance (farther when more than 0, as a dolly out), in seconds. It keeps looking where it looks
fit
fit(targets: readonly (number | string)[], options?: {
padding?: number;
seconds?: number;
ease?: Ease | string;
pitch?: number;
yaw?: number;
fov?: number;
}): Promise<void>;Frames a group: the camera moved over their middle, as far as it takes to have all of them in the picture with padding units round them, in seconds (1 when left out). Stops following. For a group kept framed as it moves, follow(group, { fit: true })
focus
focus(target: number | string, options?: {
distance?: number;
seconds?: number;
ease?: Ease | string;
pitch?: number;
fov?: number;
}): Promise<void>;Pushes in on a unit: the camera over it, distance from it (12 when left out), in seconds (1 when left out)
follow
follow(target: number | string | readonly (number | string)[] | null, options?: FollowOptions): void;Keeps the camera on an entity (an id, or a unit's name) or a group from now on, catching up with it as options say (FollowOptions: distance, pitch, yaw, the lens; lag, lead, deadzone, offset, keep, fit for a group kept whole in the picture); until told to follow something else, moved by a shot, or all of it is gone. Null stops following. The code form of a follow clip of the camera lane
frame
frame(step: number): void;What keeps the camera on something, after the shots and the lanes have put it where they want: a frame of the cut
handheld
handheld(options?: HandheldOptions | null): void;A camera held by hand: where it looks and which way wander a little (amount units, at speed), noise of the cut's clock, the same for the same seed (the cut's, seed, when left out). Null steadies it
letGo
letGo(): void;Lets go of what the camera keeps on: the cut is skipped
lookAt
lookAt(target: number | string | null): void;Keeps the camera turned to a unit wherever it stands or goes, whatever the shots do, until lookAt(null). The camera stays where the shots put it; only what it looks at is the unit
orbit
orbit(center: Vec2 | {
entity: number;
}, options: {
radians: number;
seconds?: number;
distance?: number;
pitch?: number;
ease?: Ease | string;
}): Promise<void>;Orbits: the camera turned by radians around a spot or an entity (where it is then), in seconds, at the distance and the pitch given, or as it looks now. A full turn is 2π; the way round is the sign's
pan
pan(by: Vec2, seconds?: number, ease?: Ease | string): Promise<void>;Pans: the point looked at moved by by on the ground, in seconds; the rest as it is
rail
rail(name: string, options?: RailOptions): Promise<void>;A run along a path of the map by its name, as a camera on tracks: cut to from of its length, then on to to of it in seconds, facing the way it goes (or a yaw), straight from point to point or its bends rounded (smooth). What the options leave out of the pose is as the camera has it. Stops following. The code form of a rail key
shake
shake(strength?: number): void;Shakes the camera, so hard (as a blast nearby does): it settles by itself. Nothing on a stage that cannot
shot
shot(key: CameraKey | string | readonly (CameraKey | string)[], options?: ShotOptions): Promise<void>;A shot: the camera moved to a pose in seconds (at once when none), along a curve (ease, gently when left out), and the hook shot as it gets there. The pose is a key (what it leaves out stays as it is: at: entity: id , distance: 15, fov: 50 ), a view of the map by its name, or several of either: a move through them all, along a smooth curve (path), with the time shared out by the distance. Stops following. The code form of a key of the camera lane; dolly, zoom, orbit, pan and tilt make shots of their own
tilt
tilt(radians: number, seconds?: number, ease?: Ease | string): Promise<void>;Tilts: the pitch changed by radians (down towards the ground when more than 0), in seconds
transition
transition(which: string | TransitionDef, options?: TransitionOptions): Promise<void>;A transition at a cut (B3): the last frame drawn is kept, and the new shot comes in over it for seconds (0.6 when left out), as the transition's mask has it (a dissolve, a wipe, an iris opening on a unit, a fade through a colour). Called just before the camera cuts (or with shot(..., { transition })), and settles when it is over. By id among transitions, or a def; the hook transition hears it. A skip lets go of it at once
zoom
zoom(to: {
fov?: number;
distance?: number;
}, seconds?: number, ease?: Ease | string): Promise<void>;Zooms: to a lens (fov, degrees: a long lens is a small angle) and, or, a distance, in seconds. A zoom of the lens flattens the picture as a real one does; a dolly does not