首页 > Web开发 > 详细

三星a8上测试egret与pixi.js的渲染性能

时间:2019-03-14 21:14:06      阅读:280      评论:0      收藏:0      [点我收藏+]
for (let i = 0; i < 500; i++) {
let shape = new egret.Shape();
shape.graphics.beginFill(0xff0000)
shape.graphics.drawCircle(0, 0, 200);
shape.graphics.endFill();
this.stage.addChild(shape)
}
平均22帧

for (let i = 0; i < 500; i++) {
  var shape = new PIXI.Graphics();
  shape.beginFill(0xff0000);
  shape.drawCircle(0, 0, 200);
  shape.endFill();
this.addChild(shape)
}
平均35帧
 
for (let i = 0; i < 1000; i++) {
let shape = new egret.Shape();
shape.graphics.beginFill(0xff0000)
shape.graphics.drawCircle(0, 0, 200);
shape.graphics.endFill();
this.stage.addChild(shape)
}
显示一下后退出

for (let i = 0; i < 500; i++) {
  var shape = new PIXI.Graphics();
  shape.beginFill(0xff0000);
  shape.drawCircle(0, 0, 200);
  shape.endFill();
this.addChild(shape)
}
平均18帧

三星a8上测试egret与pixi.js的渲染性能

原文:https://www.cnblogs.com/honghong87/p/10533435.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!