ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Canvas Snippets

by Adi ST2/ST3

Canvas Snippets makes coding with HTML5 Canvas APIs easier.

Details

Installs

  • Total 10K
  • Win 7K
  • OS X 2K
  • Linux 948
Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10
Windows 3 6 7 4 6 9 8 1 4 1 4 5 2 2 2 0 6 2 5 4 4 6 3 8 8 2 11 6 2 3 5 7 5 6 7 5 6 8 6 7 7 1 1 4 8 5
OS X 0 1 1 1 0 2 2 1 0 1 1 0 1 1 1 0 0 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 1 1 0 3 0 1 1 1 1 2 1 2 2 3
Linux 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 2 1 0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1

Readme

Source
raw.​githubusercontent.​com

Canvas Snippets is a plugin for SublimeText 2 & 3 to make coding with HTML5 Canvas API a little easier.

Installing


Download the latest version:

or

Install it via Package Control.

  • Install PackageControl
  • Find PackageControl in the Command Palette(CTRL+SHIFT+P)
  • Search for Canvas Snippets and Install it.

Using


Using these snippets are as easy as typeing the first two letters of a Method and Entering Tab.

Examples:

  • To revel the stroke() method, type st and Press Tab.
  • To insert the rotate() method, type ro and Press Tab.

And So on………

For when the Method/Property names are more than one word, type the second word's first two letters with the first two letters of the first word like in the examples below.

  • To revel the shadowColor property, type shco and Press Tab.
  • To insert the beginPath() method, type bepa and Press Tab.

And So on………

NOTE: Remember everything you type before entering the Tab must be in Lower Case.

Major Change since v1.1.0


Up until this release you would have to type context or ctx or whatever you have named the Canvas' Context and then the tabtrigger to insert a snippet but, from here on you don't have to enter the Context, it set to “ctx” as default and cannot be changed.

So, if you type fi
previously it would just be fill()
but now it will be ctx.fill()

I have also added a CheatSheet.txt which you can make use of when using these snippets.


If you have any doubts about how to use a snippet, please refer to my CheatSheet File or

If something is not working right please make an issue HERE

Your Thoughts and Contributions are always appropriated.