CubeTexture.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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>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. <h3>See [page:Texture]</h3>
  34. <h2>Methods</h2>
  35. <h3>See [page:Texture]</h3>
  36. <h2>Source</h2>
  37. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  38. </body>
  39. </html>