aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge
diff options
context:
space:
mode:
authorKris Kowal2012-07-06 11:53:10 -0700
committerKris Kowal2012-07-06 15:01:48 -0700
commit04343eda8c2f870b0da55cfdc8003c99fe1cc4de (patch)
tree0a6048889b65bb16ff58822e55bc1346e9eb07bd /js/lib/rdge
parent648ee61ae84216d0236e0dbc211addc13b2cfa3a (diff)
downloadninja-04343eda8c2f870b0da55cfdc8003c99fe1cc4de.tar.gz
Remove trailing spaces
Diffstat (limited to 'js/lib/rdge')
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js16
-rw-r--r--js/lib/rdge/materials/cloud-material.js20
-rw-r--r--js/lib/rdge/materials/deform-material.js10
-rw-r--r--js/lib/rdge/materials/flag-material.js12
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js8
-rw-r--r--js/lib/rdge/materials/fly-material.js10
-rw-r--r--js/lib/rdge/materials/julia-material.js10
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js10
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js32
-rw-r--r--js/lib/rdge/materials/mandel-material.js10
-rwxr-xr-xjs/lib/rdge/materials/material.js12
-rw-r--r--js/lib/rdge/materials/plasma-material.js10
-rw-r--r--js/lib/rdge/materials/pulse-material.js12
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js6
-rw-r--r--js/lib/rdge/materials/taper-material.js2
-rw-r--r--js/lib/rdge/materials/tunnel-material.js10
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js4
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js14
-rw-r--r--js/lib/rdge/materials/water-material.js2
-rw-r--r--js/lib/rdge/texture.js18
20 files changed, 114 insertions, 114 deletions
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() {
100 100
101/////////////////////////////////////////////////////////////////////////////////////// 101///////////////////////////////////////////////////////////////////////////////////////
102// RDGE shader 102// RDGE shader
103 103
104// shader spec (can also be loaded from a .JSON file, or constructed at runtime) 104// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
105var bumpMetalMaterialDef = bumpMetalShaderDef = 105var bumpMetalMaterialDef = bumpMetalShaderDef =
106{ 106{
@@ -109,7 +109,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
109 // this shader is being referenced by file 109 // this shader is being referenced by file
110 'defaultVShader':"assets/shaders/test_vshader.glsl", 110 'defaultVShader':"assets/shaders/test_vshader.glsl",
111 'defaultFShader':"assets/shaders/test_fshader.glsl", 111 'defaultFShader':"assets/shaders/test_fshader.glsl",
112 112
113 // this shader is inline 113 // this shader is inline
114 'dirLightVShader': "\ 114 'dirLightVShader': "\
115 uniform mat4 u_mvMatrix;\ 115 uniform mat4 u_mvMatrix;\
@@ -124,7 +124,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
124 vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\ 124 vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\
125 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\ 125 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\
126 vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\ 126 vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\
127 }", 127 }",
128 'dirLightFShader': "\ 128 'dirLightFShader': "\
129 precision highp float;\ 129 precision highp float;\
130 uniform vec4 u_light1Diff;\ 130 uniform vec4 u_light1Diff;\
@@ -144,7 +144,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
144 }" 144 }"
145 }, 145 },
146 'techniques': 146 'techniques':
147 { 147 {
148 'default': 148 'default':
149 [ 149 [
150 { 150 {
@@ -158,7 +158,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
158 'texcoord' : { 'type' : 'vec2' } 158 'texcoord' : { 'type' : 'vec2' }
159 }, 159 },
160 // parameters 160 // parameters
161 'params' : 161 'params' :
162 { 162 {
163 'u_light0Diff' : { 'type' : 'vec4' }, 163 'u_light0Diff' : { 'type' : 'vec4' },
164 'u_colMap': { 'type' : 'tex2d' }, 164 'u_colMap': { 'type' : 'tex2d' },
@@ -167,7 +167,7 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
167 }, 167 },
168 168
169 // render states 169 // render states
170 'states' : 170 'states' :
171 { 171 {
172 'depthEnable' : true, 172 'depthEnable' : true,
173 'offset':[1.0, 0.1] 173 'offset':[1.0, 0.1]
@@ -183,12 +183,12 @@ var bumpMetalMaterialDef = bumpMetalShaderDef =
183 'a_nrm' : { 'type' : 'vec3' } 183 'a_nrm' : { 'type' : 'vec3' }
184 }, 184 },
185 // parameters 185 // parameters
186 'params' : 186 'params' :
187 { 187 {
188 }, 188 },
189 189
190 // render states 190 // render states
191 'states' : 191 'states' :
192 { 192 {
193 'depthEnable' : true, 193 'depthEnable' : true,
194 "blendEnable" : true, 194 "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()
225 } 225 }
226 226
227 var technique, renderer, tex; 227 var technique, renderer, tex;
228 228
229 // update the cloud map material 229 // update the cloud map material
230 var material = this._materialNode; 230 var material = this._materialNode;
231 if (material) 231 if (material)
@@ -261,7 +261,7 @@ var CloudMaterial = function CloudMaterial()
261 { 261 {
262 // save the current RDGE context so we can reset it later 262 // save the current RDGE context so we can reset it later
263 var saveContext = RDGE.globals.engine.getContext(); 263 var saveContext = RDGE.globals.engine.getContext();
264 this.getWorld().stop(); 264 this.getWorld().stop();
265 265
266 // build a world to do the rendering 266 // build a world to do the rendering
267 if (!GLWorld) GLWorld = require("js/lib/drawing/world").World; 267 if (!GLWorld) GLWorld = require("js/lib/drawing/world").World;
@@ -349,7 +349,7 @@ var CloudMaterial = function CloudMaterial()
349 var hWidth = -z*(r-l)/(2.0*zn)*xFillNDC, 349 var hWidth = -z*(r-l)/(2.0*zn)*xFillNDC,
350 hHeight = -z*(t-b)/(2.0*zn)*yFillNDC; 350 hHeight = -z*(t-b)/(2.0*zn)*yFillNDC;
351 351
352 352
353 //this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); 353 //this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial);
354 var ctr = [x,y], width = 2*hWidth, height = 2*hHeight; 354 var ctr = [x,y], width = 2*hWidth, height = 2*hHeight;
355 var cloudSize = width > height ? 0.25*width : 0.25*height; 355 var cloudSize = width > height ? 0.25*width : 0.25*height;
@@ -377,12 +377,12 @@ var CloudMaterial = function CloudMaterial()
377 this._adjustedZMin = zMin; 377 this._adjustedZMin = zMin;
378 this._adjustedZMax = zMax; 378 this._adjustedZMax = zMax;
379 379
380 380
381 // build the polygons 381 // build the polygons
382 var verts = [], 382 var verts = [],
383 normals = [ [0,0,1], [0,0,1], [0,0,1], [0,0,1] ], 383 normals = [ [0,0,1], [0,0,1], [0,0,1], [0,0,1] ],
384 uvs = [ [0,0], [1,0], [1,1], [0,1] ]; 384 uvs = [ [0,0], [1,0], [1,1], [0,1] ];
385 385
386 for ( i = 0; i < 20; i++ ) 386 for ( i = 0; i < 20; i++ )
387 { 387 {
388// var x = hWidth*2*(Math.random() - 0.5), 388// var x = hWidth*2*(Math.random() - 0.5),
@@ -496,17 +496,17 @@ var cloudMaterialDef =
496 ] 496 ]
497 } 497 }
498}; 498};
499 499
500// the cloud map material def is used to map the cloud image onto 500// the cloud map material def is used to map the cloud image onto
501// the destination geometry 501// the destination geometry
502var cloudMapMaterialDef = 502var cloudMapMaterialDef =
503{'shaders': 503{'shaders':
504 { 504 {
505 'defaultVShader':"assets/shaders/Basic.vert.glsl", 505 'defaultVShader':"assets/shaders/Basic.vert.glsl",
506 'defaultFShader':"assets/shaders/BasicTex.frag.glsl" 506 'defaultFShader':"assets/shaders/BasicTex.frag.glsl"
507 }, 507 },
508 'techniques': 508 'techniques':
509 { 509 {
510 'default': 510 'default':
511 [ 511 [
512 { 512 {
@@ -520,13 +520,13 @@ var cloudMapMaterialDef =
520 'texcoord' : { 'type' : 'vec2' } 520 'texcoord' : { 'type' : 'vec2' }
521 }, 521 },
522 // parameters 522 // parameters
523 'params' : 523 'params' :
524 { 524 {
525 'u_tex0' : { 'type' : 'tex2d' }, 525 'u_tex0' : { 'type' : 'tex2d' },
526 }, 526 },
527 527
528 // render states 528 // render states
529 'states' : 529 'states' :
530 { 530 {
531 'depthEnable' : true, 531 'depthEnable' : true,
532 'offset':[1.0, 0.1] 532 'offset':[1.0, 0.1]