M2AnimationsChain

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun M2AnimationsChain.animateColor(m2ArGeometry: M2ArGeometry, toColor: Int, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates all three RGB channels of an AR geometry drawable to the given toColor in parallel.

fun M2AnimationsChain.animateColor(hudDrawable: M2HudDrawable, toColor: Int, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates all three RGB channels of a HUD drawable to the given toColor in parallel.

Link copied to clipboard
fun M2AnimationsChain.animateSizeByPercent(drawable: M2Rect, percent: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates both the width and height of an outlined rectangle by a uniform percentage.

fun M2AnimationsChain.animateSizeByPercent(drawable: M2RectFilled, percent: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates both the width and height of a filled rectangle by a uniform percentage.

fun M2AnimationsChain.animateSizeByPercent(drawable: M2Rect, dWidthPercent: Float, dHeightPercent: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates the width and height of an outlined rectangle by independent percentages.

fun M2AnimationsChain.animateSizeByPercent(drawable: M2RectFilled, dWidthPercent: Float, dHeightPercent: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Animates the width and height of a filled rectangle by independent percentages.

Link copied to clipboard
fun delay(durationMillis: Long): M2AnimationsChain

Adds a pause before the next step.

Link copied to clipboard
fun exe(block: () -> Any?): M2AnimationsChain

Adds a block to run in parallel with the most recent step added via then.

Link copied to clipboard
fun M2AnimationsChain.replaceFade(hudDrawable: M2HudDrawable, replace: M2HudDrawable, targetAlpha: <Error class: unknown class>, durationMillis: Long, anchorPoint: M2AnchorPoint = M2AnchorPoint.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Cross-fades from hudDrawable to replace by fading the source out during the first half and fading the replacement in during the second half of the duration.

Link copied to clipboard
fun M2AnimationsChain.replaceSlide(source: M2HudDrawable, replace: M2HudDrawable, durationMil: Long, distance: Float, orientation: M2ReplaceOrientation, anchorPoint: M2AnchorPoint = M2AnchorPoint.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Slides the source drawable out while simultaneously sliding the replace drawable in, fading the source out during the transition.

Link copied to clipboard
fun start()

Begins executing the animation chain from the first step.

Link copied to clipboard
fun stop()

Stops all currently running animations in this chain.

Link copied to clipboard

Adds a nested M2AnimationsChain as a sequential step that runs after the previous step finishes.

Adds an M2Animator as a sequential step that runs after the previous step finishes.

fun then(block: () -> Any?): M2AnimationsChain

Adds a block (scope) that will run sequentially after the previous block finishes.

Link copied to clipboard
fun M2AnimationsChain.translateBy(drawable: M2HudDrawable, dx: Float, dy: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Translates a HUD drawable by (dx, dy) pixels, animating X and Y in parallel.

fun M2AnimationsChain.translateBy(drawable: M2Panel, dx: Float, dy: Float, durationMillis: Long, repeat: M2AnimatorRepeat = M2AnimatorRepeat.None, callback: IM2AnimatorCallback? = null): M2AnimationsChain

Translates a panel by (dx, dy) pixels, animating X and Y in parallel.

Link copied to clipboard

Adds a nested M2AnimationsChain to run in parallel with the most recent step.

Adds an M2Animator to run in parallel with the most recent step.