DecalGeometry.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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:BufferGeometry] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">[name] can be used to create a decal mesh that serves different kinds of purposes e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams.</p>
  13. <h2>Code Example</h2>
  14. <code>
  15. const geometry = new DecalGeometry( mesh, position, orientation, size );
  16. const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
  17. const mesh = new THREE.Mesh( geometry, material );
  18. scene.add( mesh );
  19. </code>
  20. <h2>Examples</h2>
  21. <p>[example:webgl_decals WebGL / decals]</p>
  22. <h2>Constructor</h2>
  23. <h3>[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientation], [param:Vector3 size] )</h3>
  24. <p>
  25. mesh — Any mesh object.<br />
  26. position — Position of the decal projector.<br />
  27. orientation — Orientation of the decal projector.<br />
  28. size — Size of the decal projector.
  29. </p>
  30. <h2>Source</h2>
  31. <p>
  32. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/DecalGeometry.js examples/jsm/geometries/DecalGeometry.js]
  33. </p>
  34. </body>
  35. </html>