This is a UV unwrapping I make it in Blender:
I exported it as GLTF with UVs and imported the mesh in Threejs:
this.cubePost2Model = this.resources.items.cubePost2.scene
Then apply a texture:
this.cubePost2Model.traverse((child) =>
{
if(child instanceof THREE.Mesh)
{
child.castShadow = true
child.material = this.material
}
})
As can be seen, the exterior of the texture is clamped to the edges because wrapS
and wrapT
are set to default THREE.ClampToEdgeWrapping
Is there a way to achieve the mapping as in Blender? I mean, with a solid color in the surface of the geometry outside of texture.
The other possible values for wrapS
and wrapT
are THREE.RepeatWrapping
and THREE.MirroredRepeatWrapping
so I can’t find the way to do it.
Thanks.