ShadowMaterial.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 transparent.
  14. </p>
  15. <h2>Code Example</h2>
  16. <code>
  17. const geometry = new THREE.PlaneGeometry( 2000, 2000 );
  18. geometry.rotateX( - Math.PI / 2 );
  19. const material = new THREE.ShadowMaterial();
  20. material.opacity = 0.2;
  21. const plane = new THREE.Mesh( geometry, material );
  22. plane.position.y = -200;
  23. plane.receiveShadow = true;
  24. scene.add( plane );
  25. </code>
  26. <h2>Examples</h2>
  27. <p>
  28. [example:webgl_geometry_spline_editor geometry / spline / editor]
  29. </p>
  30. <h2>Constructor</h2>
  31. <h3>[name]( [param:Object parameters] )</h3>
  32. <p>
  33. [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
  34. Any property of the material (including any property inherited from [page:Material]) can be passed in here.<br /><br />
  35. </p>
  36. <h2>Properties</h2>
  37. <p>See the base [page:Material] classes for common properties.</p>
  38. <h3>[property:Boolean transparent]</h3>
  39. <p>Defines whether this material is transparent. Default is *true*.</p>
  40. <h2>Methods</h2>
  41. <p>See the base [page:Material] classes for common methods.</p>
  42. <h2>Source</h2>
  43. <p>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </p>
  46. </body>
  47. </html>