CubeTexture.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. [page:Texture] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">Creates a cube texture made up of six images.</div>
  13. <h2>Example</h2>
  14. <code>
  15. var path = "textures/cube/pisa/";
  16. var format = '.png';
  17. var urls = [
  18. path + 'px' + format, path + 'nx' + format,
  19. path + 'py' + format, path + 'ny' + format,
  20. path + 'pz' + format, path + 'nz' + format
  21. ];
  22. var textureCube = THREE.ImageUtils.loadTextureCube( urls );
  23. var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
  24. </code>
  25. <h2>Constructor</h2>
  26. <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
  27. <div>
  28. CubeTexture is almost equivalent in functionality and usage to [page:Texture]. The only differences are that the
  29. images are an array of 6 images as opposed to a single image, and the mapping options are
  30. [page:Textures THREE.CubeReflectionMapping] (default) or [page:Textures THREE.CubeRefractionMapping]<br />
  31. <br />
  32. Generally [page:ImageUtils.loadTextureCube] is used instead of using CubeTexture directly.
  33. </div>
  34. <h2>Properties</h2>
  35. <h3>See [page:Texture]</h3>
  36. <h2>Methods</h2>
  37. <h3>See [page:Texture]</h3>
  38. <h2>Source</h2>
  39. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  40. </body>
  41. </html>