Create a zdog ilssutration

illustration(id = NULL, class = id, canvasID = id, width = 240,
  height = 240, background = "#FFDDBB", dragRotate = TRUE,
  centered = TRUE, zoom = 1, scale = 1, translate = c(x = 0, y = 0,
  z = 0), rotate = c(x = 0, y = 0, z = 0), resize = FALSE,
  onResize = NULL, onPrerender = NULL, onDragStart = NULL,
  displayType = c("canvas", "svg"))

Arguments

id

Id of the object that will be used for the illustration

class

class of the canvas. By default it's just set to ID. change

canvasID

id of the canvas where the shapes will be drawn. if you want to modify it further with CSS

width, height

width and height of the canvas in pixels

background

background color

dragRotate

enable drag rotation on the canvas. Could also be the name of an object three for which the rotation will be enabled.

centered

If TRUE, the x = 0, y = 0 will be the center of the figure, if FALSE x = 0 y= 0 will be the upper left corner

zoom

Enlarge or shring the displayed size.

scale

Enlarge or shrink item geometry. Unlike zoom, it won't effect srokes (if set to 2 objects will be larger but no thicker)

translate

Named vector. Positition the entire image within the canvas. (Effectively moves the origin point)

rotate

Named vector. Rotation applied to the entire image in radians.

resize

Allow fluid element resizing

onResize

javascript code to execute on resize, requires resize = TRUE. width and height is passed into the function.

onPrerender

javascript code to execute on pre-render. canvas context will be passed as context

onDragStart

javascript code to execute on drag start.

displayType

type of display. canvas or svg

Value

An empty zdog illustration.