iDraw.js is a simple JavaScript framework for Drawing on the web.
一个面向Web绘图的JavaScript框架
The preview of @idraw/studo
. Click here to get it.
npm i idraw
import iDraw from 'idraw';
const idraw = new iDraw(
document.querySelector('#app'),
{
width: 600,
height: 400,
contextWidth: 600,
contextHeight: 400,
devicePixelRatio: 4,
}
);
idraw.addElement({
name: "rect-1",
x: 140,
y: 120,
w: 200,
h: 100,
type: "rect",
desc: {
bgColor: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
},
});
We appreciate your help!
To contribute, please follow the steps:
git clone [email protected]:idrawjs/idraw.git
cd idraw
npm i
npm run init
npm run dev
for compiling all packagesnpm run dev ${module}
for compiling single module such asidraw
npm run serve
for starting a server- http://127.0.0.1:8080