Skip to content

ConstructionLook beta ​

Interface of @v12-engine/client

ts
export interface ConstructionLook

How a building looks as it goes up (UnitLook.construction), each part as a game likes, together

Members ​

cancelled ​

ts
cancelled?: {
        fx?: string | FxDef;
        sound?: string;
        look?: 'fold' | 'sink' | DeathLook;
    };

What plays as it is called off, and how it goes: folds into the ground (fold, when left out), sinks, or a death's look

clip ​

ts
clip?: string;

A clip of its model played along with its progress, as a classic RTS building's birth: birth

done ​

ts
done?: {
        fx?: string | FxDef;
        sound?: string;
    };

What plays as it is done

motion ​

ts
motion?: 'grow' | 'rise' | 'fade' | 'reveal' | 'none';

How it comes up: grows up out of the ground (grow, as it always did), rises out of it (rise), fades in (fade), is revealed from the ground up by a cut with a glowing edge (reveal, revealColor), or stands as it will (none). grow when left out

revealColor ​

ts
revealColor?: [number, number, number];

The glowing edge of reveal: its colour, and how tall it is in world units

revealEdge ​

ts
revealEdge?: number;

How tall the glowing edge of reveal is, in world units

stages ​

ts
stages?: readonly ConstructionStage[];

Stages by progress (ConstructionStage): models, nodes shown, an effect and a sound as each begins

upgrade ​

ts
upgrade?: Omit<ConstructionLook, 'upgrade' | 'cancelled'>;

The same, for its upgrade into another type (UnitTypeDef.upgradesTo): by the upgrade's progress

working ​

ts
working?: {
        fx?: string | FxDef;
        at?: string;
        sound?: string;
        params?: FxParams;
    };

What plays while builders work at it, at each blow: an effect at the builder's point (at: a hand), a sound