2
0

DecalGeometry.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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:BufferGeometry] &rarr;
  12. <h1>[name]</h1>
  13. <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>
  14. <h2>Code Example</h2>
  15. <code>
  16. var geometry = new DecalGeometry( mesh, position, orientation, size );
  17. var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
  18. var mesh = new THREE.Mesh( geometry, material );
  19. scene.add( mesh );
  20. </code>
  21. <h2>Examples</h2>
  22. <p>[example:webgl_decals WebGL / decals]</p>
  23. <h2>Constructor</h2>
  24. <h3>[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientation], [param:Vector3 size] )</h3>
  25. <p>
  26. mesh — Any mesh object.<br />
  27. position — Position of the decal projector.<br />
  28. orientation — Orientation of the decal projector.<br />
  29. size — Size of the decal projector.
  30. </p>
  31. <h2>Source</h2>
  32. <p>
  33. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/DecalGeometry.js examples/jsm/geometries/DecalGeometry.js]
  34. </p>
  35. </body>
  36. </html>