RemapNode.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RemapNode - 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. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → </p>
  13. <h1 translate="no">RemapNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>This node allows to remap a node value from one range into another. E.g a value of
  17. <code>0.4</code> in the range <code>[ 0.3, 0.5 ]</code> should be remapped into the normalized range <code>[ 0, 1 ]</code>.
  18. <code>RemapNode</code> takes care of that and converts the original value of <code>0.4</code> to <code>0.5</code>.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="RemapNode" translate="no">new <a href="#RemapNode">RemapNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, inLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, inHighNode : <span class="param-type"><a href="Node.html">Node</a></span>, outLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, outHighNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new remap node.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>node</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The node that should be remapped.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>inLowNode</strong>
  41. </td>
  42. <td class="description last">
  43. <p>The source or current lower bound of the range.</p>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong>inHighNode</strong>
  49. </td>
  50. <td class="description last">
  51. <p>The source or current upper bound of the range.</p>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="name">
  56. <strong>outLowNode</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The target lower bound of the range.</p>
  60. <p>Default is <code>float(0)</code>.</p>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="name">
  65. <strong>outHighNode</strong>
  66. </td>
  67. <td class="description last">
  68. <p>The target upper bound of the range.</p>
  69. <p>Default is <code>float(1)</code>.</p>
  70. </td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. <h2 class="subsection-title">Properties</h2>
  77. <div class="member">
  78. <h3 class="name" id="doClamp" translate="no">.<a href="#doClamp">doClamp</a><span class="type-signature"> : boolean</span> </h3>
  79. <div class="description">
  80. <p>Whether the node value should be clamped before
  81. remapping it to the target range.</p>
  82. <p>Default is <code>true</code>.</p>
  83. </div>
  84. </div>
  85. <div class="member">
  86. <h3 class="name" id="inHighNode" translate="no">.<a href="#inHighNode">inHighNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  87. <div class="description">
  88. <p>The source or current upper bound of the range.</p>
  89. </div>
  90. </div>
  91. <div class="member">
  92. <h3 class="name" id="inLowNode" translate="no">.<a href="#inLowNode">inLowNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  93. <div class="description">
  94. <p>The source or current lower bound of the range.</p>
  95. </div>
  96. </div>
  97. <div class="member">
  98. <h3 class="name" id="node" translate="no">.<a href="#node">node</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  99. <div class="description">
  100. <p>The node that should be remapped.</p>
  101. </div>
  102. </div>
  103. <div class="member">
  104. <h3 class="name" id="outHighNode" translate="no">.<a href="#outHighNode">outHighNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  105. <div class="description">
  106. <p>The target upper bound of the range.</p>
  107. <p>Default is <code>float(1)</code>.</p>
  108. </div>
  109. </div>
  110. <div class="member">
  111. <h3 class="name" id="outLowNode" translate="no">.<a href="#outLowNode">outLowNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  112. <div class="description">
  113. <p>The target lower bound of the range.</p>
  114. <p>Default is <code>float(0)</code>.</p>
  115. </div>
  116. </div>
  117. <h2 class="subsection-title">Source</h2>
  118. <p>
  119. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/RemapNode.js" translate="no" target="_blank" rel="noopener">src/nodes/utils/RemapNode.js</a>
  120. </p>
  121. </article>
  122. </section>
  123. <script src="../scripts/linenumber.js"></script>
  124. <script src="../scripts/page.js"></script>
  125. </body>
  126. </html>
粤ICP备19079148号