在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:nalexn/CCSpriteWithHue开源软件地址:https://github.com/nalexn/CCSpriteWithHue开源编程语言:Objective-C 71.5%开源软件介绍:CCSpriteWithHue
In games it is often necessary for multiple characters to differ only in color, for example, to play in different teams. You can certainly duplicate all animations in a different color palette and attach them to the project, but it drastically increases the size of the application and restricts user to choose from a limited number of color sets. There is an alternative approach with With The basics for hue rotation algorithm were taken from Apple's GLImageProcessing sample project I optimised the algo so that it does not affect the performance even if the hue value is changing rapidly. DemoBuild and run the Example UsageCCSpriteWithHue * sprite = [CCSpriteWithHue spriteWithFile:@"mySprite.png"];
sprite.hue = M_PI_4; The hue property represents the hue rotation angle from 0 to 2 * π radians, but you can specify any value, it will remove a complete revolutions. ContactAlexey Naumov License
|
2022-08-15
2022-08-17
2022-09-23
2023-10-27
2022-08-18
请发表评论