time

This object provides common methods for converting a time value into an alpha value (a value in the range 0 to 1).
see: java doc

value

as: |time|

atributes

  • time [Float:1f] set increasing and decreasing time //second
  • incTime [Float:1f] set increasing time //second
  • decTime [Float:0f] set decreasing time //second
  • decTime [Float:0f] set decreasing time //second
  • mode [{inc,dec,incDec}:inc] increasing, decreasing, increasing + decreasing
  • enabled [Boolean:true] start animating after scene is created
  • loopCount [Integer,loop:loop] no of loops
  • ramp [Float:0f] set increasing and decreasing ramp time //second
  • incRamp [Float:0f] set increasing ramp time //second
  • decRamp [Float:0f] set decreasing ramp time //second
  • atZeroOne [Float:0f] set at zero and one duration //second
  • atZero [Float:0f] set at zero duration //second
  • atOne [Float:0f] set at one duration //second

control

  • pause() stop animation
  • pause([Float]) pause animation at the specified time
  • [Boolean] paused() return true if animation is paused
  • start() start animation
  • start([Float]) start animation at the specified time
  • loop([Integer]) set loop count
  • loop() loops indefinitely
  • setMode({inc,dec,incDec}) increasing, decreasing, increasing + decreasing
  • atZeroOne([Float]) set at zero and one duration //second
  • atZero([Float]) set at zero duration //second
  • atOne([Float]) set at one duration //second
  • time([Float]) set increasing and decreasing time //second
  • incTime([Float]) set increasing time //second
  • decTime([Float]) set decreasing time //second
  • ramp([Float]) set increasing and decreasing ramp time //second
  • incRamp([Float]) set increasing ramp time //second
  • decRamp([Float]) set decreasing ramp time //second
  • [Float] value() return actual value <0,1>
  • [Float] value([Float]) return value <0,1> based on the specified time

Examples

1
time(time:45f);
1
time(time:0.2f, mode:incDec, ramp:0.02f);
1
2
3
4
5
animTime = _time(time:0.2f, mode:incDec, ramp:0.02f);
anim = animTime.control();
// ...
anim.pause();
anim.loop(3);