Difference between revisions of "Easing"

From GiderosMobile
Line 11: Line 11:
  
 
=== Example ===
 
=== Example ===
A table holding all easing functions
+
A table holding a few easings
 
<source lang="lua">
 
<source lang="lua">
 
require "easing"
 
require "easing"
Line 21: Line 21:
 
easing.inBounce, -- 4
 
easing.inBounce, -- 4
 
easing.outBounce, -- 5
 
easing.outBounce, -- 5
easing.inOutBounce, -- 6
 
easing.inCircular, -- 7
 
easing.outCircular, -- 8
 
easing.inOutCircular, -- 9
 
easing.inCubic, -- 10
 
easing.outCubic, -- 11
 
easing.inOutCubic, -- 12
 
easing.inElastic, -- 13
 
easing.outElastic, -- 14
 
easing.inOutElastic, -- 15
 
easing.inExponential, -- 16
 
easing.outExponential, -- 17
 
easing.inOutExponential, -- 18
 
easing.linear, -- 19
 
easing.inQuadratic, -- 20
 
easing.outQuadratic, -- 21
 
easing.inOutQuadratic, -- 22
 
easing.inQuartic, -- 23
 
easing.outQuartic, -- 24
 
easing.inOutQuartic, -- 25
 
easing.inQuintic, -- 26
 
easing.outQuintic, -- 27
 
easing.inOutQuintic, -- 28
 
easing.inSine, -- 29
 
easing.outSine, -- 30
 
easing.inOutSine, -- 31
 
 
}
 
}
 
</source>
 
</source>
Line 56: Line 30:
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
 +
easing.inBack<br/> <!-- GIDEROSCST:easing.inBack-->
 +
easing.outBack<br/> <!-- GIDEROSCST:easing.outBack-->
 +
easing.inOutBack<br/> <!-- GIDEROSCST:easing.inOutBack-->
 +
easing.inBounce<br/> <!-- GIDEROSCST:easing.inBounce-->
 +
easing.outBounce<br/> <!-- GIDEROSCST:easing.outBounce-->
 +
easing.inOutBounce<br/> <!-- GIDEROSCST:easing.inOutBounce-->
 +
easing.inCircular<br/> <!-- GIDEROSCST:easing.inCircular-->
 +
easing.outCircular<br/> <!-- GIDEROSCST:easing.outCircular-->
 +
easing.inOutCircular<br/> <!-- GIDEROSCST:easing.inOutCircular-->
 +
easing.inCubic<br/> <!-- GIDEROSCST:easing.inCubic-->
 +
easing.outCubic<br/> <!-- GIDEROSCST:easing.outCubic-->
 +
easing.inOutCubic<br/> <!-- GIDEROSCST:easing.inOutCubic-->
 +
easing.inElastic<br/> <!-- GIDEROSCST:easing.inElastic-->
 +
easing.outElastic<br/> <!-- GIDEROSCST:easing.outElastic-->
 +
easing.inOutElastic<br/> <!-- GIDEROSCST:easing.inOutElastic-->
 +
easing.inExponential<br/> <!-- GIDEROSCST:easing.inExponential-->
 +
easing.outExponential<br/> <!-- GIDEROSCST:easing.outExponential-->
 +
easing.inOutExponential<br/> <!-- GIDEROSCST:easing.inOutExponential-->
 +
easing.linear<br/> <!-- GIDEROSCST:easing.linear-->
 +
easing.inQuadratic<br/> <!-- GIDEROSCST:easing.inQuadratic-->
 +
easing.outQuadratic<br/> <!-- GIDEROSCST:easing.outQuadratic-->
 +
easing.inOutQuadratic<br/> <!-- GIDEROSCST:easing.inOutQuadratic-->
 +
easing.inQuartic<br/> <!-- GIDEROSCST:easing.inQuartic-->
 +
easing.outQuartic<br/> <!-- GIDEROSCST:easing.outQuartic-->
 +
easing.inOutQuartic<br/> <!-- GIDEROSCST:easing.inOutQuartic-->
 +
easing.inQuintic<br/> <!-- GIDEROSCST:easing.inQuintic-->
 +
easing.outQuintic<br/> <!-- GIDEROSCST:easing.outQuintic-->
 +
easing.inOutQuintic<br/> <!-- GIDEROSCST:easing.inOutQuintic-->
 +
easing.inSine<br/> <!-- GIDEROSCST:easing.inSine-->
 +
easing.outSine<br/> <!-- GIDEROSCST:easing.outSine-->
 +
easing.inOutSine<br/> <!-- GIDEROSCST:easing.inOutSine-->
 
|}
 
|}
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 04:37, 26 March 2020

Supported platforms: Platform android.pngPlatform ios.pngPlatform pc.pngPlatform mac.pngPlatform winrt.pngPlatform win32.png
Available since: 2020.2

Description

Easing functions to help tween between states.

require "easing"

Example

A table holding a few easings

require "easing"
-- EASINGS
easings = {
	easing.inBack, -- 1
	easing.outBack, -- 2
	easing.inOutBack, -- 3
	easing.inBounce, -- 4
	easing.outBounce, -- 5
}

Methods

Events

Constants

easing.inBack
easing.outBack
easing.inOutBack
easing.inBounce
easing.outBounce
easing.inOutBounce
easing.inCircular
easing.outCircular
easing.inOutCircular
easing.inCubic
easing.outCubic
easing.inOutCubic
easing.inElastic
easing.outElastic
easing.inOutElastic
easing.inExponential
easing.outExponential
easing.inOutExponential
easing.linear
easing.inQuadratic
easing.outQuadratic
easing.inOutQuadratic
easing.inQuartic
easing.outQuartic
easing.inOutQuartic
easing.inQuintic
easing.outQuintic
easing.inOutQuintic
easing.inSine
easing.outSine
easing.inOutSine