module-Raymarching.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Raymarching - 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">Raymarching</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">Raymarching</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  19. <pre><code class="language-js">import { RaymarchingBox } from 'three/addons/tsl/utils/Raymarching.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Static Methods</h2>
  23. <h3 class="name name-method" id=".RaymarchingBox" translate="no">.<a href="#.RaymarchingBox">RaymarchingBox</a><span class="signature">( steps : <span class="param-type">number | Node</span>, callback : <span class="param-type">function | FunctionNode</span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>TSL function for performing raymarching in a box-area using the specified number of steps
  27. and a callback function.</p>
  28. <pre><code class="language-js">RaymarchingBox( count, ( { positionRay } ) => {
  29. } );
  30. </code></pre>
  31. </div>
  32. <table class="params">
  33. <tbody>
  34. <tr>
  35. <td class="name"><code>steps</code></td>
  36. <td class="description last"><p>The number of steps for raymarching.</p></td>
  37. </tr>
  38. <tr>
  39. <td class="name"><code>callback</code></td>
  40. <td class="description last"><p>The callback function to execute at each step.</p></td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. <h2 class="subsection-title">Source</h2>
  46. <p>
  47. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/utils/Raymarching.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/utils/Raymarching.js</a>
  48. </p>
  49. </article>
  50. </section>
  51. <script src="../scripts/linenumber.js"></script>
  52. <script src="../scripts/page.js"></script>
  53. </body>
  54. </html>
粤ICP备19079148号