five-on-it / apps/client/src/renderer/models / ActorModels
Interface: ActorModels
Defined in: apps/client/src/renderer/models.ts:371
The models the actors are drawn with.
Properties
batched
readonlybatched:object
Defined in: apps/client/src/renderer/models.ts:427
Instances drawn by the last flush, and the batch meshes the scene holds.
instances
instances:
number
meshes
meshes:
number
clips
readonlyclips:ClipLibrary|undefined
Defined in: apps/client/src/renderer/models.ts:375
The character's clips, once loaded (clips.ts).
joints
readonlyjoints:ReadonlyMap<"head"|"torso"|"arm-l"|"arm-r"|"forearm-l"|"forearm-r"|"leg-l"|"leg-r"|"shin-l"|"shin-r",Vector3>
Defined in: apps/client/src/renderer/models.ts:377
Where each of the character's joints is at rest, in the actor's frame (m, the feet at the origin, facing +z); empty before the files are in.
lightBars
readonlylightBars:boolean
Defined in: apps/client/src/renderer/models.ts:429
Whether the light bars are loaded (their lamps' materials).
ready
readonlyready:boolean
Defined in: apps/client/src/renderer/models.ts:373
Whether every file is loaded; before that (and when a file fails) the actors are boxes.
Methods
doors()
doors(
name): readonlyDoorInfo[]
Defined in: apps/client/src/renderer/models.ts:381
The doors of the vehicle model name (none for an open one, or before the files are loaded).
Parameters
name
string
Returns
readonly DoorInfo[]
draw()
draw(
name,world,tint,options?):boolean
Defined in: apps/client/src/renderer/models.ts:404
Draws the model name this frame as spawn would show it under a node whose world matrix is world, tinted tint: an instance in each of its batches. Returns false when there is no such model (or the files are not in yet).
Parameters
name
string
world
Matrix
tint
Color3
options?
Returns
boolean
drawWeapon()
drawWeapon(
world,options):boolean
Defined in: apps/client/src/renderer/models.ts:421
Draws only the weapon a figure under world holds (options.weapon), the figure posed by options: the player's own figure, a clone the scene graph draws, holds its weapon so.
Parameters
world
Matrix
options
Returns
boolean
flashLightBars()
flashLightBars(
ms):void
Defined in: apps/client/src/renderer/models.ts:431
Lights every light bar's lamps as its livery's pattern has them at ms, and darkens the others.
Parameters
ms
number
Returns
void
flush()
flush():
void
Defined in: apps/client/src/renderer/models.ts:425
Hands this frame's instances to the batches; once a frame, after every draw, before the scene renders.
Returns
void
glass()
glass(
name):GlassGeometry|undefined
Defined in: apps/client/src/renderer/models.ts:383
The glass of the vehicle model name, once loaded; undefined for a model without any.
Parameters
name
string
Returns
GlassGeometry | undefined
hand()
hand(
world,side,options,out):boolean
Defined in: apps/client/src/renderer/models.ts:410
Where the tip of a character's fist is this frame (its right with side r, its left with l), the figure drawn under world as draw would draw it with options, into out. Returns false before the files are in.
Parameters
world
Matrix
side
"r" | "l"
options
out
Vector3
Returns
boolean
muzzle()
muzzle(
world,weapon,options,out):boolean
Defined in: apps/client/src/renderer/models.ts:416
Where the muzzle of the weapon weapon (a model's name) is this frame, held by a figure drawn under world with options, into out. Returns false before the files are in, or for a weapon without a muzzle (a grenade).
Parameters
world
Matrix
weapon
string
options
out
Vector3
Returns
boolean
offCentre()
offCentre(
name):number
Defined in: apps/client/src/renderer/models.ts:387
How far the middle of the model name lies from its actor's origin on the ground (m): 0 for a model hung where it should be.
Parameters
name
string
Returns
number
paintOf()
paintOf(
tint,wrecked):Color3
Defined in: apps/client/src/renderer/models.ts:423
The colour a model tinted tint is painted in: the tint, or a wreck's scorched (the same object every time).
Parameters
tint
Color3
wrecked
boolean
Returns
Color3
seats()
seats(
name): readonlySeat[]
Defined in: apps/client/src/renderer/models.ts:379
The seats of the vehicle model name, by seat index (0 the driver's); none before the files are loaded.
Parameters
name
string
Returns
readonly Seat[]
spawn()
spawn(
name,parent,tint,options?):TransformNode|undefined
Defined in: apps/client/src/renderer/models.ts:393
Hangs a tinted clone of the model name under parent (a car's node at its chassis centre; a person's at its capsule centre, the feet drop metres below), or returns undefined when there is no such model. wrecked scorches it as a wreck is drawn.
Parameters
name
string
parent
TransformNode
tint
Color3
options?
drop?
number
wrecked?
boolean
Returns
TransformNode | undefined
turning()
turning(
name):number
Defined in: apps/client/src/renderer/models.ts:385
How many parts of the vehicle model name turn as it steers (its front wheels and its steering wheel; none for a two-wheeler or a trailer, or before the files are in).
Parameters
name
string
Returns
number