Skip to content

Commit 071dbdb

Browse files
committed
Missing variables for Vector2/3/4
1 parent 30ea43b commit 071dbdb

File tree

5 files changed

+43
-10
lines changed

5 files changed

+43
-10
lines changed

elements/Vector/Vector2.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'vector2'
1+
name: 'Vector2'
22
description: |
33
This is a 2D [Vector](/reference/Vector) class.
44
oop_only_methods:
@@ -26,22 +26,16 @@ oop_only_methods:
2626
- name: getX
2727
description: Gets the X coordinate of a vector
2828
signature: float Vector2.getX(vector2 vector)
29+
variable: x
2930
parameters:
3031
- name: vector
3132
type: vector2
3233
description: Vector2 to get X coordinate from
3334

34-
- name: getY
35-
description: Gets the Y coordinate of a vector
36-
signature: float Vector2.getY(vector2 vector)
37-
parameters:
38-
- name: vector
39-
type: vector2
40-
description: Vector2 to get Y coordinate from
41-
4235
- name: setX
4336
description: Sets the X coordinate of a vector
4437
signature: bool Vector2.setX(vector2 vector, float x)
38+
variable: x
4539
parameters:
4640
- name: vector
4741
type: vector2
@@ -50,9 +44,19 @@ oop_only_methods:
5044
type: float
5145
description: New X coordinate
5246

47+
- name: getY
48+
description: Gets the Y coordinate of a vector
49+
signature: float Vector2.getY(vector2 vector)
50+
variable: "y"
51+
parameters:
52+
- name: vector
53+
type: vector2
54+
description: Vector2 to get Y coordinate from
55+
5356
- name: setY
5457
description: Sets the Y coordinate of a vector
5558
signature: bool Vector2.setY(vector2 vector, float y)
59+
variable: "y"
5660
parameters:
5761
- name: vector
5862
type: vector2
@@ -64,6 +68,7 @@ oop_only_methods:
6468
- name: getNormalized
6569
description: Gets a normalized version of the vector
6670
signature: vector2 Vector2.getNormalized(vector2 vector)
71+
variable: normalized
6772
parameters:
6873
- name: vector
6974
type: vector2
@@ -72,6 +77,7 @@ oop_only_methods:
7277
- name: getLength
7378
description: Gets the length of a vector
7479
signature: float Vector2.getLength(vector2 vector)
80+
variable: length
7581
parameters:
7682
- name: vector
7783
type: vector2
@@ -80,6 +86,7 @@ oop_only_methods:
8086
- name: getSquaredLength
8187
description: Gets the squared length of a vector
8288
signature: float Vector2.getSquaredLength(vector2 vector)
89+
variable: squaredLength
8390
parameters:
8491
- name: vector
8592
type: vector2

elements/Vector/Vector3.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ oop_only_methods:
5050
type: method
5151
description: Returns the X component of the vector.
5252
signature: float Vector3:getX ( )
53+
variable: x
5354
returns:
5455
type: float
5556
description: The X coordinate.
@@ -58,6 +59,7 @@ oop_only_methods:
5859
type: method
5960
description: Sets the X component of the vector.
6061
signature: void Vector3:setX ( float x )
62+
variable: x
6163
parameters:
6264
- name: x
6365
type: float
@@ -67,6 +69,7 @@ oop_only_methods:
6769
type: method
6870
description: Returns the Y component of the vector.
6971
signature: float Vector3:getY ( )
72+
variable: "y"
7073
returns:
7174
type: float
7275
description: The Y coordinate.
@@ -75,6 +78,7 @@ oop_only_methods:
7578
type: method
7679
description: Sets the Y component of the vector.
7780
signature: void Vector3:setY ( float y )
81+
variable: "y"
7882
parameters:
7983
- name: "y"
8084
type: float
@@ -84,6 +88,7 @@ oop_only_methods:
8488
type: method
8589
description: Returns the Z component of the vector.
8690
signature: float Vector3:getZ ( )
91+
variable: z
8792
returns:
8893
type: float
8994
description: The Z coordinate.
@@ -92,6 +97,7 @@ oop_only_methods:
9297
type: method
9398
description: Sets the Z component of the vector.
9499
signature: void Vector3:setZ ( float z )
100+
variable: z
95101
parameters:
96102
- name: z
97103
type: float
@@ -111,6 +117,7 @@ oop_only_methods:
111117
description: |
112118
Returns a normalized version of the vector without modifying the original.
113119
signature: vector3 Vector3:getNormalized ( )
120+
variable: normalized
114121
returns:
115122
type: Vector3
116123
description: A new normalized vector.
@@ -120,6 +127,7 @@ oop_only_methods:
120127
description: |
121128
Returns the length (magnitude) of the vector.
122129
signature: float Vector3:getLength ( )
130+
variable: length
123131
returns:
124132
type: float
125133
description: The vector's length.
@@ -129,6 +137,7 @@ oop_only_methods:
129137
description: |
130138
Returns the squared length of the vector (useful to avoid square root operations).
131139
signature: float Vector3:getSquaredLength ( )
140+
variable: squaredLength
132141
returns:
133142
type: float
134143
description: The squared length of the vector.

