~~NOTOC~~ ====== Colortransform ====== ---- dataentry extension ---- author_mail : romain.thery@live.fr Romain Théry description : A MeshStyle for Starling 2 to emulate flash.display.ColorTransform compatible : v2.3 tags : MeshStyle, Style homepage_url : https://github.com/rthery/starling-colortransform ---- ===== Overview ===== The use of this style is almost exactly similar to the native [[https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/ColorTransform.html|flash.displayColorTransform]]. Here's a simple example on how to turn a fuchsia texture to blue. var image : Image = new Image(Texture.fromColor(256, 256, 0xFF00FF)); image.style = new ColorTransformStyle(0, 0, 1); addChild(image); Have a look at this comparison demo, as well: {{ :extensions:starling-colortransform.mp4?510x400 |}} However, please note that currently the DisplayObject alpha will be ignored, you'll need to use exclusively the alpha multiplier of the ColorTransformStyle for now. Regarding the Mesh color property, it will act the same as setting the [[https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/ColorTransform.html#color|color]] property on a ColorTransform (because setting the color on a Starling Mesh will actually applies it to its style) ===== Changelog ===== * //2018/05/09 13:03//: First public version ===== Source Code ===== %gist(30a7308b6384a0290a2cb0566c1f23f4)% ===== User Comments ===== Please use this forum [[https://forum.starling-framework.org/topic/colortransformstyle|thread]]