查看: 3745|回复: 7

[交流讨论] 图片显示可能会非常影响游戏的帧率

[复制链接]
梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2018-4-28 21:03:52 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
测试时发现图片显示会使用 pixi-picture.js ,这个会极大拉低fps.

Sprite_Picture.prototype.initialize = function(pictureId) {
    //精灵 初始化 呼叫(this)
    Sprite.prototype.initialize.call(this);
    this._pictureId = pictureId;
    this._pictureName = '';
    this._isPicture = true;
    this.update();
};
可以在初始化的这里把 this._isPicture = true 改成 this._isPicture = false
不知道pixi-picture.js ,有什么功能....

评分

参与人数 1赞 +1 收起 理由
白嫩白嫩的 + 1 塞糖

查看全部评分

梦石
0
星屑
2432
在线时间
270 小时
注册时间
2015-4-11
回帖
42
发表于 2018-4-29 21:13:13 | 显示全部楼层
用虚拟按键的时候有这种情况 突然变得特别卡 请问大神这得在哪改。。。。。。。
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
 楼主| 发表于 2018-4-30 15:17:14 | 显示全部楼层
本帖最后由 汪汪 于 2018-4-30 15:22 编辑
黄玉瑞 发表于 2018-4-29 21:13
用虚拟按键的时候有这种情况 突然变得特别卡 请问大神这得在哪改。。。。。。。 ...


(function(){

var spritepictureinit =
Sprite_Picture.prototype.initialize

Sprite_Picture.prototype.initialize=function (){

spritepictureinit.apply(this,arguments)
this._isPicture =false
}

})()
回复

使用道具 举报

梦石
0
星屑
2432
在线时间
270 小时
注册时间
2015-4-11
回帖
42
发表于 2018-4-30 21:28:55 | 显示全部楼层
找了一顿也没对上号 适用于这个插件么?  UCHU_MobileOperation.js

点评

是原版mv的设置。。你把上面那个当插件放最上面就好。。  发表于 2018-5-1 09:22
回复

使用道具 举报

梦石
0
星屑
2432
在线时间
270 小时
注册时间
2015-4-11
回帖
42
发表于 2018-5-1 19:11:28 | 显示全部楼层
黄玉瑞 发表于 2018-4-30 21:28
找了一顿也没对上号 适用于这个插件么?  UCHU_MobileOperation.js

谢谢
回复

使用道具 举报

梦石
0
星屑
4716
在线时间
501 小时
注册时间
2013-12-7
回帖
333

极短28参与极短27参与

发表于 2018-5-2 11:47:24 | 显示全部楼层
A plugin that includes a sprite renderer that reduces border artifacts and 3 blend mode implementations for WebGL

Allows to use blendModes that are not available in pure webgl implementation, such as PIXI.BLEND_MODES.OVERLAY.

Please, don't add children to sprite if you use those blendModes.

Use PIXI.picture.Sprite instead of PIXI.Sprite, or change sprite pluginName to picture, or call renderer.plugins.picture from your own Sprite implementation.


你可以在https://github.com/pixijs/pixi-picture查看它的用法以及DEMO.

点评

_(:з」∠)_还是看不懂  发表于 2018-5-3 11:07
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部