Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@koenbok
Created December 28, 2016 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koenbok/f97c7ffb46a54b69ca3df1d84d49e359 to your computer and use it in GitHub Desktop.
Save koenbok/f97c7ffb46a54b69ca3df1d84d49e359 to your computer and use it in GitHub Desktop.
# Don't forget to add Frabric to the index.html file
# https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.2/fabric.js
layer = new CanvasLayer
# Create a new Fabric canvas instance
canvas = new fabric.Canvas(layer.canvas)
rect = new fabric.Circle
radius: 100
fill: "#0055DD"
stroke: "#00AAFF"
strokeWidth: 20
canvas.add(rect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment