Description Usage Methods Examples
Create a garcon to animate images on the waiter.
1 2 3 | useGarcon()
use_garcon()
|
new()
Garcon$new( image, bg_color = "#FFFFFF", opacity = 0.5, direction = c("bt", "tb", "lr", "rl"), filter = NULL )
image
The CSS id of the image tag.
bg_color
Background overlay color in hexadecimal or RGB.
opacity
Overlay transparency.
direction
Animation direction. Possible values: lr
(left to right),
rl
(right to left), bt
(bottom to top), tb
(top to bottom).
filter
Filter to apply, options are blur
, grayscale
, sepia
,
hue-rotate
, invert
, opacity
.
Initialise the garçon.
\dontrun{Garcon$new("img")$set(30)}
set()
Garcon$set(value)
value
Percentage to set to.
Value to set the garçon to.
\dontrun{Garcon$new("img")$set(30)}
inc()
Garcon$inc(value)
value
Percentage to increase to.
Value to increase the garçon to.
\dontrun{Garcon$new("img")$inc(30)}
reset()
Garcon$reset(value)
value
Percentage to set to.
Reset the garçon to.
\dontrun{Garcon$new("img")$set(30)$reset()}
destroy()
Garcon$destroy()
Kill the garçon to.
\dontrun{Garcon$new("img")$set(30)$destroy()}
print()
Garcon$print()
print the garcon
close()
Garcon$close()
Close the garçon.
\dontrun{Garcon$new("img")$set(30)$close()}
clone()
The objects of this class are cloneable with this method.
Garcon$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## ------------------------------------------------
## Method `Garcon$new`
## ------------------------------------------------
## Not run: Garcon$new("img")$set(30)
## ------------------------------------------------
## Method `Garcon$set`
## ------------------------------------------------
## Not run: Garcon$new("img")$set(30)
## ------------------------------------------------
## Method `Garcon$inc`
## ------------------------------------------------
## Not run: Garcon$new("img")$inc(30)
## ------------------------------------------------
## Method `Garcon$reset`
## ------------------------------------------------
## Not run: Garcon$new("img")$set(30)$reset()
## ------------------------------------------------
## Method `Garcon$destroy`
## ------------------------------------------------
## Not run: Garcon$new("img")$set(30)$destroy()
## ------------------------------------------------
## Method `Garcon$close`
## ------------------------------------------------
## Not run: Garcon$new("img")$set(30)$close()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.