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/square-tunnel-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/square-tunnel-material.js')
-rw-r--r-- | js/lib/rdge/materials/square-tunnel-material.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/js/lib/rdge/materials/square-tunnel-material.js b/js/lib/rdge/materials/square-tunnel-material.js index e8066f6b..ba4cb94e 100644 --- a/js/lib/rdge/materials/square-tunnel-material.js +++ b/js/lib/rdge/materials/square-tunnel-material.js | |||
@@ -49,19 +49,19 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() { | |||
49 | /////////////////////////////////////////////////////////////////////// | 49 | /////////////////////////////////////////////////////////////////////// |
50 | // Material Property Accessors | 50 | // Material Property Accessors |
51 | /////////////////////////////////////////////////////////////////////// | 51 | /////////////////////////////////////////////////////////////////////// |
52 | var u_tex0_index = 0, u_speed_index = 1; | 52 | var u_tex0_index = 0, u_speed_index = 1; |
53 | this._propNames = ["u_tex0", "u_speed" ]; | 53 | this._propNames = ["u_tex0", "u_speed" ]; |
54 | this._propLabels = ["Texture map", "Speed" ]; | 54 | this._propLabels = ["Texture map", "Speed" ]; |
55 | this._propTypes = ["file", "float" ]; | 55 | this._propTypes = ["file", "float" ]; |
56 | this._propValues = []; | 56 | this._propValues = []; |
57 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); | 57 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); |
58 | this._propValues[this._propNames[u_speed_index]] = 1.0; | 58 | this._propValues[this._propNames[u_speed_index]] = 1.0; |
59 | 59 | ||
60 | /////////////////////////////////////////////////////////////////////// | 60 | /////////////////////////////////////////////////////////////////////// |
61 | // Material Property Accessors | 61 | // Material Property Accessors |
62 | /////////////////////////////////////////////////////////////////////// | 62 | /////////////////////////////////////////////////////////////////////// |
63 | this.isAnimated = function() { return true; }; | 63 | this.isAnimated = function() { return true; }; |
64 | this.getShaderDef = function() { return squareTunnelMaterialDef; }; | 64 | this.getShaderDef = function() { return squareTunnelMaterialDef; }; |
65 | 65 | ||
66 | /////////////////////////////////////////////////////////////////////// | 66 | /////////////////////////////////////////////////////////////////////// |
67 | // Methods | 67 | // Methods |
@@ -107,42 +107,42 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() { | |||
107 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 107 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
108 | var squareTunnelMaterialDef = | 108 | var squareTunnelMaterialDef = |
109 | { 'shaders': | 109 | { 'shaders': |
110 | { | 110 | { |
111 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", | 111 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", |
112 | 'defaultFShader': "assets/shaders/SquareTunnel.frag.glsl" | 112 | 'defaultFShader': "assets/shaders/SquareTunnel.frag.glsl" |
113 | }, | 113 | }, |
114 | 'techniques': | 114 | 'techniques': |
115 | { | 115 | { |
116 | 'default': | 116 | 'default': |
117 | [ | 117 | [ |
118 | { | 118 | { |
119 | 'vshader': 'defaultVShader', | 119 | 'vshader': 'defaultVShader', |
120 | 'fshader': 'defaultFShader', | 120 | 'fshader': 'defaultFShader', |
121 | // attributes | 121 | // attributes |
122 | 'attributes': | 122 | 'attributes': |
123 | { | 123 | { |
124 | 'vert': { 'type': 'vec3' }, | 124 | 'vert': { 'type': 'vec3' }, |
125 | 'normal': { 'type': 'vec3' }, | 125 | 'normal': { 'type': 'vec3' }, |
126 | 'texcoord': { 'type': 'vec2' } | 126 | 'texcoord': { 'type': 'vec2' } |
127 | }, | 127 | }, |
128 | // parameters | 128 | // parameters |
129 | 'params': | 129 | 'params': |
130 | { | 130 | { |
131 | 'u_tex0': { 'type': 'tex2d' }, | 131 | 'u_tex0': { 'type': 'tex2d' }, |
132 | 'u_time': { 'type': 'float' }, | 132 | 'u_time': { 'type': 'float' }, |
133 | 'u_speed': { 'type': 'float' }, | 133 | 'u_speed': { 'type': 'float' }, |
134 | 'u_resolution': { 'type': 'vec2' } | 134 | 'u_resolution': { 'type': 'vec2' } |
135 | }, | 135 | }, |
136 | 136 | ||
137 | // render states | 137 | // render states |
138 | 'states': | 138 | 'states': |
139 | { | 139 | { |
140 | 'depthEnable': true, | 140 | 'depthEnable': true, |
141 | 'offset': [1.0, 0.1] | 141 | 'offset': [1.0, 0.1] |
142 | } | 142 | } |
143 | } | 143 | } |
144 | ] | 144 | ] |
145 | } | 145 | } |
146 | }; | 146 | }; |
147 | 147 | ||
148 | SquareTunnelMaterial.prototype = new PulseMaterial(); | 148 | SquareTunnelMaterial.prototype = new PulseMaterial(); |