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 11K
  • Win 8K
  • OS X 2K
  • Linux 1K
Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7
Windows 0 2 4 1 0 3 1 1 3 0 1 3 1 4 5 1 6 2 3 3 2 1 4 3 2 4 2 4 1 2 2 5 3 3 3 5 2 2 2 5 2 0 2 2 1 4
OS X 0 0 0 0 1 0 0 0 0 1 0 2 0 0 1 0 0 0 1 0 1 0 0 1 2 0 0 2 1 0 0 2 1 1 0 1 0 0 0 0 1 0 0 1 0 0
Linux 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 2 1 0 0 1 1 0 0 0 2 6 0 2 0 0 1 2 0 0 0 0 0 2 0 1 1 1 0 0 0 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.