Egret Engine 5.3.10版本发布,主要修复基于 iOS14 系统的卡顿问题

今天Egret Engine5.3.10版正式发布,主要内容是修复iOS14 系统上 mesh 卡顿、htmlsound 声音挂载到后台后无法返回以及龙骨模型显示异常三个问题。

截至目前,虽然Egret Engine5.3系列依然属测试版,但产品功能已趋于稳定,建议有卡顿问题的开发者升级处理!

如若您的上线项目使用的是Egret Engine 5.2系列的稳定版,且不想升级引擎版本解决卡顿问题,我们为您提供了第二套解决方案,需要您在Egret Engine 5.2.X版本中手动修改以下2个位置的代码:

位置1:WebGLVertexArrayObject.ts
cacheArrays方法

1 ....... 2 3 if (meshVertices) { 4 let vertData = []; 5 // 计算索引位置与赋值 6 const vertices = this.vertices; 7 const verticesUint32View = this._verticesUint32View; 8 let index = this.vertexIndex * this.vertSize; 9 // 缓存顶点数组 10 let i = 0, iD = 0, l = 0; 11 let u = 0, v = 0, x = 0, y = 0; 12 for (i = 0, l = meshUVs.length; i < l; i += 2) { 13 iD = index + i * 5 / 2; 14 x = meshVertices[i]; 15 y = meshVertices[i + 1]; 16 u = meshUVs[i]; 17 v = meshUVs[i + 1]; 18 19 if (rotated) { 20 vertData.push([ 21 a * x + c * y + tx, 22 b * x + d * y + ty, 23 (sourceX + (1.0 - v) * sourceHeight) / textureSourceWidth, 24 (sourceY + u * sourceWidth) / textureSourceHeight, 25 ]); 26 } else { 27 vertData.push([ 28 a * x + c * y + tx, 29 b * x + d * y + ty, 30 (sourceX + u * sourceWidth) / textureSourceWidth, 31 (sourceY + v * sourceHeight) / textureSourceHeight, 32 ]); 33 } 34 verticesUint32View[iD + 4] = alpha; 35 } 36 for (let i = 0; i < meshIndices.length; i += 3) { 37 let data0 = vertData[meshIndices[i]]; 38 vertices[index++] = data0[0]; 39 vertices[index++] = data0[1]; 40 vertices[index++] = data0[2]; 41 vertices[index++] = data0[3]; 42 verticesUint32View[index++] = alpha; 43 44 let data1 = vertData[meshIndices[i + 1]]; 45 vertices[index++] = data1[0]; 46 vertices[index++] = data1[1]; 47 vertices[index++] = data1[2]; 48 vertices[index++] = data1[3]; 49 verticesUint32View[index++] = alpha; 50 51 let data2 = vertData[meshIndices[i + 2]]; 52 vertices[index++] = data2[0]; 53 vertices[index++] = data2[1]; 54 vertices[index++] = data2[2]; 55 vertices[index++] = data2[3]; 56 verticesUint32View[index++] = alpha; 57 58 // 填充数据 59 vertices[index++] = data2[0]; 60 vertices[index++] = data2[1]; 61 vertices[index++] = data2[2]; 62 vertices[index++] = data2[3]; 63 verticesUint32View[index++] = alpha; 64 } 65 66 let meshNum = meshIndices.length / 3; 67 this.vertexIndex += 4 * meshNum; 68 this.indexIndex += 6 * meshNum; 69 70 } else { 71 ......

位置2:WebGLRenderContext.ts
drawTexture方法

1 let buffer = this.currentBuffer; 2 if (this.contextLost || !texture || !buffer) { 3 return; 4 } 5 6 let meshNum = meshIndices && (meshIndices.length / 3) || 0; 7 if (meshIndices) { 8 if (this.vao.reachMaxSize(meshNum * 4, meshNum * 6)) { 9 this.$drawWebGL(); 10 } 11 } else { 12 if (this.vao.reachMaxSize()) { 13 this.$drawWebGL(); 14 } 15 } 16 17 if (smoothing != undefined && texture["smoothing"] != smoothing) { 18 this.drawCmdManager.pushChangeSmoothing(texture, smoothing); 19 } 20 21 // if (meshUVs) { 22 // this.vao.changeToMeshIndices(); 23 // } 24 25 let count = meshIndices ? meshNum * 2 : 2; 26 .........

以上2种方案均可解决基于iOS14系统带来的卡顿问题,大家可根据项目情况自行选择。使用Egret Engine期间如若遇到问题,可联系官方客服微信号:egretengine,我们会第一时间帮您解决!

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

2020年前端实用代码段,为你的工作保驾护航

有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )

Egret Engine 5.3.10版本发布,主要修复基于 iOS14 系统的卡顿问题 - HelloWorld