CubeTexture.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 cube texture made up of six images.</div>
  14. <h2>Example</h2>
  15. <code>
  16. var path = "textures/cube/pisa/";
  17. var format = '.png';
  18. var urls = [
  19. path + 'px' + format, path + 'nx' + format,
  20. path + 'py' + format, path + 'ny' + format,
  21. path + 'pz' + format, path + 'nz' + format
  22. ];
  23. var textureCube = THREE.ImageUtils.loadTextureCube( urls );
  24. var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
  25. </code>
  26. <h2>Constructor</h2>
  27. <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
  28. <div>
  29. CubeTexture is almost equivalent in functionality and usage to [page:Texture]. The only differences are that the
  30. images are an array of 6 images as opposed to a single image, and the mapping options are
  31. [page:Textures THREE.CubeReflectionMapping] (default) or [page:Textures THREE.CubeRefractionMapping]<br />
  32. <br />
  33. Generally [page:ImageUtils.loadTextureCube] is used instead of using CubeTexture directly.
  34. </div>
  35. <h2>Properties</h2>
  36. <h3>See [page:Texture]</h3>
  37. <h2>Methods</h2>
  38. <h3>See [page:Texture]</h3>
  39. <h2>Source</h2>
  40. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  41. </body>
  42. </html>