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

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.