Canvas Snippets is a plugin for SublimeText 2 & 3 to make coding with HTML5 Canvas API a little easier.
Download the latest version:
Install it via Package Control.
CTRL+SHIFT+P
)Canvas Snippets
and Install it.Using these snippets are as easy as typeing the first two letters of a Method and Entering Tab
.
Examples:
stroke()
method, type st
and Press Tab
.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.
shadowColor
property, type shco
and Press Tab
.beginPath()
method, type bepa
and Press Tab
.And So on.........
NOTE: Remember everything you type before entering the Tab
must be in Lower Case.
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。