| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>ShadowMaterial - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Material.html">Material</a> → </p>
- <h1 translate="no">ShadowMaterial</h1>
- <section>
- <header>
- <div class="class-description"><p>This material can receive shadows, but otherwise is completely transparent.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const geometry = new THREE.PlaneGeometry( 2000, 2000 );
- geometry.rotateX( - Math.PI / 2 );
- const material = new THREE.ShadowMaterial();
- material.opacity = 0.2;
- const plane = new THREE.Mesh( geometry, material );
- plane.position.y = -200;
- plane.receiveShadow = true;
- scene.add( plane );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="ShadowMaterial" translate="no">new <a href="#ShadowMaterial">ShadowMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new shadow material.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>parameters</strong>
- </td>
- <td class="description last">
- <p>An object with one or more properties
- defining the material's appearance. Any property of the material
- (including any property from inherited materials) can be passed
- in here. Color values can be passed any type of value accepted
- by <a href="Color.html#set">Color#set</a>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : <a href="Color.html">Color</a></span> </h3>
- <div class="description">
- <p>Color of the material.</p>
- <p>Default is <code>(0,0,0)</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether the material is affected by fog or not.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isShadowMaterial" translate="no">.<a href="#isShadowMaterial">isShadowMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="transparent" translate="no">.<a href="#transparent">transparent</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Overwritten since shadow materials are transparent
- by default.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Material.html#transparent">Material#transparent</a></dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/ShadowMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/ShadowMaterial.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|