Skip to content

applyTextureBinding

applyTextureBinding(modelRoot, binding, texture, normalTexture?): TextureBindingResult

Defined in: packages/declarative-hex-worlds/src/three/texture-binding.ts:43

Apply a texture binding to a loaded model. Traverses modelRoot, and for every mesh whose name is targeted by the binding (a binding with no targets matches all meshes), sets the base-color map (and normalMap when a normal texture is given) on its material(s). Returns how many materials were updated.

Object3D

TextureBinding

Texture

Texture<unknown, TextureEventMap>

TextureBindingResult