Interface: SkinnedFamilyDefinition<TVariant, TBone, TData>
Type parameters
| Name | Type |
|---|---|
TVariant | extends string |
TBone | extends string |
TData | extends InstancedEntityData |
Properties
animate
• Optional animate: (pose: SkinnedPose<TBone, TData>) => void
Poses the bones each frame; a still body when unset.
Type declaration
▸ (pose): void
Parameters
| Name | Type |
|---|---|
pose | SkinnedPose<TBone, TData> |
Returns
void
bones
• bones: readonly TBone[]
Bone names, in index order.
config
• Optional config: Partial<Omit<SkinnedFamilyConfig<TVariant, Texture<unknown>>, "family" | "variants" | "buildGeometry" | "buildTexture">>
Anything else the pool takes (material, emissive, ...).
density
• Optional density: TexelDensity
Texels per block of the painted atlas.
hasBabies
• Optional hasBabies: boolean
Whether babies get their own body (parts(variant, true)).
legSwing
• Optional legSwing: number
The leg sweep (radians) animate uses at full stride, so the stride
clock covers the ground those legs reach. Defaults to 0.5.
parts
• parts: (variant: TVariant, isBaby: boolean) => NamedSkinnedPart<TBone>[]
The body of one variant, adult or baby. Index = atlas row.
Type declaration
▸ (variant, isBaby): NamedSkinnedPart<TBone>[]
Parameters
| Name | Type |
|---|---|
variant | TVariant |
isBaby | boolean |
Returns
NamedSkinnedPart<TBone>[]
type
• type: string
The entity type the server spawns; also the family's name.
variants
• variants: readonly TVariant[]