Timeline

indigo.shared.animation.timeline.Timeline$package$.Timeline$
object Timeline

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Timeline.type

Members list

Value members

Concrete methods

inline def apply[A](timeWindows: Batch[TimeWindow[A]]): Timeline[A]
inline def apply[A](timeWindows: TimeWindow[A]*): Timeline[A]
inline def apply[A](timeSlots: TimeSlot[A]*): Timeline[A]
inline def apply[A](animations: TimelineAnimation[A]*): Timeline[A]
def empty[A]: Timeline[A]

Extensions

Extensions

extension [A](tl: Timeline[A])(tl: Timeline[A])
def add(animation: TimeSlot[A]): Timeline[A]

Add a TimeSlot[A] to the animation as a TimeWindow. Time slots are the building block of animation and can be combined together to build up an animation, for example: startAfter(2.seconds) andThen show(5.seconds)(_.withAlpha(0.5))

Add a TimeSlot[A] to the animation as a TimeWindow. Time slots are the building block of animation and can be combined together to build up an animation, for example: startAfter(2.seconds) andThen show(5.seconds)(_.withAlpha(0.5))

Value parameters

animation

the TimeSlot[A] to add

Attributes

Returns

Timeline[A]

def addWindow(nextWindow: TimeWindow[A]): Timeline[A]

Add a time window to the animation.

Add a time window to the animation.

Value parameters

nextWindow

TimeWindow[A]

Attributes

Returns

Timeline[A]

def addWindows(nextWindows: Batch[TimeWindow[A]]): Timeline[A]

Add a batch of time windows to the animation.

Add a batch of time windows to the animation.

Value parameters

nextWindows

Batch[TimeWindow[A]]

Attributes

Returns

Timeline[A]

def at(time: Seconds): A => Option[A]

Samples the animation at the given time to produce a value. The return type is ultimately optional because you could sample the animation outside of the animations time range.

Samples the animation at the given time to produce a value. The return type is ultimately optional because you could sample the animation outside of the animations time range.

Value parameters

time

the current running time in Seconds to sample the animation at.

Attributes

Returns

A => Option[A] where A is the 'subject', the thing to be animated.

def atOrElse(time: Seconds): A => A

Calls at but always returns a value, using the original subject A if no other value would be produced by the animation.

Calls at but always returns a value, using the original subject A if no other value would be produced by the animation.

Value parameters

time

the current running time in Seconds to sample the animation at.

Attributes

Returns

A

def atOrElse(time: Seconds, default: A): A => A

Calls at but always returns a value, using the given default subject A if no other value would be produced by the animation.

Calls at but always returns a value, using the given default subject A if no other value would be produced by the animation.

Value parameters

default

the subject to use if no other value is produced

time

the current running time in Seconds to sample the animation at.

Attributes

Returns

A

def atOrLast(time: Seconds): A => Option[A]

Clamps the time to be within the animation's duration, ensuring that the last frame is present even when over the time windows. Still produces an optional value because you may have a delay at the beginning of you animation, for example.

Clamps the time to be within the animation's duration, ensuring that the last frame is present even when over the time windows. Still produces an optional value because you may have a delay at the beginning of you animation, for example.

Value parameters

time

the current running time in Seconds to sample the animation at.

Attributes

Returns

Option[A]

Return the total time duration of the animation in seconds, including any initial delays.

Return the total time duration of the animation in seconds, including any initial delays.

Attributes

Returns

Seconds

Alias for duration, returns the total time duration of the animation in seconds, including any initial delays.

Alias for duration, returns the total time duration of the animation in seconds, including any initial delays.

Attributes

Returns

Seconds

Give the time windows as a Batch.

Give the time windows as a Batch.

Attributes

Returns

Batch[TimeWindow[A]]