Constructs the bone hierarchy, then attaches each part. A rigid part is
parented to its attachedBone and rides that bone. A mesh with skin data and
no rigid attachment becomes a THREE.SkinnedMesh bound to the skeleton. If
both signals are present, attachedBone wins: the part is treated as a rigid
prop and its skin payload is ignored by the viewer. An attachedBone the
skeleton does not carry throws, the same class as a skin referencing a
missing bone (#1106): a silently root-parented prop renders frozen at the
origin while everything else looks right.
A skin whose method is "dual-quaternion" takes a material variant with
the dual quaternion vertex patch, and its mesh casts shadows through its own
patched depth and distance materials, so the shadow deforms like the surface;
the mesh is flagged so guide passes patch the materials they swap in. Every
skinned part is an AutoMovieSkinnedMesh of its skin's method, so
bounds, culling, raycasts and vertex queries read the blend the shader draws.
Parts with the same ordered joint slots share one skeleton and bone texture
within this model; each mesh retains its own bind matrix and blend method.
Separate model builds own independent skeletons and pose state.
A mesh's morph targets reach morphTargetDictionary by name, so
applyExpression drives them, and its driven targets are recorded on
the mesh for applyPose.
The returned bones map is what applyPose drives, and the model's
lookAt rides along so AutoMoviePlayer can turn its eye bones.
resolveTexture is how a declared PBR finish gets its pixels, and it is the
host's to supply because this package performs no I/O: the caller decodes the
model's bindings first (an AutoMovieTextureCache primes them in one pass)
and hands over an IAutoMovieTextureResolver that answers
synchronously. Omitting it builds every material with its scalar coefficients
and no maps, which is exactly what a model declaring no texture renders and
what every pre-texture production still renders. The resolver must answer
with a texture object PER BINDING, because buildMaterial writes that
binding's color space, UV transform and sampler onto whatever it is given,
and two slots sharing one object would fight over one repeat.
Every returned geometry and material is registered as soon as it is acquired,
before a later part, binding or attachment can fail. Failure independently
retires those owned objects, including objects not yet attached to the group;
successful return transfers them to the caller. Texture wrappers stay with
the resolver's owner. A nested producer retires its own failed allocation.
An anisotropic rigid mesh without morph targets or normal maps receives
native computed tangents when its indexed normal/UV geometry supports them.
Mapped and deforming meshes retain their derivative frame: a rest tangent
cannot follow a morph or replace a transformed normal-map frame. This
changes no source arrays or material coefficients, is not a MikkTSpace bake
guarantee and leaves degenerate UVs on their existing fallback.
Fully transparent, non-transmissive parts stay hidden when a guide swaps materials.
Build a renderable
three.jsobject from an IAutoMovieModel.Constructs the bone hierarchy, then attaches each part. A rigid part is parented to its
attachedBoneand rides that bone. A mesh with skin data and no rigid attachment becomes aTHREE.SkinnedMeshbound to the skeleton. If both signals are present,attachedBonewins: the part is treated as a rigid prop and its skin payload is ignored by the viewer. AnattachedBonethe skeleton does not carry throws, the same class as a skin referencing a missing bone (#1106): a silently root-parented prop renders frozen at the origin while everything else looks right.A skin whose
methodis"dual-quaternion"takes a material variant with the dual quaternion vertex patch, and its mesh casts shadows through its own patched depth and distance materials, so the shadow deforms like the surface; the mesh is flagged so guide passes patch the materials they swap in. Every skinned part is an AutoMovieSkinnedMesh of its skin's method, so bounds, culling, raycasts and vertex queries read the blend the shader draws. Parts with the same ordered joint slots share one skeleton and bone texture within this model; each mesh retains its own bind matrix and blend method. Separate model builds own independent skeletons and pose state.A mesh's morph targets reach
morphTargetDictionaryby name, so applyExpression drives them, and its driven targets are recorded on the mesh for applyPose.The returned
bonesmap is what applyPose drives, and the model'slookAtrides along so AutoMoviePlayer can turn its eye bones.resolveTextureis how a declared PBR finish gets its pixels, and it is the host's to supply because this package performs no I/O: the caller decodes the model's bindings first (anAutoMovieTextureCacheprimes them in one pass) and hands over an IAutoMovieTextureResolver that answers synchronously. Omitting it builds every material with its scalar coefficients and no maps, which is exactly what a model declaring no texture renders and what every pre-texture production still renders. The resolver must answer with a texture object PER BINDING, because buildMaterial writes that binding's color space, UV transform and sampler onto whatever it is given, and two slots sharing one object would fight over one repeat. Every returned geometry and material is registered as soon as it is acquired, before a later part, binding or attachment can fail. Failure independently retires those owned objects, including objects not yet attached to the group; successful return transfers them to the caller. Texture wrappers stay with the resolver's owner. A nested producer retires its own failed allocation. An anisotropic rigid mesh without morph targets or normal maps receives native computed tangents when its indexed normal/UV geometry supports them. Mapped and deforming meshes retain their derivative frame: a rest tangent cannot follow a morph or replace a transformed normal-map frame. This changes no source arrays or material coefficients, is not a MikkTSpace bake guarantee and leaves degenerate UVs on their existing fallback. Fully transparent, non-transmissive parts stay hidden when a guide swaps materials.