From 31e924e1b8b8da8342b3ff2341c8284915486c0b Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 22 Mar 2012 15:32:19 -0700 Subject: Added Paris and Raiders materials --- js/io/system/ninjalibrary.json | 2 +- js/lib/geom/geom-obj.js | 2 + js/lib/rdge/materials/radial-blur-material.js | 2 - js/lib/rdge/materials/water-material.js | 84 ++++++++++++++++++++++++++- js/models/materials-model.js | 5 ++ 5 files changed, 89 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index 00ee7ed2..a863a135 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,6 @@ { "libraries": [ {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"}, - {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.1.0"} + {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.1.2"} ] } \ No newline at end of file diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index 75b7808b..dbef4859 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js @@ -301,6 +301,7 @@ var GeomObj = function GLGeomObj() { case "plasma": case "deform": case "water": + case "paris": case "tunnel": case "reliefTunnel": case "squareTunnel": @@ -373,6 +374,7 @@ var GeomObj = function GLGeomObj() { case "plasma": case "deform": case "water": + case "paris": case "tunnel": case "reliefTunnel": case "squareTunnel": diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index 91eebcff..f4a4baa2 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js @@ -275,7 +275,6 @@ var radialBlurMaterialDef = }; -/* var RaidersMaterial = function RaidersMaterial() { // initialize the inherited members @@ -295,7 +294,6 @@ if (typeof exports === "object") { exports.RaidersMaterial = RaidersMaterial; } -*/ RadialBlurMaterial.prototype = new Material(); diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js index 565055a1..b7413f55 100644 --- a/js/lib/rdge/materials/water-material.js +++ b/js/lib/rdge/materials/water-material.js @@ -117,7 +117,6 @@ var waterMaterialDef = } }; -/* var ParisMaterial = function ParisMaterial() { // initialize the inherited members @@ -125,19 +124,98 @@ var ParisMaterial = function ParisMaterial() this.inheritedFrom(); this._name = "ParisMaterial"; - this._shaderName = "water"; + this._shaderName = "paris"; this._texMap = 'assets/images/paris.png'; this._propValues[ this._propNames[0] ] = this._texMap.slice(0); this._diffuseColor = [0.5, 0.5, 0.5, 0.5]; this._propValues[ this._propNames[1] ] = this._diffuseColor.slice(); + + // duplcate method requirde + this.dup = function( world ) { + // allocate a new uber material + var newMat = new ParisMaterial(); + + // copy over the current values; + var propNames = [], propValues = [], propTypes = [], propLabels = []; + this.getAllProperties( propNames, propValues, propTypes, propLabels); + var n = propNames.length; + for (var i=0; i