You can clone with
HTTPS or Subversion.
cc.LayerGradient works ok on Chrome and Safari, but it looks really bad in Firefox.
Tested on Firefox 16.0.2, in OS X 10.7.4
How to test it:
Run the Layer Test, and go to the Gradient subtest
Here is the info regarding how to do gradients in FF
Thank you, Riq. Dingping will look into this problem.
So, apparently it is possible to have nice gradients in FF by using createLinearGradient.
If you want to "rotate" it, you have to change the coordinates.
Official documentation: https://developer.mozilla.org/en-US/docs/Canvas_tutorial/Applying_styles_and_colors
Example of "rotated" gradients: http://weblogs.asp.net/dwahlin/archive/2012/06/20/rendering-linear-gradients-using-the-html5-canvas.aspx
CCLayer.js is using createFillRect and I think we have to replace it with createLinearGradient in FF browsers.
LayerColor is only one color, so I think using fillRect is better than createLinearGradient.
and Gradient effect by change the coordinates is different to openGL. I will using this way to implement LayerGradient at first, but because this reason, I select other way.
OK, I will using createLinearGradient to implement LayerGradient soon.
Thanks, working correctly on FF now, but there the new approach introduced a new bug.