Comments (6)
嗯应该是updateWebglStyle时没有释放缓存,晚上到家看一下
from easycanvas.
这两天发个版本修复;可以暂时在updateWebglStyle上面包装一个新的API使用,验证一下是否解决
例如
Easycanvas.sprite.prototype.updateWebglStyle_fix = function (key, value) {
if (this.webgl && this.webgl[key]) {
this.$canvas.$gl.deleteBuffer(this.webgl[key].$cacheBuffer);
}
this.updateWebglStyle(key, value);
}
from easycanvas.
好的,我先按照您的方法测试一下。
期待Easycanvas的新版本!
from easycanvas.
您好!
使用您的修复方法之后,经测试,浏览器内存保持在一个稳定状态,但是GPU的使用率一直接近100%的程度。
目前考虑在不需要的时候使用$app.pause()
方法暂停Webgl的渲染,应该能降低GPU的使用率。
感谢您的支持!
from easycanvas.
试验发现setMaxFps方法更好用一点!
from easycanvas.
@cyitianyou 好的,这样的话也可能是mousemove的触发频率太高了,例如一帧触发了多次mousemove。
可以参考
sprite.addEventListener('mousemove', somehandle, 20)
绑定事件,设置触发间隔,单位ms
整个实例的话,可以painter.addEventListener('mousemove', somehandle, 20)
from easycanvas.
Related Issues (20)
- 那个 chrome 工具是怎么弄的呀 HOT 3
- 事件冒泡最好符合业内程序标准设计 HOT 1
- demo有JS报错误 HOT 1
- 大佬,不支持 vue引入吗? HOT 1
- API 为什么都没了? HOT 3
- 求api啊 HOT 1
- 请问下容器可不可以为圆形? HOT 1
- vue里面咋引入插件啊?现在报错了,应该是有个插件没引入,不知道咋引入啊
- 如何设置样式啊?没有文档吗?样式的参数没有文档? HOT 7
- 有没有Easycanvas.webglShapes.custom使用纹理贴图的demo呀? HOT 2
- webgl添加透明纹理的问题 HOT 6
- IOS 平台 点击事件偏移 HOT 3
- [BUG] HOT 4
- [BUG]node方式引入根本不能用。。。。
- [BUG]在配置比较低的win平台上, 使用chrome浏览器 发现闪屏问题
- 开发文档还会继续更新么? HOT 2
- 微信小游戏兼容问题 HOT 6
- 没有作者详细信息
- 事件的return true机制不起 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easycanvas.