Stretch
A class in Root.Township, Alta.Caves.PluginParts.
Cave map generator part that shapes a layer vertically from a height map, using a curve from floor (or roof) upward. Settings only; the work is done in StretchInstance.
- Listed in World generation
- Inherits or implements
MapGeneratorPart - Derived types
StretchInstance
Constructors
| Member | What it is |
|---|---|
Stretch() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private float floorValue | Backing field for FloorValue. |
private Plugin heightMapLayer | Backing field for HeightMapLayer. |
private int heightMapYIndex | Backing field for HeightMapYIndex. |
private bool isFromRoof | Backing field for IsFromRoof. |
private float maximumValue | Backing field for MaximumValue. |
private float minimumValue | Backing field for MinimumValue. |
private OperationType operationType | Backing field for OperationType. |
private AnimationCurve stretchCurve | Backing field for StretchCurve. |
Properties
| Member | What it is |
|---|---|
float FloorValue { get; } | Added to the height map value before it is scaled by the curve. |
Plugin HeightMapLayer { get; } | Layer plugin read as the height map. |
int HeightMapYIndex { get; } | Which Y slice of the height map layer is read. |
bool IsFromRoof { get; } | When true, the curve runs from the top of the layer downward instead of from the bottom. |
float MaximumValue { get; } | Upper clamp for each written value. |
float MinimumValue { get; } | Lower clamp for each written value. |
OperationType OperationType { get; } | How the curve value combines with the existing layer value. |
AnimationCurve StretchCurve { get; } | Curve over the layer's height (0 at the start, 1 at the end) that scales the height map value. |
Methods
| Member | What it is |
|---|---|
override IPartInstance GetInstance(PluginInstance plugin) | Creates the StretchInstance that runs this part on a plugin. |
Used in
Members of other types that take, return or hold a Stretch: