CubeTexture.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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">创建一个由6张图片所组成的纹理对象。</p>
  13. <h2>代码示例</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>构造函数</h2>
  25. <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
  26. <p>
  27. CubeTexture(立方贴图)的功能以及用法几乎和[page:Texture]是相同的。区别在于,CubeTexture中的图像是6个单独的图像所组成的数组,
  28. 纹理映射选项为[page:Textures THREE.CubeReflectionMapping](默认值)或[page:Textures THREE.CubeRefractionMapping]。
  29. </p>
  30. <h2>属性</h2>
  31. <p>
  32. See the base [page:Texture Texture] class for common properties.
  33. </p>
  34. <h2>方法</h2>
  35. <p>
  36. See the base [page:Texture Texture] class for common methods.
  37. </p>
  38. <h2>源代码</h2>
  39. <p>
  40. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  41. </p>
  42. </body>
  43. </html>