Skip to content

Commit 01ea3cd

Browse files
committed
Docs: Starting Matrix4.
1 parent 08d4e42 commit 01ea3cd

File tree

1 file changed

+89
-5
lines changed

1 file changed

+89
-5
lines changed

docs/api/core/Matrix4.html

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,107 @@
11
<h1>[name]</h1>
22

3-
<div class="desc">todo</div>
3+
<div class="desc">A 4x4 Matrix.</div>
4+
5+
6+
<h2>Example</h2>
7+
8+
<code>// Simple rig for rotating around 3 axes
9+
10+
var m = new THREE.Matrix4();
11+
12+
var m1 = new THREE.Matrix4();
13+
var m2 = new THREE.Matrix4();
14+
var m3 = new THREE.Matrix4();
15+
16+
var alpha = 0;
17+
var beta = Math.PI;
18+
var gamma = Math.PI/2;
19+
20+
m1.setRotationX( alpha );
21+
m2.setRotationY( beta );
22+
m3.setRotationZ( gamma );
23+
24+
m.multiply( m1, m2 );
25+
m.multiplySelf( m3 );
26+
</code>
427

528

629
<h2>Constructor</h2>
730

8-
<h3>[name]()</h3>
31+
<h3>[name]( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] )</h3>
932

1033

1134
<h2>Properties</h2>
1235

13-
<h3>.[page:Vector3 todo]</h3>
36+
<h3>.[page:Float n11]</h3>
37+
38+
<h3>.[page:Float n12]</h3>
39+
40+
<h3>.[page:Float n13]</h3>
41+
42+
<h3>.[page:Float n14]</h3>
43+
44+
<h3>.[page:Float n21]</h3>
45+
46+
<h3>.[page:Float n22]</h3>
47+
48+
<h3>.[page:Float n23]</h3>
49+
50+
<h3>.[page:Float n24]</h3>
51+
52+
<h3>.[page:Float n31]</h3>
53+
54+
<h3>.[page:Float n32]</h3>
55+
56+
<h3>.[page:Float n33]</h3>
57+
58+
<h3>.[page:Float n34]</h3>
59+
60+
<h3>.[page:Float n41]</h3>
61+
62+
<h3>.[page:Float n42]</h3>
63+
64+
<h3>.[page:Float n43]</h3>
65+
66+
<h3>.[page:Float n44]</h3>
1467

1568

1669
<h2>Methods</h2>
1770

18-
<h3>.todo( [page:Vector3 todo] )</h3>
71+
<h3>.set( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] ) [page:Matrix4]</h3>
72+
<div>
73+
Sets all fields of this matrix.
74+
</div>
75+
76+
<h3>.identity() [page:Matrix4]</h3>
77+
<div>
78+
Resets this matrix to identity.
79+
</div>
80+
81+
<h3>.copy( [page:Matrix4 m] ) [page:Matrix4]</h3>
82+
<div>
83+
Copies a matrix <strong>m</strong> into this matrix.
84+
</div>
85+
86+
<h3>.lookAt( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4]</h3>
87+
<div>
88+
Constructs a rotation matrix, looking from <strong>eye</strong> towards <strong>center</strong> with defined <strong>up</strong> vector.
89+
</div>
90+
91+
<h3>.multiply( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4]</h3>
92+
<div>
93+
Sets this matrix to <strong>a * b</strong>.
94+
</div>
95+
96+
<h3>.multiplySelf( [page:Matrix4 m] ) [page:Matrix4]</h3>
97+
<div>
98+
Multiplies this matrix by <strong>m</strong>.
99+
</div>
100+
101+
<h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4]</h3>
19102
<div>
20-
todo — todo<br />
103+
Sets this matrix to <strong>a * b</strong> and sets result into flat array <strong>r</strong>.<br />
104+
Destination array can be regular Array or TypedArray.
21105
</div>
22106

23107

0 commit comments

Comments
 (0)