hytopia 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bun.lock +494 -0
- package/docs/server.matrix2._constructor_.md +89 -0
- package/docs/server.matrix2.add.md +55 -0
- package/docs/server.matrix2.adjoint.md +19 -0
- package/docs/server.matrix2.clone.md +19 -0
- package/docs/server.matrix2.copy.md +55 -0
- package/docs/server.matrix2.create.md +19 -0
- package/docs/server.matrix2.determinant.md +13 -0
- package/docs/server.matrix2.equals.md +55 -0
- package/docs/server.matrix2.exactequals.md +55 -0
- package/docs/server.matrix2.frobeniusnorm.md +13 -0
- package/docs/server.matrix2.fromrotation.md +55 -0
- package/docs/server.matrix2.fromscaling.md +55 -0
- package/docs/server.matrix2.identity.md +19 -0
- package/docs/server.matrix2.invert.md +19 -0
- package/docs/server.matrix2.md +383 -0
- package/docs/server.matrix2.multiply.md +55 -0
- package/docs/server.matrix2.multiplyscalar.md +55 -0
- package/docs/server.matrix2.rotate.md +55 -0
- package/docs/server.matrix2.subtract.md +55 -0
- package/docs/server.matrix2.tostring.md +19 -0
- package/docs/server.matrix2.transpose.md +19 -0
- package/docs/server.matrix3._constructor_.md +159 -0
- package/docs/server.matrix3.add.md +55 -0
- package/docs/server.matrix3.adjoint.md +19 -0
- package/docs/server.matrix3.clone.md +19 -0
- package/docs/server.matrix3.copy.md +55 -0
- package/docs/server.matrix3.create.md +19 -0
- package/docs/server.matrix3.determinant.md +13 -0
- package/docs/server.matrix3.equals.md +55 -0
- package/docs/server.matrix3.exactequals.md +55 -0
- package/docs/server.matrix3.frobeniusnorm.md +13 -0
- package/docs/server.matrix3.frommatrix4.md +55 -0
- package/docs/server.matrix3.fromquaternion.md +55 -0
- package/docs/server.matrix3.fromrotation.md +55 -0
- package/docs/server.matrix3.fromscaling.md +55 -0
- package/docs/server.matrix3.fromtranslation.md +55 -0
- package/docs/server.matrix3.identity.md +19 -0
- package/docs/server.matrix3.invert.md +19 -0
- package/docs/server.matrix3.md +459 -0
- package/docs/server.matrix3.multiply.md +55 -0
- package/docs/server.matrix3.multiplyscalar.md +55 -0
- package/docs/server.matrix3.projection.md +71 -0
- package/docs/server.matrix3.rotate.md +55 -0
- package/docs/server.matrix3.subtract.md +55 -0
- package/docs/server.matrix3.tostring.md +19 -0
- package/docs/server.matrix3.transformvector.md +55 -0
- package/docs/server.matrix3.transpose.md +19 -0
- package/docs/server.matrix4._constructor_.md +257 -0
- package/docs/server.matrix4.add.md +55 -0
- package/docs/server.matrix4.adjoint.md +19 -0
- package/docs/server.matrix4.clone.md +19 -0
- package/docs/server.matrix4.copy.md +55 -0
- package/docs/server.matrix4.create.md +19 -0
- package/docs/server.matrix4.determinant.md +13 -0
- package/docs/server.matrix4.equals.md +55 -0
- package/docs/server.matrix4.exactequals.md +55 -0
- package/docs/server.matrix4.frobeniusnorm.md +13 -0
- package/docs/server.matrix4.fromquaternion.md +55 -0
- package/docs/server.matrix4.fromrotation.md +71 -0
- package/docs/server.matrix4.fromrotationtranslation.md +71 -0
- package/docs/server.matrix4.fromrotationtranslationscale.md +87 -0
- package/docs/server.matrix4.fromrotationtranslationscaleorigin.md +103 -0
- package/docs/server.matrix4.fromscaling.md +55 -0
- package/docs/server.matrix4.fromtranslation.md +55 -0
- package/docs/server.matrix4.fromxrotation.md +55 -0
- package/docs/server.matrix4.fromyrotation.md +55 -0
- package/docs/server.matrix4.fromzrotation.md +55 -0
- package/docs/server.matrix4.frustrum.md +135 -0
- package/docs/server.matrix4.identity.md +19 -0
- package/docs/server.matrix4.invert.md +19 -0
- package/docs/server.matrix4.lookat.md +87 -0
- package/docs/server.matrix4.md +651 -0
- package/docs/server.matrix4.multiply.md +55 -0
- package/docs/server.matrix4.multiplyscalar.md +55 -0
- package/docs/server.matrix4.orthographic.md +135 -0
- package/docs/server.matrix4.perspective.md +103 -0
- package/docs/server.matrix4.rotate.md +71 -0
- package/docs/server.matrix4.rotatex.md +55 -0
- package/docs/server.matrix4.rotatey.md +55 -0
- package/docs/server.matrix4.rotatez.md +55 -0
- package/docs/server.matrix4.scale.md +55 -0
- package/docs/server.matrix4.subtract.md +55 -0
- package/docs/server.matrix4.targetto.md +87 -0
- package/docs/server.matrix4.tostring.md +19 -0
- package/docs/server.matrix4.translate.md +55 -0
- package/docs/server.matrix4.transpose.md +19 -0
- package/docs/server.md +66 -0
- package/docs/server.quaternion.md +14 -0
- package/docs/server.quaternion.transformvector.md +55 -0
- package/docs/server.vector2._constructor_.md +61 -0
- package/docs/server.vector2.add.md +55 -0
- package/docs/server.vector2.angle.md +55 -0
- package/docs/server.vector2.ceil.md +19 -0
- package/docs/server.vector2.clone.md +19 -0
- package/docs/server.vector2.copy.md +55 -0
- package/docs/server.vector2.create.md +19 -0
- package/docs/server.vector2.distance.md +55 -0
- package/docs/server.vector2.divide.md +55 -0
- package/docs/server.vector2.dot.md +55 -0
- package/docs/server.vector2.equals.md +55 -0
- package/docs/server.vector2.exactequals.md +55 -0
- package/docs/server.vector2.floor.md +19 -0
- package/docs/server.vector2.invert.md +19 -0
- package/docs/server.vector2.length.md +13 -0
- package/docs/server.vector2.lerp.md +71 -0
- package/docs/server.vector2.magnitude.md +13 -0
- package/docs/server.vector2.max.md +55 -0
- package/docs/server.vector2.md +643 -0
- package/docs/server.vector2.min.md +55 -0
- package/docs/server.vector2.multiply.md +55 -0
- package/docs/server.vector2.negate.md +19 -0
- package/docs/server.vector2.normalize.md +19 -0
- package/docs/server.vector2.randomize.md +55 -0
- package/docs/server.vector2.rotate.md +71 -0
- package/docs/server.vector2.round.md +19 -0
- package/docs/server.vector2.scale.md +55 -0
- package/docs/server.vector2.scaleandadd.md +71 -0
- package/docs/server.vector2.squaredlength.md +13 -0
- package/docs/server.vector2.squaredmagnitude.md +13 -0
- package/docs/server.vector2.subtract.md +55 -0
- package/docs/server.vector2.tostring.md +19 -0
- package/docs/server.vector2.transformmatrix2.md +55 -0
- package/docs/server.vector2.transformmatrix3.md +55 -0
- package/docs/server.vector2.transformmatrix4.md +55 -0
- package/docs/server.vector2.x.md +15 -0
- package/docs/server.vector2.y.md +15 -0
- package/docs/server.vector2.zero.md +19 -0
- package/docs/server.vector2boolean.md +72 -0
- package/docs/server.vector2boolean.x.md +11 -0
- package/docs/server.vector2boolean.y.md +11 -0
- package/docs/server.vector2like.md +72 -0
- package/docs/server.vector2like.x.md +11 -0
- package/docs/server.vector2like.y.md +11 -0
- package/docs/server.vector3.dot.md +55 -0
- package/docs/server.vector3.md +14 -0
- package/docs/server.vector3.transformmatrix3.md +1 -1
- package/docs/server.vector3.transformmatrix4.md +1 -1
- package/examples/child-entity/assets/models/.optimized/baseColor.png +0 -0
- package/examples/child-entity/assets/models/.optimized/sword/baseColor.png +0 -0
- package/examples/child-entity/assets/models/.optimized/sword/sword.bin +0 -0
- package/examples/child-entity/assets/models/.optimized/sword/sword.gltf +356 -0
- package/examples/child-entity/assets/models/.optimized/sword.bin +0 -0
- package/examples/child-entity/assets/models/.optimized/sword.gltf +136 -0
- package/examples/child-entity/bun.lock +17 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.gltf +806 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/barbedfence.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/barbedfence/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.gltf +1633 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/binoculars/binoculars.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.gltf +2480 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bombbox/bombbox.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.gltf +136 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/bullet-hole/bullet-hole.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.gltf +831 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/healthkit/healthkit.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/baseColor_1.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/baseColor_2.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.gltf +4025 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/metalshelf/metalshelf.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/baseColor_1.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/baseColor_2.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.gltf +196 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/muzzle-flash/muzzle-flash.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/baseColor_1.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/baseColor_2.png +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.bin +0 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.gltf +3412 -0
- package/examples/zombies-fps/assets/models/environment/.optimized/weaponbox/weaponbox.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/ak-47/ak-47.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/ak-47/ak-47.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/ar-15/ar-15.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/ar-15/ar-15.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/auto-pistol/auto-pistol.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/auto-pistol/auto-pistol.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/auto-shotgun/auto-shotgun.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/auto-shotgun/auto-shotgun.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/pistol/pistol.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/pistol/pistol.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/items/.optimized/shotgun/shotgun.glb +0 -0
- package/examples/zombies-fps/assets/models/items/.optimized/shotgun/shotgun.glb.md5 +1 -0
- package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.bin +0 -0
- package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.gltf +10037 -0
- package/examples/zombies-fps/assets/models/npcs/.optimized/ripper-boss/ripper-boss.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_1.png +0 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_2.png +0 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_3.png +0 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/baseColor_4.png +0 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.bin +0 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.gltf +7679 -0
- package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.gltf.md5 +1 -0
- package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/baseColor.png +0 -0
- package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.bin +0 -0
- package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf +136 -0
- package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf.md5 +1 -0
- package/examples/zombies-fps/classes/GameManager.ts +8 -1
- package/package.json +4 -1
- package/server.api.json +13820 -7433
- package/server.d.ts +416 -16
- package/server.js +89 -89
@@ -0,0 +1,651 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Matrix4](./server.matrix4.md)
|
4
|
+
|
5
|
+
## Matrix4 class
|
6
|
+
|
7
|
+
Represents a 4x4 matrix.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export default class Matrix4 extends Float32Array
|
13
|
+
```
|
14
|
+
**Extends:** Float32Array
|
15
|
+
|
16
|
+
## Remarks
|
17
|
+
|
18
|
+
All matrix methods result in mutation of the matrix instance. This class extends `Float32Array` to provide an efficient way to create and manipulate a 4x4 matrix. Various convenience methods are provided for common matrix operations.
|
19
|
+
|
20
|
+
## Constructors
|
21
|
+
|
22
|
+
<table><thead><tr><th>
|
23
|
+
|
24
|
+
Constructor
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Modifiers
|
30
|
+
|
31
|
+
|
32
|
+
</th><th>
|
33
|
+
|
34
|
+
Description
|
35
|
+
|
36
|
+
|
37
|
+
</th></tr></thead>
|
38
|
+
<tbody><tr><td>
|
39
|
+
|
40
|
+
[(constructor)(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)](./server.matrix4._constructor_.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td><td>
|
47
|
+
|
48
|
+
Constructs a new instance of the `Matrix4` class
|
49
|
+
|
50
|
+
|
51
|
+
</td></tr>
|
52
|
+
</tbody></table>
|
53
|
+
|
54
|
+
## Properties
|
55
|
+
|
56
|
+
<table><thead><tr><th>
|
57
|
+
|
58
|
+
Property
|
59
|
+
|
60
|
+
|
61
|
+
</th><th>
|
62
|
+
|
63
|
+
Modifiers
|
64
|
+
|
65
|
+
|
66
|
+
</th><th>
|
67
|
+
|
68
|
+
Type
|
69
|
+
|
70
|
+
|
71
|
+
</th><th>
|
72
|
+
|
73
|
+
Description
|
74
|
+
|
75
|
+
|
76
|
+
</th></tr></thead>
|
77
|
+
<tbody><tr><td>
|
78
|
+
|
79
|
+
[determinant](./server.matrix4.determinant.md)
|
80
|
+
|
81
|
+
|
82
|
+
</td><td>
|
83
|
+
|
84
|
+
`readonly`
|
85
|
+
|
86
|
+
|
87
|
+
</td><td>
|
88
|
+
|
89
|
+
number
|
90
|
+
|
91
|
+
|
92
|
+
</td><td>
|
93
|
+
|
94
|
+
The determinant of the matrix.
|
95
|
+
|
96
|
+
|
97
|
+
</td></tr>
|
98
|
+
<tr><td>
|
99
|
+
|
100
|
+
[frobeniusNorm](./server.matrix4.frobeniusnorm.md)
|
101
|
+
|
102
|
+
|
103
|
+
</td><td>
|
104
|
+
|
105
|
+
`readonly`
|
106
|
+
|
107
|
+
|
108
|
+
</td><td>
|
109
|
+
|
110
|
+
number
|
111
|
+
|
112
|
+
|
113
|
+
</td><td>
|
114
|
+
|
115
|
+
The frobenius norm of the matrix.
|
116
|
+
|
117
|
+
|
118
|
+
</td></tr>
|
119
|
+
</tbody></table>
|
120
|
+
|
121
|
+
## Methods
|
122
|
+
|
123
|
+
<table><thead><tr><th>
|
124
|
+
|
125
|
+
Method
|
126
|
+
|
127
|
+
|
128
|
+
</th><th>
|
129
|
+
|
130
|
+
Modifiers
|
131
|
+
|
132
|
+
|
133
|
+
</th><th>
|
134
|
+
|
135
|
+
Description
|
136
|
+
|
137
|
+
|
138
|
+
</th></tr></thead>
|
139
|
+
<tbody><tr><td>
|
140
|
+
|
141
|
+
[add(matrix4)](./server.matrix4.add.md)
|
142
|
+
|
143
|
+
|
144
|
+
</td><td>
|
145
|
+
|
146
|
+
|
147
|
+
</td><td>
|
148
|
+
|
149
|
+
Adds a matrix to the current matrix.
|
150
|
+
|
151
|
+
|
152
|
+
</td></tr>
|
153
|
+
<tr><td>
|
154
|
+
|
155
|
+
[adjoint()](./server.matrix4.adjoint.md)
|
156
|
+
|
157
|
+
|
158
|
+
</td><td>
|
159
|
+
|
160
|
+
|
161
|
+
</td><td>
|
162
|
+
|
163
|
+
Sets the adjugate of the current matrix.
|
164
|
+
|
165
|
+
|
166
|
+
</td></tr>
|
167
|
+
<tr><td>
|
168
|
+
|
169
|
+
[clone()](./server.matrix4.clone.md)
|
170
|
+
|
171
|
+
|
172
|
+
</td><td>
|
173
|
+
|
174
|
+
|
175
|
+
</td><td>
|
176
|
+
|
177
|
+
Clones the current matrix.
|
178
|
+
|
179
|
+
|
180
|
+
</td></tr>
|
181
|
+
<tr><td>
|
182
|
+
|
183
|
+
[copy(matrix4)](./server.matrix4.copy.md)
|
184
|
+
|
185
|
+
|
186
|
+
</td><td>
|
187
|
+
|
188
|
+
|
189
|
+
</td><td>
|
190
|
+
|
191
|
+
Copies a matrix to the current matrix.
|
192
|
+
|
193
|
+
|
194
|
+
</td></tr>
|
195
|
+
<tr><td>
|
196
|
+
|
197
|
+
[create()](./server.matrix4.create.md)
|
198
|
+
|
199
|
+
|
200
|
+
</td><td>
|
201
|
+
|
202
|
+
`static`
|
203
|
+
|
204
|
+
|
205
|
+
</td><td>
|
206
|
+
|
207
|
+
Creates a new `Matrix4` instance.
|
208
|
+
|
209
|
+
|
210
|
+
</td></tr>
|
211
|
+
<tr><td>
|
212
|
+
|
213
|
+
[equals(matrix4)](./server.matrix4.equals.md)
|
214
|
+
|
215
|
+
|
216
|
+
</td><td>
|
217
|
+
|
218
|
+
|
219
|
+
</td><td>
|
220
|
+
|
221
|
+
Checks if the current matrix is approximately equal to another matrix.
|
222
|
+
|
223
|
+
|
224
|
+
</td></tr>
|
225
|
+
<tr><td>
|
226
|
+
|
227
|
+
[exactEquals(matrix4)](./server.matrix4.exactequals.md)
|
228
|
+
|
229
|
+
|
230
|
+
</td><td>
|
231
|
+
|
232
|
+
|
233
|
+
</td><td>
|
234
|
+
|
235
|
+
Checks if the current matrix is exactly equal to another matrix.
|
236
|
+
|
237
|
+
|
238
|
+
</td></tr>
|
239
|
+
<tr><td>
|
240
|
+
|
241
|
+
[fromQuaternion(quaternion)](./server.matrix4.fromquaternion.md)
|
242
|
+
|
243
|
+
|
244
|
+
</td><td>
|
245
|
+
|
246
|
+
`static`
|
247
|
+
|
248
|
+
|
249
|
+
</td><td>
|
250
|
+
|
251
|
+
Creates a new `Matrix4` instance from a `Quaternion` object.
|
252
|
+
|
253
|
+
|
254
|
+
</td></tr>
|
255
|
+
<tr><td>
|
256
|
+
|
257
|
+
[fromRotation(angle, axis)](./server.matrix4.fromrotation.md)
|
258
|
+
|
259
|
+
|
260
|
+
</td><td>
|
261
|
+
|
262
|
+
`static`
|
263
|
+
|
264
|
+
|
265
|
+
</td><td>
|
266
|
+
|
267
|
+
Creates a new `Matrix4` instance from an angle and axis.
|
268
|
+
|
269
|
+
|
270
|
+
</td></tr>
|
271
|
+
<tr><td>
|
272
|
+
|
273
|
+
[fromRotationTranslation(rotation, translation)](./server.matrix4.fromrotationtranslation.md)
|
274
|
+
|
275
|
+
|
276
|
+
</td><td>
|
277
|
+
|
278
|
+
`static`
|
279
|
+
|
280
|
+
|
281
|
+
</td><td>
|
282
|
+
|
283
|
+
Creates a new `Matrix4` instance from a rotation and translation.
|
284
|
+
|
285
|
+
|
286
|
+
</td></tr>
|
287
|
+
<tr><td>
|
288
|
+
|
289
|
+
[fromRotationTranslationScale(rotation, translation, scale)](./server.matrix4.fromrotationtranslationscale.md)
|
290
|
+
|
291
|
+
|
292
|
+
</td><td>
|
293
|
+
|
294
|
+
`static`
|
295
|
+
|
296
|
+
|
297
|
+
</td><td>
|
298
|
+
|
299
|
+
Creates a new `Matrix4` instance from a rotation, translation, and scale.
|
300
|
+
|
301
|
+
|
302
|
+
</td></tr>
|
303
|
+
<tr><td>
|
304
|
+
|
305
|
+
[fromRotationTranslationScaleOrigin(rotation, translation, scale, origin)](./server.matrix4.fromrotationtranslationscaleorigin.md)
|
306
|
+
|
307
|
+
|
308
|
+
</td><td>
|
309
|
+
|
310
|
+
`static`
|
311
|
+
|
312
|
+
|
313
|
+
</td><td>
|
314
|
+
|
315
|
+
Creates a new `Matrix4` instance from a rotation, translation, scale, and origin.
|
316
|
+
|
317
|
+
|
318
|
+
</td></tr>
|
319
|
+
<tr><td>
|
320
|
+
|
321
|
+
[fromScaling(scale)](./server.matrix4.fromscaling.md)
|
322
|
+
|
323
|
+
|
324
|
+
</td><td>
|
325
|
+
|
326
|
+
`static`
|
327
|
+
|
328
|
+
|
329
|
+
</td><td>
|
330
|
+
|
331
|
+
Creates a new `Matrix4` instance from a scale of identity matrix.
|
332
|
+
|
333
|
+
|
334
|
+
</td></tr>
|
335
|
+
<tr><td>
|
336
|
+
|
337
|
+
[fromTranslation(translation)](./server.matrix4.fromtranslation.md)
|
338
|
+
|
339
|
+
|
340
|
+
</td><td>
|
341
|
+
|
342
|
+
`static`
|
343
|
+
|
344
|
+
|
345
|
+
</td><td>
|
346
|
+
|
347
|
+
Creates a new `Matrix4` instance from a translation of identity matrix.
|
348
|
+
|
349
|
+
|
350
|
+
</td></tr>
|
351
|
+
<tr><td>
|
352
|
+
|
353
|
+
[fromXRotation(angle)](./server.matrix4.fromxrotation.md)
|
354
|
+
|
355
|
+
|
356
|
+
</td><td>
|
357
|
+
|
358
|
+
`static`
|
359
|
+
|
360
|
+
|
361
|
+
</td><td>
|
362
|
+
|
363
|
+
Creates a new `Matrix4` instance from an x-rotation of identity matrix.
|
364
|
+
|
365
|
+
|
366
|
+
</td></tr>
|
367
|
+
<tr><td>
|
368
|
+
|
369
|
+
[fromYRotation(angle)](./server.matrix4.fromyrotation.md)
|
370
|
+
|
371
|
+
|
372
|
+
</td><td>
|
373
|
+
|
374
|
+
`static`
|
375
|
+
|
376
|
+
|
377
|
+
</td><td>
|
378
|
+
|
379
|
+
Creates a new `Matrix4` instance from a y-rotation of identity matrix.
|
380
|
+
|
381
|
+
|
382
|
+
</td></tr>
|
383
|
+
<tr><td>
|
384
|
+
|
385
|
+
[fromZRotation(angle)](./server.matrix4.fromzrotation.md)
|
386
|
+
|
387
|
+
|
388
|
+
</td><td>
|
389
|
+
|
390
|
+
`static`
|
391
|
+
|
392
|
+
|
393
|
+
</td><td>
|
394
|
+
|
395
|
+
Creates a new `Matrix4` instance from a z-rotation of identity matrix.
|
396
|
+
|
397
|
+
|
398
|
+
</td></tr>
|
399
|
+
<tr><td>
|
400
|
+
|
401
|
+
[frustrum(left, right, bottom, top, near, far)](./server.matrix4.frustrum.md)
|
402
|
+
|
403
|
+
|
404
|
+
</td><td>
|
405
|
+
|
406
|
+
|
407
|
+
</td><td>
|
408
|
+
|
409
|
+
Sets the current matrix to a frustrum matrix with the given bounds.
|
410
|
+
|
411
|
+
|
412
|
+
</td></tr>
|
413
|
+
<tr><td>
|
414
|
+
|
415
|
+
[identity()](./server.matrix4.identity.md)
|
416
|
+
|
417
|
+
|
418
|
+
</td><td>
|
419
|
+
|
420
|
+
|
421
|
+
</td><td>
|
422
|
+
|
423
|
+
Sets the current matrix to the identity matrix.
|
424
|
+
|
425
|
+
|
426
|
+
</td></tr>
|
427
|
+
<tr><td>
|
428
|
+
|
429
|
+
[invert()](./server.matrix4.invert.md)
|
430
|
+
|
431
|
+
|
432
|
+
</td><td>
|
433
|
+
|
434
|
+
|
435
|
+
</td><td>
|
436
|
+
|
437
|
+
Inverts the current matrix.
|
438
|
+
|
439
|
+
|
440
|
+
</td></tr>
|
441
|
+
<tr><td>
|
442
|
+
|
443
|
+
[lookAt(eye, center, up)](./server.matrix4.lookat.md)
|
444
|
+
|
445
|
+
|
446
|
+
</td><td>
|
447
|
+
|
448
|
+
|
449
|
+
</td><td>
|
450
|
+
|
451
|
+
Sets the current matrix to a look-at matrix with the given eye, center, and up vectors.
|
452
|
+
|
453
|
+
|
454
|
+
</td></tr>
|
455
|
+
<tr><td>
|
456
|
+
|
457
|
+
[multiply(matrix4)](./server.matrix4.multiply.md)
|
458
|
+
|
459
|
+
|
460
|
+
</td><td>
|
461
|
+
|
462
|
+
|
463
|
+
</td><td>
|
464
|
+
|
465
|
+
Multiplies the current matrix by another matrix.
|
466
|
+
|
467
|
+
|
468
|
+
</td></tr>
|
469
|
+
<tr><td>
|
470
|
+
|
471
|
+
[multiplyScalar(scalar)](./server.matrix4.multiplyscalar.md)
|
472
|
+
|
473
|
+
|
474
|
+
</td><td>
|
475
|
+
|
476
|
+
|
477
|
+
</td><td>
|
478
|
+
|
479
|
+
Multiplies each element of the current matrix by a scalar value.
|
480
|
+
|
481
|
+
|
482
|
+
</td></tr>
|
483
|
+
<tr><td>
|
484
|
+
|
485
|
+
[orthographic(left, right, bottom, top, near, far)](./server.matrix4.orthographic.md)
|
486
|
+
|
487
|
+
|
488
|
+
</td><td>
|
489
|
+
|
490
|
+
|
491
|
+
</td><td>
|
492
|
+
|
493
|
+
Sets the current matrix to an orthographic projection matrix with the given bounds.
|
494
|
+
|
495
|
+
|
496
|
+
</td></tr>
|
497
|
+
<tr><td>
|
498
|
+
|
499
|
+
[perspective(fovy, aspect, near, far)](./server.matrix4.perspective.md)
|
500
|
+
|
501
|
+
|
502
|
+
</td><td>
|
503
|
+
|
504
|
+
|
505
|
+
</td><td>
|
506
|
+
|
507
|
+
Sets the current matrix to a perspective matrix with the given field of view, aspect ratio, and near and far bounds.
|
508
|
+
|
509
|
+
|
510
|
+
</td></tr>
|
511
|
+
<tr><td>
|
512
|
+
|
513
|
+
[rotate(angle, axis)](./server.matrix4.rotate.md)
|
514
|
+
|
515
|
+
|
516
|
+
</td><td>
|
517
|
+
|
518
|
+
|
519
|
+
</td><td>
|
520
|
+
|
521
|
+
Rotates the current matrix by an angle in radians around an axis.
|
522
|
+
|
523
|
+
|
524
|
+
</td></tr>
|
525
|
+
<tr><td>
|
526
|
+
|
527
|
+
[rotateX(angle)](./server.matrix4.rotatex.md)
|
528
|
+
|
529
|
+
|
530
|
+
</td><td>
|
531
|
+
|
532
|
+
|
533
|
+
</td><td>
|
534
|
+
|
535
|
+
Rotates the current matrix by an angle in radians around the x-axis.
|
536
|
+
|
537
|
+
|
538
|
+
</td></tr>
|
539
|
+
<tr><td>
|
540
|
+
|
541
|
+
[rotateY(angle)](./server.matrix4.rotatey.md)
|
542
|
+
|
543
|
+
|
544
|
+
</td><td>
|
545
|
+
|
546
|
+
|
547
|
+
</td><td>
|
548
|
+
|
549
|
+
Rotates the current matrix by an angle in radians around the y-axis.
|
550
|
+
|
551
|
+
|
552
|
+
</td></tr>
|
553
|
+
<tr><td>
|
554
|
+
|
555
|
+
[rotateZ(angle)](./server.matrix4.rotatez.md)
|
556
|
+
|
557
|
+
|
558
|
+
</td><td>
|
559
|
+
|
560
|
+
|
561
|
+
</td><td>
|
562
|
+
|
563
|
+
Rotates the current matrix by an angle in radians around the z-axis.
|
564
|
+
|
565
|
+
|
566
|
+
</td></tr>
|
567
|
+
<tr><td>
|
568
|
+
|
569
|
+
[scale(vector3)](./server.matrix4.scale.md)
|
570
|
+
|
571
|
+
|
572
|
+
</td><td>
|
573
|
+
|
574
|
+
|
575
|
+
</td><td>
|
576
|
+
|
577
|
+
Scales the current matrix by a vector.
|
578
|
+
|
579
|
+
|
580
|
+
</td></tr>
|
581
|
+
<tr><td>
|
582
|
+
|
583
|
+
[subtract(matrix4)](./server.matrix4.subtract.md)
|
584
|
+
|
585
|
+
|
586
|
+
</td><td>
|
587
|
+
|
588
|
+
|
589
|
+
</td><td>
|
590
|
+
|
591
|
+
Subtracts a matrix from the current matrix.
|
592
|
+
|
593
|
+
|
594
|
+
</td></tr>
|
595
|
+
<tr><td>
|
596
|
+
|
597
|
+
[targetTo(eye, center, up)](./server.matrix4.targetto.md)
|
598
|
+
|
599
|
+
|
600
|
+
</td><td>
|
601
|
+
|
602
|
+
|
603
|
+
</td><td>
|
604
|
+
|
605
|
+
Sets the current matrix to a matrix that looks at a target.
|
606
|
+
|
607
|
+
|
608
|
+
</td></tr>
|
609
|
+
<tr><td>
|
610
|
+
|
611
|
+
[toString()](./server.matrix4.tostring.md)
|
612
|
+
|
613
|
+
|
614
|
+
</td><td>
|
615
|
+
|
616
|
+
|
617
|
+
</td><td>
|
618
|
+
|
619
|
+
Returns a string representation of the current matrix.
|
620
|
+
|
621
|
+
|
622
|
+
</td></tr>
|
623
|
+
<tr><td>
|
624
|
+
|
625
|
+
[translate(vector3)](./server.matrix4.translate.md)
|
626
|
+
|
627
|
+
|
628
|
+
</td><td>
|
629
|
+
|
630
|
+
|
631
|
+
</td><td>
|
632
|
+
|
633
|
+
Translates the current matrix by a vector.
|
634
|
+
|
635
|
+
|
636
|
+
</td></tr>
|
637
|
+
<tr><td>
|
638
|
+
|
639
|
+
[transpose()](./server.matrix4.transpose.md)
|
640
|
+
|
641
|
+
|
642
|
+
</td><td>
|
643
|
+
|
644
|
+
|
645
|
+
</td><td>
|
646
|
+
|
647
|
+
Transposes the current matrix.
|
648
|
+
|
649
|
+
|
650
|
+
</td></tr>
|
651
|
+
</tbody></table>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Matrix4](./server.matrix4.md) > [multiply](./server.matrix4.multiply.md)
|
4
|
+
|
5
|
+
## Matrix4.multiply() method
|
6
|
+
|
7
|
+
Multiplies the current matrix by another matrix.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
multiply(matrix4: Matrix4): Matrix4;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
matrix4
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Matrix4](./server.matrix4.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The matrix to multiply the current matrix by.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
[Matrix4](./server.matrix4.md)
|
53
|
+
|
54
|
+
The current matrix.
|
55
|
+
|