CubeTexture.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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, colorSpace )</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. <h3>[property:Boolean flipY]</h3>
  35. <p>
  36. If set to *true*, the texture is flipped along the vertical axis when uploaded to the GPU. Default is *false*.
  37. </p>
  38. <h3>[property:Boolean isCubeTexture]</h3>
  39. <p>
  40. Read-only flag to check if a given object is of type [name].
  41. </p>
  42. <h2>方法</h2>
  43. <p>
  44. See the base [page:Texture Texture] class for common methods.
  45. </p>
  46. <h2>源代码</h2>
  47. <p>
  48. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  49. </p>
  50. </body>
  51. </html>