diff options
Diffstat (limited to 'js/lib/rdge/materials/linear-gradient-material.js')
-rwxr-xr-x | js/lib/rdge/materials/linear-gradient-material.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/js/lib/rdge/materials/linear-gradient-material.js b/js/lib/rdge/materials/linear-gradient-material.js index 51a7430c..79f323db 100755 --- a/js/lib/rdge/materials/linear-gradient-material.js +++ b/js/lib/rdge/materials/linear-gradient-material.js | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | var MaterialParser = require("js/lib/rdge/materials/material-parser").MaterialParser; | 7 | var MaterialParser = require("js/lib/rdge/materials/material-parser").MaterialParser; |
8 | var Material = require("js/lib/rdge/materials/material").Material; | 8 | var Material = require("js/lib/rdge/materials/material").Material; |
9 | var ShapePrimitive = require("js/lib/geom/shape-primitive").ShapePrimitive; | ||
9 | 10 | ||
10 | var LinearGradientMaterial = function LinearGradientMaterial() { | 11 | var LinearGradientMaterial = function LinearGradientMaterial() { |
11 | /////////////////////////////////////////////////////////////////////// | 12 | /////////////////////////////////////////////////////////////////////// |
@@ -132,12 +133,6 @@ var LinearGradientMaterial = function LinearGradientMaterial() { | |||
132 | } | 133 | } |
133 | }; | 134 | }; |
134 | 135 | ||
135 | // this.getColorCount = function() { return this._colorCount; }; | ||
136 | // this.setColorCount = function(c) { this._colorCount = c; | ||
137 | // if (this._shader && this._shader['default']) | ||
138 | // this._shader['default'].u_colorCount.set([c]); | ||
139 | // }; | ||
140 | |||
141 | this.getAngle = function () { | 136 | this.getAngle = function () { |
142 | return this._angle; | 137 | return this._angle; |
143 | }; | 138 | }; |
@@ -245,7 +240,9 @@ var LinearGradientMaterial = function LinearGradientMaterial() { | |||
245 | this._shader['default'].u_colorStop4.set([s]); | 240 | this._shader['default'].u_colorStop4.set([s]); |
246 | 241 | ||
247 | this.setAngle(this.getAngle()); | 242 | this.setAngle(this.getAngle()); |
248 | } | 243 | |
244 | this._shader['default'].u_texTransform.set( [1,0,0, 0,1,0, 0,0,1] ); | ||
245 | } | ||
249 | }; | 246 | }; |
250 | 247 | ||
251 | this.exportJSON = function () { | 248 | this.exportJSON = function () { |
@@ -367,7 +364,8 @@ var linearGradientMaterialDef = | |||
367 | 'u_colorStop2': { 'type' : 'float' }, | 364 | 'u_colorStop2': { 'type' : 'float' }, |
368 | 'u_colorStop3': { 'type' : 'float' }, | 365 | 'u_colorStop3': { 'type' : 'float' }, |
369 | 'u_colorStop4': { 'type' : 'float' }, | 366 | 'u_colorStop4': { 'type' : 'float' }, |
370 | 'u_cos_sin_angle' : { 'type' : 'vec2' } | 367 | 'u_cos_sin_angle': { 'type' : 'vec2' }, |
368 | 'u_texTransform': { 'type' : 'mat3' } | ||
371 | //'u_colorCount': {'type' : 'int' } | 369 | //'u_colorCount': {'type' : 'int' } |
372 | 370 | ||
373 | }, | 371 | }, |