CubeTexture.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  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. <p class="desc">Creates a cube texture made up of six images.</p>
  13. <h2>Code Example</h2>
  14. <code>
  15. const loader = new THREE.CubeTextureLoader();
  16. loader.setPath( 'textures/cube/pisa/' );
  17. const textureCube = loader.load( [
  18. 'px.png', 'nx.png',
  19. 'py.png', 'ny.png',
  20. 'pz.png', 'nz.png'
  21. ] );
  22. const material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
  23. </code>
  24. <h2>Constructor</h2>
  25. <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
  26. <p>
  27. CubeTexture is almost equivalent in functionality and usage to [page:Texture]. The only differences are that the
  28. images are an array of 6 images as opposed to a single image, and the mapping options are
  29. [page:Textures THREE.CubeReflectionMapping] (default) or [page:Textures THREE.CubeRefractionMapping]
  30. </p>
  31. <h2>Properties</h2>
  32. <p>
  33. See the base [page:Texture Texture] class for common properties.
  34. </p>
  35. <h2>Methods</h2>
  36. <p>
  37. See the base [page:Texture Texture] class for common methods.
  38. </p>
  39. <h2>Source</h2>
  40. <p>
  41. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  42. </p>
  43. </body>
  44. </html>