The pack
fpsPropArt
function fpsPropArt(): Pack<{ propArt: PropArtApi }>
The fps-prop-art pack: game.propArt, ready-made barrels and crates, whole and wrecked, and scenery that stands about
a facility, for the FPS packs. No options.
Helpers
findPropArt
function findPropArt(id: string, set?: string): string | null
The art a prop id should wear; see PropArtApi.find.
findSceneryArt
function findSceneryArt(type: string, set?: string): string | null
The scenery picture a thing type should wear; see PropArtApi.findScenery.
PROP_ART
const PROP_ART: Readonly<Record<string, PropArtEntry>>
Every prop's pictures, 128 × 128 256-colour PNGs in base64 standing on the bottom edge, by set/id.
SCENERY_ART
const SCENERY_ART: Readonly<Record<string, SceneryArtEntry>>
Every piece of scenery's picture, a 256-colour PNG in base64 cut to the thing's own shape (at most 256 × 128,
as tall as fits), with its natural height in world units, by set/id.
Types
PropArtApi
interface PropArtApi
game.propArt.
readonly names: readonly string[]— Every prop's art, byset/id.readonly sets: readonly string[]— The sets:classic(Sector Assault) andmodern(Overdrive).find(id: string, set?: string): string | null— The art a prop id should wear:set/idas it is, the id inset, the id in any set, or a guess from its words ('fuel-drum'and'toxic-canister'wear a barrel,'supply-box'a crate). Null when nothing fits.load(props: ReadonlyArray<string | { id: string; art?: string }>, options?: PropArtLoadOptions): Promise<Record<string, PropArtInfo>>— Paint props into the atlas: each id (or{ id, art }to choose the art) gets its two frames atprefix + id. Ids with no art are left out. Async, because a browser decodes the pictures; headless, the frames exist but blank.readonly scenery: readonly SceneryArtSpec[]— Every piece of scenery's picture,set/idwith its natural height and width in world units.findScenery(type: string, set?: string): string | null— The scenery picture a thing type should wear:set/idas it is, the type inset, the type in any set, or a guess from its words ('wash-basin'wears the sink,'street-light'the lamp post,'chopper'the helicopter). Null when nothing fits.loadScenery(things: ReadonlyArray<string | { id: string; art?: string; height?: number }>, options?: SceneryArtLoadOptions): Promise<Record<string, SceneryArtInfo>>— Paint scenery into the atlas: each thing type (or{ id, art?, height? }to choose the art or how tall it stands, in world units) gets its one frame atprefix + id. Types with no art are left out. Async, because a browser decodes the pictures; headless, the frame exists but blank. Throws on anartthe pack does not have, and in dev on ascaleorheightthat is not a positive number (in production those fall back to the natural size).
PropArtEntry
interface PropArtEntry
One prop's pictures, as the pack ships them.
readonly whole: string— The prop standing whole, a 128 × 128 256-colour PNG in base64, standing on the bottom edge.readonly broken: string— Its wreck, the same size, lower and standing on the bottom edge.readonly bursts: boolean— Whether it is something that bursts (a barrel, a fuel cell) rather than something that only breaks (a crate).
PropArtInfo
interface PropArtInfo
A prop as it was painted: its key and which frame is which.
readonly id: string— The prop id it was painted for.readonly art: string— The art it wears,set/id.readonly key: string— The atlas key of its frames.readonly size: number— One frame's size in pixels (square; the prop stands on its bottom edge, centred).readonly frames: { readonly whole: number; readonly broken: number }— Which frame ofkeyis which:whole(0) andbroken(1, the wreck, lower).readonly bursts: boolean— Whether the art is of something that bursts (a barrel) rather than something that only breaks (a crate).
PropArtLoadOptions
interface PropArtLoadOptions
Options for load.
set?: string— The set to look in first:'classic'or'modern'. Default none (any set).prefix?: string— Atlas keys are this plus the prop id. Default'pa-'.
SceneryArtEntry
interface SceneryArtEntry
One piece of scenery's picture, as the pack ships it.
readonly picture: string— The thing standing, a 256-colour PNG in base64 cut to its own shape: its top on the top edge, its foot on the bottom.readonly size: readonly [number, number]— The picture's size in pixels,[width, height]: at most 256 × 128, as tall as fits.readonly height: number— How tall the thing stands in the world, in world units (metres): the picture's whole height.
SceneryArtInfo
interface SceneryArtInfo
A piece of scenery as it was painted: its key and how big to stand it.
readonly id: string— The thing type it was painted for.readonly art: string— The art it wears,set/id.readonly key: string— The atlas key of its one frame.readonly size: readonly [number, number]— The frame's size in pixels,[width, height]: the thing's own shape, its foot on the bottom edge, its top on the top.readonly height: number— How tall to stand its billboard, in world units: its natural height ×scale, or the height it was given.readonly width: number— How wide to make its billboard, in world units:height× the frame's width over its height.
SceneryArtLoadOptions
interface SceneryArtLoadOptions
Options for loadScenery.
set?: string— The set to look in first:'facility'. Default none (any set).prefix?: string— Atlas keys are this plus the thing type. Default'sc-'.scale?: number— World units per metre: every natural height and width is multiplied by it. Positive; default 1.
SceneryArtSpec
interface SceneryArtSpec
A piece of scenery the pack has a picture of, and how big it stands.
readonly art: string— Its name,set/id, asfindSceneryreturns andloadScenerytakes.readonly height: number— Its natural height in world units (metres): a toilet 0.8, a lamp post 3.5.readonly width: number— Its width in world units at that height, from the picture's shape.


