Skip to content

ScreenTransition beta ​

Interface of @v12-engine/render

ts
export interface ScreenTransition

A transition being played. A new object is a new cut: the old shot is taken as the object is first seen, and for as long as it is the one given, its values are read every frame

Members ​

angle ​

ts
angle: number;

The angle a wipe, a push or a slide moves along, in radians, 0 from left to right, a quarter turn upwards

at ​

ts
at: readonly [number, number];

An iris's middle, shares of the screen from its bottom left

colour ​

ts
colour: Rgb;

The colour a fade or a flash goes through

kind ​

ts
kind: number;

One of the stages' own (TRANSITION_KINDS)

mask ​

ts
mask?: {
        id: string;
        wgsl: string;
    };

A mask of the game's own in the stages' place: the body of fn mask(uv: vec2f, t: f32, at: vec2f, soft: f32) -> f32 in WGSL (1 where the old picture shows, 0 the new; uv and at from the bottom left), under a name of its own

old ​

ts
old: 'kept' | ScreenPicture;

The old shot: the picture as the frame before this object came left it, or one drawn elsewhere every frame

reverse ​

ts
reverse: boolean;

The other way round: an iris closing on its point

shape ​

ts
shape: number;

An iris's shape: 0 a circle, 1 a diamond, 2 a star

soft ​

ts
soft: number;

How soft the edge of a wipe or an iris is, as a share of the picture

t ​

ts
t: number;

How far along, 0 (all old) to 1 (all new)