[name]
A Helper class to ease the loading of images of different types.
Properties
.[page:string crossOrigin]
The crossOrigin string to implement CORS for loading the image from a different domain that allows CORS.
Methods
.generateDataTexture([page:Number width], [page:Number height], [page:Number color]) [page:DataTexture]
width -- The width of the texture.
height -- The width of the texture.
color -- The hexadecimal value of the color.
Generates a texture of a single color. It is a DataTexture with format, RGBFormat.
.parseDDS([page:String buffer], [page:boolean loadMipmaps]) [page:CompressedTexture]
buffer -- A string containing the data of the dds.
loadMipmaps -- A boolean to indicate if you need to load the mipmaps. Default is True.
Parses a DDS Image from the string into a CompressedTexture.
.loadCompressedTexture([page:todo url], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]
url -- todo
mapping -- todo
onLoad -- todo
onError -- todo
todo
.loadTexture([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError]) [page:todo]
url -- the url of the texture
mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping], [page:SphericalReflectionMapping THREE.SphericalReflectionMapping] or [page:SphericalRefractionMapping THREE.SphericalRefractionMapping]. Describes how the image is applied to the object.
Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details.
onLoad -- callback function
onError -- callback function
todo
.getNormalMap([page:todo image], [page:todo depth]) [page:todo]
image -- todo
depth -- todo
todo
.loadCompressedTextureCube([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]
array -- todo
mapping -- todo
onLoad -- todo
onError -- todo
todo
.loadTextureCube([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]
array -- todo
mapping -- todo
onLoad -- todo
onError -- todo
todo
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]