UNPKG

jsdk-offical

Version:

JSDK is the most comprehensive TypeScript framework, like JDK.

862 lines 45.8 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Vector3 | JSDK 2.7.0 API</title> <meta name="description" content="Documentation for JSDK 2.7.0 API"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">JSDK 2.7.0 API</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="../modules/js.html">JS</a> </li> <li> <a href="../modules/js.math.html">math</a> </li> <li> <a href="js.math.vector3.html">Vector3</a> </li> </ul> <h1>Class Vector3</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>3D Vector</p> </div> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">Vector3</span> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class"><a href="js.math.vector3.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class"><a href="js.math.vector3.html#x" class="tsd-kind-icon">x</a></li> <li class="tsd-kind-property tsd-parent-kind-class"><a href="js.math.vector3.html#y" class="tsd-kind-icon">y</a></li> <li class="tsd-kind-property tsd-parent-kind-class"><a href="js.math.vector3.html#z" class="tsd-kind-icon">z</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#one" class="tsd-kind-icon">One</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#unitx" class="tsd-kind-icon">UnitX</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#unity" class="tsd-kind-icon">UnitY</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#unitz" class="tsd-kind-icon">UnitZ</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#zero" class="tsd-kind-icon">Zero</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#abs" class="tsd-kind-icon">abs</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#add" class="tsd-kind-icon">add</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#clone" class="tsd-kind-icon">clone</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#div" class="tsd-kind-icon">div</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#dot" class="tsd-kind-icon">dot</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#equals" class="tsd-kind-icon">equals</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#length" class="tsd-kind-icon">length</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#lengthsq" class="tsd-kind-icon">length<wbr>Sq</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#mul" class="tsd-kind-icon">mul</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#negate" class="tsd-kind-icon">negate</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#normalize" class="tsd-kind-icon">normalize</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#set" class="tsd-kind-icon">set</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#sub" class="tsd-kind-icon">sub</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#toarray" class="tsd-kind-icon">to<wbr>Array</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="js.math.vector3.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#cross" class="tsd-kind-icon">cross</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#lerp" class="tsd-kind-icon">lerp</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.vector3.html#tovector" class="tsd-kind-icon">to<wbr>Vector</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">new <wbr>Vector3<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> <li class="tsd-signature tsd-kind-icon">new <wbr>Vector3<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, z<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>x: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>y: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>z: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> <a name="x" class="tsd-anchor"></a> <h3>x</h3> <div class="tsd-signature tsd-kind-icon">x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> <a name="y" class="tsd-anchor"></a> <h3>y</h3> <div class="tsd-signature tsd-kind-icon">y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"> <a name="z" class="tsd-anchor"></a> <h3>z</h3> <div class="tsd-signature tsd-kind-icon">z<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="one" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> One</h3> <div class="tsd-signature tsd-kind-icon">One<span class="tsd-signature-symbol">:</span> <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol"> = new Vector3(1, 1, 1)</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="unitx" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> UnitX</h3> <div class="tsd-signature tsd-kind-icon">UnitX<span class="tsd-signature-symbol">:</span> <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol"> = new Vector3(1, 0, 0)</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="unity" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> UnitY</h3> <div class="tsd-signature tsd-kind-icon">UnitY<span class="tsd-signature-symbol">:</span> <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol"> = new Vector3(0, 1, 0)</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="unitz" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> UnitZ</h3> <div class="tsd-signature tsd-kind-icon">UnitZ<span class="tsd-signature-symbol">:</span> <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol"> = new Vector3(0, 0, 1)</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="zero" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> Zero</h3> <div class="tsd-signature tsd-kind-icon">Zero<span class="tsd-signature-symbol">:</span> <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol"> = new Vector3(0, 0, 0)</span></div> <aside class="tsd-sources"> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="abs" class="tsd-anchor"></a> <h3>abs</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">abs<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p> Sets each component of this tuple to its absolute value.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="add" class="tsd-anchor"></a> <h3>add</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="clone" class="tsd-anchor"></a> <h3>clone</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="div" class="tsd-anchor"></a> <h3>div</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">div<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>n: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="dot" class="tsd-anchor"></a> <h3>dot</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">dot<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Computes the dot product of this vector and vector v.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="equals" class="tsd-anchor"></a> <h3>equals</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="length" class="tsd-anchor"></a> <h3>length</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">length<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns the length of this vector.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="lengthsq" class="tsd-anchor"></a> <h3>length<wbr>Sq</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">length<wbr>Sq<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns the squared length of this vector.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="mul" class="tsd-anchor"></a> <h3>mul</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">mul<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>n: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="negate" class="tsd-anchor"></a> <h3>negate</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">negate<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Negates this vector.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="normalize" class="tsd-anchor"></a> <h3>normalize</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">normalize<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the 1 length vector of this vector.<br> 设置成长度为1的单位向量。</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="set" class="tsd-anchor"></a> <h3>set</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> <li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a>, to<span class="tsd-signature-symbol">: </span><a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>from: <a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a></h5> </li> <li> <h5>to: <a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="sub" class="tsd-anchor"></a> <h3>sub</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">sub<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="toarray" class="tsd-anchor"></a> <h3>to<wbr>Array</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">to<wbr>Array<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="tostring" class="tsd-anchor"></a> <h3>to<wbr>String</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">to<wbr>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="cross" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> cross</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">cross<span class="tsd-signature-symbol">(</span>v1<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a>, v2<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns new cross product vector of vectors v1 and v2.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v1: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> <li> <h5>v2: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="lerp" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> lerp</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">lerp<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a>, to<span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a>, amount<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Return an vector of linear interpolation. <br> 返回新的线性插值向量。 amount: 一个介于 0 与 1 之间的值,指示 the &quot;to&quot; vector 的权重。</p> </div> <dl class="tsd-comment-tags"> <dt>throws</dt> <dd><p>{RangeError} when amount is not in [0,1]</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>from: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> <li> <h5>to: <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h5> </li> <li> <h5>amount: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="tovector" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> to<wbr>Vector</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">to<wbr>Vector<span class="tsd-signature-symbol">(</span>p1<span class="tsd-signature-symbol">: </span><a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a>, p2<span class="tsd-signature-symbol">: </span><a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>p1: <a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a></h5> </li> <li> <h5>p2: <a href="js.math.point3.html" class="tsd-signature-type">Point3</a><span class="tsd-signature-symbol"> | </span><a href="../modules/js.math.html#arraypoint3" class="tsd-signature-type">ArrayPoint3</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="js.math.vector3.html" class="tsd-signature-type">Vector3</a></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-namespace"> <a href="../modules/js.html">JS</a> <ul> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.an.html">an</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.app.html">app</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.core.html">core</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.d2.html">d2</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ds.html">ds</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.fx.html">fx</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.input.html">input</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ioc.html">ioc</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.lang.html">lang</a> </li> <li class="current tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.math.html">math</a> <ul> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.math.geom.html">geom</a> </li> </ul> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.media.html">media</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.model.html">model</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.net.html">net</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.store.html">store</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.sugar.html">sugar</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ui.html">ui</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.unit.html">unit</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.util.html">util</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.view.html">view</a> </li> </ul> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.coords2.html" class="tsd-kind-icon">Coords2</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.floats.html" class="tsd-kind-icon">Floats</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.point2.html" class="tsd-kind-icon">Point2</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.point3.html" class="tsd-kind-icon">Point3</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.radians.html" class="tsd-kind-icon">Radians</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.vector2.html" class="tsd-kind-icon">Vector2</a> </li> </ul> <ul class="current"> <li class="current tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.vector3.html" class="tsd-kind-icon">Vector3</a> <ul> <li class=" tsd-kind-constructor tsd-parent-kind-class"> <a href="js.math.vector3.html#constructor" class="tsd-kind-icon">constructor</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class"> <a href="js.math.vector3.html#x" class="tsd-kind-icon">x</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class"> <a href="js.math.vector3.html#y" class="tsd-kind-icon">y</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class"> <a href="js.math.vector3.html#z" class="tsd-kind-icon">z</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#one" class="tsd-kind-icon">One</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#unitx" class="tsd-kind-icon">UnitX</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#unity" class="tsd-kind-icon">UnitY</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#unitz" class="tsd-kind-icon">UnitZ</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#zero" class="tsd-kind-icon">Zero</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#abs" class="tsd-kind-icon">abs</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#add" class="tsd-kind-icon">add</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#clone" class="tsd-kind-icon">clone</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#div" class="tsd-kind-icon">div</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#dot" class="tsd-kind-icon">dot</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#equals" class="tsd-kind-icon">equals</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#length" class="tsd-kind-icon">length</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#lengthsq" class="tsd-kind-icon">length<wbr>Sq</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#mul" class="tsd-kind-icon">mul</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#negate" class="tsd-kind-icon">negate</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#normalize" class="tsd-kind-icon">normalize</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#set" class="tsd-kind-icon">set</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#sub" class="tsd-kind-icon">sub</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#toarray" class="tsd-kind-icon">to<wbr>Array</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="js.math.vector3.html#tostring" class="tsd-kind-icon">to<wbr>String</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#cross" class="tsd-kind-icon">cross</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#lerp" class="tsd-kind-icon">lerp</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.vector3.html#tovector" class="tsd-kind-icon">to<wbr>Vector</a> </li> </ul> </li> </ul> <ul class="after-current"> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#arraypoint2" class="tsd-kind-icon">Array<wbr>Point2</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#arraypoint3" class="tsd-kind-icon">Array<wbr>Point3</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#polarpoint2" class="tsd-kind-icon">Polar<wbr>Point2</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#polarpoint3" class="tsd-kind-icon">Polar<wbr>Point3</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#m" class="tsd-kind-icon">M</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#p" class="tsd-kind-icon">P</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#pi" class="tsd-kind-icon">PI</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#v" class="tsd-kind-icon">V</a> </li> </ul> </nav> </div> </div> </div> <footer> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>