CutScreen beta
Class of @v12-engine/client
export declare class CutScreenThe screen as a script drives it (cut.screen, cinematic plan B4): the code form of the screen lane's clips. Each call eases the screen from where it is to what is asked over seconds, on the cut's clock (a pause holds it, a seek is a jump), and settles when it is there; one not waited for goes on with the rest. What a call does not name stays as it is; reset brings everything back. The stage draws it (Stage.screen, the renderer's ScreenPass); on a stage without a screen (a test's) the calls only take their time
Members
constructor
constructor(cut: Cut);Constructs a new instance of the CutScreen class
aspect
aspect(ratio: number | false, seconds?: number, look?: {
color?: ScreenColor;
soft?: number;
}): Promise<void>;The picture in a ratio, centred: bars above and below or at the sides, whichever make it, and the HUD laid out inside it (ui.screenBox). false for the whole screen again
blur
blur(px: number, seconds?: number): Promise<void>;The picture blurred by px pixels (0 sharp), over seconds
crop
crop(region: {
x: number;
y: number;
w: number;
h: number;
} | false, seconds?: number): Promise<void>;A part of the picture filling the frame: shares of its width and height from its top left; false the whole
fade
fade(color: ScreenColor, opacity: number, seconds?: number): Promise<void>;The screen faded to a colour, opacity of the way (1 all colour, 0 clear), over seconds. It stays as left
flash
flash(color?: ScreenColor, seconds?: number): Promise<void>;A flash: the screen all color at once, clearing over seconds
letterbox
letterbox(ratio: number | boolean, seconds?: number, look?: {
color?: ScreenColor;
soft?: number;
}): Promise<void>;Bars above and below: of the look's share (true), leaving a picture of ratio between them (2.39, 1.85, 16/9), or none (false), eased over seconds. look is their colour and how soft their edge is
overlay
overlay(what: string | false, options?: {
color?: ScreenColor;
opacity?: number;
blend?: OverlayBlend;
seconds?: number;
}): Promise<void>;A colour, or a picture of the game's textures coloured by color (white as it is), laid over everything at opacity, blended over it, darkening (multiply), lightening (screen) or added; false takes it off
pillarbox
pillarbox(ratio: number | boolean, seconds?: number, look?: {
color?: ScreenColor;
soft?: number;
}): Promise<void>;Bars at the sides, as letterbox above and below
reset
reset(seconds?: number): Promise<void>;Everything back to the plain picture, over seconds
state
get state(): ScreenState;The screen as it is now, as the stage draws it
stretch
stretch(by: {
x: number;
y: number;
} | false, seconds?: number): Promise<void>;The picture stretched about its centre, x and y times; false as it is
tint
tint(color: ScreenColor, amount: number, seconds?: number): Promise<void>;The picture coloured by color, amount of the way (0 as it is), over seconds
to
to(state: Partial<ScreenState>, seconds: number): Promise<void>;Eases the screen from where it is to state over seconds, on the cut's clock, and settles there
vignette
vignette(amount: number, softness?: number, seconds?: number): Promise<void>;The corners darkened by amount (0 to 1), coming in over softness of the way from the edge (0 a ring, 1 from the centre)