ShadowMaterial.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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:Material] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. This material can receive shadows, but otherwise is completely
  14. transparent.
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. const geometry = new THREE.PlaneGeometry( 2000, 2000 );
  19. geometry.rotateX( - Math.PI / 2 );
  20. const material = new THREE.ShadowMaterial();
  21. material.opacity = 0.2;
  22. const plane = new THREE.Mesh( geometry, material );
  23. plane.position.y = -200;
  24. plane.receiveShadow = true;
  25. scene.add( plane );
  26. </code>
  27. <h2>Examples</h2>
  28. <p>[example:webgl_geometry_spline_editor geometry / spline / editor]</p>
  29. <h2>Constructor</h2>
  30. <h3>[name]( [param:Object parameters] )</h3>
  31. <p>
  32. [page:Object parameters] - (optional) an object with one or more
  33. properties defining the material's appearance. Any property of the
  34. material (including any property inherited from [page:Material]) can be
  35. passed in here.<br /><br />
  36. </p>
  37. <h2>Properties</h2>
  38. <p>See the base [page:Material] classes for common properties.</p>
  39. <h3>[property:Color color]</h3>
  40. <p>[page:Color] of the material, by default set to black (0x000000).</p>
  41. <h3>[property:Boolean fog]</h3>
  42. <p>Whether the material is affected by fog. Default is `true`.</p>
  43. <h3>[property:Boolean transparent]</h3>
  44. <p>Defines whether this material is transparent. Default is `true`.</p>
  45. <h2>Methods</h2>
  46. <p>See the base [page:Material] classes for common methods.</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>