DecalGeometry.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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:BufferGeometry] &rarr;
  11. <h1>贴花几何体([name])</h1>
  12. <p class="desc">[name] 可被用于创建贴花网格物体,以达到不同的目的,例如:为模型增加独特的细节、进行动态的视觉环境改变或覆盖接缝。</p>
  13. <h2>代码示例</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>例子</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 — 一个网格对象。<br />
  26. position — 贴花投影器的位置。<br />
  27. orientation — 贴花投影器的朝向。<br />
  28. size — 贴花投影器的尺寸。
  29. </p>
  30. <h2>源代码</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>