| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>CameraUtils - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">CameraUtils</h1>
- <section>
- <header>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <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>
- <pre><code class="language-js">import * as CameraUtils from 'three/addons/utils/CameraUtils.js';</code></pre>
- <div class="container-overview">
- </div>
- <h2 class="subsection-title">Methods</h2>
- <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>
- <div class="method">
- <div class="description">
- <p>Set projection matrix and the orientation of a perspective camera
- to exactly frame the corners of an arbitrary rectangle.
- NOTE: This function ignores the standard parameters;
- do not call <code>updateProjectionMatrix()</code> after this.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>camera</strong>
- </td>
- <td class="description last">
- <p>The camera.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>bottomLeftCorner</strong>
- </td>
- <td class="description last">
- <p>The bottom-left corner point.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>bottomRightCorner</strong>
- </td>
- <td class="description last">
- <p>The bottom-right corner point.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>topLeftCorner</strong>
- </td>
- <td class="description last">
- <p>The top-left corner point.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>estimateViewFrustum</strong>
- </td>
- <td class="description last">
- <p>If set to <code>true</code>, the function tries to estimate the camera's FOV.</p>
- <p>Default is <code>false</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <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>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|