mirror of
https://gitee.com/nomat/lcc-ui-sorting-group-demo.git
synced 2025-10-24 17:15:28 +00:00
提交
This commit is contained in:
@@ -66,7 +66,8 @@ export function UpdateRenderEntity(renderEntity:__private._cocos_2d_renderer_ren
|
||||
return this._sortingPriority;
|
||||
},
|
||||
set: function(value) {
|
||||
this._sortingPriority = value;
|
||||
this._sortingPriority = value;
|
||||
// console.log(`JSB sortingPriority ${value}`);
|
||||
if (JSB) {
|
||||
this._floatSharedBuffer[RenderEntityFloatSharedBufferView.sortingPriority] = value;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ if(!('sortingPriority' in UIRenderer.prototype)){
|
||||
return this._sortingPriority;
|
||||
},
|
||||
set: function(value) {
|
||||
this._sortingPriority = value;
|
||||
this._sortingPriority = value;
|
||||
this._renderEntity.sortingPriority = value;
|
||||
},
|
||||
enumerable: true
|
||||
});
|
||||
|
||||
@@ -66,7 +66,9 @@ UI.prototype.flushRendererCache = function(){
|
||||
if(this.rendererOrder){
|
||||
rendererCache.sort((a, b)=>{ return a._sortingPriority - b._sortingPriority; });
|
||||
}
|
||||
// console.log(`flushRendererCache ${rendererCache.length}`);
|
||||
for(let render of rendererCache){
|
||||
// console.log(`${render.node.name} render hash ${render.renderData.dataHash}`);
|
||||
render.fillBuffers(this);
|
||||
if(render.sortingOpacity >= 0){
|
||||
updateOpacity(render.renderData, render.sortingOpacity);
|
||||
|
||||
Reference in New Issue
Block a user