aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js6
-rwxr-xr-xjs/helper-classes/RDGE/GLCircle.js10
-rwxr-xr-xjs/helper-classes/RDGE/GLLine.js594
-rwxr-xr-xjs/helper-classes/RDGE/GLRectangle.js117
-rwxr-xr-xjs/helper-classes/RDGE/GLWorld.js45
-rw-r--r--js/helper-classes/RDGE/Materials/DeformMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/FlyMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/JuliaMaterial.js150
-rw-r--r--js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js149
-rw-r--r--js/helper-classes/RDGE/Materials/MandelMaterial.js151
-rw-r--r--js/helper-classes/RDGE/Materials/PlasmaMaterial.js134
-rw-r--r--js/helper-classes/RDGE/Materials/PulseMaterial.js263
-rw-r--r--js/helper-classes/RDGE/Materials/RadialBlurMaterial.js257
-rw-r--r--js/helper-classes/RDGE/Materials/ReliefTunnelMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/SquareTunnelMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/StarMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/TaperMaterial.js223
-rw-r--r--js/helper-classes/RDGE/Materials/TunnelMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/TwistMaterial.js149
-rw-r--r--js/helper-classes/RDGE/Materials/TwistVertMaterial.js248
-rw-r--r--js/helper-classes/RDGE/Materials/WaterMaterial.js133
-rw-r--r--js/helper-classes/RDGE/Materials/ZInvertMaterial.js133
-rwxr-xr-xjs/helper-classes/RDGE/MaterialsLibrary.js59
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/precompiled.js10
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/runtime.js14
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraphNodes.js8
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.bat4
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.sh3
-rw-r--r--js/helper-classes/RDGE/src/tools/compiler.jarbin0 -> 4927265 bytes
-rw-r--r--js/helper-classes/RDGE/src/tools/rdge-compiled.js454
30 files changed, 3674 insertions, 438 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 45a178ce..94202dc5 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -521,7 +521,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
521 521
522 if (!elt.elementModel) 522 if (!elt.elementModel)
523 { 523 {
524 NJUtils.makeElementModel2(elt); 524 NJUtils.makeModelFromElement(elt);
525 } 525 }
526 elt.elementModel.isIn2DSnapCache = true; 526 elt.elementModel.isIn2DSnapCache = true;
527 } 527 }
@@ -588,7 +588,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
588 588
589 if (!elt.elementModel) 589 if (!elt.elementModel)
590 { 590 {
591 NJUtils.makeElementModel2(elt); 591 NJUtils.makeModelFromElement(elt);
592 } 592 }
593 elt.elementModel.isIn2DSnapCache = true; 593 elt.elementModel.isIn2DSnapCache = true;
594 } 594 }
@@ -1087,7 +1087,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1087 1087
1088 // we need to check the orientation of the bounds 1088 // we need to check the orientation of the bounds
1089 var nrm = MathUtils.getNormalFromBounds3D( bounds3D ); 1089 var nrm = MathUtils.getNormalFromBounds3D( bounds3D );
1090 if (MathUtils.fpSign(nrm[2]) == 0) return null; 1090 if (MathUtils.fpSign(nrm[2]) == 0) return null;
1091 var zNrm = nrm[2]; 1091 var zNrm = nrm[2];
1092 var dist; 1092 var dist;
1093 1093
diff --git a/js/helper-classes/RDGE/GLCircle.js b/js/helper-classes/RDGE/GLCircle.js
index 08057778..5b32547e 100755
--- a/js/helper-classes/RDGE/GLCircle.js
+++ b/js/helper-classes/RDGE/GLCircle.js
@@ -400,7 +400,10 @@ function GLCircle()
400 ctx.lineWidth = 0; 400 ctx.lineWidth = 0;
401 ctx.fillStyle = "#990000"; 401 ctx.fillStyle = "#990000";
402 if (this._fillColor) 402 if (this._fillColor)
403 ctx.fillStyle = MathUtils.colorToHex( this._fillColor ); 403 {
404 var c = "rgba(" + 255*this._fillColor[0] + "," + 255*this._fillColor[1] + "," + 255*this._fillColor[2] + "," + this._fillColor[3] + ")";
405 ctx.fillStyle = c;
406 }
404 407
405 // draw the fill 408 // draw the fill
406 ctx.beginPath(); 409 ctx.beginPath();
@@ -460,7 +463,10 @@ function GLCircle()
460 ctx.lineWidth = lineWidth; 463 ctx.lineWidth = lineWidth;
461 ctx.strokeStyle = "#0000ff"; 464 ctx.strokeStyle = "#0000ff";
462 if (this._strokeColor) 465 if (this._strokeColor)
463 ctx.strokeStyle = MathUtils.colorToHex( this._strokeColor ); 466 {
467 var c = "rgba(" + 255*this._strokeColor[0] + "," + 255*this._strokeColor[1] + "," + 255*this._strokeColor[2] + "," + this._strokeColor[3] + ")";
468 ctx.strokeStyle = c;
469 }
464 470
465 // draw the stroke 471 // draw the stroke
466 p = MathUtils.transformPoint( bezPts[0], mat ); 472 p = MathUtils.transformPoint( bezPts[0], mat );
diff --git a/js/helper-classes/RDGE/GLLine.js b/js/helper-classes/RDGE/GLLine.js
index 5ec51230..0d815145 100755
--- a/js/helper-classes/RDGE/GLLine.js
+++ b/js/helper-classes/RDGE/GLLine.js
@@ -11,74 +11,74 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
11/////////////////////////////////////////////////////////////////////// 11///////////////////////////////////////////////////////////////////////
12function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj) 12function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj)
13{ 13{
14 /////////////////////////////////////////////////////////////////////// 14 ///////////////////////////////////////////////////////////////////////
15 // Instance variables 15 // Instance variables
16 /////////////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////
17 this._width = 2.0; 17 this._width = 2.0;
18 this._height = 2.0; 18 this._height = 2.0;
19 this._xOffset = 0; 19 this._xOffset = 0;
20 this._yOffset = 0; 20 this._yOffset = 0;
21 21
22 // If line doesn't fit in canvas world, we had to grow the canvas by this much on either side 22 // If line doesn't fit in canvas world, we had to grow the canvas by this much on either side
23 this._xAdj = 0; 23 this._xAdj = 0;
24 this._yAdj = 0; 24 this._yAdj = 0;
25 25
26 this._slope = 0; 26 this._slope = 0;
27 27
28 this._strokeWidth = 0.25; 28 this._strokeWidth = 0.25;
29 29
30 this._strokeStyle = "Solid"; 30 this._strokeStyle = "Solid";
31 this._scaleX = 1.0; 31 this._scaleX = 1.0;
32 this._scaleY = 1.0; 32 this._scaleY = 1.0;
33 33
34 if (arguments.length > 0) 34 if (arguments.length > 0)
35 { 35 {
36 this._width = width; 36 this._width = width;
37 this._height = height; 37 this._height = height;
38 this._xOffset = xOffset; 38 this._xOffset = xOffset;
39 this._yOffset = yOffset; 39 this._yOffset = yOffset;
40 40
41 this._xAdj = xAdj; 41 this._xAdj = xAdj;
42 this._yAdj = yAdj; 42 this._yAdj = yAdj;
43 43
44 this._slope = slope; 44 this._slope = slope;
45 this._strokeWidth = strokeSize; 45 this._strokeWidth = strokeSize;
46 this._strokeColor = strokeColor; 46 this._strokeColor = strokeColor;
47 47
48 this._strokeStyle = strokeStyle; 48 this._strokeStyle = strokeStyle;
49 this._scaleX = (world.getViewportWidth())/(world.getViewportHeight()); 49 this._scaleX = (world.getViewportWidth())/(world.getViewportHeight());
50 } 50 }
51 51
52 this._strokeVerticesLen = 0; 52 this._strokeVerticesLen = 0;
53 53
54 this.m_world = world; 54 this.m_world = world;
55 55
56 this._materialAmbient = [0.2, 0.2, 0.2, 1.0]; 56 this._materialAmbient = [0.2, 0.2, 0.2, 1.0];
57 this._materialDiffuse = [0.4, 0.4, 0.4, 1.0]; 57 this._materialDiffuse = [0.4, 0.4, 0.4, 1.0];
58 this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; 58 this._materialSpecular = [0.4, 0.4, 0.4, 1.0];
59 59
60 // initialize the inherited members 60 // initialize the inherited members
61 this.inheritedFrom = GLGeomObj; 61 this.inheritedFrom = GLGeomObj;
62 this.inheritedFrom(); 62 this.inheritedFrom();
63 63
64 if(strokeMaterial) 64 if(strokeMaterial)
65 { 65 {
66 this._strokeMaterial = strokeMaterial; 66 this._strokeMaterial = strokeMaterial;
67 } 67 }
68 68
69 /////////////////////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////////////////////
70 // Property Accessors 70 // Property Accessors
71 /////////////////////////////////////////////////////////////////////// 71 ///////////////////////////////////////////////////////////////////////
72 this.getStrokeWidth = function() { return this._strokeWidth; } 72 this.getStrokeWidth = function() { return this._strokeWidth; }
73 this.setStrokeWidth = function(w) { this._strokeWidth = w; } 73 this.setStrokeWidth = function(w) { this._strokeWidth = w; }