R/create-anim-pulse-line.R
create_anim_pulse_line.Rd
Create a simple pulsing animation in which the width of the line varies
create_anim_pulse_line( size1 = 0, size2 = 10, duration = 4, repeatCount = "indefinite", ... )
size1, size2 | the minimum and maximum size of the strokes |
---|---|
duration | time for full cycle (seconds). default: 4 |
repeatCount | default: 'indefinite' |
... | other arguments passed to |
minisvg SVGElement
if (FALSE) { # Create an SVG document library(minisvg) doc <- minisvg::svg_doc() # Create the animation pulse <- create_anim_pulse_line(size2 = 50) # Create a rectangle with the animation rect <- stag$rect( x = "10%", y = "10%", width = "80%", height = "80%", fill = "lightblue", stroke = 'black', pulse ) # Add this rectangle to the document, show the SVG text, then render it doc$append(rect) doc doc$show() }