mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 11:01:36 +08:00
parent
a43bdc4361
commit
1af2089157
@ -50,6 +50,7 @@
|
||||
* Updated example to use Cocos2d-x 3.14.1.
|
||||
* Added mesh debug rendering. Enable/Disable via `SkeletonRenderer::setDebugMeshesEnabled()`.
|
||||
* Added support for clipping.
|
||||
* SkeletonRenderer now combines the displayed color of the Node (cascaded from all parents) with the skeleton color for tinting.
|
||||
|
||||
### Cocos2d-Objc
|
||||
* Fixed renderer to work with 3.6 changes
|
||||
|
||||
@ -184,12 +184,12 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
|
||||
SkeletonTwoColorBatch* twoColorBatch = SkeletonTwoColorBatch::getInstance();
|
||||
bool isTwoColorTint = this->isTwoColorTint();
|
||||
|
||||
Color3B nodeColor = getColor();
|
||||
_skeleton->color.r = nodeColor.r / (float)255;
|
||||
_skeleton->color.g = nodeColor.g / (float)255;
|
||||
_skeleton->color.b = nodeColor.b / (float)255;
|
||||
_skeleton->color.a = getDisplayedOpacity() / (float)255;
|
||||
|
||||
Color4F nodeColor;
|
||||
nodeColor.r = getDisplayedColor().r / (float)255;
|
||||
nodeColor.g = getDisplayedColor().g / (float)255;
|
||||
nodeColor.b = getDisplayedColor().b / (float)255;
|
||||
nodeColor.a = getDisplayedOpacity() / (float)255;
|
||||
|
||||
Color4F color;
|
||||
Color4F darkColor;
|
||||
AttachmentVertices* attachmentVertices = nullptr;
|
||||
@ -278,11 +278,11 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
|
||||
darkColor.b = 0;
|
||||
}
|
||||
|
||||
color.a *= _skeleton->color.a * slot->color.a * 255;
|
||||
color.a *= nodeColor.a * _skeleton->color.a * slot->color.a * 255;
|
||||
float multiplier = _premultipliedAlpha ? color.a : 255;
|
||||
color.r *= _skeleton->color.r * slot->color.r * multiplier;
|
||||
color.g *= _skeleton->color.g * slot->color.g * multiplier;
|
||||
color.b *= _skeleton->color.b * slot->color.b * multiplier;
|
||||
color.r *= nodeColor.r * _skeleton->color.r * slot->color.r * multiplier;
|
||||
color.g *= nodeColor.g * _skeleton->color.g * slot->color.g * multiplier;
|
||||
color.b *= nodeColor.b * _skeleton->color.b * slot->color.b * multiplier;
|
||||
|
||||
BlendFunc blendFunc;
|
||||
switch (slot->data->blendMode) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user