1.0.0 • Published 5 years ago
@vatsa/simple.js v1.0.0
Simple.js v0.1.7
A js library to make things simple
you can use it to teach people like children, as it is designed to lower unfamiliar symbols and words
to see full features list click Here
to see changelog click Here
to use include these CDNs
https://code.jquery.com/jquery-2.1.0.js - jquery 2.1.0
https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js - lodash 4.17.20 (for repeat only)
Examples
Without Simple.js
ctx.lineWidth = 4;
ctx.strokeStyle = "Red";
ctx.beginPath();
ctx.arc(100, 100, 10, 0, Math.PI * 2, false);
ctx.stroke();
ctx.strokeStyle = "Orange";
ctx.beginPath();
ctx.arc(100, 100, 20, 0, Math.PI * 2, false);
ctx.stroke();
ctx.strokeStyle = "Yellow";
ctx.beginPath();
ctx.arc(100, 100, 30, 0, Math.PI * 2, false);
ctx.stroke();
ctx.strokeStyle = "Green";
ctx.beginPath();
ctx.arc(100, 100, 40, 0, Math.PI * 2, false);
ctx.stroke();
ctx.strokeStyle = "Blue";
ctx.beginPath();
ctx.arc(100, 100, 50, 0, Math.PI * 2, false);
ctx.stroke();
ctx.strokeStyle = "Purple";
ctx.beginPath();
ctx.arc(100, 100, 60, 0, Math.PI * 2, false);
ctx.stroke();
With Simple.js
canvasBeginPath("red", 4);
canvasArc(200, 200, 10, 0, 360, false, "Red", 4);
canvasArc(200, 200, 20, 0, 360, false, "Orange", 4);
canvasArc(200, 200, 30, 0, 360, false, "Yellow", 4);
canvasArc(200, 200, 40, 0, 360, false, "Green", 4);
canvasArc(200, 200, 50, 0, 360, false, "Blue", 4);
canvasArc(200, 200, 60, 0, 360, false, "Purple", 4);
canvasClosePath();
You can see the obvious difference! Use this today. CDN
<script src = "https://vatsadev.github.io/Simple.js/main.js"></script>
download file Click here to go to file
<script src = "path/to/main.js"></script>
// use like this
Npm
npm install "@vatsa/simple.js"
//install
var simple = require("@vatsa/simple.js")
//import in