JTransition: Construct a JTransition

View source: R/anim-tools.R

JTransitionR Documentation

Construct a JTransition

Description

A JTransition defines how a single parameter values changes throughout a scene. The parameter changes from from in the first frame (time 0), through to to in the final frame (time 1). The way it changes is defined by the parameters timing and times.

Usage

JTransition(from, to, timing = JEase, times = c(0, 1))

Arguments

from

Initial parameter value.

to

Final parameter value.

timing

Animation timing function, such as JEaseIn, JBounce.

times

Time period (start, stop) over which the transition occurs, as a proportion of the scene time. A time of 0 indicates the first frame in the scene, while 1 is the last frame. If the transition does not start at the beginning of the frame, for all earlier frames the parameter will have values 'from'. Similarly, the parameter will have value 'to' for any frames after the last transition frame.

Details

It is possible to create custom timing functions. A timing function is a function that accepts one argument, a numeric vector x, and returns a mapping from x to some other value. For example, a simple linear timing function could be implemented as function(x) x.

Value

List used to define how a single parameter changes within a scene.

See Also

JScene, JEase, JBezier


JimMcL/JUtils documentation built on Nov. 7, 2024, 11:25 a.m.