ShadowMaterial.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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:Material] &rarr; [page:ShaderMaterial] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. This material can receive shadows, but otherwise is completely transparent.
  15. </p>
  16. <h3>Example</h3>
  17. [example:webgl_geometry_spline_editor geometry / spline / editor]
  18. <code>
  19. var planeGeometry = new THREE.PlaneGeometry( 2000, 2000 );
  20. planeGeometry.rotateX( - Math.PI / 2 );
  21. var planeMaterial = new THREE.ShadowMaterial();
  22. planeMaterial.opacity = 0.2;
  23. var plane = new THREE.Mesh( planeGeometry, planeMaterial );
  24. plane.position.y = -200;
  25. plane.receiveShadow = true;
  26. scene.add( plane );
  27. </code>
  28. <h2>Constructor</h2>
  29. <h3>[name]( [param:Object parameters] )</h3>
  30. <p>
  31. [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
  32. Any property of the material (including any property inherited from [page:Material] and [page:ShaderMaterial]) can be passed in here.<br /><br />
  33. </p>
  34. <h2>Properties</h2>
  35. <p>See the base [page:Material] and [page:ShaderMaterial] classes for common properties.</p>
  36. <h3>[property:Boolean isShadowMaterial]</h3>
  37. <p>
  38. Used to check whether this or derived classes are shadow materials. Default is *true*.<br /><br />
  39. You should not change this, as it used internally for optimisation.
  40. </p>
  41. <h3>[property:Boolean lights]</h3>
  42. <p>Whether the material is affected by lights. 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] and [page:ShaderMaterial] classes for common methods.</p>
  47. <h2>Source</h2>
  48. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  49. </body>
  50. </html>