diff options
author | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
commit | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch) | |
tree | 3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/lib/rdge/materials/flat-material.js | |
parent | c0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff) | |
parent | 40c6eb2c06b34f65a74d59ef9687251952858bab (diff) | |
download | ninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz |
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts:
js/components/gradientpicker.reel/gradientpicker.js
js/components/tools-properties/text-properties.reel/text-properties.js
js/document/views/base.js
js/document/views/design.js
js/helper-classes/3D/StageLine.js
js/helper-classes/3D/draw-utils.js
js/lib/drawing/world.js
js/lib/geom/circle.js
js/lib/geom/line.js
js/lib/geom/rectangle.js
js/lib/geom/shape-primitive.js
js/lib/rdge/materials/bump-metal-material.js
js/lib/rdge/materials/flag-material.js
js/lib/rdge/materials/fly-material.js
js/lib/rdge/materials/julia-material.js
js/lib/rdge/materials/keleidoscope-material.js
js/lib/rdge/materials/mandel-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/plasma-material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/radial-gradient-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/water-material.js
js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
js/panels/Materials/materials-popup.reel/materials-popup.html
js/panels/Materials/materials-popup.reel/materials-popup.js
js/tools/LineTool.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
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(); |