12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <div class="desc">A Helper class to ease the loading of images of different types.</div>
-
- <h2>Properties</h2>
- <h3>[property:string crossOrigin]</h3>
- <div>
- The crossOrigin string to implement CORS for loading the image from a different domain that allows CORS.
- </div>
- <h2>Methods</h2>
- <h3>[method:DataTexture generateDataTexture]([page:Number width], [page:Number height], [page:Number color])</h3>
- <div>
- width -- The width of the texture. <br />
- height -- The height of the texture. <br />
- color -- The hexadecimal value of the color.
- </div>
- <div>
- Generates a texture of a single color. It is a DataTexture with format, RGBFormat.
- </div>
- <h3>[method:CompressedTexture parseDDS]([page:String buffer], [page:boolean loadMipmaps])</h3>
- <div>
- buffer -- A string containing the data of the dds. <br />
- loadMipmaps -- A boolean to indicate if you need to load the mipmaps. Default is True.
- </div>
- <div>
- Parses a DDS Image from the string into a CompressedTexture.
- </div>
- <h3>[method:Texture loadTexture]([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError])</h3>
- <div>
- url -- the url of the texture<br />
- mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping] or [page:SphericalReflectionMapping THREE.SphericalReflectionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details. <br/>
- onLoad -- callback function<br />
- onError -- callback function
- </div>
- <div>
- A helper function to generates a [page:Texture THREE.Texture] from an image URL. Provides a load and error
- callback.
- </div>
- <h3>[method:canvas getNormalMap]([page:Image image], [page:Float depth])</h3>
- <div>
- image -- A loaded image element <br />
- depth -- The depth of the normal map. Defaults to between -1 and 1.
- </div>
- <div>
- Translates an image element into a normal map with the range (-1, -1, -1) to (1, 1, 1) multiplied by the depth.
- Returns a canvas element.
- </div>
- <h3>[method:CubeTexture loadTextureCube]([page:Array array], [page:Textures mapping], [page:function onLoad], [page:function onError])</h3>
- <div>
- array -- An array of 6 images <br />
- mapping -- Either [page:Textures THREE.CubeReflectionMapping] or [page:Textures THREE.CubeRefractionMapping]<br />
- onLoad -- callback <br />
- onError -- callback
- </div>
- <div>
- Creates a [page:CubeTexture] from 6 images.<br /><br />
-
- The images are loaded in the following order where p is positiive and n is negative: [ px, nx, py, ny, pz, nz ].
- See [page:CubeTexture] for an example in code.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|