CubeTexture.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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>
  26. [name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace )
  27. </h3>
  28. <p>
  29. CubeTexture is almost equivalent in functionality and usage to
  30. [page:Texture]. The only differences are that the images are an array of 6
  31. images as opposed to a single image, and the mapping options are
  32. [page:Textures THREE.CubeReflectionMapping] (default) or [page:Textures THREE.CubeRefractionMapping]
  33. </p>
  34. <h2>Properties</h2>
  35. <p>See the base [page:Texture Texture] class for common properties.</p>
  36. <h3>[property:Boolean flipY]</h3>
  37. <p>
  38. If set to `true`, the texture is flipped along the vertical axis when
  39. uploaded to the GPU. Default is `false`.
  40. </p>
  41. <h3>[property:Boolean isCubeTexture]</h3>
  42. <p>Read-only flag to check if a given object is of type [name].</p>
  43. <h2>Methods</h2>
  44. <p>See the base [page:Texture Texture] class for common methods.</p>
  45. <h2>Source</h2>
  46. <p>
  47. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  48. </p>
  49. </body>
  50. </html>