This commit is contained in:
lujun
2023-02-06 22:06:27 +08:00
parent f9c85e9b81
commit 934207d732
39 changed files with 3135 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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
});

View File

@@ -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);