{tigerfb} provides a cross-platform GUI window for display - based on
the public domain TiGr library
This display window includes keyboard and mouse events.
The name {tigerfb} is derived from the parent TiGr library name, and
is a loose acronym for “TIny Graphics Engine for an R Frame Buffer”
The suggested way to use {tigerfb} is to combine it with
{nara}[https://cran.r-project.org/package=nara] - i.e
nara as the rendering buffer to prepare an imagetigerfb::fb_updatd(window, image)
fb_open(), fb_close() open and close a frame buffer windowfb_update() update the state of the window i.e.
fb_state() read the state of the current window i.e. key presses,
mouse positionfb_capture() capture the current window to a native raster imagefb_save_png() save the current window to a PNG filefb_update() is required to refresh the
visible window state and see the results)
fb_fill() - fill the entire window with the given colorfb_line() - draw a linefb_rect() - draw a rectanglefb_text() - write some text to the screenpress_state a list of the 4 possible states for keyboard keys and
mouse buttons.fb_demo() an all-in-one demo which opens a window and displays a
colorful simulation.You can install from GitHub with:
# install.packages('pak')
install.packages('nara') # from CRAN
# pak::pkg_install('coolbutuseless/tigerfb')
install.packages("tigerfb", repos = c('https://coolbutuseless.r-universe.dev', 'https://cloud.r-project.org'))
# A collection of demonstrations of capabilities if `tigerfb`
pak::pkg_install('coolbutuseless/tigerdemos')
fb_demo()
The fb_demo() command runs a colorful simulation of a bubble universe.
library(tigerfb)
fb_demo()

{rdoom} and {tigerdemos}
{rdoom} is the game Doom
running in R with interactive keyboard/mouse control and sound effects.
{tigerdemos} includes
a number of smaller demonstrations
bubble_universe()flying_toasters()line_drawing()oxygene()parallax_squares()particles()raster_bars()This is tigerdemos::particles() where particles swarm around the mouse location:
https://github.com/user-attachments/assets/87afff12-e780-4350-b0f8-a5a5adc77d98