ShadowMaterial.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. <div class="desc">
  14. This material can recieve shadows, but otherwise is completely transparent.
  15. </div>
  16. <h3>Example</h3>
  17. [example:webgl_geometry_spline_editor gemoetry / 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]( )</h3>
  30. <h2>Properties</h2>
  31. <div>See the base [page:Material] and [page:ShaderMaterial] classes for common properties.</div>
  32. <h3>[property:Boolean lights]</h3>
  33. <div>Whether the material is affected by lights. Default is *true*.</div>
  34. <h3>[property:Boolean transparent]</h3>
  35. <div>Defines whether this material is transparent. Default is *true*.</div>
  36. <h2>Methods</h2>
  37. <div>See the base [page:Material] and [page:ShaderMaterial] classes for common methods.</div>
  38. <h2>Source</h2>
  39. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  40. </body>
  41. </html>