baptiste / minixcali

experiment to create excalidraw objects from R

Home Page:https://baptiste.github.io/minixcali/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

preview

preview

See live at: https://excalidraw.com/#json=6574685261135872,GxSfukqmhssGOdgZvNhG-g

Usage

library(minixcali)

d <- Excali_doc()
shape <- xkd_rectangle(width = 300, height=200,
                       fillStyle = 'hachure', roughness = 2)
d$add(shape)
d$export(file = file.path(tempdir(), 'output.json'))

Imported into Excalidraw: https://excalidraw.com/#json=5715677440638976,p-zr2_oejToaWyr7Slr44w

preview

preview

Acknowledgments

  • Excalidraw for this cool & open interactive tool

  • {minisvg} by @coolbutuseless — the R6 model was too complicated for me to copy properly so I settled for a dumb list structure ¯\_(ツ)_/¯

  • {jsonlite} to import/export R objects to JSON

  • {purrr}, {tibble}, {glue} for making the initial digressions in development somewhat less terrible

  • {svgchop} by @brodieG to import SVG paths

  • {flametree} for providing a pretty example to play with

  • ln (golang) for cool SVGs to import

  • poorlydrawnlines for Kevin and Roberto

  • {isoband} to melt Excalidraw with volcanos

  • {gridfont} by @coolbutuseless, to draw text as single line strokes

  • {excalidrawr} by @timelyportfolio for the experimental Shiny wrapper around Excalidraw’s React component (hopefully this will help provide a live-preview)

About

experiment to create excalidraw objects from R

https://baptiste.github.io/minixcali/

License:MIT License


Languages

Language:R 87.0%Language:HTML 12.7%Language:TeX 0.3%