From 04343eda8c2f870b0da55cfdc8003c99fe1cc4de Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:53:10 -0700 Subject: Remove trailing spaces --- js/lib/rdge/materials/bump-metal-material.js | 16 ++++++------ js/lib/rdge/materials/cloud-material.js | 20 +++++++------- js/lib/rdge/materials/deform-material.js | 10 +++---- js/lib/rdge/materials/flag-material.js | 12 ++++----- js/lib/rdge/materials/flat-material.js | 8 +++--- js/lib/rdge/materials/fly-material.js | 10 +++---- js/lib/rdge/materials/julia-material.js | 10 +++---- js/lib/rdge/materials/keleidoscope-material.js | 10 +++---- js/lib/rdge/materials/linear-gradient-material.js | 32 +++++++++++------------ js/lib/rdge/materials/mandel-material.js | 10 +++---- js/lib/rdge/materials/material.js | 12 ++++----- js/lib/rdge/materials/plasma-material.js | 10 +++---- js/lib/rdge/materials/pulse-material.js | 12 ++++----- js/lib/rdge/materials/radial-gradient-material.js | 6 ++--- js/lib/rdge/materials/taper-material.js | 2 +- js/lib/rdge/materials/tunnel-material.js | 10 +++---- js/lib/rdge/materials/twist-vert-material.js | 4 +-- js/lib/rdge/materials/uber-material.js | 14 +++++----- js/lib/rdge/materials/water-material.js | 2 +- 19 files changed, 105 insertions(+), 105 deletions(-) (limited to 'js/lib/rdge/materials') diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js index bcc092f9..fa830d3d 100755 --- a/js/lib/rdge/materials/bump-metal-material.js +++ b/js/lib/rdge/materials/bump-metal-material.js @@ -100,7 +100,7 @@ var BumpMetalMaterial = function BumpMetalMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var bumpMetalMaterialDef = bumpMetalShaderDef = { @@ -109,7 +109,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = // this shader is being referenced by file 'defaultVShader':"assets/shaders/test_vshader.glsl", 'defaultFShader':"assets/shaders/test_fshader.glsl", - + // this shader is inline 'dirLightVShader': "\ uniform mat4 u_mvMatrix;\ @@ -124,7 +124,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\ gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\ vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\ - }", + }", 'dirLightFShader': "\ precision highp float;\ uniform vec4 u_light1Diff;\ @@ -144,7 +144,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = }" }, 'techniques': - { + { 'default': [ { @@ -158,7 +158,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_light0Diff' : { 'type' : 'vec4' }, 'u_colMap': { 'type' : 'tex2d' }, @@ -167,7 +167,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] @@ -183,12 +183,12 @@ var bumpMetalMaterialDef = bumpMetalShaderDef = 'a_nrm' : { 'type' : 'vec3' } }, // parameters - 'params' : + 'params' : { }, // render states - 'states' : + 'states' : { 'depthEnable' : true, "blendEnable" : true, diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js index 873059bc..47f4b647 100644 --- a/js/lib/rdge/materials/cloud-material.js +++ b/js/lib/rdge/materials/cloud-material.js @@ -225,7 +225,7 @@ var CloudMaterial = function CloudMaterial() } var technique, renderer, tex; - + // update the cloud map material var material = this._materialNode; if (material) @@ -261,7 +261,7 @@ var CloudMaterial = function CloudMaterial() { // save the current RDGE context so we can reset it later var saveContext = RDGE.globals.engine.getContext(); - this.getWorld().stop(); + this.getWorld().stop(); // build a world to do the rendering if (!GLWorld) GLWorld = require("js/lib/drawing/world").World; @@ -349,7 +349,7 @@ var CloudMaterial = function CloudMaterial() var hWidth = -z*(r-l)/(2.0*zn)*xFillNDC, hHeight = -z*(t-b)/(2.0*zn)*yFillNDC; - + //this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); var ctr = [x,y], width = 2*hWidth, height = 2*hHeight; var cloudSize = width > height ? 0.25*width : 0.25*height; @@ -377,12 +377,12 @@ var CloudMaterial = function CloudMaterial() this._adjustedZMin = zMin; this._adjustedZMax = zMax; - + // build the polygons var verts = [], normals = [ [0,0,1], [0,0,1], [0,0,1], [0,0,1] ], uvs = [ [0,0], [1,0], [1,1], [0,1] ]; - + for ( i = 0; i < 20; i++ ) { // var x = hWidth*2*(Math.random() - 0.5), @@ -496,17 +496,17 @@ var cloudMaterialDef = ] } }; - + // the cloud map material def is used to map the cloud image onto // the destination geometry var cloudMapMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/BasicTex.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -520,13 +520,13 @@ var cloudMapMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0' : { 'type' : 'tex2d' }, }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/deform-material.js b/js/lib/rdge/materials/deform-material.js index 6c5f93ad..8f88b22e 100644 --- a/js/lib/rdge/materials/deform-material.js +++ b/js/lib/rdge/materials/deform-material.js @@ -102,16 +102,16 @@ var DeformMaterial = function DeformMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var deformMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Deform.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -125,7 +125,7 @@ var deformMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0': { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, @@ -134,7 +134,7 @@ var deformMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/flag-material.js b/js/lib/rdge/materials/flag-material.js index 5cd361df..f0d9b84c 100644 --- a/js/lib/rdge/materials/flag-material.js +++ b/js/lib/rdge/materials/flag-material.js @@ -70,7 +70,7 @@ var FlagMaterial = function FlagMaterial() { this._propValues[ this._propNames[3] ] = this._speed; - // a material can be animated or not. default is not. + // a material can be animated or not. default is not. // Any material needing continuous rendering should override this method this.isAnimated = function() { return true; }; this.getShaderDef = function() { return flagMaterialDef; } @@ -106,16 +106,16 @@ var FlagMaterial = function FlagMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var flagMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Flag.vert.glsl", 'defaultFShader':"assets/shaders/Flag.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -129,7 +129,7 @@ var flagMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0': { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, @@ -139,7 +139,7 @@ var flagMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/flat-material.js b/js/lib/rdge/materials/flat-material.js index 5fa46231..b344db7c 100755 --- a/js/lib/rdge/materials/flat-material.js +++ b/js/lib/rdge/materials/flat-material.js @@ -70,7 +70,7 @@ var FlatMaterial = function FlatMaterial() // set up the material node this._materialNode = RDGE.createMaterialNode("flatMaterial_" + world.generateUniqueNodeID()); this._materialNode.setShader(this._shader); - + this.setShaderValues(); } else @@ -91,9 +91,9 @@ var FlatMaterial = function FlatMaterial() /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) -flatShaderDef = +flatShaderDef = { 'shaders': { // shader files 'defaultVShader':"assets/shaders/Basic.vert.glsl", @@ -104,7 +104,7 @@ flatShaderDef = { 'vshader' : 'defaultVShader', 'fshader' : 'defaultFShader', - + // attributes 'attributes' : { diff --git a/js/lib/rdge/materials/fly-material.js b/js/lib/rdge/materials/fly-material.js index d53532d9..13291e25 100644 --- a/js/lib/rdge/materials/fly-material.js +++ b/js/lib/rdge/materials/fly-material.js @@ -97,17 +97,17 @@ var FlyMaterial = function FlyMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var flyMaterialDef = { - 'shaders': + 'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Fly.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -121,7 +121,7 @@ var flyMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0': { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, @@ -130,7 +130,7 @@ var flyMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/julia-material.js b/js/lib/rdge/materials/julia-material.js index 718f5b44..cf9176df 100644 --- a/js/lib/rdge/materials/julia-material.js +++ b/js/lib/rdge/materials/julia-material.js @@ -90,16 +90,16 @@ var JuliaMaterial = function JuliaMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var JuliaMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Julia.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -113,7 +113,7 @@ var JuliaMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_time' : { 'type' : 'float' }, 'u_speed' : { 'type' : 'float' }, @@ -121,7 +121,7 @@ var JuliaMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/keleidoscope-material.js b/js/lib/rdge/materials/keleidoscope-material.js index 90340e00..8f235948 100644 --- a/js/lib/rdge/materials/keleidoscope-material.js +++ b/js/lib/rdge/materials/keleidoscope-material.js @@ -100,16 +100,16 @@ var KeleidoscopeMaterial = function KeleidoscopeMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var keleidoscopeMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Keleidoscope.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -123,7 +123,7 @@ var keleidoscopeMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0': { 'type' : 'tex2d' }, 'u_speed' : { 'type' : 'float' }, @@ -132,7 +132,7 @@ var keleidoscopeMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/linear-gradient-material.js b/js/lib/rdge/materials/linear-gradient-material.js index d216a2c0..da6d205c 100755 --- a/js/lib/rdge/materials/linear-gradient-material.js +++ b/js/lib/rdge/materials/linear-gradient-material.js @@ -107,15 +107,15 @@ var LinearGradientMaterial = function LinearGradientMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var linearGradientMaterialDef = -{'shaders': +{'shaders': { // shader file 'defaultVShader':"assets/shaders/linearGradient.vert.glsl", 'defaultFShader':"assets/shaders/linearGradient.frag.glsl", - + // this shader is inline 'dirLightVShader': "\ uniform mat4 u_mvMatrix;\ @@ -130,7 +130,7 @@ var linearGradientMaterialDef = vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\ gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\ vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\ - }", + }", 'dirLightFShader': "\ precision highp float;\ uniform vec4 u_light1Diff;\ @@ -150,7 +150,7 @@ var linearGradientMaterialDef = }" }, 'techniques': - { + { 'default': [ { @@ -164,16 +164,16 @@ var linearGradientMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { - 'u_color1' : { 'type' : 'vec4' }, - 'u_color2' : { 'type' : 'vec4' }, - 'u_color3' : { 'type' : 'vec4' }, + 'u_color1' : { 'type' : 'vec4' }, + 'u_color2' : { 'type' : 'vec4' }, + 'u_color3' : { 'type' : 'vec4' }, 'u_color4' : { 'type' : 'vec4' }, - 'u_colorStop1': { 'type' : 'float' }, - 'u_colorStop2': { 'type' : 'float' }, - 'u_colorStop3': { 'type' : 'float' }, - 'u_colorStop4': { 'type' : 'float' }, + 'u_colorStop1': { 'type' : 'float' }, + 'u_colorStop2': { 'type' : 'float' }, + 'u_colorStop3': { 'type' : 'float' }, + 'u_colorStop4': { 'type' : 'float' }, 'u_cos_sin_angle': { 'type' : 'vec2' }, 'u_texTransform': { 'type' : 'mat3' } //'u_colorCount': {'type' : 'int' } @@ -181,7 +181,7 @@ var linearGradientMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] @@ -197,12 +197,12 @@ var linearGradientMaterialDef = 'a_nrm' : { 'type' : 'vec3' } }, // parameters - 'params' : + 'params' : { }, // render states - 'states' : + 'states' : { 'depthEnable' : true, "blendEnable" : true, diff --git a/js/lib/rdge/materials/mandel-material.js b/js/lib/rdge/materials/mandel-material.js index 41b7793e..6cf3ce7e 100644 --- a/js/lib/rdge/materials/mandel-material.js +++ b/js/lib/rdge/materials/mandel-material.js @@ -93,16 +93,16 @@ var MandelMaterial = function MandelMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var MandelMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Mandel.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -116,7 +116,7 @@ var MandelMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_time' : { 'type' : 'float' }, 'u_speed' : { 'type' : 'float' }, @@ -124,7 +124,7 @@ var MandelMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js index c273611b..7e1f2ec5 100755 --- a/js/lib/rdge/materials/material.js +++ b/js/lib/rdge/materials/material.js @@ -103,7 +103,7 @@ var Material = function GLMaterial( world ) { return this._materialNode; }; - // a material can be animated or not. default is not. + // a material can be animated or not. default is not. // Any material needing continuous rendering should override this method this.isAnimated = function() { return false; @@ -187,7 +187,7 @@ var Material = function GLMaterial( world ) { // get the current values; var propNames = [], propValues = [], propTypes = [], propLabels = []; this.getAllProperties(propNames, propValues, propTypes, propLabels); - + // allocate a new material var MaterialLibrary = require("js/models/materials-model").MaterialsModel; var newMat = MaterialLibrary.createMaterialByShaderName( this.getShaderName() ); @@ -221,7 +221,7 @@ var Material = function GLMaterial( world ) { case "vector2d": rtnVal = ((valType == "object") && (value.length >= 2)); break; - + case "vector3d": rtnVal = ((valType == "object") && (value.length >= 3)); break; @@ -243,7 +243,7 @@ var Material = function GLMaterial( world ) { catch(e) { console.log( "setting invalid material property: " + prop + ", value: " + value ); } - + // if (!rtnVal && (prop != 'color')) { // console.log( "invalid material property: " + prop + " : " + value ); // } @@ -360,7 +360,7 @@ var Material = function GLMaterial( world ) { return jObj; }; - + this.importJSON = function (jObj) { if (this.getShaderName() != jObj.material) throw new Error("ill-formed material"); this.setName(jObj.name); @@ -382,7 +382,7 @@ var Material = function GLMaterial( world ) { }; /////////////////////////////////////////////////////////////////////// - + /////////////////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////////////////// diff --git a/js/lib/rdge/materials/plasma-material.js b/js/lib/rdge/materials/plasma-material.js index 8e51a9b0..cb8c881f 100644 --- a/js/lib/rdge/materials/plasma-material.js +++ b/js/lib/rdge/materials/plasma-material.js @@ -108,16 +108,16 @@ var PlasmaMaterial = function PlasmaMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var plasmaShaderDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/plasma.vert.glsl", 'defaultFShader':"assets/shaders/plasma.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -131,7 +131,7 @@ var plasmaShaderDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_time' : { 'type' : 'float' }, 'u_speed': { 'type' : 'float' }, @@ -141,7 +141,7 @@ var plasmaShaderDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 4356c911..2ad174a3 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -42,7 +42,7 @@ var PulseMaterial = function PulseMaterial() // initialize the inherited members this.inheritedFrom = Material; this.inheritedFrom(); - + /////////////////////////////////////////////////////////////////////// // Instance variables /////////////////////////////////////////////////////////////////////// @@ -160,16 +160,16 @@ var PulseMaterial = function PulseMaterial() /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var pulseMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Pulse.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -183,7 +183,7 @@ var pulseMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0' : { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, @@ -194,7 +194,7 @@ var pulseMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/radial-gradient-material.js b/js/lib/rdge/materials/radial-gradient-material.js index f7e28083..ab7cf484 100755 --- a/js/lib/rdge/materials/radial-gradient-material.js +++ b/js/lib/rdge/materials/radial-gradient-material.js @@ -54,7 +54,7 @@ var RadialGradientMaterial = function RadialGradientMaterial() { /////////////////////////////////////////////////////////////////////// // Property Accessors /////////////////////////////////////////////////////////////////////// - + this.isAnimated = function () { return false; }; this.getShaderDef = function() { return radialGradientMaterialDef; }; @@ -126,9 +126,9 @@ var RadialGradientMaterial = function RadialGradientMaterial() { 0.0, yScale, 0.0, xCtr*(1-xScale), yCtr*(1 - yScale), 1.0 ]; - + if (this._shader && this._shader['default']) - this._shader['default'].u_texTransform.set( this._textureTransform ); + this._shader['default'].u_texTransform.set( this._textureTransform ); } }; diff --git a/js/lib/rdge/materials/taper-material.js b/js/lib/rdge/materials/taper-material.js index d88b1e9e..988381f1 100644 --- a/js/lib/rdge/materials/taper-material.js +++ b/js/lib/rdge/materials/taper-material.js @@ -76,7 +76,7 @@ var TaperMaterial = function TaperMaterial() // set up the material node this._materialNode = RDGE.createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID()); this._materialNode.setShader(this._shader); - + this._time = 0; if (this._shader && this._shader['default']) { this._shader['default'].u_time.set([this._time]); diff --git a/js/lib/rdge/materials/tunnel-material.js b/js/lib/rdge/materials/tunnel-material.js index fd2e28d5..8a80cb85 100644 --- a/js/lib/rdge/materials/tunnel-material.js +++ b/js/lib/rdge/materials/tunnel-material.js @@ -94,16 +94,16 @@ var TunnelMaterial = function TunnelMaterial() { /////////////////////////////////////////////////////////////////////////////////////// // RDGE shader - + // shader spec (can also be loaded from a .JSON file, or constructed at runtime) var tunnelMaterialDef = -{'shaders': +{'shaders': { 'defaultVShader':"assets/shaders/Basic.vert.glsl", 'defaultFShader':"assets/shaders/Tunnel.frag.glsl" }, 'techniques': - { + { 'default': [ { @@ -117,7 +117,7 @@ var tunnelMaterialDef = 'texcoord' : { 'type' : 'vec2' } }, // parameters - 'params' : + 'params' : { 'u_tex0': { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, @@ -126,7 +126,7 @@ var tunnelMaterialDef = }, // render states - 'states' : + 'states' : { 'depthEnable' : true, 'offset':[1.0, 0.1] diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js index 6ab2662e..1c04a90c 100644 --- a/js/lib/rdge/materials/twist-vert-material.js +++ b/js/lib/rdge/materials/twist-vert-material.js @@ -61,7 +61,7 @@ var TwistVertMaterial = function TwistVertMaterial() this.isAnimated = function () { return true; }; this.getShaderDef = function() { return twistVertShaderDef; }; this.getTechniqueName = function() { return 'twistMe' }; - + this.hasVertexDeformation = function () { return this._hasVertexDeformation; }; this._hasVertexDeformation = true; this._vertexDeformationTolerance = 0.02; // should be a property @@ -110,7 +110,7 @@ var TwistVertMaterial = function TwistVertMaterial() if (this._shader && this._shader.twistMe) { var technique = this._shader.twistMe; - + var angle = this._angle; angle += this._deltaTime * this._propValues["speed"]; if (angle > this._propValues["u_twistAmount"]) diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 8bd44e60..34aa06bf 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js @@ -146,9 +146,9 @@ var UberMaterial = function UberMaterial() { 'spotOuterCutoff': 15.0, // fragments outside the outer cutoff 'cone' are unlit. 'position': [8.0, 2.0, 8.0], // light position; ignored for directional lights 'direction': [-1.0, -1.0, -1.0], // light direction; ignored for point lights - 'attenuation': [1.0, 0.025, 0.00125], // light attenuation; constant, linear, quadratic + 'attenuation': [1.0, 0.025, 0.00125], // light attenuation; constant, linear, quadratic 'diffuseColor': [1.0, 0.5, 0.5, 1.0], // diffuse light color - 'specularColor': [1.0, 1.0, 1.0, 1.0] // specular light color + 'specularColor': [1.0, 1.0, 1.0, 1.0] // specular light color }, { 'type': 'point', @@ -184,7 +184,7 @@ var UberMaterial = function UberMaterial() { this._ubershaderCaps = { - // ubershader material properties. + // ubershader material properties. 'material': { 'ambientColor': this._ambientColor, // material ambient color 'diffuseColor': this._diffuseColor, // material diffuse color @@ -192,7 +192,7 @@ var UberMaterial = function UberMaterial() { 'specularPower': this._specularPower // material specular power (shininess) }, - // ubershader supports up to four lights. + // ubershader supports up to four lights. 'lighting': { 'light0': this._lights[0], 'light1': this._lights[1], @@ -386,7 +386,7 @@ var UberMaterial = function UberMaterial() { // get the current values; var propNames = [], propValues = [], propTypes = [], propLabels = []; this.getAllProperties(propNames, propValues, propTypes, propLabels); - + // allocate a new material var newMat = new UberMaterial(); newMat._useDiffuseMap = this._useDiffuseMap; @@ -434,7 +434,7 @@ var UberMaterial = function UberMaterial() { } } } - + this.isAnimated = function() { var anim = (this._diffuseTexture && this._diffuseTexture.isAnimated()); @@ -687,7 +687,7 @@ var UberMaterial = function UberMaterial() { var vshader = preproc + uberVShader; var fshader = preproc + uberFShader; - // build output jshader + // build output jshader var uberJShader = new RDGE.jshader(); uberJShader.def = { 'shaders': { diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js index a0056452..0b431046 100644 --- a/js/lib/rdge/materials/water-material.js +++ b/js/lib/rdge/materials/water-material.js @@ -181,7 +181,7 @@ var ParisMaterial = function ParisMaterial() this._materialNode.setShader(this._shader); this._time = 0; - if (this._shader && this._shader['default']) + if (this._shader && this._shader['default']) this._shader['default'].u_time.set([this._time]); // set the shader values in the shader -- cgit v1.2.3