NodeCache.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>NodeCache - 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">NodeCache</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>This utility class is used in <a href="NodeBuilder.html">NodeBuilder</a> as an internal
  16. cache data structure for node data.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="NodeCache" translate="no">new <a href="#NodeCache">NodeCache</a><span class="signature">( parent : <span class="param-type"><a href="NodeCache.html">NodeCache</a></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new node cache.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name">
  30. <strong>parent</strong>
  31. </td>
  32. <td class="description last">
  33. <p>A reference to a parent cache.</p>
  34. <p>Default is <code>null</code>.</p>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <h2 class="subsection-title">Properties</h2>
  42. <div class="member">
  43. <h3 class="name" id="id" translate="no">.<a href="#id">id</a><span class="type-signature"> : number</span> <span class="type-signature">(readonly) </span></h3>
  44. <div class="description">
  45. <p>The id of the cache.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="nodesData" translate="no">.<a href="#nodesData">nodesData</a><span class="type-signature"> : WeakMap.&lt;<a href="Node.html">Node</a>, Object></span> </h3>
  50. <div class="description">
  51. <p>A weak map for managing node data.</p>
  52. </div>
  53. </div>
  54. <div class="member">
  55. <h3 class="name" id="parent" translate="no">.<a href="#parent">parent</a><span class="type-signature"> : <a href="NodeCache.html">NodeCache</a></span> </h3>
  56. <div class="description">
  57. <p>Reference to a parent node cache.</p>
  58. <p>Default is <code>null</code>.</p>
  59. </div>
  60. </div>
  61. <h2 class="subsection-title">Methods</h2>
  62. <h3 class="name name-method" id="getData" translate="no">.<a href="#getData">getData</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : Object</span> </h3>
  63. <div class="method">
  64. <div class="description">
  65. <p>Returns the data for the given node.</p>
  66. </div>
  67. <table class="params">
  68. <tbody>
  69. <tr>
  70. <td class="name">
  71. <strong>node</strong>
  72. </td>
  73. <td class="description last">
  74. <p>The node.</p>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. <dl class="details">
  80. <dt class="tag-returns"><strong>Returns:</strong> The data for the node.</dt>
  81. </dl>
  82. </div>
  83. <h3 class="name name-method" id="setData" translate="no">.<a href="#setData">setData</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, data : <span class="param-type">Object</span> )</span> </h3>
  84. <div class="method">
  85. <div class="description">
  86. <p>Sets the data for a given node.</p>
  87. </div>
  88. <table class="params">
  89. <tbody>
  90. <tr>
  91. <td class="name">
  92. <strong>node</strong>
  93. </td>
  94. <td class="description last">
  95. <p>The node.</p>
  96. </td>
  97. </tr>
  98. <tr>
  99. <td class="name">
  100. <strong>data</strong>
  101. </td>
  102. <td class="description last">
  103. <p>The data that should be cached.</p>
  104. </td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. </div>
  109. <h2 class="subsection-title">Source</h2>
  110. <p>
  111. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/core/NodeCache.js" translate="no" target="_blank" rel="noopener">src/nodes/core/NodeCache.js</a>
  112. </p>
  113. </article>
  114. </section>
  115. <script src="../scripts/linenumber.js"></script>
  116. <script src="../scripts/page.js"></script>
  117. </body>
  118. </html>
粤ICP备19079148号