unity
Models for Unity data types.
JSON Schema and C# models are not generated for these models since they are built-in Unity types.
Color
Bases: BaseModel
RGBA color.
Range for each component is 0 to 1.
Attributes:
Name | Type | Description |
---|---|---|
r |
float
|
Red component. |
g |
float
|
Green component. |
b |
float
|
Blue component. |
a |
float
|
Alpha component. |
Source code in src/vbl_aquarium/models/unity.py
Vector2
Vector3
Vector4
Bases: BaseModel
4D vector.
Attributes:
Name | Type | Description |
---|---|---|
x |
float
|
X component. |
y |
float
|
Y component. |
z |
float
|
Z component. |
w |
float
|
W component. |
Source code in src/vbl_aquarium/models/unity.py
__add__(other)
Add two vectors together.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
Any
|
The other vector to add. |
required |
Returns:
Type | Description |
---|---|
Vector4
|
The sum of the two vectors. |
Raises:
Type | Description |
---|---|
TypeError
|
If the other object is not a Vector4. |
Source code in src/vbl_aquarium/models/unity.py
__mul__(other)
Multiply a vector by a scalar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
Any
|
The scalar to multiply by. |
required |
Returns:
Type | Description |
---|---|
Vector4
|
The product of the vector and scalar. |
Raises:
Type | Description |
---|---|
TypeError
|
If the other object is not an int or float. |
Source code in src/vbl_aquarium/models/unity.py
__sub__(other)
Subtract one vector from another.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
Any
|
The other vector to subtract. |
required |
Returns:
Type | Description |
---|---|
Vector4
|
The difference of the two vectors. |
Raises:
Type | Description |
---|---|
TypeError
|
If the other object is not a Vector4. |
Source code in src/vbl_aquarium/models/unity.py
__truediv__(other)
Divide a vector by a scalar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
Any
|
The scalar to divide by. |
required |
Returns:
Type | Description |
---|---|
Vector4
|
The quotient of the vector and scalar. |
Raises:
Type | Description |
---|---|
TypeError
|
If the other object is not an int or float. |