You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
757 B
25 lines
757 B
namespace UnityEditor.VFX.Operator
|
|
{
|
|
[VFXHelpURL("Operator-AgeOverLifetime")]
|
|
[VFXInfo(name = "Get Age Over Lifetime [0..1]", category = "Attribute")]
|
|
class AgeOverLifetime : VFXOperator
|
|
{
|
|
public class OutputProperties
|
|
{
|
|
public float t = 0;
|
|
}
|
|
|
|
public override string name
|
|
{
|
|
get
|
|
{
|
|
return "Get Age Over Lifetime [0..1]";
|
|
}
|
|
}
|
|
protected override VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
|
|
{
|
|
VFXExpression[] output = new VFXExpression[] { new VFXAttributeExpression(VFXAttribute.Age) / new VFXAttributeExpression(VFXAttribute.Lifetime) };
|
|
return output;
|
|
}
|
|
}
|
|
}
|