elements/Vector/Vector4.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ oop_only_methods:
4141
type: method
4242
description: Returns the X component of the vector.
4343
signature: float Vector4:getX ( )
44+
variable: x
4445
returns:
4546
type: float
4647
description: The X coordinate.
@@ -49,6 +50,7 @@ oop_only_methods:
4950
type: method
5051
description: Sets the X component of the vector.
5152
signature: nil Vector4:setX ( float x )
53+
variable: x
5254
parameters:
5355
- name: x
5456
type: float
@@ -58,6 +60,7 @@ oop_only_methods:
5860
type: method
5961
description: Returns the Y component of the vector.
6062
signature: float Vector4:getY ( )
63+
variable: "y"
6164
returns:
6265
type: float
6366
description: The Y coordinate.
@@ -66,6 +69,7 @@ oop_only_methods:
6669
type: method
6770
description: Sets the Y component of the vector.
6871
signature: nil Vector4:setY ( float y )
72+
variable: "y"
6973
parameters:
7074
- name: "y"
7175
type: float
@@ -75,6 +79,7 @@ oop_only_methods:
7579
type: method
7680
description: Returns the Z component of the vector.
7781
signature: float Vector4:getZ ( )
82+
variable: z
7883
returns:
7984
type: float
8085
description: The Z coordinate.
@@ -83,6 +88,7 @@ oop_only_methods:
8388
type: method
8489
description: Sets the Z component of the vector.
8590
signature: nil Vector4:setZ ( float z )
91+
variable: z
8692
parameters:
8793
- name: z
8894
type: float
@@ -92,6 +98,7 @@ oop_only_methods:
9298
type: method
9399
description: Returns the W component of the vector.
94100
signature: float Vector4:getW ( )
101+
variable: w
95102
returns:
96103
type: float
97104
description: The W coordinate.
@@ -100,6 +107,7 @@ oop_only_methods:
100107
type: method
101108
description: Sets the W component of the vector.
102109
signature: nil Vector4:setW ( float w )
110+
variable: w
103111
parameters:
104112
- name: w
105113
type: float
@@ -119,6 +127,7 @@ oop_only_methods:
119127
description: |
120128
Returns a normalized version of the vector without modifying the original.
121129
signature: Vector4 Vector4:getNormalized ( )
130+
variable: normalized
122131
returns:
123132
type: Vector4
124133
description: A new normalized vector.
@@ -128,6 +137,7 @@ oop_only_methods:
128137
description: |
129138
Returns the length (magnitude) of the vector.
130139
signature: float Vector4:getLength ( )
140+
variable: length
131141
returns:
132142
type: float
133143
description: The vector's length.
@@ -137,6 +147,7 @@ oop_only_methods:
137147
description: |
138148
Returns the squared length of the vector (useful to anil square root operations).
139149
signature: float Vector4:getSquaredLength ( )
150+
variable: squaredLength
140151
returns:
141152
type: float
142153
description: The squared length of the vector.

schemas/element.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ properties:
3939
type: string
4040
signature:
4141
type: string
42+
variable:
43+
type: string
4244
overloads:
4345
type: array
4446
items:

web/src/components/ElementOOPInfo.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ let oop_constructor = oop_compatible_functions.find(func => func.oop.constructor
4949

5050
{oop_only_methods.length > 0 && (
5151
<section class="oop-methods-section">
52-
<h4><a href="/reference/OOP">OOP</a>-Only Methods</h4>
52+
<h4><a href="/reference/OOP">OOP</a>-Only Methods and Variables</h4>
5353

5454
{oop_only_methods.map((method: any) => (
5555
<>
@@ -92,6 +92,10 @@ let oop_constructor = oop_compatible_functions.find(func => func.oop.constructor
9292
))}
9393
</ul>
9494
)}
95+
96+
{method.variable && (
97+
<strong>Variable:</strong> <span><a href="/reference/Vector">{element_name}</a>.{method.variable}</span>
98+
)}
9599
</>
96100
))}
97101

0 commit comments

Comments
 (0)