- Developed by Dented Pixel
API Docs for: LeanTween 2.50

Support LeanTween!

Maintaining and adding new features takes time, your support is appreciated.

Show:

LTRect Class

Defined in: LeanTween.cs:3593

Animate GUI Elements by creating this object and passing the *.rect variable to the GUI method

Example Javascript:
var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 );
function OnGUI(){
  if(GUI.Button(bRect.rect, "Scale")){ }
}

Example C#:
LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f );
void OnGUI(){
  if(GUI.Button(bRect.rect, "Scale")){ }
}

Constructor

LTRect

(
  • x:float
  • y:float
  • width:float
  • height:float
  • alpha:float
  • rotation:float
)

Defined in LeanTween.cs:3593

Parameters:

  • x:float Float

    X location

  • y:float Float

    Y location

  • width:float Float

    Width

  • height:float Float

    Height

  • alpha:float Float

    (Optional) initial alpha amount (0-1)

  • rotation:float Float

    (Optional) initial rotation in degrees (0-360)

Item Index

Properties

Properties

rect

Rect rect:Rect Rect object that controls the positioning and size

Defined in LeanTween.cs:3620

Pass this value to the GUI Methods