All Projects → qiqiboy → Sketch

qiqiboy / Sketch

Just a HTML5 sketch-pad.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sketch

boring-avatars
Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.
Stars: ✭ 3,582 (+39700%)
Mutual labels:  sketch, javascript-library
Psd Guides
📐 JS library to draw photoshop-like guides.
Stars: ✭ 22 (+144.44%)
Mutual labels:  sketch, javascript-library
Sketch Commands
A collection of script commands for Sketch.app
Stars: ✭ 826 (+9077.78%)
Mutual labels:  sketch
Graphicsjs
A lightweight JavaScript graphics library with the intuitive API, based on SVG/VML technology.
Stars: ✭ 937 (+10311.11%)
Mutual labels:  javascript-library
Sketch Chat
A Sketch plugin to chat in Sketch Cloud files
Stars: ✭ 20 (+122.22%)
Mutual labels:  sketch
Renamer
Sketch Plugin to rename multiple selected layers or groups or artboards at once
Stars: ✭ 16 (+77.78%)
Mutual labels:  sketch
Symbol Organizer
Organize your symbols page alphabetically (including layer list) and into groupings determined by your symbol names.
Stars: ✭ 835 (+9177.78%)
Mutual labels:  sketch
Spotlight
Web's most easy to integrate lightbox gallery library. Super-lightweight, outstanding performance, no dependencies.
Stars: ✭ 799 (+8777.78%)
Mutual labels:  javascript-library
Waff Query
Lightweight DOM manager
Stars: ✭ 9 (+0%)
Mutual labels:  javascript-library
Elfi
An elegant state container for your JavaScript applications
Stars: ✭ 18 (+100%)
Mutual labels:  javascript-library
Linenormalizer
Normalize rasterization line-drawings to uniform width using deep learning.
Stars: ✭ 26 (+188.89%)
Mutual labels:  sketch
Wykop Es6
Wykop.pl API library
Stars: ✭ 17 (+88.89%)
Mutual labels:  javascript-library
Gradientify
Create beautiful, animated gradients with ease. This JS library provides you with an easy-to-use API to create and put animated gradients wherever you want on your website.
Stars: ✭ 16 (+77.78%)
Mutual labels:  javascript-library
Sprite
Sketch 3 Plugin that makes SpriteSheets for game developers to export or use
Stars: ✭ 23 (+155.56%)
Mutual labels:  sketch
Validformbuilder
ValidForm Builder. Easy and safe XHTML 1.0 strict forms with validation!
Stars: ✭ 26 (+188.89%)
Mutual labels:  javascript-library
Infinite Ajax Scroll
Turn your existing pagination into infinite scrolling pages with ease
Stars: ✭ 804 (+8833.33%)
Mutual labels:  javascript-library
Thread
Simply, lightweight and easy multi-thread JavaScript library
Stars: ✭ 17 (+88.89%)
Mutual labels:  javascript-library
Jsmlt
🏭 JavaScript Machine Learning Toolkit
Stars: ✭ 22 (+144.44%)
Mutual labels:  javascript-library
Sketch Web Viewer
View and inspect Sketch 43 files in browser
Stars: ✭ 853 (+9377.78%)
Mutual labels:  sketch
Sketch Toggle Constrain Proportions
Toggle the constrain proportions setting with your own configurable keyboard shortcut.
Stars: ✭ 9 (+0%)
Mutual labels:  sketch

Sketch

Just a HTML5 sketch-pad. 简易H5画板,支持绘画与擦除

如何使用

// @Class Sketch
// @param String|HTMLCanvasElement id canvas节点id或者该对象
// @param Object config 初始画板配置
//                      .width int 画板宽度
//                      .height int 画板高度
//                      .lineWidth int 笔画宽度
//                      .color 笔画颜色
//                      .bgcolor 背景颜色
//                      .multi 是否支持多指同时绘画

var sketch=new Sketch('canvas',{
    width:document.body.clientWidth,
    height:document.body.clientHeight,,
	bgcolor:'transparent'
    lineWidth:5,
    color:'red',
    multi:false
});

// @event 
// start 开始绘画
// move 绘画中
// end 绘画结束

sketch.on('start',function(){
	console.log('开始绘画');
});
sketch.on('move',function(){
	console.log('绘画中');
});
sketch.on('end',function(){
	console.log('绘画结束');
});

// @method
sketch.clear(); //清除画布重新开始
sketch.cancel(num); //上一步,num为取消步数,默认为1
sketch.toDataUrl(type); //转为dataUrl数据
sketch.toBlob(callback,type); //生成blob对象(不支持ie9-)

// 更改笔画宽度、颜色
sketch.lineWidth=10;
sketch.color='green';

// erase擦除
sketch.erase=true; //该属性为true时表示是擦除状态


DEMO

http://u.boy.im/sketch/demo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].