aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/geom-obj.js67
1 files changed, 24 insertions, 43 deletions
diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js
index a4813326..63f71955 100755
--- a/js/lib/geom/geom-obj.js
+++ b/js/lib/geom/geom-obj.js
@@ -5,28 +5,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var MaterialsModel = require("js/models/materials-model").MaterialsModel; 7var MaterialsModel = require("js/models/materials-model").MaterialsModel;
8/*
9var FlatMaterial = require("js/lib/rdge/materials/flat-material").FlatMaterial;
10var LinearGradientMaterial = require("js/lib/rdge/materials/linear-gradient-material").LinearGradientMaterial;
11var RadialGradientMaterial = require("js/lib/rdge/materials/radial-gradient-material").RadialGradientMaterial;
12var BumpMetalMaterial = require("js/lib/rdge/materials/bump-metal-material").BumpMetalMaterial;
13var UberMaterial = require("js/lib/rdge/materials/uber-material").UberMaterial;
14var RadialBlurMaterial = require("js/lib/rdge/materials/radial-blur-material").RadialBlurMaterial;
15var PlasmaMaterial = require("js/lib/rdge/materials/plasma-material").PlasmaMaterial;
16var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial;
17var TunnelMaterial = require("js/lib/rdge/materials/tunnel-material").TunnelMaterial;
18var ReliefTunnelMaterial = require("js/lib/rdge/materials/relief-tunnel-material").ReliefTunnelMaterial;
19var SquareTunnelMaterial = require("js/lib/rdge/materials/square-tunnel-material").SquareTunnelMaterial;
20var FlyMaterial = require("js/lib/rdge/materials/fly-material").FlyMaterial;
21var WaterMaterial = require("js/lib/rdge/materials/water-material").WaterMaterial;
22var ZInvertMaterial = require("js/lib/rdge/materials/z-invert-material").ZInvertMaterial;
23var DeformMaterial = require("js/lib/rdge/materials/deform-material").DeformMaterial;
24var StarMaterial = require("js/lib/rdge/materials/star-material").StarMaterial;
25var TwistMaterial = require("js/lib/rdge/materials/twist-material").TwistMaterial;
26var JuliaMaterial = require("js/lib/rdge/materials/julia-material").JuliaMaterial;
27var KeleidoscopeMaterial = require("js/lib/rdge/materials/keleidoscope-material").KeleidoscopeMaterial;
28var MandelMaterial = require("js/lib/rdge/materials/mandel-material").MandelMaterial;
29*/
30 8
31/////////////////////////////////////////////////////////////////////// 9///////////////////////////////////////////////////////////////////////
32// Class GLGeomObj 10// Class GLGeomObj
@@ -335,7 +313,7 @@ var GeomObj = function GLGeomObj() {
335 break; 313 break;
336 314
337 default: 315 default:
338 console.log( "material type: " + materialType + " is not supported" ); 316 console.log( "material type: " + shaderName + " is not supported" );
339 break; 317 break;
340 } 318 }
341 319
@@ -375,26 +353,29 @@ var GeomObj = function GLGeomObj() {
375 var materialType = this.getPropertyFromString( "material: ", importStr ); 353 var materialType = this.getPropertyFromString( "material: ", importStr );
376 switch (materialType) 354 switch (materialType)
377 { 355 {
378 case "flat": mat = new FlatMaterial(); break; 356 case "flat":
379 case "radialGradient": mat = new RadialGradientMaterial(); break; 357 case "radialGradient":
380 case "linearGradient": mat = new LinearGradientMaterial(); break; 358 case "linearGradient":
381 case "bumpMetal": mat = new BumpMetalMaterial(); break; 359 case "bumpMetal":
382 case "uber": mat = new UberMaterial(); break; 360 case "uber":
383 case "plasma": mat = new PlasmaMaterial(); break; 361 case "plasma":
384 case "deform": mat = new DeformMaterial(); break; 362 case "deform":
385 case "water": mat = new WaterMaterial(); break; 363 case "water":
386 case "tunnel": mat = new TunnelMaterial(); break; 364 case "tunnel":
387 case "reliefTunnel": mat = new ReliefTunnelMaterial(); break; 365 case "reliefTunnel":
388 case "squareTunnel": mat = new SquareTunnelMaterial(); break; 366 case "squareTunnel":
389 case "twist": mat = new TwiseMaterial(); break; 367 case "twist":
390 case "fly": mat = new FlyMaterial(); break; 368 case "fly":
391 case "julia": mat = new JuliaMaterial(); break; 369 case "julia":
392 case "mandel": mat = new MandelMaterial(); break; 370 case "mandel":
393 case "star": mat = new StarMaterial(); break; 371 case "star":
394 case "zinvert": mat = new ZInvertMaterial(); break; 372 case "zinvert":
395 case "keleidoscope": mat = new KeleidoscopeMaterial(); break; 373 case "keleidoscope":
396 case "radialBlur": mat = new RadialBlurMaterial(); break; 374 case "radialBlur":
397 case "pulse": mat = new PulseMaterial(); break; 375 case "pulse":
376 mat = MaterialsModel.getMaterialByShader( materialType );
377 if (mat) mat = mat.dup();
378 break;
398 379
399 default: 380 default:
400 console.log( "material type: " + materialType + " is not supported" ); 381 console.log( "material type: " + materialType + " is not supported" );