aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/runtime/RuntimeGeomObj.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/runtime/RuntimeGeomObj.js')
-rw-r--r--js/helper-classes/RDGE/runtime/RuntimeGeomObj.js27
1 files changed, 22 insertions, 5 deletions
diff --git a/js/helper-classes/RDGE/runtime/RuntimeGeomObj.js b/js/helper-classes/RDGE/runtime/RuntimeGeomObj.js
index da941b56..2539abc1 100644
--- a/js/helper-classes/RDGE/runtime/RuntimeGeomObj.js
+++ b/js/helper-classes/RDGE/runtime/RuntimeGeomObj.js
@@ -37,7 +37,10 @@ function RuntimeGeomObj()
37 // Property accessors 37 // Property accessors
38 /////////////////////////////////////////////////////////////////////// 38 ///////////////////////////////////////////////////////////////////////
39 39
40 this.geomType = function() { return this.GEOM_TYPE_UNDEFINED; } 40 this.geomType = function() { return this.GEOM_TYPE_UNDEFINED; }
41
42 this.setWorld = function(w) { this._world = w; }
43 this.getWorld = function() { return this._world; }
41 44
42 /////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////
43 // Methods 46 // Methods
@@ -76,8 +79,22 @@ function RuntimeGeomObj()
76 var materialType = getPropertyFromString( "material: ", importStr ); 79 var materialType = getPropertyFromString( "material: ", importStr );
77 switch (materialType) 80 switch (materialType)
78 { 81 {
79 case "flat": mat = new RuntimeFlatMaterial(); break; 82 case "flat": mat = new RuntimeFlatMaterial(); break;
80 case "pulse": mat = new RuntimePulseMaterial(); break; 83
84 case "radialGradient":
85 case "linearGradient": mat = new RuntimeLinearGradientMaterial(); break;
86
87 case "water":
88 case "tunnel":
89 case "reliefTunnel":
90 case "squareTunnel":
91 case "twist":
92 case "fly":
93 case "julia":
94 case "mandel":
95 case "star":
96 case "zinvert":
97 case "pulse": mat = new RuntimePulseMaterial(); break;
81 98
82 default: 99 default:
83 console.log( "material type: " + materialType + " is not supported" ); 100 console.log( "material type: " + materialType + " is not supported" );
@@ -146,8 +163,8 @@ function RuntimeRectangle()
146 { 163 {
147 // various declarations 164 // various declarations
148 var pt, rad, ctr, startPt, bPts; 165 var pt, rad, ctr, startPt, bPts;
149 var width = Math.round(this.getWidth()), 166 var width = Math.round(this._width),
150 height = Math.round(this.getHeight()); 167 height = Math.round(this._height);
151 168
152 pt = [inset, inset]; // top left corner 169 pt = [inset, inset]; // top left corner
153 170