animation: Animations

Description Methods Examples

Description

Helper function to build animations.

Methods

Public methods


Method enter()

Usage
Animation$enter(animation = NULL, easing = NULL, delay = NULL, duration = NULL)
Arguments
animation

Name of animation; clipIn, zoomIn, pathIn, scaleInY, scaleInX, fanIn, or fadeIn.

easing

Name of easing function.

delay, duration

Delay and duration in milliseconds.

Details

Animation to use on enter


Method leave()

Usage
Animation$leave(animation = NULL, easing = NULL, delay = NULL, duration = NULL)
Arguments
animation

Name of animation; lineWidthOut, zoomOut, pathOut, or fadeOut.

easing

Name of easing function.

delay, duration

Delay and duration in milliseconds.

Details

Animation to use on leave


Method appear()

Usage
Animation$appear(
  animation = NULL,
  easing = NULL,
  delay = NULL,
  duration = NULL
)
Arguments
animation

Name of animation; clipIn, zoomIn, pathIn, scaleInY, scaleInX, fanIn, or fadeIn.

easing

Name of easing function.

delay, duration

Delay and duration in milliseconds.

Details

Animation to use on appear


Method update()

Usage
Animation$update(
  animation = NULL,
  easing = NULL,
  delay = NULL,
  duration = NULL
)
Arguments
animation

Name of animation; fadeIn, or fanIn.

easing

Name of easing function.

delay, duration

Delay and duration in milliseconds.

Details

Animation to use on appear


Method print()

Usage
Animation$print()
Details

Print


Method retrieve()

Usage
Animation$retrieve()
Details

Retrieve the animation list


Method clone()

The objects of this class are cloneable with this method.

Usage
Animation$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create animation
anim <- Animation$
  new()$
  appear(
  duration = 2000,
  delay = 500
)

iris %>%
  g2(asp(Sepal.Length, Sepal.Width, color = Species)) %>%
  fig_point(anim)

devOpifex/g2r documentation built on Jan. 16, 2022, 12:36 a.m.