sprite_file | R Documentation |
This function is equivalent to gif_file()
but works for animations encoded
as a sprite. A sprite is a single image file where each frame of the
animation is stacked next to each other. The animation then happens by
changing what slice of the image is shown. The implementation used allow
users to click on the animation in order to toggle pause/play.
sprite_file(file, fps, width, full_width, height)
## S3 method for class 'sprite_image'
print(x, width = NULL, ...)
knit_print.sprite_image(x, options, ...)
file |
A png file with frames placed horizontally |
fps |
The framerate for the sprite animation |
width , height |
The dimension of a single frame |
full_width |
The width of the whole image |
x |
A |
... |
Arguments passed on |
sprite_file
returns a sprite_image
object which is a shallow wrapper
around the file path text string along with dimensions and fps used for
animating the sprite when printing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.