DecalGeometry.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. <div class="desc"> You can use this geometry to create a decal mesh, that serves different kinds of purposes e.g.:
  14. adding unique details to models, performing dynamic visual environmental changes or covering seams. </div>
  15. <h2>Example</h2>
  16. [example:webgl_decals decals]
  17. <code>var geometry = new THREE.DecalGeometry( mesh, position, orientation, size );
  18. var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
  19. var decal = new THREE.Mesh( geometry, material );
  20. scene.add( decal );
  21. </code>
  22. <h2>Constructor</h2>
  23. <h3>[name]( [page:Mesh mesh], [page:Vector3 position], [page:Euler orientation], [page:Vector3 size] )</h3>
  24. <div>
  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.<br />
  29. </div>
  30. <h2>Source</h2>
  31. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  32. </body>
  33. </html>