Skip to content

Caster beta ​

Interface of @v12-engine/render

ts
export interface Caster

A thing that would cast the sun's shadow into a cascade, as the game's code is asked of it (Renderer.casters.casts, the client's WorldShadows.casts): once a frame for each cascade it is in, so what decides should be quick

Members ​

batch ​

ts
batch: unknown;

The batch it is drawn by, and which of its copies it is (0 for a batch kept whole, or in parts)

cascade ​

ts
cascade: number;

The cascade it is drawn into: 0 the nearest the camera

copy ​

ts
copy: number;

Which of the batch's copies it is: 0 for a batch kept whole, or in parts

distance ​

ts
distance: number;

How far the nearest of it is from the camera, in cells

doodads ​

ts
doodads?: readonly number[];

The doodads it is, for scenery: by their ids (BatchOptions.caster)

kept ​

ts
kept: boolean;

Whether it casts as the culling says: small and far does not, nor what throws no shadow the view can see

size ​

ts
size: number;

The longest side of what it is drawn in, in cells: its sphere's width; a batch kept whole or in parts, its box's

unit ​

ts
unit: boolean;

Whether it is a unit's or a building's (BatchOptions.caster)