Skip to content

Commit

Permalink
Add MaterialColors property format to docs (#140)
Browse files Browse the repository at this point in the history
Co-authored-by: boatbomber <[email protected]>
  • Loading branch information
Dekkonot and boatbomber authored May 20, 2024
1 parent 97617b3 commit db1ea66
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rojo supports most Roblox properties. This page documents all of the properties
|:----------------------------------------------------|:--------------------------------|:--:|:--:|:--:|
| [Attributes](#attributes) | `Instance.Attributes` ||||
| [Axes](#axes) | `ArcHandles.Axes` ||||
| [BinaryString](#binarystring) | `Terrain.MaterialColors` ||||
| [BinaryString](#binarystring) | `BinaryStringValue.Value` ||||
| [Bool](#bool) | `Part.Anchored` ||||
| [BrickColor](#brickcolor) | `Part.BrickColor` ||||
| [CFrame](#cframe) | `Camera.CFrame` ||||
Expand All @@ -28,6 +28,7 @@ Rojo supports most Roblox properties. This page documents all of the properties
| [Font](#font) | `TextLabel.FontFace` ||||
| [Int32](#int32) | `Frame.ZIndex` ||||
| [Int64](#int64) | `Player.UserId` ||||
| [MaterialColors](#materialcolors) | `Terrain.MaterialColors` ||||
| [NumberRange](#numberrange) | `ParticleEmitter.Lifetime` ||||
| [NumberSequence](#numbersequence) | `Beam.Transparency` ||||
| [OptionalCoordinateFrame](#optionalcoordinateframe) | `Model.WorldPivotData` ||||
Expand Down Expand Up @@ -352,6 +353,31 @@ For both implicit and explicit values, the format is an integer.
}
```

### MaterialColors

For both implicit and explicit values, the type is an object that looks like this:

```json
{
"$properties": {
"ImplicitExample": {
"Grass": [10, 20, 30],
"Asphalt": [40, 50, 60],
"LeafyGrass": [255, 155, 55]
},
"ExplicitExample": {
"MaterialColors": {
"Grass": [10, 20, 30],
"Asphalt": [40, 50, 60],
"LeafyGrass": [255, 155, 55]
}
}
}
}
```

The key-value pairs within the object should be [Material](https://create.roblox.com/docs/reference/engine/enums/Material) enum items mapped to arrays of 3 integers representing the RGB of the specified color. Only the values you wish to change the defaults of need to be specified.

### NumberRange
The NumberRange type cannot be specified implicitly. For explicit values, the format is a list of Min and Max components, respectively. Each component is a float.

Expand Down

0 comments on commit db1ea66

Please sign in to comment.