lufylegend / lufylegend.js Goto Github PK
View Code? Open in Web Editor NEWa library for html5
Home Page: http://lufylegend.com/lufylegend
a library for html5
Home Page: http://lufylegend.com/lufylegend
hi~有个问题打扰下:
官方的几个例子,个人在iphone5C、ipad air2和小米3下做尝试,都会有明显的不流畅,具体是哪个API造成的呢?还是说现在移动端的canvas性能还是不行。。。
Master lufy:
I think you might forget something important. There is a slight difference between unix(OS X, Linux) and Windows on processing wraps:
On Windows, '/r/n' indicates a wrap, while unix uses '/n' only to indicate a wrap.
So when I try process a string read from a file with wraps with LString.trim
on diverse OS, I got various results because of the difference I mentioned above and LString.trim
's bug on processing "\r". Actually, it's tough to find their differences as character '/r' is invisible in browser's console.
That's a hidden bug.
Recently I might found a bug in lufylegend v1.10.1.
As the LEvent.PROGRESS
was added in v1.10.1, the method of calculating loading progress in LLoadManage
was changed. I found the loading progress would go wrong when I used LLoadManage.load
to load some .mp3 files. At first, I believed that is a problem from LLoadManage
or LSound
, but after checking the code of the two classes carefully, I turned my attention to LAjax
.
At the same time, I found onProgress
callback of LLoadManage.load(loadList, onProgress, onComplete)
will be called more times than the corresponded value, namely length of loadList
.
I suppose this question stems from XMLHttpRequest
's "progress" event. As the data type is "buffer", so the "progress" event callback will be called when receiving even a few data, which causing the bug that callback of LLoadManage
's LEvent.PROGRESS will be called several times.
因为LTweenLite中有一句s.currentTime += LGlobal.speed;
如果 LGlobal.speed是requestAnimationFrame时会有问题
具体代码如下
theTextField = new LTextField();
theTextField.setType(LTextFieldType.INPUT);
theTextField.x = 10;
theTextField.y = 10;
addChild(theTextField);
theTextField.addEventListener(LTextEvent.TEXT_INPUT, function(e) {
console.log("TEXT_INPUT " + theTextField.text);
});
现象是 比如使用中文输入法输入“你”字,当“你”字输入完毕后,text取得的内容是"ni",
一个 移动端 webapp 项目。里面一个页面需要 一个赛车小动画。不需要响应用户任何事件只是 动画。
背景分为上下两块。上面部分赛车跑动的时候,向右无缝一直移动,下面的赛道部分 以稍微快点的速度同样向右移动。十辆赛车 随机向左移动。每辆赛车尾部有喷火效果。
目前用 createjs 0.8.2 初步实现效果。不过在android 浏览器 有 轻微 卡顿。fps 35-58 之间 波动。改用 createjs next 最新版本,切换 stage 为 stagegl (基于 webgl)还是同样问题。感觉没有性能提升。实在找不到 优化办法。
最后搜到lufylegend 看介绍感觉还不错毕竟是 国人开发,看更新日期最近几年没怎么更新,想知道项目是否还在维护。如果实现。大概个思路是否和 createjs 差不多。最后就是 性能问题。能稳定在 60 fps 左右吗。求大神解答。多谢了
突然想到还有个问题忘说了,这里补充下
http://lufylegend.com/api/api/Q_and_A/drawEM.html
这个demo 在android 手机 浏览器下。如果用户点击屏幕 fps 会急剧下降。松开恢复。感觉应该是处理事件造成的影响。是否存在开关屏蔽 事件。避免造成性能损失
为什么会组织页面的其他元素呢? 我的a标签都不能跳转了.
现在不能用npm,只能手动将jar丢到项目中,不方便
神,请问啥时候推出es6版本的 lufylegend?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.