lightweight block-based visual scripting
modding is almost as easy as pie as long as you know javascript
no compilers needed for blocks.js! you can edit right from its source
pretty small in file size so it wont take up all of your computer space
https://sjrnoodles.github.io/blocks.js/playground/try.html
heres how to add in blocks.js to your website
download respitory via the download button or if you wanna use node js console:
npm install https://github.com/SJRNoodles/blocks.js.git
<link href="blocks.css" rel="stylesheet" type="text/css" />
<script src="blocks.js"></script>
you can use the playground folder as a template
edit blocks.js and go to here:
// custom block functions
function log(in_){
alert(in_)
}
under this function you can add in a function now lets go to your editor html
<p id="bjs_yourdivhere">
<button onclick="addcode('YOURFUNCTION(variable);','YOURTHEME');">YOURBUTTOMTHEME</button>
</p>
remember your block's function name and goto function "innerset" in blocks.js and paste this with your block function's name and type on it as well as its div and button text as well too
document.getElementById("bjs_YOURDIVID").innerHTML = " <button onclick='addcode(" + '"YOURFUNCTION(' + evalname + ');","YOURTHEME"' + ");'>BUTTON TEXT</button>";
if done right than your block can do custom variables!
goto blocks.css and add a new div id with name "blocks_" and than the theme you chose for your block
#blocks_YOURTHEME{
background-color: #anycolor;
}
the theme will be added on what ever block contains the theme
<button onclick="addcode('yourfunction(variable);','YOURTHEME');">yourbutton</button>