1
0

module-CameraUtils.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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">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">PerspectiveCamera</span>, bottomLeftCorner : <span class="param-type">Vector3</span>, bottomRightCorner : <span class="param-type">Vector3</span>, topLeftCorner : <span class="param-type">Vector3</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"><code>camera</code></td>
  35. <td class="description last"><p>The camera.</p></td>
  36. </tr>
  37. <tr>
  38. <td class="name"><code>bottomLeftCorner</code></td>
  39. <td class="description last"><p>The bottom-left corner point.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>bottomRightCorner</code></td>
  43. <td class="description last"><p>The bottom-right corner point.</p></td>
  44. </tr>
  45. <tr>
  46. <td class="name"><code>topLeftCorner</code></td>
  47. <td class="description last"><p>The top-left corner point.</p></td>
  48. </tr>
  49. <tr>
  50. <td class="name"><code>estimateViewFrustum</code></td>
  51. <td class="description last"><p>If set to <code>true</code>, the function tries to estimate the camera's FOV.<br/>Default is <code>false</code>.</p></td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. </div>
  56. <h2 class="subsection-title">Source</h2>
  57. <p>
  58. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/CameraUtils.js" target="_blank" rel="noopener" translate="no">examples/jsm/utils/CameraUtils.js</a>
  59. </p>
  60. </article>
  61. </section>
  62. <script src="../scripts/linenumber.js"></script>
  63. <script src="../scripts/page.js"></script>
  64. </body>
  65. </html>
粤ICP备19079148号