DataTexture.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Texture] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">Creates a texture directly from raw data, width and height.</div>
  14. <h2>Constructor</h2>
  15. <h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy )</h3>
  16. <div>
  17. The data argument must be an ArrayBuffer or a typed array view.
  18. Further parameters correspond to the properties inherited from [page:Texture], where both magFilter and minFilter default to THREE.NearestFilter. The properties flipY and generateMipmaps are intially set to false.
  19. </div>
  20. <div>
  21. The interpretation of the data depends on type and format:
  22. If the type is THREE.UnsignedByteType, a Uint8Array will be useful for addressing the texel data.
  23. If the format is THREE.RGBAFormat, data needs four values for one texel; Red, Green, Blue and Alpha (typically the opacity). Similarly, THREE.RGBFormat specifies a format where only three values are used for each texel.<br />
  24. For the packed types, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type or THREE.UnsignedShort565Type, all color components of one texel can be addressed as bitfields within an integer element of a Uint16Array.<br />
  25. In order to use the types THREE.FloatType and THREE.HalfFloatType, the WebGL implementation must support the respective extensions OES_texture_float and OES_texture_half_float. In order to use THREE.LinearFilter for component-wise, bilinear interpolation of the texels based on these types, the WebGL extensions OES_texture_float_linear or OES_texture_half_float_linear must also be present.
  26. </div>
  27. <h2>Properties</h2>
  28. <h3>[property:Image image]</h3>
  29. <div>
  30. Overridden with a record type holding data, width and height.
  31. </div>
  32. <h2>Methods</h2>
  33. <h2>Source</h2>
  34. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  35. </body>
  36. </html>