added support for nodejs

This commit is contained in:
tamat
2018-03-08 12:58:39 +01:00
parent 1df90b5348
commit f984476c83
17 changed files with 555 additions and 628 deletions

View File

@@ -1,4 +1,5 @@
(function(){
(function(global){
var LiteGraph = global.LiteGraph;
//Converter
function Converter()
@@ -685,7 +686,7 @@ LiteGraph.registerNodeType("math/trigonometry", MathTrigonometry );
//math library for safe math operations without eval
if(window.math)
if(typeof(math) != undefined)
{
function MathFormula()
{
@@ -903,7 +904,7 @@ LiteGraph.registerNodeType("math3d/xyzw-to-vec4", Math3DXYZWToVec4 );
//if glMatrix is installed...
if(window.glMatrix)
if(global.glMatrix)
{
function Math3DQuaternion()
@@ -1038,4 +1039,4 @@ if(window.glMatrix)
} //glMatrix
})();
})(this);