This helper plays nothing; use mascot_gesture() to play a movement.
After the mascot appears or changes (a new mood, a gesture or a swap), it breathes and blinks for up to five
seconds, then rests.
The visitor's
reduced-motion setting
always wins over any TRUE.
Switches you do not set, including any added in later versions, follow
others; switches you set always win.
Usage
mascot_motion_settings(
...,
idle = NULL,
mood_change = NULL,
gestures = NULL,
swap = NULL,
minimising = NULL,
restoring = NULL,
messages = NULL,
others = TRUE
)Arguments
- ...
Must be empty; all settings must be named.
- idle
Logical flag or
NULL(default): breathing and blinking.NULLfollowsothers.- mood_change
Logical flag or
NULL(default): the wiggle or hop on a mood change.NULLfollowsothers.- gestures
Logical flag or
NULL(default): nods, waves and other gestures.NULLfollowsothers. Skipping a gesture leaves the mood, bubble and status of the same update intact.- swap
Logical flag or
NULL(default): character-change transitions.NULLfollowsothers.- minimising
Logical flag or
NULL(default): movement to the round restore button.NULLfollowsothers.- restoring
Logical flag or
NULL(default): movement back from the restore button.NULLfollowsothers.- messages
TRUEfor all panels,FALSEfor none, or a character vector of names fromc("bubble", "tooltip", "menu")for only those panels.NULL(default) followsothers. Panels still appear and work.- others
Logical flag, default
TRUE, for every switch you do not set. Withothers = FALSEand no switch you set allowing movement, this is the same asmotion = FALSE, including the reduced-motion poses and instant drag moves.
Value
A mascot_motion_settings object. Its fields are internal; pass the
object on rather than reading its fields.
See also
mascot(), update_mascot(), mascot_gesture()
Other mascot helpers:
mascot_action(),
mascot_anchors(),
mascot_bubble(),
mascot_character(),
mascot_characters(),
mascot_check_character(),
mascot_colour_roles(),
mascot_families(),
mascot_gesture(),
mascot_gestures(),
mascot_mood(),
mascot_moods(),
mascot_palettes(),
mascot_placement(),
mascot_popup_menu(),
mascot_preview(),
mascot_read_character(),
mascot_size(),
mascot_status(),
mascot_theme()
Examples
mascot_motion_settings()
#> mascot_motion_settings()
mascot_motion_settings(idle = FALSE)
#> mascot_motion_settings(idle = FALSE)
mascot_motion_settings(messages = "menu", others = FALSE)
#> mascot_motion_settings(messages = "menu", others = FALSE)
ui <- mascot("still", motion = FALSE)
if (FALSE) { # interactive()
shiny::shinyApp(
shiny::fluidPage(
shiny::checkboxInput("idle", "Allow idle movement", TRUE),
shiny::actionButton("nod", "Nod"),
mascot("helper")
),
function(input, output, session) {
shiny::observeEvent(input$idle, {
update_mascot("helper", motion = mascot_motion_settings(idle = input$idle))
})
shiny::observeEvent(input$nod, {
update_mascot("helper", gesture = "nod")
})
}
)
}
