Client Scripting API - Decal
From Multiverse
Decal is a class in the Client Scripting API that represents an image layered onto the terrain.
Contents |
[edit]
Constructor
ClientAPI.Decal.Decal(imageName, posX, posZ, sizeX, sizeZ, priority, rot, lifetime, deleteRadius)
Creates a new Decal object.
Returns
A new Decal object.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| imageName | string | None | Name of the image to use for the Decal. |
| posX | float | None | X coordinate of location to center the decal. |
| posZ | float | None | Z coordinate of location to center the decal. |
| sizeX | float | None | Size of the decal along the X axis. |
| sizeZ | float | None | Size of the decal along the X axis. |
| priority | int | 50 | Order to draw the decals. |
| rot | float | 0 | Rotation of the decal. |
| lifetime | float | 0 | How many seconds the decal should remain before automatically being removed. A value of zero means that the decal must be removed manually. |
| deleteRadius | float | 0 | Distance from the camera at which the decal should be automatically deleted. A value of zero means that the decal must be removed manually. |
[edit]
Methods
[edit]
CreateAnimableValue
animableValue = CreateAnimableValue(propertyName)
Creates an AnimableValue object which can be used to animate one of the properties of the Decal.
Returns
An AnimableValue object, which can be assigned to an animation track to allow for animating the specified property.
Parameters
| Parameter | Datatype | Default Value | Description |
|---|---|---|---|
| propertyName | string | None | Name of the property to animate. Valid values are Rot, ScaleX, ScaleZ, PosX, PosZ. |
[edit]
Dispose
Dispose()
Remove the decal from the scene.
Returns
None
Parameters
None
[edit]
Properties
| Property | Datatype | Description |
|---|---|---|
| PosX | float | X coordinate of the center the decal. |
| PosZ | float | Z coordinate of the center the decal. |
| SizeX | float | Size of the decal along the X axis. |
| SizeZ | float | Size of the decal along the Z axis. |
| Rotation | float | Amount to rotate the decal. |
| Priority | int | Priority of drawing the decal. |
| ImageName | string | Name of the decal image. Read only. |
