module-CameraUtils.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CameraUtils - 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">CameraUtils</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">CameraUtils</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 * as CameraUtils from 'three/addons/utils/CameraUtils.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Methods</h2>
  23. <h3 class="name name-method" id="~frameCorners" translate="no">.<a href="#~frameCorners">frameCorners</a><span class="signature">( camera : <span class="param-type"><a href="PerspectiveCamera.html">PerspectiveCamera</a></span>, bottomLeftCorner : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, bottomRightCorner : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, topLeftCorner : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, estimateViewFrustum : <span class="param-type">boolean</span> )</span> <span class="type-signature">(inner) </span></h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Set projection matrix and the orientation of a perspective camera
  27. to exactly frame the corners of an arbitrary rectangle.
  28. NOTE: This function ignores the standard parameters;
  29. do not call <code>updateProjectionMatrix()</code> after this.</p>
  30. </div>
  31. <table class="params">
  32. <tbody>
  33. <tr>
  34. <td class="name">
  35. <strong>camera</strong>
  36. </td>
  37. <td class="description last">
  38. <p>The camera.</p>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="name">
  43. <strong>bottomLeftCorner</strong>
  44. </td>
  45. <td class="description last">
  46. <p>The bottom-left corner point.</p>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="name">
  51. <strong>bottomRightCorner</strong>
  52. </td>
  53. <td class="description last">
  54. <p>The bottom-right corner point.</p>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td class="name">
  59. <strong>topLeftCorner</strong>
  60. </td>
  61. <td class="description last">
  62. <p>The top-left corner point.</p>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td class="name">
  67. <strong>estimateViewFrustum</strong>
  68. </td>
  69. <td class="description last">
  70. <p>If set to <code>true</code>, the function tries to estimate the camera's FOV.</p>
  71. <p>Default is <code>false</code>.</p>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </div>
  77. <h2 class="subsection-title">Source</h2>
  78. <p>
  79. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/CameraUtils.js" translate="no" target="_blank" rel="noopener">examples/jsm/utils/CameraUtils.js</a>
  80. </p>
  81. </article>
  82. </section>
  83. <script src="../scripts/linenumber.js"></script>
  84. <script src="../scripts/page.js"></script>
  85. </body>
  86. </html>
粤ICP备19079148号