module-Raymarching.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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" rel="noopener">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 | <a href="Node.html">Node</a></span>, callback : <span class="param-type">function | <a href="FunctionNode.html">FunctionNode</a></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">
  36. <strong>steps</strong>
  37. </td>
  38. <td class="description last">
  39. <p>The number of steps for raymarching.</p>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="name">
  44. <strong>callback</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The callback function to execute at each step.</p>
  48. </td>
  49. </tr>
  50. </tbody>
  51. </table>
  52. </div>
  53. <h2 class="subsection-title">Source</h2>
  54. <p>
  55. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/utils/Raymarching.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/utils/Raymarching.js</a>
  56. </p>
  57. </article>
  58. </section>
  59. <script src="../scripts/linenumber.js"></script>
  60. <script src="../scripts/page.js"></script>
  61. </body>
  62. </html>
粤ICP备19079148号