TextureLoader
Component for asynchronously loading a texture. It internally manages THREE.Texture
.
Example
Props
Prop name | Description | Type | Default |
---|---|---|---|
offset | How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is 0.0 to 1.0 . | Vector2Like | [0, 0] |
repeat | How many times the texture is repeated across the surface, in each direction U and V. If repeat is set greater than 1 in either direction, the corresponding Wrap parameter should also be set to THREE.RepeatWrapping or THREE.MirroredRepeatWrapping to achieve the desired tiling effect.Setting different repeat values for textures is restricted in the same way like offset . | Vector2Like | [1, 1] |
rotation | How much the texture is rotated around the center point, in radians. Positive values are counter-clockwise. | number | 0 |
url | The path or URL to the texture file. This can also be a Data URI. | string | |
wrapS | This defines how the texture is wrapped horizontally and corresponds to U in UV mapping. The default is THREE.ClampToEdgeWrapping , where the edge is clamped to the outer edge texels.The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping .See the texture constants page for details. | Wrapping | ClampToEdgeWrapping |
wrapT | This defines how the texture is wrapped vertically and corresponds to V in UV mapping. The default is THREE.ClampToEdgeWrapping , where the edge is clamped to the outer edge texels.The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping .See the texture constants page for details. | Wrapping | ClampToEdgeWrapping |