设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3095|回复: 7
打印 上一主题 下一主题

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

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
帖子
1516
跳转到指定楼层
1
发表于 2018-4-28 21:03:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
测试时发现图片显示会使用 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 塞糖

查看全部评分

Lv3.寻梦者

梦石
0
星屑
2377
在线时间
264 小时
注册时间
2015-4-11
帖子
45
2
发表于 2018-4-29 21:13:13 | 只看该作者
用虚拟按键的时候有这种情况 突然变得特别卡 请问大神这得在哪改。。。。。。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
帖子
1516
3
 楼主| 发表于 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
}

})()
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2377
在线时间
264 小时
注册时间
2015-4-11
帖子
45
4
发表于 2018-4-30 21:28:55 | 只看该作者
找了一顿也没对上号 适用于这个插件么?  UCHU_MobileOperation.js

点评

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

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2377
在线时间
264 小时
注册时间
2015-4-11
帖子
45
5
发表于 2018-5-1 19:11:28 | 只看该作者
黄玉瑞 发表于 2018-4-30 21:28
找了一顿也没对上号 适用于这个插件么?  UCHU_MobileOperation.js

谢谢
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3399
在线时间
461 小时
注册时间
2013-12-7
帖子
333
6
发表于 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
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-26 20:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表