hytopia 0.2.3 → 0.2.5-dev.1
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.frobeniusnormal.md → server.matrix2.frobeniusnorm.md} +3 -3
- package/docs/server.matrix2.md +1 -1
- package/docs/server.matrix3.frobeniusnorm.md +13 -0
- package/docs/server.matrix3.fromtranslation.md +3 -3
- package/docs/server.matrix3.md +18 -4
- package/docs/server.matrix3.projection.md +1 -1
- package/docs/server.matrix3.transformvector.md +55 -0
- package/docs/server.matrix4.frobeniusnorm.md +13 -0
- package/docs/server.matrix4.md +4 -4
- package/docs/{server.matrix4.orthogonal.md → server.matrix4.orthographic.md} +10 -10
- package/docs/server.quaternion.md +14 -0
- package/docs/server.quaternion.transformvector.md +55 -0
- package/docs/server.vector2.md +0 -14
- package/docs/server.vector3.dot.md +55 -0
- package/docs/server.vector3.md +14 -0
- 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 +168 -69
- package/server.d.ts +40 -22
- package/server.js +44 -44
- package/docs/server.matrix3.frobeniusnormal.md +0 -13
- package/docs/server.matrix4.frobeniusnormal.md +0 -13
- package/docs/server.vector2.cross.md +0 -55
package/examples/zombies-fps/assets/models/players/.optimized/soldier-player/soldier-player.gltf.md5
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
59f0afda681124b5e1c0c9e9287aec58c511ee9ed94e1916f29b3623fcb24055
|
Binary file
|
package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.bin
ADDED
Binary file
|
package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
{
|
2
|
+
"asset": {
|
3
|
+
"generator": "glTF-Transform v4.1.1",
|
4
|
+
"version": "2.0"
|
5
|
+
},
|
6
|
+
"accessors": [
|
7
|
+
{
|
8
|
+
"type": "SCALAR",
|
9
|
+
"componentType": 5123,
|
10
|
+
"count": 36,
|
11
|
+
"bufferView": 0,
|
12
|
+
"byteOffset": 0
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"type": "VEC3",
|
16
|
+
"componentType": 5126,
|
17
|
+
"count": 24,
|
18
|
+
"max": [
|
19
|
+
0,
|
20
|
+
0.0625,
|
21
|
+
3.5625
|
22
|
+
],
|
23
|
+
"min": [
|
24
|
+
-0.0625,
|
25
|
+
0,
|
26
|
+
-0.0625
|
27
|
+
],
|
28
|
+
"bufferView": 1,
|
29
|
+
"byteOffset": 0
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type": "VEC3",
|
33
|
+
"componentType": 5126,
|
34
|
+
"count": 24,
|
35
|
+
"bufferView": 1,
|
36
|
+
"byteOffset": 12
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"type": "VEC2",
|
40
|
+
"componentType": 5126,
|
41
|
+
"count": 24,
|
42
|
+
"bufferView": 1,
|
43
|
+
"byteOffset": 24
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"bufferViews": [
|
47
|
+
{
|
48
|
+
"buffer": 0,
|
49
|
+
"byteOffset": 0,
|
50
|
+
"byteLength": 72,
|
51
|
+
"target": 34963
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"buffer": 0,
|
55
|
+
"byteOffset": 72,
|
56
|
+
"byteLength": 768,
|
57
|
+
"byteStride": 32,
|
58
|
+
"target": 34962
|
59
|
+
}
|
60
|
+
],
|
61
|
+
"samplers": [
|
62
|
+
{
|
63
|
+
"magFilter": 9728,
|
64
|
+
"minFilter": 9728,
|
65
|
+
"wrapS": 33071,
|
66
|
+
"wrapT": 33071
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"textures": [
|
70
|
+
{
|
71
|
+
"source": 0,
|
72
|
+
"sampler": 0
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"images": [
|
76
|
+
{
|
77
|
+
"mimeType": "image/png",
|
78
|
+
"uri": "baseColor.png"
|
79
|
+
}
|
80
|
+
],
|
81
|
+
"buffers": [
|
82
|
+
{
|
83
|
+
"uri": "bullet-trace.bin",
|
84
|
+
"byteLength": 840
|
85
|
+
}
|
86
|
+
],
|
87
|
+
"materials": [
|
88
|
+
{
|
89
|
+
"alphaMode": "MASK",
|
90
|
+
"alphaCutoff": 0.05,
|
91
|
+
"doubleSided": true,
|
92
|
+
"pbrMetallicRoughness": {
|
93
|
+
"metallicFactor": 0,
|
94
|
+
"baseColorTexture": {
|
95
|
+
"index": 0
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
],
|
100
|
+
"meshes": [
|
101
|
+
{
|
102
|
+
"primitives": [
|
103
|
+
{
|
104
|
+
"attributes": {
|
105
|
+
"POSITION": 1,
|
106
|
+
"NORMAL": 2,
|
107
|
+
"TEXCOORD_0": 3
|
108
|
+
},
|
109
|
+
"mode": 4,
|
110
|
+
"material": 0,
|
111
|
+
"indices": 0
|
112
|
+
}
|
113
|
+
]
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"nodes": [
|
117
|
+
{
|
118
|
+
"name": "cube",
|
119
|
+
"translation": [
|
120
|
+
0,
|
121
|
+
0,
|
122
|
+
-1.75
|
123
|
+
],
|
124
|
+
"mesh": 0
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"scenes": [
|
128
|
+
{
|
129
|
+
"name": "blockbench_export",
|
130
|
+
"nodes": [
|
131
|
+
0
|
132
|
+
]
|
133
|
+
}
|
134
|
+
],
|
135
|
+
"scene": 0
|
136
|
+
}
|
package/examples/zombies-fps/assets/models/projectiles/.optimized/bullet-trace/bullet-trace.gltf.md5
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
c74848409426988ed22402cb4f3a3581ca3ca3dfb5e857071ccac927b75da478
|
@@ -45,7 +45,9 @@ export default class GameManager {
|
|
45
45
|
}
|
46
46
|
|
47
47
|
public checkEndGame() {
|
48
|
-
|
48
|
+
if (this._endGameTimeout !== undefined) {
|
49
|
+
return;
|
50
|
+
}
|
49
51
|
|
50
52
|
this._endGameTimeout = setTimeout(() => {
|
51
53
|
if (!this.world) return;
|
@@ -63,6 +65,8 @@ export default class GameManager {
|
|
63
65
|
if (allPlayersDowned) {
|
64
66
|
this.endGame();
|
65
67
|
}
|
68
|
+
|
69
|
+
this._endGameTimeout = undefined;
|
66
70
|
}, 1000);
|
67
71
|
}
|
68
72
|
|
@@ -215,6 +219,9 @@ export default class GameManager {
|
|
215
219
|
|
216
220
|
this._enemySpawnTimeout = setTimeout(() => this._spawnLoop(), nextSpawn);
|
217
221
|
this.waveDelay = 0;
|
222
|
+
|
223
|
+
// Check end game conditions.
|
224
|
+
this.checkEndGame();
|
218
225
|
}
|
219
226
|
|
220
227
|
private _waveLoop() {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hytopia",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.5-dev.1",
|
4
4
|
"description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
|
5
5
|
"main": "server.js",
|
6
6
|
"bin": {
|
@@ -40,6 +40,9 @@
|
|
40
40
|
"roblox",
|
41
41
|
"recroom"
|
42
42
|
],
|
43
|
+
"dependencies": {
|
44
|
+
"@gltf-transform/cli": "^4.1.1"
|
45
|
+
},
|
43
46
|
"author": "HYTOPIA, Inc.",
|
44
47
|
"license": "SEE LICENSE IN LICENSE.md",
|
45
48
|
"types": "./server.d.ts",
|
package/server.api.json
CHANGED
@@ -17578,12 +17578,12 @@
|
|
17578
17578
|
},
|
17579
17579
|
{
|
17580
17580
|
"kind": "Property",
|
17581
|
-
"canonicalReference": "server!Matrix2#
|
17581
|
+
"canonicalReference": "server!Matrix2#frobeniusNorm:member",
|
17582
17582
|
"docComment": "/**\n * The frobenius normal of the matrix.\n */\n",
|
17583
17583
|
"excerptTokens": [
|
17584
17584
|
{
|
17585
17585
|
"kind": "Content",
|
17586
|
-
"text": "get
|
17586
|
+
"text": "get frobeniusNorm(): "
|
17587
17587
|
},
|
17588
17588
|
{
|
17589
17589
|
"kind": "Content",
|
@@ -17597,7 +17597,7 @@
|
|
17597
17597
|
"isReadonly": true,
|
17598
17598
|
"isOptional": false,
|
17599
17599
|
"releaseTag": "Public",
|
17600
|
-
"name": "
|
17600
|
+
"name": "frobeniusNorm",
|
17601
17601
|
"propertyTypeTokenRange": {
|
17602
17602
|
"startIndex": 1,
|
17603
17603
|
"endIndex": 2
|
@@ -18548,12 +18548,12 @@
|
|
18548
18548
|
},
|
18549
18549
|
{
|
18550
18550
|
"kind": "Property",
|
18551
|
-
"canonicalReference": "server!Matrix3#
|
18552
|
-
"docComment": "/**\n * The frobenius
|
18551
|
+
"canonicalReference": "server!Matrix3#frobeniusNorm:member",
|
18552
|
+
"docComment": "/**\n * The frobenius norm of the matrix.\n */\n",
|
18553
18553
|
"excerptTokens": [
|
18554
18554
|
{
|
18555
18555
|
"kind": "Content",
|
18556
|
-
"text": "get
|
18556
|
+
"text": "get frobeniusNorm(): "
|
18557
18557
|
},
|
18558
18558
|
{
|
18559
18559
|
"kind": "Content",
|
@@ -18567,7 +18567,7 @@
|
|
18567
18567
|
"isReadonly": true,
|
18568
18568
|
"isOptional": false,
|
18569
18569
|
"releaseTag": "Public",
|
18570
|
-
"name": "
|
18570
|
+
"name": "frobeniusNorm",
|
18571
18571
|
"propertyTypeTokenRange": {
|
18572
18572
|
"startIndex": 1,
|
18573
18573
|
"endIndex": 2
|
@@ -18778,7 +18778,7 @@
|
|
18778
18778
|
{
|
18779
18779
|
"kind": "Method",
|
18780
18780
|
"canonicalReference": "server!Matrix3.fromTranslation:member(1)",
|
18781
|
-
"docComment": "/**\n * Creates a new `Matrix3` instance from a translation of identity matrix
|
18781
|
+
"docComment": "/**\n * Creates a new `Matrix3` instance from a translation of identity matrix. This is used only when working with two-dimensional homogeneous coordinates, which is why the `translation` parameter is a `Vector2`.\n *\n * @param translation - The translation of the matrix.\n *\n * @returns A new `Matrix3` instance.\n */\n",
|
18782
18782
|
"excerptTokens": [
|
18783
18783
|
{
|
18784
18784
|
"kind": "Content",
|
@@ -18786,8 +18786,8 @@
|
|
18786
18786
|
},
|
18787
18787
|
{
|
18788
18788
|
"kind": "Reference",
|
18789
|
-
"text": "
|
18790
|
-
"canonicalReference": "server!
|
18789
|
+
"text": "Vector2",
|
18790
|
+
"canonicalReference": "server!Vector2:class"
|
18791
18791
|
},
|
18792
18792
|
{
|
18793
18793
|
"kind": "Content",
|
@@ -18991,7 +18991,7 @@
|
|
18991
18991
|
{
|
18992
18992
|
"kind": "Method",
|
18993
18993
|
"canonicalReference": "server!Matrix3#projection:member(1)",
|
18994
|
-
"docComment": "/**\n * Sets the current matrix to a projection matrix with the given bounds.\n *\n * @param width - The width of the projection.\n *\n * @param height - The height of the projection.\n *\n * @returns The current matrix.\n */\n",
|
18994
|
+
"docComment": "/**\n * Sets the current matrix to a orthographic projection matrix with the given bounds.\n *\n * @param width - The width of the projection.\n *\n * @param height - The height of the projection.\n *\n * @returns The current matrix.\n */\n",
|
18995
18995
|
"excerptTokens": [
|
18996
18996
|
{
|
18997
18997
|
"kind": "Content",
|
@@ -19183,6 +19183,56 @@
|
|
19183
19183
|
"isAbstract": false,
|
19184
19184
|
"name": "toString"
|
19185
19185
|
},
|
19186
|
+
{
|
19187
|
+
"kind": "Method",
|
19188
|
+
"canonicalReference": "server!Matrix3#transformVector:member(1)",
|
19189
|
+
"docComment": "/**\n * Multiplies the provided vector3 by this matrix. This modifies the vector in-place, but also returns the transformed vector.\n *\n * @param vector - The vector to multiply by this.\n *\n * @returns The transformed vector.\n */\n",
|
19190
|
+
"excerptTokens": [
|
19191
|
+
{
|
19192
|
+
"kind": "Content",
|
19193
|
+
"text": "transformVector(vector: "
|
19194
|
+
},
|
19195
|
+
{
|
19196
|
+
"kind": "Reference",
|
19197
|
+
"text": "Vector3",
|
19198
|
+
"canonicalReference": "server!Vector3:class"
|
19199
|
+
},
|
19200
|
+
{
|
19201
|
+
"kind": "Content",
|
19202
|
+
"text": "): "
|
19203
|
+
},
|
19204
|
+
{
|
19205
|
+
"kind": "Reference",
|
19206
|
+
"text": "Vector3",
|
19207
|
+
"canonicalReference": "server!Vector3:class"
|
19208
|
+
},
|
19209
|
+
{
|
19210
|
+
"kind": "Content",
|
19211
|
+
"text": ";"
|
19212
|
+
}
|
19213
|
+
],
|
19214
|
+
"isStatic": false,
|
19215
|
+
"returnTypeTokenRange": {
|
19216
|
+
"startIndex": 3,
|
19217
|
+
"endIndex": 4
|
19218
|
+
},
|
19219
|
+
"releaseTag": "Public",
|
19220
|
+
"isProtected": false,
|
19221
|
+
"overloadIndex": 1,
|
19222
|
+
"parameters": [
|
19223
|
+
{
|
19224
|
+
"parameterName": "vector",
|
19225
|
+
"parameterTypeTokenRange": {
|
19226
|
+
"startIndex": 1,
|
19227
|
+
"endIndex": 2
|
19228
|
+
},
|
19229
|
+
"isOptional": false
|
19230
|
+
}
|
19231
|
+
],
|
19232
|
+
"isOptional": false,
|
19233
|
+
"isAbstract": false,
|
19234
|
+
"name": "transformVector"
|
19235
|
+
},
|
19186
19236
|
{
|
19187
19237
|
"kind": "Method",
|
19188
19238
|
"canonicalReference": "server!Matrix3#transpose:member(1)",
|
@@ -19845,12 +19895,12 @@
|
|
19845
19895
|
},
|
19846
19896
|
{
|
19847
19897
|
"kind": "Property",
|
19848
|
-
"canonicalReference": "server!Matrix4#
|
19849
|
-
"docComment": "/**\n * The frobenius
|
19898
|
+
"canonicalReference": "server!Matrix4#frobeniusNorm:member",
|
19899
|
+
"docComment": "/**\n * The frobenius norm of the matrix.\n */\n",
|
19850
19900
|
"excerptTokens": [
|
19851
19901
|
{
|
19852
19902
|
"kind": "Content",
|
19853
|
-
"text": "get
|
19903
|
+
"text": "get frobeniusNorm(): "
|
19854
19904
|
},
|
19855
19905
|
{
|
19856
19906
|
"kind": "Content",
|
@@ -19864,7 +19914,7 @@
|
|
19864
19914
|
"isReadonly": true,
|
19865
19915
|
"isOptional": false,
|
19866
19916
|
"releaseTag": "Public",
|
19867
|
-
"name": "
|
19917
|
+
"name": "frobeniusNorm",
|
19868
19918
|
"propertyTypeTokenRange": {
|
19869
19919
|
"startIndex": 1,
|
19870
19920
|
"endIndex": 2
|
@@ -20866,12 +20916,12 @@
|
|
20866
20916
|
},
|
20867
20917
|
{
|
20868
20918
|
"kind": "Method",
|
20869
|
-
"canonicalReference": "server!Matrix4#
|
20870
|
-
"docComment": "/**\n * Sets the current matrix to an
|
20919
|
+
"canonicalReference": "server!Matrix4#orthographic:member(1)",
|
20920
|
+
"docComment": "/**\n * Sets the current matrix to an orthographic projection matrix with the given bounds.\n *\n * @param left - The left bound of the frustum.\n *\n * @param right - The right bound of the frustum.\n *\n * @param bottom - The bottom bound of the frustum.\n *\n * @param top - The top bound of the frustum.\n *\n * @param near - The near bound of the frustum.\n *\n * @param far - The far bound of the frustum.\n *\n * @returns The current matrix.\n */\n",
|
20871
20921
|
"excerptTokens": [
|
20872
20922
|
{
|
20873
20923
|
"kind": "Content",
|
20874
|
-
"text": "
|
20924
|
+
"text": "orthographic(left: "
|
20875
20925
|
},
|
20876
20926
|
{
|
20877
20927
|
"kind": "Content",
|
@@ -20991,7 +21041,7 @@
|
|
20991
21041
|
],
|
20992
21042
|
"isOptional": false,
|
20993
21043
|
"isAbstract": false,
|
20994
|
-
"name": "
|
21044
|
+
"name": "orthographic"
|
20995
21045
|
},
|
20996
21046
|
{
|
20997
21047
|
"kind": "Method",
|
@@ -29284,6 +29334,56 @@
|
|
29284
29334
|
"isAbstract": false,
|
29285
29335
|
"name": "toString"
|
29286
29336
|
},
|
29337
|
+
{
|
29338
|
+
"kind": "Method",
|
29339
|
+
"canonicalReference": "server!Quaternion#transformVector:member(1)",
|
29340
|
+
"docComment": "/**\n * Rotates the provided vector by the rotation this quaternion represents. This modifies the vector in-place, but also returns the rotated vector.\n *\n * @param vector - the vector to rotate\n *\n * @returns the rotated vector.\n */\n",
|
29341
|
+
"excerptTokens": [
|
29342
|
+
{
|
29343
|
+
"kind": "Content",
|
29344
|
+
"text": "transformVector(vector: "
|
29345
|
+
},
|
29346
|
+
{
|
29347
|
+
"kind": "Reference",
|
29348
|
+
"text": "Vector3",
|
29349
|
+
"canonicalReference": "server!Vector3:class"
|
29350
|
+
},
|
29351
|
+
{
|
29352
|
+
"kind": "Content",
|
29353
|
+
"text": "): "
|
29354
|
+
},
|
29355
|
+
{
|
29356
|
+
"kind": "Reference",
|
29357
|
+
"text": "Vector3",
|
29358
|
+
"canonicalReference": "server!Vector3:class"
|
29359
|
+
},
|
29360
|
+
{
|
29361
|
+
"kind": "Content",
|
29362
|
+
"text": ";"
|
29363
|
+
}
|
29364
|
+
],
|
29365
|
+
"isStatic": false,
|
29366
|
+
"returnTypeTokenRange": {
|
29367
|
+
"startIndex": 3,
|
29368
|
+
"endIndex": 4
|
29369
|
+
},
|
29370
|
+
"releaseTag": "Public",
|
29371
|
+
"isProtected": false,
|
29372
|
+
"overloadIndex": 1,
|
29373
|
+
"parameters": [
|
29374
|
+
{
|
29375
|
+
"parameterName": "vector",
|
29376
|
+
"parameterTypeTokenRange": {
|
29377
|
+
"startIndex": 1,
|
29378
|
+
"endIndex": 2
|
29379
|
+
},
|
29380
|
+
"isOptional": false
|
29381
|
+
}
|
29382
|
+
],
|
29383
|
+
"isOptional": false,
|
29384
|
+
"isAbstract": false,
|
29385
|
+
"name": "transformVector"
|
29386
|
+
},
|
29287
29387
|
{
|
29288
29388
|
"kind": "Property",
|
29289
29389
|
"canonicalReference": "server!Quaternion#w:member",
|
@@ -35999,56 +36099,6 @@
|
|
35999
36099
|
"isAbstract": false,
|
36000
36100
|
"name": "create"
|
36001
36101
|
},
|
36002
|
-
{
|
36003
|
-
"kind": "Method",
|
36004
|
-
"canonicalReference": "server!Vector2#cross:member(1)",
|
36005
|
-
"docComment": "/**\n * Calculates the cross product of the current vector and another vector.\n *\n * @param vector2 - The vector to calculate the cross product with.\n *\n * @returns The cross product of the two vector 2s as a vector3.\n */\n",
|
36006
|
-
"excerptTokens": [
|
36007
|
-
{
|
36008
|
-
"kind": "Content",
|
36009
|
-
"text": "cross(vector2: "
|
36010
|
-
},
|
36011
|
-
{
|
36012
|
-
"kind": "Reference",
|
36013
|
-
"text": "Vector2",
|
36014
|
-
"canonicalReference": "server!Vector2:class"
|
36015
|
-
},
|
36016
|
-
{
|
36017
|
-
"kind": "Content",
|
36018
|
-
"text": "): "
|
36019
|
-
},
|
36020
|
-
{
|
36021
|
-
"kind": "Reference",
|
36022
|
-
"text": "Vector3",
|
36023
|
-
"canonicalReference": "server!Vector3:class"
|
36024
|
-
},
|
36025
|
-
{
|
36026
|
-
"kind": "Content",
|
36027
|
-
"text": ";"
|
36028
|
-
}
|
36029
|
-
],
|
36030
|
-
"isStatic": false,
|
36031
|
-
"returnTypeTokenRange": {
|
36032
|
-
"startIndex": 3,
|
36033
|
-
"endIndex": 4
|
36034
|
-
},
|
36035
|
-
"releaseTag": "Public",
|
36036
|
-
"isProtected": false,
|
36037
|
-
"overloadIndex": 1,
|
36038
|
-
"parameters": [
|
36039
|
-
{
|
36040
|
-
"parameterName": "vector2",
|
36041
|
-
"parameterTypeTokenRange": {
|
36042
|
-
"startIndex": 1,
|
36043
|
-
"endIndex": 2
|
36044
|
-
},
|
36045
|
-
"isOptional": false
|
36046
|
-
}
|
36047
|
-
],
|
36048
|
-
"isOptional": false,
|
36049
|
-
"isAbstract": false,
|
36050
|
-
"name": "cross"
|
36051
|
-
},
|
36052
36102
|
{
|
36053
36103
|
"kind": "Method",
|
36054
36104
|
"canonicalReference": "server!Vector2#distance:member(1)",
|
@@ -37943,6 +37993,55 @@
|
|
37943
37993
|
"isAbstract": false,
|
37944
37994
|
"name": "divide"
|
37945
37995
|
},
|
37996
|
+
{
|
37997
|
+
"kind": "Method",
|
37998
|
+
"canonicalReference": "server!Vector3#dot:member(1)",
|
37999
|
+
"docComment": "/**\n * Returns the dot product of this vector and another vector.\n *\n * @param vector3 - the other vector\n *\n * @returns the dot product of this and vector3\n */\n",
|
38000
|
+
"excerptTokens": [
|
38001
|
+
{
|
38002
|
+
"kind": "Content",
|
38003
|
+
"text": "dot(vector3: "
|
38004
|
+
},
|
38005
|
+
{
|
38006
|
+
"kind": "Reference",
|
38007
|
+
"text": "Vector3",
|
38008
|
+
"canonicalReference": "server!Vector3:class"
|
38009
|
+
},
|
38010
|
+
{
|
38011
|
+
"kind": "Content",
|
38012
|
+
"text": "): "
|
38013
|
+
},
|
38014
|
+
{
|
38015
|
+
"kind": "Content",
|
38016
|
+
"text": "number"
|
38017
|
+
},
|
38018
|
+
{
|
38019
|
+
"kind": "Content",
|
38020
|
+
"text": ";"
|
38021
|
+
}
|
38022
|
+
],
|
38023
|
+
"isStatic": false,
|
38024
|
+
"returnTypeTokenRange": {
|
38025
|
+
"startIndex": 3,
|
38026
|
+
"endIndex": 4
|
38027
|
+
},
|
38028
|
+
"releaseTag": "Public",
|
38029
|
+
"isProtected": false,
|
38030
|
+
"overloadIndex": 1,
|
38031
|
+
"parameters": [
|
38032
|
+
{
|
38033
|
+
"parameterName": "vector3",
|
38034
|
+
"parameterTypeTokenRange": {
|
38035
|
+
"startIndex": 1,
|
38036
|
+
"endIndex": 2
|
38037
|
+
},
|
38038
|
+
"isOptional": false
|
38039
|
+
}
|
38040
|
+
],
|
38041
|
+
"isOptional": false,
|
38042
|
+
"isAbstract": false,
|
38043
|
+
"name": "dot"
|
38044
|
+
},
|
37946
38045
|
{
|
37947
38046
|
"kind": "Method",
|
37948
38047
|
"canonicalReference": "server!Vector3#equals:member(1)",
|
package/server.d.ts
CHANGED
@@ -2135,7 +2135,7 @@ export declare class Matrix2 extends Float32Array {
|
|
2135
2135
|
/** The determinant of the matrix. */
|
2136
2136
|
get determinant(): number;
|
2137
2137
|
/** The frobenius normal of the matrix. */
|
2138
|
-
get
|
2138
|
+
get frobeniusNorm(): number;
|
2139
2139
|
/**
|
2140
2140
|
* Creates a new `Matrix2` instance.
|
2141
2141
|
*
|
@@ -2265,8 +2265,8 @@ export declare class Matrix3 extends Float32Array {
|
|
2265
2265
|
constructor(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number);
|
2266
2266
|
/** The determinant of the matrix. */
|
2267
2267
|
get determinant(): number;
|
2268
|
-
/** The frobenius
|
2269
|
-
get
|
2268
|
+
/** The frobenius norm of the matrix. */
|
2269
|
+
get frobeniusNorm(): number;
|
2270
2270
|
/**
|
2271
2271
|
* Creates a new `Matrix3` instance.
|
2272
2272
|
*
|
@@ -2303,11 +2303,13 @@ export declare class Matrix3 extends Float32Array {
|
|
2303
2303
|
static fromScaling(scale: Vector3): Matrix3;
|
2304
2304
|
/**
|
2305
2305
|
* Creates a new `Matrix3` instance from a translation of identity matrix.
|
2306
|
+
* This is used only when working with two-dimensional homogeneous coordinates,
|
2307
|
+
* which is why the `translation` parameter is a `Vector2`.
|
2306
2308
|
*
|
2307
2309
|
* @param translation - The translation of the matrix.
|
2308
2310
|
* @returns A new `Matrix3` instance.
|
2309
2311
|
*/
|
2310
|
-
static fromTranslation(translation:
|
2312
|
+
static fromTranslation(translation: Vector2): Matrix3;
|
2311
2313
|
/**
|
2312
2314
|
* Adds a matrix to the current matrix.
|
2313
2315
|
*
|
@@ -2375,7 +2377,15 @@ export declare class Matrix3 extends Float32Array {
|
|
2375
2377
|
*/
|
2376
2378
|
multiplyScalar(scalar: number): Matrix3;
|
2377
2379
|
/**
|
2378
|
-
*
|
2380
|
+
* Multiplies the provided vector3 by this matrix. This modifies
|
2381
|
+
* the vector in-place, but also returns the transformed vector.
|
2382
|
+
*
|
2383
|
+
* @param vector - The vector to multiply by this.
|
2384
|
+
* @returns The transformed vector.
|
2385
|
+
*/
|
2386
|
+
transformVector(vector: Vector3): Vector3;
|
2387
|
+
/**
|
2388
|
+
* Sets the current matrix to a orthographic projection matrix with the given bounds.
|
2379
2389
|
*
|
2380
2390
|
* @param width - The width of the projection.
|
2381
2391
|
* @param height - The height of the projection.
|
@@ -2425,8 +2435,8 @@ export declare class Matrix4 extends Float32Array {
|
|
2425
2435
|
constructor(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number);
|
2426
2436
|
/** The determinant of the matrix. */
|
2427
2437
|
get determinant(): number;
|
2428
|
-
/** The frobenius
|
2429
|
-
get
|
2438
|
+
/** The frobenius norm of the matrix. */
|
2439
|
+
get frobeniusNorm(): number;
|
2430
2440
|
/**
|
2431
2441
|
* Creates a new `Matrix4` instance.
|
2432
2442
|
*
|
@@ -2598,17 +2608,17 @@ export declare class Matrix4 extends Float32Array {
|
|
2598
2608
|
*/
|
2599
2609
|
multiplyScalar(scalar: number): Matrix4;
|
2600
2610
|
/**
|
2601
|
-
* Sets the current matrix to an
|
2611
|
+
* Sets the current matrix to an orthographic projection matrix with the given bounds.
|
2602
2612
|
*
|
2603
|
-
* @param left - The left bound of the
|
2604
|
-
* @param right - The right bound of the
|
2605
|
-
* @param bottom - The bottom bound of the
|
2606
|
-
* @param top - The top bound of the
|
2607
|
-
* @param near - The near bound of the
|
2608
|
-
* @param far - The far bound of the
|
2613
|
+
* @param left - The left bound of the frustum.
|
2614
|
+
* @param right - The right bound of the frustum.
|
2615
|
+
* @param bottom - The bottom bound of the frustum.
|
2616
|
+
* @param top - The top bound of the frustum.
|
2617
|
+
* @param near - The near bound of the frustum.
|
2618
|
+
* @param far - The far bound of the frustum.
|
2609
2619
|
* @returns The current matrix.
|
2610
2620
|
*/
|
2611
|
-
|
2621
|
+
orthographic(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4;
|
2612
2622
|
/**
|
2613
2623
|
* Sets the current matrix to a perspective matrix with the given field of view, aspect ratio, and near and far bounds.
|
2614
2624
|
*
|
@@ -3646,6 +3656,14 @@ export declare class Quaternion extends Float32Array implements QuaternionLike {
|
|
3646
3656
|
* @returns The current quaternion.
|
3647
3657
|
*/
|
3648
3658
|
multiply(quaternion: Quaternion): Quaternion;
|
3659
|
+
/**
|
3660
|
+
* Rotates the provided vector by the rotation this quaternion represents.
|
3661
|
+
* This modifies the vector in-place, but also returns the rotated vector.
|
3662
|
+
*
|
3663
|
+
* @param vector - the vector to rotate
|
3664
|
+
* @returns the rotated vector.
|
3665
|
+
*/
|
3666
|
+
transformVector(vector: Vector3): Vector3;
|
3649
3667
|
/**
|
3650
3668
|
* Normalizes the quaternion.
|
3651
3669
|
*
|
@@ -4562,13 +4580,6 @@ export declare class Vector2 extends Float32Array implements Vector2Like {
|
|
4562
4580
|
* @returns The current vector.
|
4563
4581
|
*/
|
4564
4582
|
copy(vector2: Vector2): Vector2;
|
4565
|
-
/**
|
4566
|
-
* Calculates the cross product of the current vector and another vector.
|
4567
|
-
*
|
4568
|
-
* @param vector2 - The vector to calculate the cross product with.
|
4569
|
-
* @returns The cross product of the two vector 2s as a vector3.
|
4570
|
-
*/
|
4571
|
-
cross(vector2: Vector2): Vector3;
|
4572
4583
|
/**
|
4573
4584
|
* Calculates the distance between the current vector and another vector.
|
4574
4585
|
*
|
@@ -4837,6 +4848,13 @@ export declare class Vector3 extends Float32Array implements Vector3Like {
|
|
4837
4848
|
* @returns The current vector.
|
4838
4849
|
*/
|
4839
4850
|
divide(vector3: Vector3): Vector3;
|
4851
|
+
/**
|
4852
|
+
* Returns the dot product of this vector and another vector.
|
4853
|
+
*
|
4854
|
+
* @param vector3 - the other vector
|
4855
|
+
* @returns the dot product of this and vector3
|
4856
|
+
*/
|
4857
|
+
dot(vector3: Vector3): number;
|
4840
4858
|
/**
|
4841
4859
|
* Checks if the current vector is approximately equal to another vector.
|
4842
4860
|
*
|