UVBuilderFlipbook Class
Namespace: Stride.Particles.MaterialsAssembly: Stride.Particles.dll
Animates the texture coordinates in a flipbook fashion, based on the particle's life The order of the frames is left to right, top to bottom The flipbook assumes uniform sizes for all frames
[DataContract("UVBuilderFlipbook")]
[Display("Flipbook", null)]
public class UVBuilderFlipbook : UVBuilder, IAttributeTransformer<Vector2, Vector4>
Name | Description | |
---|---|---|
Properties | ||
AnimationSpeed | Number of frames to change over the particle life |
|
StartingFrame | Position of the starting frame, 0-based indexing |
|
XDivisions | Number of columns (cells per row) |
|
YDivisions | Number of rows (cells per column) |
|
Methods | ||
BuildUVCoordinates(ref ParticleBufferState, ref ParticleList, AttributeDescription) | Enhances or animates the texture coordinates using already existing base coordinates of (0, 0, 1, 1) or similar (base texture coordinates may differ depending on the actual shape) |
|
Transform(ref Vector2, ref Vector4) |
Properties
AnimationSpeed
Number of frames to change over the particle life
[DataMember(320)]
[Display("Animation speed", null)]
public uint AnimationSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
StartingFrame
Position of the starting frame, 0-based indexing
[DataMember(280)]
[Display("Starting frame", null)]
public uint StartingFrame { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
XDivisions
Number of columns (cells per row)
[DataMember(200)]
[Display("X divisions", null)]
public uint XDivisions { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
YDivisions
Number of rows (cells per column)
[DataMember(240)]
[Display("Y divisions", null)]
public uint YDivisions { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
BuildUVCoordinates(ref ParticleBufferState, ref ParticleList, AttributeDescription)
Enhances or animates the texture coordinates using already existing base coordinates of (0, 0, 1, 1) or similar (base texture coordinates may differ depending on the actual shape)
public override void BuildUVCoordinates(ref ParticleBufferState bufferState, ref ParticleList sorter, AttributeDescription texCoordsDescription)
Parameters
Type | Name | Description |
---|---|---|
ParticleBufferState | bufferState | The particle buffer state which is used to build the assigned vertex buffer |
ParticleList | sorter | |
AttributeDescription | texCoordsDescription | Attribute description of the texture coordinates in the current vertex layout |
Overrides
Transform(ref Vector2, ref Vector4)
public void Transform(ref Vector2 attribute, ref Vector4 uvTransform)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | attribute | |
Vector4 | uvTransform |