diff options
author | hwc487 | 2012-07-09 16:08:02 -0700 |
---|---|---|
committer | hwc487 | 2012-07-09 16:08:02 -0700 |
commit | 5085d0f67df89a21715308956004164597a6ba79 (patch) | |
tree | 2c896163143a66331205a39b0a3b1b45d51bf12a /js/lib/rdge/materials/flat-material.js | |
parent | 51f1691f792dbda9b740ded8aa0457c9406db156 (diff) | |
parent | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (diff) | |
download | ninja-5085d0f67df89a21715308956004164597a6ba79.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into GridFixes
Conflicts:
js/helper-classes/3D/StageLine.js
Diffstat (limited to 'js/lib/rdge/materials/flat-material.js')
-rwxr-xr-x | js/lib/rdge/materials/flat-material.js | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/js/lib/rdge/materials/flat-material.js b/js/lib/rdge/materials/flat-material.js index 6b8bd2c5..b344db7c 100755 --- a/js/lib/rdge/materials/flat-material.js +++ b/js/lib/rdge/materials/flat-material.js | |||
@@ -48,8 +48,8 @@ var FlatMaterial = function FlatMaterial() | |||
48 | // Property Accessors | 48 | // Property Accessors |
49 | /////////////////////////////////////////////////////////////////////// | 49 | /////////////////////////////////////////////////////////////////////// |
50 | this.getShaderName = function () { return this._shaderName; }; | 50 | this.getShaderName = function () { return this._shaderName; }; |
51 | this.isAnimated = function () { return false; }; | 51 | this.isAnimated = function () { return false; }; |
52 | this.getTechniqueName = function() { return 'colorMe' }; | 52 | this.getTechniqueName = function() { return 'colorMe' }; |
53 | 53 | ||
54 | /////////////////////////////////////////////////////////////////////// | 54 | /////////////////////////////////////////////////////////////////////// |
55 | // Methods | 55 | // Methods |
@@ -57,7 +57,7 @@ var FlatMaterial = function FlatMaterial() | |||
57 | // duplcate method requirde | 57 | // duplcate method requirde |
58 | 58 | ||
59 | this.init = function (world) | 59 | this.init = function (world) |
60 | { | 60 | { |
61 | // save the world | 61 | // save the world |
62 | if (world) { | 62 | if (world) { |
63 | this.setWorld(world); | 63 | this.setWorld(world); |
@@ -70,8 +70,8 @@ var FlatMaterial = function FlatMaterial() | |||
70 | // set up the material node | 70 | // set up the material node |
71 | this._materialNode = RDGE.createMaterialNode("flatMaterial_" + world.generateUniqueNodeID()); | 71 | this._materialNode = RDGE.createMaterialNode("flatMaterial_" + world.generateUniqueNodeID()); |
72 | this._materialNode.setShader(this._shader); | 72 | this._materialNode.setShader(this._shader); |
73 | 73 | ||
74 | this.setShaderValues(); | 74 | this.setShaderValues(); |
75 | } | 75 | } |
76 | else | 76 | else |
77 | throw new Error("GLWorld not supplied to material initialization"); | 77 | throw new Error("GLWorld not supplied to material initialization"); |
@@ -91,35 +91,35 @@ var FlatMaterial = function FlatMaterial() | |||
91 | 91 | ||
92 | /////////////////////////////////////////////////////////////////////////////////////// | 92 | /////////////////////////////////////////////////////////////////////////////////////// |
93 | // RDGE shader | 93 | // RDGE shader |
94 | 94 | ||
95 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 95 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
96 | flatShaderDef = | 96 | flatShaderDef = |
97 | { | 97 | { |
98 | 'shaders': { // shader files | 98 | 'shaders': { // shader files |
99 | 'defaultVShader':"assets/shaders/Basic.vert.glsl", | 99 | 'defaultVShader':"assets/shaders/Basic.vert.glsl", |
100 | 'defaultFShader':"assets/shaders/Basic.frag.glsl" | 100 | 'defaultFShader':"assets/shaders/Basic.frag.glsl" |
101 | }, | 101 | }, |
102 | 'techniques': { // rendering control | 102 | 'techniques': { // rendering control |
103 | 'colorMe':[ // simple color pass | 103 | 'colorMe':[ // simple color pass |
104 | { | 104 | { |
105 | 'vshader' : 'defaultVShader', | 105 | 'vshader' : 'defaultVShader', |
106 | 'fshader' : 'defaultFShader', | 106 | 'fshader' : 'defaultFShader', |
107 | 107 | ||
108 | // attributes | 108 | // attributes |
109 | 'attributes' : | 109 | 'attributes' : |
110 | { | 110 | { |
111 | 'vert' : { 'type' : 'vec3' }, | 111 | 'vert' : { 'type' : 'vec3' }, |
112 | 'normal' : { 'type' : 'vec3' }, | 112 | 'normal' : { 'type' : 'vec3' }, |
113 | 'texcoord' : { 'type' : 'vec2' } | 113 | 'texcoord' : { 'type' : 'vec2' } |
114 | }, | 114 | }, |
115 | // attributes | 115 | // attributes |
116 | 'params' : | 116 | 'params' : |
117 | { | 117 | { |
118 | 'color' : { 'type' : 'vec4' } | 118 | 'color' : { 'type' : 'vec4' } |
119 | } | 119 | } |
120 | } | 120 | } |
121 | ] | 121 | ] |
122 | } | 122 | } |
123 | }; | 123 | }; |
124 | 124 | ||
125 | FlatMaterial.prototype = new Material(); | 125 | FlatMaterial.prototype = new Material(); |