SidewalkGenerator.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>SidewalkGenerator - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">SidewalkGenerator</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Generates the raised sidewalk for a city's blocks: per block, a rounded-corner concrete
  16. slab rimmed by a distinct granite kerbstone that stands proud of the walking surface and
  17. drops to the road. Instanced across a list of placements and dressed with its own
  18. procedural material ( poured concrete flags, scored expansion joints, granite curb ).
  19. Returns a <code>THREE.Group</code> of two instanced meshes — the walking slab and the curb.</p>
  20. <p>Unlike the building generator, this one owns its materials: the slab and curb
  21. geometry and the TSL that shades them live together here.</p></div>
  22. <h2>Code Example</h2>
  23. <div translate="no"><pre><code class="language-js">const sidewalk = new SidewalkGenerator( { width: 90, depth: 60, height: 0.5 } );
  24. scene.add( sidewalk.build( placements ) ); // placements: Matrix4[]
  25. </code></pre></div>
  26. </header>
  27. <article>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="SidewalkGenerator" translate="no">new <a href="#SidewalkGenerator">SidewalkGenerator</a><span class="signature">()</span> </h3>
  31. <div class="method">
  32. </div>
  33. </div>
  34. <h2 class="subsection-title">Source</h2>
  35. <p>
  36. <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>
  37. </p>
  38. </article>
  39. </section>
  40. <script src="../scripts/linenumber.js"></script>
  41. <script src="../scripts/page.js"></script>
  42. </body>
  43. </html>
粤ICP备19079148号