AnimatedNode

abstract class AnimatedNode

Base class for all Animated.js library node types that can be created on the "native" side.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
open fun onAttachedToNode(parent: AnimatedNode)

Subclasses may want to override this method in order to store a reference to the parent of a given node that can then be used to calculate current node's value in update. In that case it is important to also override onDetachedFromNode to clear that reference once current node gets detached.

Link copied to clipboard
Link copied to clipboard
abstract fun prettyPrint(): String

Pretty-printer for the AnimatedNode. Only called in production pre-crash for debug diagnostics.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun update()

This method will be run on each node at most once every repetition of the animation loop. It will be executed on a node only when all the node's parent has already been updated. Therefore it can be used to calculate node's value.