Skip to content

ThomUK/Sketch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sketch

Sketch is a simple R Shiny drawing app — a lightweight way to make and share a sketch online. Sketches can be exported as a PNG file via a popup window.

Deploy your own copy, or you can use the deployed version on shinyapps.io.

Features

  • Pen colours — Black, Silver, Blue, Red, Orange, Green
  • Pen size — adjustable via a slider
  • Eraser — three-state toggle: off / erase selected colour only / erase all colours
  • Caption — type directly onto the canvas; the caption bar always shows the current date and time
  • Export — opens the full-resolution 1280×720 PNG in a new window for saving or right-click copying
  • Responsive layout — canvas scales to fit the browser window; toolbar reflows on tablet and smaller screens

Usage

shiny::runApp()

Or run the deployed version on shinyapps.io.

Tech details

There is no server-side element to the app. All drawing, erasing, caption handling, and export logic is implemented client-side in vanilla JavaScript (www/sketch.js). Styles are in www/styles.css. The Shiny app.R defines only the UI structure.

The canvas buffer is fixed at 1280×720 pixels regardless of display size. Drawing coordinates are scaled from display pixels to buffer pixels on every pointer event, so strokes are always placed accurately at any zoom level.

About

An R Shiny app to create quick sketches. Add a caption, copy to clipboard, or download as png.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors