CubeTexture.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. <p class="desc">Creates a cube texture made up of six images.</p>
  14. <h2>Code Example</h2>
  15. <code>
  16. var loader = new THREE.CubeTextureLoader();
  17. loader.setPath( 'textures/cube/pisa/' );
  18. var textureCube = loader.load( [
  19. 'px.png', 'nx.png',
  20. 'py.png', 'ny.png',
  21. 'pz.png', 'nz.png'
  22. ] );
  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. <p>
  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]
  31. </p>
  32. <h2>Properties</h2>
  33. <p>
  34. See the base [page:Texture Texture] class for common properties.
  35. </p>
  36. <h2>Methods</h2>
  37. <p>
  38. See the base [page:Texture Texture] class for common methods.
  39. </p>
  40. <h2>Source</h2>
  41. <p>
  42. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  43. </p>
  44. </body>
  45. </html>