Skip to main content

Interface: SkinnedFamilyConfig<TVariant, TTexture>

One family of GPU-instanced, bone-skinned entities: its variants, its rig, and how to build each variant's geometry and texture. Adding a variant is a row in variants; adding a family is one of these and a SkinnedInstancePool over it.

Geometry is one box per part, every vertex carrying skinIndex / skinWeight (its bone), pivotOffset (the bone's pivot) and partIndex (its row in the part atlas); see buildSkinnedParts for a builder that writes all of them from a part list.

Type parameters​

NameType
TVariantextends string = string
TTextureextends THREE.Texture = THREE.Texture

Properties​

boneCount​

• boneCount: number | (variant: TVariant) => number


buildGeometry​

• buildGeometry: (variant: TVariant, isBaby: boolean) => BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>

Type declaration​

▸ (variant, isBaby): BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>

Parameters​
NameType
variantTVariant
isBabyboolean
Returns​

BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>


buildTexture​

• buildTexture: (variant: TVariant, isBaby: boolean) => TTexture

Type declaration​

▸ (variant, isBaby): TTexture

Parameters​
NameType
variantTVariant
isBabyboolean
Returns​

TTexture


emissive​

• Optional emissive: (variant: TVariant, isBaby: boolean) => number

Type declaration​

▸ (variant, isBaby): number

Parameters​
NameType
variantTVariant
isBabyboolean
Returns​

number


faceShades​

• Optional faceShades: EntityFaceShades


family​

• family: string


hasAlphaCutShadow​

• Optional hasAlphaCutShadow: (variant: TVariant) => boolean

Type declaration​

▸ (variant): boolean

Parameters​
NameType
variantTVariant
Returns​

boolean


hasBabies​

• hasBabies: boolean


hitEffectIntensity​

• Optional hitEffectIntensity: number


isBakeableVariant​

• Optional isBakeableVariant: (variant: string) => boolean

Type declaration​

▸ (variant): boolean

Parameters​
NameType
variantstring
Returns​

boolean


material​

• Optional material: (variant: TVariant, isBaby: boolean) => Partial<InstancedSkinnedMaterialOptions>

Type declaration​

▸ (variant, isBaby): Partial<InstancedSkinnedMaterialOptions>

Parameters​
NameType
variantTVariant
isBabyboolean
Returns​

Partial<InstancedSkinnedMaterialOptions>


partCount​

• partCount: number


rigInfo​

• Optional rigInfo: (variant: TVariant, isBaby: boolean, measured: SkinnedRigInfo) => object

Type declaration​

▸ (variant, isBaby, measured): object

Parameters​
NameType
variantTVariant
isBabyboolean
measuredSkinnedRigInfo
Returns​

object


surface​

• Optional surface: (variant: TVariant, isBaby: boolean) => EntitySurfaceOptions

Type declaration​

▸ (variant, isBaby): EntitySurfaceOptions

Parameters​
NameType
variantTVariant
isBabyboolean
Returns​

EntitySurfaceOptions


textureSource​

• Optional textureSource: SkinnedTextureSource


variants​

• variants: readonly TVariant[]