CubeTexture.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html lang="it">
  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">Crea una texture a cubo composta da sei immagini.</p>
  13. <h2>Codice di Esempio</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>Costruttore</h2>
  25. <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace )</h3>
  26. <p>
  27. CubeTexture è quasi equivalente in funzionalità ed utilizzo alla classe [page:Texture]. Le uniche differenze sono che le immagini
  28. sono un array di 6 immagini anziché una singola immagine e le opzioni di mappatura sono
  29. [page:Textures THREE.CubeReflectionMapping] (predefinita) o [page:Textures THREE.CubeRefractionMapping].
  30. </p>
  31. <h2>Proprietà</h2>
  32. <p>
  33. Vedi la classe base [page:Texture Texture] per le proprietà comuni.
  34. </p>
  35. <h3>[property:Boolean flipY]</h3>
  36. <p>
  37. Se impostato a `true`, la texture viene capovolta lungo l'asse verticale quando viene caricata sulla GPU. L'impostazione predefinita è `false`.
  38. </p>
  39. <h3>[property:Boolean isCubeTexture]</h3>
  40. <p>
  41. Flag di sola lettura per verificare se l'oggetto dato è di tipo [name].
  42. </p>
  43. <h2>Metodi</h2>
  44. <p>
  45. Vedi la classe base [page:Texture Texture] per i metodi comuni.
  46. </p>
  47. <h2>Source</h2>
  48. <p>
  49. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  50. </p>
  51. </body>
  52. </html>