struct Curve

in global :: Sandbox

Describes a curve, which can have multiple key frames.


public Vector2 TimeRange { get; set; }

The range of this curve. This affects looping.

public Vector2 ValueRange { get; set; }

The value range. This should affect nothing but what it looks like in the editor.

public static Curve Linear

A curve that linearly interpolates from 0 to 1

public static Curve Ease

A curve that eases from 0 to 1

public static Curve EaseIn

A curve that eases in from 0 to 1

public static Curve EaseOut

A curve that eases out from 0 to 1

public ImmutableArray<Curve.Frame> Frames

A list of keyframes or points on the curve.

public int Length { get; }

Amount of key frames or points on the curve.

public int AddPoint( float x, float y )

Add a new keyframe at given position to this curve.

  • x Position of the keyframe on the X axis.
  • y Position of the keyframe on the Y axis.
  • Returns The position of newly added keyframe in the list.

public int AddPoint( ref Curve.Frame keyframe )

Add given keyframe to this curve.

  • keyframe The keyframe to add.
  • Returns The position of newly added keyframe in the list.

public void RemoveAtTime( float time, float within )

Remove all of the frames at the current time

public bool AddOrReplacePoint( ref Curve.Frame keyframe )

Add given keyframe to this curve.

  • Returns True if we added a new point. False if we just edited an existing point.

public float Evaluate( float time, bool angles )

Returns the value on the curve at given time position.

  • time The time point (x axis) at which
  • angles Is this an angle?
  • Returns The absolute value at given time. (y axis)

public float Evaluate( float time )

Returns the value on the curve at given time position.

  • time The time point (x axis) at which
  • Returns The absolute value at given time. (y axis)

public float EvaluateDelta( float time )

Like evaluate but takes a normalized time between 0 and 1 and returns a normalized value between 0 and 1

public float EvaluateDelta( float time, bool angles )

Like evaluate but takes a normalized time between 0 and 1 and returns a normalized value between 0 and 1

public static Curve op_Implicit( float value )

😔 No documentation found.

public Curve WithFrames( ImmutableList<Curve.Frame> frames )

😔 No documentation found.

public Curve( )

😔 No documentation found.

public Curve( Curve.Frame[] frames )

😔 No documentation found.

public Curve( List<Curve.Frame> frames )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public void Fix( )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public void UpdateValueRange( Vector2 newRange, bool retainValues )

😔 No documentation found.

public Curve WithFrames( IEnumerable<Curve.Frame> frames )

😔 No documentation found.

public Curve WithFrames( ImmutableArray<Curve.Frame> frames )

😔 No documentation found.

public void Sort( )

😔 No documentation found.

public Curve.Frame Item { get; set; }

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public Curve Reverse( )

😔 No documentation found.