NpcProps
NpcProps = {
avatar:string|VrmBody;children?:ReactNode;clips?:undefined;clipSpeeds?:undefined;collisionMask?:CollisionMask|null;color?:undefined;controller?:Partial<{floorSnapDistance:number;gravity:boolean;gravityScale:number;groundFriction:number;height:number;jumpHeight:number;maxSlopeRadians:number;platformOnLeave:PlatformOnLeave;pushes:CollisionMask|null;stepHeight:number;turnWithPlatform:boolean; }>;cullingMode?:AnimationCulling;facing?:number;faction?:"friendly"|"neutral"|"hostile"|Faction;height?:number;leash?:number;level?:number;model?:undefined;name:string;position?:Position;radius?:number;routines?:Routines;shape?:undefined;title?:string; } | {avatar?:undefined;children?:ReactNode;clips?:Partial<Record<ModelClip,string>>;clipSpeeds?:Partial<Record<Walk|Run,number>>;collisionMask?:CollisionMask|null;color?:undefined;controller?:Partial<{floorSnapDistance:number;gravity:boolean;gravityScale:number;groundFriction:number;height:number;jumpHeight:number;maxSlopeRadians:number;platformOnLeave:PlatformOnLeave;pushes:CollisionMask|null;stepHeight:number;turnWithPlatform:boolean; }>;cullingMode?:undefined;facing?:number;faction?:"friendly"|"neutral"|"hostile"|Faction;height?:number;leash?:number;level?:number;model:string;name:string;position?:Position;radius?:number;routines?:Routines;shape?:undefined;title?:string; } | {avatar?:undefined;children?:ReactNode;clips?:undefined;clipSpeeds?:undefined;collisionMask?:CollisionMask|null;color?:ColorRepresentation;controller?:Partial<{floorSnapDistance:number;gravity:boolean;gravityScale:number;groundFriction:number;height:number;jumpHeight:number;maxSlopeRadians:number;platformOnLeave:PlatformOnLeave;pushes:CollisionMask|null;stepHeight:number;turnWithPlatform:boolean; }>;cullingMode?:undefined;facing?:number;faction?:"friendly"|"neutral"|"hostile"|Faction;height?:number;leash?:number;level?:number;model?:undefined;name:string;position?:Position;radius?:number;routines?:Routines;shape?:"sphere"|"box"|"capsule"|PlaceholderShape;title?:string; }
What an Npc takes. It wears one look, as a CharacterSpawn does: an
avatar, a registered model with its clips, or a primitive in a colour,
the capsule when it names none. Where a CharacterSpawn lets an avatar
win over a model it is also handed, an Npc refuses the second look by
type, so a look named in vain fails the typecheck.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ avatar: string | VrmBody; children?: ReactNode; clips?: undefined; clipSpeeds?: undefined; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: AnimationCulling; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; name: string; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; }
| Name | Type | Default value | Description |
|---|---|---|---|
avatar |
string | VrmBody |
- | The body it wears, as a CharacterSpawn’s avatar. |
children? |
ReactNode |
- | Behaviours on it, such as <Interact prompt="Talk" />. |
clips? |
undefined |
- | - |
clipSpeeds? |
undefined |
- | - |
collisionMask? |
CollisionMask | null |
- | The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks her. |
color? |
undefined |
- | - |
controller? |
Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }> |
- | The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump. |
cullingMode? |
AnimationCulling |
- | Whether its avatar is posed while the camera shows it small or not at all, as Unity’s Animator.cullingMode. An avatar’s alone: a model is posed every frame, as the player’s is. |
facing? |
number |
- | Radians about y at spawn. |
faction? |
"friendly" | "neutral" | "hostile" | Faction |
- | Whose side it is on. |
height? |
number |
0 |
Metres above the feet the head stands. |
leash? |
number |
- | Metres from its spawn it may walk; left out, its route bounds it. |
level? |
number |
- | A number a game reads, such as the level a quest asks for. |
model? |
undefined |
- | - |
name |
string |
- | Drawn over its head, and how the AI tree names it. |
position? |
Position |
- | Where it spawns; the first step stands it on the ground. |
radius? |
number |
0 |
Metres from the axis to the side. |
routines? |
Routines |
- | What it does, as routines() built it. Left out, it stands and plays idle. |
shape? |
undefined |
- | - |
title? |
string |
- | Drawn under its name, such as “Herbalist”: WoW’s subname. |
Type Literal
Section titled “Type Literal”{ avatar?: undefined; children?: ReactNode; clips?: Partial<Record<ModelClip, string>>; clipSpeeds?: Partial<Record<Walk | Run, number>>; collisionMask?: CollisionMask | null; color?: undefined; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model: string; name: string; position?: Position; radius?: number; routines?: Routines; shape?: undefined; title?: string; }
| Name | Type | Default value | Description |
|---|---|---|---|
avatar? |
undefined |
- | - |
children? |
ReactNode |
- | Behaviours on it, such as <Interact prompt="Talk" />. |
clips? |
Partial<Record<ModelClip, string>> |
- | The file’s own name for each of its model’s clips that is not named as ModelClip names it, such as { run: "Sprint" }. |
clipSpeeds? |
Partial<Record<Walk | Run, number>> |
- | The ground speed, in metres a second, at which its walk and its run play at their own pace, over the speed the engine measures off the model’s feet, as a CharacterSpawn’s clipSpeeds. |
collisionMask? |
CollisionMask | null |
- | The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks her. |
color? |
undefined |
- | - |
controller? |
Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }> |
- | The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump. |
cullingMode? |
undefined |
- | - |
facing? |
number |
- | Radians about y at spawn. |
faction? |
"friendly" | "neutral" | "hostile" | Faction |
- | Whose side it is on. |
height? |
number |
0 |
Metres above the feet the head stands. |
leash? |
number |
- | Metres from its spawn it may walk; left out, its route bounds it. |
level? |
number |
- | A number a game reads, such as the level a quest asks for. |
model |
string |
- | The name of a registered model it wears, as a CharacterSpawn’s model: where its file has clips, it plays the ones its pose asks for, idle at rest, walk and run blended by its speed, and jump off the ground. |
name |
string |
- | Drawn over its head, and how the AI tree names it. |
position? |
Position |
- | Where it spawns; the first step stands it on the ground. |
radius? |
number |
0 |
Metres from the axis to the side. |
routines? |
Routines |
- | What it does, as routines() built it. Left out, it stands and plays idle. |
shape? |
undefined |
- | - |
title? |
string |
- | Drawn under its name, such as “Herbalist”: WoW’s subname. |
Type Literal
Section titled “Type Literal”{ avatar?: undefined; children?: ReactNode; clips?: undefined; clipSpeeds?: undefined; collisionMask?: CollisionMask | null; color?: ColorRepresentation; controller?: Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }>; cullingMode?: undefined; facing?: number; faction?: "friendly" | "neutral" | "hostile" | Faction; height?: number; leash?: number; level?: number; model?: undefined; name: string; position?: Position; radius?: number; routines?: Routines; shape?: "sphere" | "box" | "capsule" | PlaceholderShape; title?: string; }
| Name | Type | Default value | Description |
|---|---|---|---|
avatar? |
undefined |
- | - |
children? |
ReactNode |
- | Behaviours on it, such as <Interact prompt="Talk" />. |
clips? |
undefined |
- | - |
clipSpeeds? |
undefined |
- | - |
collisionMask? |
CollisionMask | null |
- | The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks her. |
color? |
ColorRepresentation |
- | The colour of its primitive. |
controller? |
Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }> |
- | The character controller’s settings it walks by, each laid over its defaults: its step, its steepest slope and its jump. |
cullingMode? |
undefined |
- | - |
facing? |
number |
- | Radians about y at spawn. |
faction? |
"friendly" | "neutral" | "hostile" | Faction |
- | Whose side it is on. |
height? |
number |
0 |
Metres above the feet the head stands. |
leash? |
number |
- | Metres from its spawn it may walk; left out, its route bounds it. |
level? |
number |
- | A number a game reads, such as the level a quest asks for. |
model? |
undefined |
- | - |
name |
string |
- | Drawn over its head, and how the AI tree names it. |
position? |
Position |
- | Where it spawns; the first step stands it on the ground. |
radius? |
number |
0 |
Metres from the axis to the side. |
routines? |
Routines |
- | What it does, as routines() built it. Left out, it stands and plays idle. |
shape? |
"sphere" | "box" | "capsule" | PlaceholderShape |
- | The primitive it wears. |
title? |
string |
- | Drawn under its name, such as “Herbalist”: WoW’s subname. |