From 9321b1d7ab2d23e165ac90e9eea3287f72463948 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 17 May 2012 09:51:11 -0700 Subject: Linear & radial gradients for runtime fixes --- assets/canvas-runtime.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'assets') diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index eeafaab6..b6682493 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js @@ -1456,6 +1456,8 @@ NinjaCvsRt.RuntimeRadialGradientMaterial = Object.create(NinjaCvsRt.RuntimeMater _colorStop3: { value: 0.6, writable: true }, _colorStop4: { value: 1.0, writable: true }, + _textureTransform: { value: [1,0,0, 0,1,0, 0,0,1], writable: true }, + init: { value: function(world) { var material = this._materialNode; @@ -1477,6 +1479,8 @@ NinjaCvsRt.RuntimeRadialGradientMaterial = Object.create(NinjaCvsRt.RuntimeMater this._shader["default"].u_colorStop3.set( [this._colorStop3] ); this._shader["default"].u_colorStop4.set( [this._colorStop4] ); + this._shader["default"].u_texTransform.set( this._textureTransform ); + if (this._angle !== undefined) this._shader["default"].u_cos_sin_angle.set([Math.cos(this._angle), Math.sin(this._angle)]); } @@ -1496,6 +1500,8 @@ NinjaCvsRt.RuntimeRadialGradientMaterial = Object.create(NinjaCvsRt.RuntimeMater this._colorStop3 = jObj.colorStop3; this._colorStop4 = jObj.colorStop4; + this._textureTransform = jObj.textureTransform; + if (this._angle !== undefined) this._angle = jObj.angle; } -- cgit v1.2.3