@tlua/gmod 1.0.3 → 1.0.5
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/index.d.tlua +1 -0
- package/package.json +1 -1
- package/types/achievements.d.tlua +15 -45
- package/types/ai.d.tlua +5 -15
- package/types/angle.d.tlua +18 -54
- package/types/baseclass.d.tlua +2 -4
- package/types/bf_read.d.tlua +11 -32
- package/types/bit.d.tlua +11 -33
- package/types/cam.d.tlua +16 -48
- package/types/ceffectdata.d.tlua +32 -95
- package/types/chat.d.tlua +5 -15
- package/types/cleanup.d.tlua +7 -21
- package/types/cluaemitter.d.tlua +12 -35
- package/types/clualocomotion.d.tlua +40 -119
- package/types/cluaparticle.d.tlua +44 -131
- package/types/cmovedata.d.tlua +47 -140
- package/types/cnavarea.d.tlua +77 -230
- package/types/cnavladder.d.tlua +22 -65
- package/types/cnewparticleeffect.d.tlua +26 -77
- package/types/color.d.tlua +28 -84
- package/types/concommand.d.tlua +4 -12
- package/types/constraint.d.tlua +28 -84
- package/types/construct.d.tlua +1 -3
- package/types/contentheader.d.tlua +3 -6
- package/types/contenticon.d.tlua +9 -24
- package/types/contentsidebar.d.tlua +4 -9
- package/types/contextbase.d.tlua +4 -9
- package/types/controlpanel.d.tlua +18 -40
- package/types/controlpresets.d.tlua +13 -36
- package/types/convar.d.tlua +16 -47
- package/types/cookie.d.tlua +3 -9
- package/types/coroutine.d.tlua +7 -21
- package/types/crecipientfilter.d.tlua +16 -47
- package/types/csoundpatch.d.tlua +14 -41
- package/types/ctakedamageinfo.d.tlua +33 -98
- package/types/ctrlnumpad.d.tlua +6 -17
- package/types/cusercmd.d.tlua +27 -80
- package/types/cvars.d.tlua +6 -18
- package/types/dadjustablemodelpanel.d.tlua +7 -18
- package/types/dalphabar.d.tlua +3 -6
- package/types/dbinder.d.tlua +4 -9
- package/types/dbubblecontainer.d.tlua +2 -3
- package/types/dbutton.d.tlua +8 -21
- package/types/dcheckbox.d.tlua +5 -12
- package/types/dcheckboxlabel.d.tlua +9 -27
- package/types/dcollapsiblecategory.d.tlua +23 -66
- package/types/dcolorbutton.d.tlua +7 -18
- package/types/dcolorcombo.d.tlua +5 -12
- package/types/dcolorcube.d.tlua +13 -36
- package/types/dcolormixer.d.tlua +27 -78
- package/types/dcolorpalette.d.tlua +23 -66
- package/types/dcolumnsheet.d.tlua +5 -12
- package/types/dcombobox.d.tlua +17 -48
- package/types/ddragbase.d.tlua +13 -36
- package/types/ddrawer.d.tlua +8 -21
- package/types/debug.d.tlua +44 -76
- package/types/debugoverlay.d.tlua +11 -33
- package/types/dentityproperties.d.tlua +5 -12
- package/types/derma.d.tlua +10 -30
- package/types/dexpandbutton.d.tlua +3 -6
- package/types/dfilebrowser.d.tlua +20 -60
- package/types/dform.d.tlua +18 -51
- package/types/dframe.d.tlua +24 -72
- package/types/dgrid.d.tlua +11 -30
- package/types/dhorizontaldivider.d.tlua +20 -57
- package/types/dhorizontalscroller.d.tlua +11 -30
- package/types/dhscrollbar.d.tlua +11 -30
- package/types/dhtml.d.tlua +8 -21
- package/types/dhtmlcontrols.d.tlua +5 -15
- package/types/diconbrowser.d.tlua +11 -30
- package/types/diconlayout.d.tlua +18 -51
- package/types/dimage.d.tlua +20 -55
- package/types/dimagebutton.d.tlua +9 -27
- package/types/dlabel.d.tlua +33 -96
- package/types/dlabeleditable.d.tlua +5 -12
- package/types/dlabelurl.d.tlua +10 -27
- package/types/dlistbox.d.tlua +8 -21
- package/types/dlistboxitem.d.tlua +4 -9
- package/types/dlistview.d.tlua +34 -99
- package/types/dlistview_column.d.tlua +14 -39
- package/types/dlistview_line.d.tlua +13 -36
- package/types/dmenu.d.tlua +28 -75
- package/types/dmenubar.d.tlua +6 -11
- package/types/dmenuoption.d.tlua +13 -36
- package/types/dmenuoptioncvar.d.tlua +6 -15
- package/types/dmodelpanel.d.tlua +22 -63
- package/types/dmodelselect.d.tlua +2 -3
- package/types/dmodelselectmulti.d.tlua +2 -3
- package/types/dnotify.d.tlua +10 -27
- package/types/dnumberscratch.d.tlua +26 -75
- package/types/dnumberwang.d.tlua +16 -45
- package/types/dnumslider.d.tlua +17 -51
- package/types/dpanel.d.tlua +14 -39
- package/types/dpanellist.d.tlua +11 -33
- package/types/dpaneloverlay.d.tlua +7 -18
- package/types/dpanpanel.d.tlua +6 -15
- package/types/dprogress.d.tlua +3 -6
- package/types/dproperties.d.tlua +4 -9
- package/types/dproperty_combo.d.tlua +3 -6
- package/types/dproperty_generic.d.tlua +5 -12
- package/types/dpropertysheet.d.tlua +26 -56
- package/types/dragndrop.d.tlua +10 -30
- package/types/draw.d.tlua +11 -31
- package/types/drgbpicker.d.tlua +4 -9
- package/types/drive.d.tlua +18 -41
- package/types/dscrollpanel.d.tlua +10 -30
- package/types/dshape.d.tlua +7 -18
- package/types/dsizetocontents.d.tlua +5 -12
- package/types/dslider.d.tlua +28 -81
- package/types/dsprite.d.tlua +9 -24
- package/types/dtab.d.tlua +8 -21
- package/types/dtextentry.d.tlua +43 -126
- package/types/dtilelayout.d.tlua +21 -60
- package/types/dtooltip.d.tlua +6 -15
- package/types/dtree.d.tlua +16 -45
- package/types/dtree_node.d.tlua +68 -201
- package/types/duplicator.d.tlua +30 -88
- package/types/dverticaldivider.d.tlua +23 -66
- package/types/dvscrollbar.d.tlua +11 -30
- package/types/effect.d.tlua +4 -9
- package/types/effects.d.tlua +6 -18
- package/types/engine.d.tlua +21 -63
- package/types/entity.d.tlua +676 -1962
- package/types/ents.d.tlua +23 -61
- package/types/file.d.tlua +39 -117
- package/types/frame_blend.d.tlua +7 -21
- package/types/game.d.tlua +39 -117
- package/types/gameevent.d.tlua +4 -8
- package/types/gamemode.d.tlua +3 -7
- package/types/gm.d.tlua +267 -800
- package/types/gmsave.d.tlua +4 -12
- package/types/gui.d.tlua +21 -63
- package/types/gwen.d.tlua +3 -9
- package/types/halo.d.tlua +2 -6
- package/types/hook.d.tlua +8 -17
- package/types/hook_events.d.tlua +2412 -0
- package/types/http.d.tlua +1 -3
- package/types/iconeditor.d.tlua +11 -30
- package/types/igmodaudiochannel.d.tlua +41 -122
- package/types/imagecheckbox.d.tlua +4 -9
- package/types/imaterial.d.tlua +26 -77
- package/types/imesh.d.tlua +5 -14
- package/types/input.d.tlua +24 -68
- package/types/irestore.d.tlua +9 -26
- package/types/isave.d.tlua +9 -26
- package/types/itexture.d.tlua +10 -29
- package/types/ivideowriter.d.tlua +5 -14
- package/types/jit.d.tlua +21 -53
- package/types/killicon.d.tlua +7 -21
- package/types/language.d.tlua +1 -3
- package/types/list.d.tlua +8 -24
- package/types/markup.d.tlua +2 -6
- package/types/markupobject.d.tlua +5 -14
- package/types/math.d.tlua +277 -447
- package/types/matproxy.d.tlua +3 -9
- package/types/matselect.d.tlua +11 -30
- package/types/menubar.d.tlua +2 -6
- package/types/mesh.d.tlua +19 -57
- package/types/motionsensor.d.tlua +10 -30
- package/types/navmesh.d.tlua +26 -78
- package/types/net.d.tlua +52 -154
- package/types/nextbot.d.tlua +46 -116
- package/types/notification.d.tlua +2 -6
- package/types/npc.d.tlua +182 -543
- package/types/numpad.d.tlua +7 -21
- package/types/os.d.tlua +4 -10
- package/types/panel.d.tlua +333 -991
- package/types/pathfollower.d.tlua +31 -92
- package/types/permissions.d.tlua +6 -18
- package/types/physcollide.d.tlua +3 -8
- package/types/physenv.d.tlua +11 -33
- package/types/physobj.d.tlua +78 -233
- package/types/player.d.tlua +302 -880
- package/types/player_manager.d.tlua +13 -39
- package/types/presets.d.tlua +6 -18
- package/types/projectedtexture.d.tlua +48 -143
- package/types/properties.d.tlua +5 -15
- package/types/propselect.d.tlua +5 -12
- package/types/render.d.tlua +142 -426
- package/types/resource.d.tlua +2 -6
- package/types/sandbox.d.tlua +54 -159
- package/types/saverestore.d.tlua +12 -36
- package/types/schedule.d.tlua +6 -17
- package/types/scripted_ents.d.tlua +11 -29
- package/types/search.d.tlua +1 -3
- package/types/serverlist.d.tlua +7 -21
- package/types/sound.d.tlua +10 -30
- package/types/spawnicon.d.tlua +8 -21
- package/types/spawnmenu.d.tlua +24 -70
- package/types/spawnmenucontentpanel.d.tlua +5 -12
- package/types/sql.d.tlua +9 -27
- package/types/stack.d.tlua +5 -14
- package/types/steamworks.d.tlua +18 -54
- package/types/string.d.tlua +49 -141
- package/types/surface.d.tlua +34 -102
- package/types/surfaceinfo.d.tlua +5 -14
- package/types/system.d.tlua +10 -30
- package/types/table.d.tlua +47 -137
- package/types/task.d.tlua +9 -26
- package/types/team.d.tlua +19 -57
- package/types/timer.d.tlua +14 -42
- package/types/tool.d.tlua +46 -131
- package/types/ugcpublishwindow.d.tlua +9 -24
- package/types/umsg.d.tlua +12 -36
- package/types/undo.d.tlua +10 -30
- package/types/usermessage.d.tlua +2 -6
- package/types/utf8.d.tlua +7 -21
- package/types/util.d.tlua +94 -274
- package/types/vector.d.tlua +36 -108
- package/types/vehicle.d.tlua +52 -149
- package/types/vgui.d.tlua +18 -46
- package/types/vmatrix.d.tlua +35 -105
- package/types/weapon.d.tlua +85 -248
- package/types/weapons.d.tlua +6 -16
- package/types/widgets.d.tlua +1 -3
- package/types/workshopfilebase.d.tlua +5 -14
package/types/vector.d.tlua
CHANGED
|
@@ -19,36 +19,24 @@ interface Vector {
|
|
|
19
19
|
__mul(l: number, r: Vector): Vector;
|
|
20
20
|
__div(l: Vector, r: Vector | number): Vector;
|
|
21
21
|
__unm(v: Vector): Vector;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface Vector {
|
|
25
22
|
/**
|
|
26
23
|
* Adds the values of the argument vector to the original vector. This function is the same as vector1 + vector2 without creating a new vector object, skipping object construction and garbage collection.
|
|
27
24
|
* @realm shared and menu
|
|
28
25
|
* @source https://wiki.facepunch.com/gmod/Vector:Add
|
|
29
26
|
*/
|
|
30
27
|
Add(self: Vector, vector: Vector): void;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface Vector {
|
|
34
28
|
/**
|
|
35
29
|
* Returns an angle representing the normal of the vector.
|
|
36
30
|
* @realm shared and menu
|
|
37
31
|
* @source https://wiki.facepunch.com/gmod/Vector:Angle
|
|
38
32
|
*/
|
|
39
33
|
Angle(self: Vector): Angle;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface Vector {
|
|
43
34
|
/**
|
|
44
35
|
* Returns the angle of this vector (normalized), but instead of assuming that up is [Global.Vector](https://wiki.facepunch.com/gmod/Global.Vector)( 0, 0, 1 ) (Like [Vector:Angle](https://wiki.facepunch.com/gmod/Vector:Angle) does) you can specify which direction is 'up' for the angle.
|
|
45
36
|
* @realm shared and menu
|
|
46
37
|
* @source https://wiki.facepunch.com/gmod/Vector:AngleEx
|
|
47
38
|
*/
|
|
48
39
|
AngleEx(self: Vector, up: Vector): Angle;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface Vector {
|
|
52
40
|
/**
|
|
53
41
|
* Calculates the cross product of this vector and the passed one.
|
|
54
42
|
*
|
|
@@ -60,9 +48,6 @@ interface Vector {
|
|
|
60
48
|
* @source https://wiki.facepunch.com/gmod/Vector:Cross
|
|
61
49
|
*/
|
|
62
50
|
Cross(self: Vector, otherVector: Vector): Vector;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface Vector {
|
|
66
51
|
/**
|
|
67
52
|
* Returns the squared distance of 2 vectors, this is quicker to call than [Vector:Distance](https://wiki.facepunch.com/gmod/Vector:Distance) as DistToSqr does not need to calculate the square root, which is an expensive process.
|
|
68
53
|
*
|
|
@@ -75,9 +60,6 @@ interface Vector {
|
|
|
75
60
|
* @source https://wiki.facepunch.com/gmod/Vector:DistToSqr
|
|
76
61
|
*/
|
|
77
62
|
DistToSqr(self: Vector, otherVec: Vector): number;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
interface Vector {
|
|
81
63
|
/**
|
|
82
64
|
* Returns the Euclidean distance between the vector and the other vector.
|
|
83
65
|
*
|
|
@@ -88,9 +70,6 @@ interface Vector {
|
|
|
88
70
|
* @source https://wiki.facepunch.com/gmod/Vector:Distance
|
|
89
71
|
*/
|
|
90
72
|
Distance(self: Vector, otherVector: Vector): number;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
interface Vector {
|
|
94
73
|
/**
|
|
95
74
|
* Returns the Euclidean distance between the vector and the other vector in 2D space. The Z axis is ignored.
|
|
96
75
|
*
|
|
@@ -101,9 +80,6 @@ interface Vector {
|
|
|
101
80
|
* @source https://wiki.facepunch.com/gmod/Vector:Distance2D
|
|
102
81
|
*/
|
|
103
82
|
Distance2D(self: Vector, otherVector: Vector): number;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
interface Vector {
|
|
107
83
|
/**
|
|
108
84
|
* Returns the squared distance between 2 vectors in 2D space, ignoring the Z axis. This is faster than [Vector:Distance2D](https://wiki.facepunch.com/gmod/Vector:Distance2D) as calculating the square root is an expensive process.
|
|
109
85
|
*
|
|
@@ -116,18 +92,12 @@ interface Vector {
|
|
|
116
92
|
* @source https://wiki.facepunch.com/gmod/Vector:Distance2DSqr
|
|
117
93
|
*/
|
|
118
94
|
Distance2DSqr(self: Vector, otherVec: Vector): number;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface Vector {
|
|
122
95
|
/**
|
|
123
96
|
* Divide the vector by the given number, that means x, y and z are divided by that value. This will change the value of the original vector, see example 2 for division without changing the value.
|
|
124
97
|
* @realm shared and menu
|
|
125
98
|
* @source https://wiki.facepunch.com/gmod/Vector:Div
|
|
126
99
|
*/
|
|
127
100
|
Div(self: Vector, divisor: number): void;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
interface Vector {
|
|
131
101
|
/**
|
|
132
102
|
* Returns the [dot product](https://en.wikipedia.org/wiki/Dot_product#Geometric_definition) of this vector and the passed one.
|
|
133
103
|
*
|
|
@@ -142,9 +112,6 @@ interface Vector {
|
|
|
142
112
|
* @source https://wiki.facepunch.com/gmod/Vector:Dot
|
|
143
113
|
*/
|
|
144
114
|
Dot(self: Vector, otherVector: Vector): number;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
interface Vector {
|
|
148
115
|
/**
|
|
149
116
|
* Returns the dot product of the two vectors.
|
|
150
117
|
* @realm shared and menu
|
|
@@ -152,9 +119,6 @@ interface Vector {
|
|
|
152
119
|
* @deprecated This is an alias of Vector:Dot. Use that instead.
|
|
153
120
|
*/
|
|
154
121
|
DotProduct(self: Vector, Vector: Vector): number;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
interface Vector {
|
|
158
122
|
/**
|
|
159
123
|
* Returns the negative version of this vector, i.e. a vector with every component to the negative value of itself.
|
|
160
124
|
*
|
|
@@ -164,9 +128,6 @@ interface Vector {
|
|
|
164
128
|
* @source https://wiki.facepunch.com/gmod/Vector:GetNegated
|
|
165
129
|
*/
|
|
166
130
|
GetNegated(self: Vector): Vector;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
interface Vector {
|
|
170
131
|
/**
|
|
171
132
|
* Returns a normalized version of the vector. This is a alias of [Vector:GetNormalized](https://wiki.facepunch.com/gmod/Vector:GetNormalized).
|
|
172
133
|
*
|
|
@@ -175,9 +136,6 @@ interface Vector {
|
|
|
175
136
|
* @deprecated Use Vector:GetNormalized instead.
|
|
176
137
|
*/
|
|
177
138
|
GetNormal(self: Vector): Vector;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
interface Vector {
|
|
181
139
|
/**
|
|
182
140
|
* Returns a normalized version of the vector. Normalized means vector with same direction but with length of 1.
|
|
183
141
|
*
|
|
@@ -187,27 +145,18 @@ interface Vector {
|
|
|
187
145
|
* @source https://wiki.facepunch.com/gmod/Vector:GetNormalized
|
|
188
146
|
*/
|
|
189
147
|
GetNormalized(self: Vector): Vector;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
interface Vector {
|
|
193
148
|
/**
|
|
194
149
|
* Returns if the vector is equal to another vector with the given tolerance.
|
|
195
150
|
* @realm shared and menu
|
|
196
151
|
* @source https://wiki.facepunch.com/gmod/Vector:IsEqualTol
|
|
197
152
|
*/
|
|
198
153
|
IsEqualTol(self: Vector, compare: Vector, tolerance: number): boolean;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
interface Vector {
|
|
202
154
|
/**
|
|
203
155
|
* Checks whenever all fields of the vector are 0.
|
|
204
156
|
* @realm shared and menu
|
|
205
157
|
* @source https://wiki.facepunch.com/gmod/Vector:IsZero
|
|
206
158
|
*/
|
|
207
159
|
IsZero(self: Vector): boolean;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
interface Vector {
|
|
211
160
|
/**
|
|
212
161
|
* Returns the [Euclidean length](https://en.wikipedia.org/wiki/Euclidean_vector#Length) of the vector: √(x² + y² + z²).
|
|
213
162
|
*
|
|
@@ -218,9 +167,6 @@ interface Vector {
|
|
|
218
167
|
* @source https://wiki.facepunch.com/gmod/Vector:Length
|
|
219
168
|
*/
|
|
220
169
|
Length(self: Vector): number;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
interface Vector {
|
|
224
170
|
/**
|
|
225
171
|
* Returns the length of the vector in two dimensions, without the Z axis.
|
|
226
172
|
*
|
|
@@ -231,9 +177,6 @@ interface Vector {
|
|
|
231
177
|
* @source https://wiki.facepunch.com/gmod/Vector:Length2D
|
|
232
178
|
*/
|
|
233
179
|
Length2D(self: Vector): number;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
interface Vector {
|
|
237
180
|
/**
|
|
238
181
|
* Returns the squared length of the vectors x and y value, x² + y².
|
|
239
182
|
*
|
|
@@ -243,9 +186,6 @@ interface Vector {
|
|
|
243
186
|
* @source https://wiki.facepunch.com/gmod/Vector:Length2DSqr
|
|
244
187
|
*/
|
|
245
188
|
Length2DSqr(self: Vector): number;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
interface Vector {
|
|
249
189
|
/**
|
|
250
190
|
* Returns the squared length of the vector, x² + y² + z².
|
|
251
191
|
*
|
|
@@ -255,53 +195,32 @@ interface Vector {
|
|
|
255
195
|
* @source https://wiki.facepunch.com/gmod/Vector:LengthSqr
|
|
256
196
|
*/
|
|
257
197
|
LengthSqr(self: Vector): number;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
interface Vector {
|
|
261
198
|
/**
|
|
262
199
|
* Scales the vector by the given [number](https://wiki.facepunch.com/gmod/number) (that means x, y and z are multiplied by that value), a [Vector](https://wiki.facepunch.com/gmod/Vector) (X, Y, and Z of each vector are multiplied) or a [VMatrix](https://wiki.facepunch.com/gmod/VMatrix) (Transforms the vector by the matrix's rotation/translation).
|
|
263
200
|
* @realm shared and menu
|
|
264
201
|
* @source https://wiki.facepunch.com/gmod/Vector:Mul
|
|
265
202
|
*/
|
|
266
203
|
Mul(self: Vector, multiplier: number): void;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
interface Vector {
|
|
270
204
|
Mul(self: Vector, multiplier: Vector): void;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
interface Vector {
|
|
274
205
|
Mul(self: Vector, matrix: VMatrix): void;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
interface Vector {
|
|
278
206
|
/**
|
|
279
207
|
* Negates this vector, i.e. sets every component to the negative value of itself. Same as `Vector( -vec.x, -vec.y, -vec.z )`
|
|
280
208
|
* @realm shared and menu
|
|
281
209
|
* @source https://wiki.facepunch.com/gmod/Vector:Negate
|
|
282
210
|
*/
|
|
283
211
|
Negate(self: Vector): void;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
interface Vector {
|
|
287
212
|
/**
|
|
288
213
|
* Normalizes the given vector. This changes the vector you call it on, if you want to return a normalized copy without affecting the original, use [Vector:GetNormalized](https://wiki.facepunch.com/gmod/Vector:GetNormalized).
|
|
289
214
|
* @realm shared and menu
|
|
290
215
|
* @source https://wiki.facepunch.com/gmod/Vector:Normalize
|
|
291
216
|
*/
|
|
292
217
|
Normalize(self: Vector): void;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
interface Vector {
|
|
296
218
|
/**
|
|
297
219
|
* Randomizes each element of this Vector object.
|
|
298
220
|
* @realm shared and menu
|
|
299
221
|
* @source https://wiki.facepunch.com/gmod/Vector:Random
|
|
300
222
|
*/
|
|
301
223
|
Random(self: Vector, min?: number, max?: number): void;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
interface Vector {
|
|
305
224
|
/**
|
|
306
225
|
* Rotates a vector by the given angle.
|
|
307
226
|
* Doesn't return anything, but rather changes the original vector.
|
|
@@ -310,36 +229,24 @@ interface Vector {
|
|
|
310
229
|
* @source https://wiki.facepunch.com/gmod/Vector:Rotate
|
|
311
230
|
*/
|
|
312
231
|
Rotate(self: Vector, rotation: Angle): void;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
interface Vector {
|
|
316
232
|
/**
|
|
317
233
|
* Copies the values from the second vector to the first vector.
|
|
318
234
|
* @realm shared and menu
|
|
319
235
|
* @source https://wiki.facepunch.com/gmod/Vector:Set
|
|
320
236
|
*/
|
|
321
237
|
Set(self: Vector, vector: Vector): void;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
interface Vector {
|
|
325
238
|
/**
|
|
326
239
|
* Sets the x, y, and z of the vector.
|
|
327
240
|
* @realm shared and menu
|
|
328
241
|
* @source https://wiki.facepunch.com/gmod/Vector:SetUnpacked
|
|
329
242
|
*/
|
|
330
243
|
SetUnpacked(self: Vector, x: number, y: number, z: number): void;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
interface Vector {
|
|
334
244
|
/**
|
|
335
245
|
* Substracts the values of the second vector from the orignal vector, this function can be used to avoid garbage collection.
|
|
336
246
|
* @realm shared and menu
|
|
337
247
|
* @source https://wiki.facepunch.com/gmod/Vector:Sub
|
|
338
248
|
*/
|
|
339
249
|
Sub(self: Vector, vector: Vector): void;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
interface Vector {
|
|
343
250
|
/**
|
|
344
251
|
* Translates the [Vector](https://wiki.facepunch.com/gmod/Vector) (values ranging from 0 to 1) into a [Color](https://wiki.facepunch.com/gmod/Color). This will also range the values from 0 - 1 to 0 - 255.
|
|
345
252
|
*
|
|
@@ -353,9 +260,6 @@ interface Vector {
|
|
|
353
260
|
* @source https://wiki.facepunch.com/gmod/Vector:ToColor
|
|
354
261
|
*/
|
|
355
262
|
ToColor(self: Vector): Color;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
interface Vector {
|
|
359
263
|
/**
|
|
360
264
|
* Returns where on the screen the specified position vector would appear. A related function is [gui.ScreenToVector](https://wiki.facepunch.com/gmod/gui.ScreenToVector), which converts a 2D coordinate to a 3D direction.
|
|
361
265
|
*
|
|
@@ -370,27 +274,18 @@ interface Vector {
|
|
|
370
274
|
* @source https://wiki.facepunch.com/gmod/Vector:ToScreen
|
|
371
275
|
*/
|
|
372
276
|
ToScreen(self: Vector): ToScreenData;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
interface Vector {
|
|
376
277
|
/**
|
|
377
278
|
* Returns the vector as a table with three elements.
|
|
378
279
|
* @realm shared and menu
|
|
379
280
|
* @source https://wiki.facepunch.com/gmod/Vector:ToTable
|
|
380
281
|
*/
|
|
381
282
|
ToTable(self: Vector): table;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
interface Vector {
|
|
385
283
|
/**
|
|
386
284
|
* Returns the x, y, and z of the vector.
|
|
387
285
|
* @realm shared and menu
|
|
388
286
|
* @source https://wiki.facepunch.com/gmod/Vector:Unpack
|
|
389
287
|
*/
|
|
390
288
|
Unpack(self: Vector): (number, number, number);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
interface Vector {
|
|
394
289
|
/**
|
|
395
290
|
* Returns whenever the given vector is in a box created by the 2 other vectors.
|
|
396
291
|
*
|
|
@@ -400,9 +295,6 @@ interface Vector {
|
|
|
400
295
|
* @source https://wiki.facepunch.com/gmod/Vector:WithinAABox
|
|
401
296
|
*/
|
|
402
297
|
WithinAABox(self: Vector, boxStart: Vector, boxEnd: Vector): boolean;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
interface Vector {
|
|
406
298
|
/**
|
|
407
299
|
* Sets x, y and z to 0.
|
|
408
300
|
* @realm shared and menu
|
|
@@ -411,3 +303,39 @@ interface Vector {
|
|
|
411
303
|
Zero(self: Vector): void;
|
|
412
304
|
}
|
|
413
305
|
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|