JEase: Predefined transition timings

View source: R/anim-tools.R

JEaseR Documentation

Predefined transition timings

Description

These functions are passed by name (i.e. without following parentheses) as the timing parameter to the JTransition function.

Usage

JEase(x)

JLinear(x)

JEaseIn(x)

JEaseOut(x)

JEaseInOut(x)

JBounce(x)

Arguments

x

x-value passed to the function automatically. See Examples below.

Value

A timing function.

See Also

JTransition, JScene, JBezier, JLoop

Examples

# Vary width from 0.1 to 1, with faster change in the middle of the scene
width = JTransition(0.1, 1, JEaseInOut)

# Function to graphically visualise a timing function
VisualiseTimingFun <- function(fn) plot(seq(0, 1, .01), fn(seq(0, 1, .01)), type = "l")
# Visualise the JEase timing function
VisualiseTimingFun(JEase)


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