| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>SidewalkGenerator - 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>
- <h1 translate="no">SidewalkGenerator</h1>
- <section>
- <header>
- <div class="class-description"><p>Generates the raised sidewalk for a city's blocks: per block, a rounded-corner concrete
- slab rimmed by a distinct granite kerbstone that stands proud of the walking surface and
- drops to the road. Instanced across a list of placements and dressed with its own
- procedural material ( poured concrete flags, scored expansion joints, granite curb ).
- Returns a <code>THREE.Group</code> of two instanced meshes — the walking slab and the curb.</p>
- <p>Unlike the building generator, this one owns its materials: the slab and curb
- geometry and the TSL that shades them live together here.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const sidewalk = new SidewalkGenerator( { width: 90, depth: 60, height: 0.5 } );
- scene.add( sidewalk.build( placements ) ); // placements: Matrix4[]
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="SidewalkGenerator" translate="no">new <a href="#SidewalkGenerator">SidewalkGenerator</a><span class="signature">()</span> </h3>
- <div class="method">
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/generators/city/SidewalkGenerator.js" translate="no" target="_blank" rel="noopener">examples/jsm/generators/city/SidewalkGenerator.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|