Skip to main content

Interface: SkinnedFamilyDefinition<TVariant, TBone, TData>

Type parameters​

NameType
TVariantextends string
TBoneextends string
TDataextends 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​
NameType
poseSkinnedPose<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​
NameType
variantTVariant
isBabyboolean
Returns​

NamedSkinnedPart<TBone>[]


type​

• type: string

The entity type the server spawns; also the family's name.


variants​

• variants: readonly TVariant[]