Comments (4)
Is this the same as #22 or something else? I've seen #22 in some version of Chrome+Win.
Is it correct for you in Firefox/Safari, Windows/Mac?
If you want to track it down I would suggest switching enableOptions() and requestAnimationFrame support in schedulemanager. Also animation with easing=linear almost never looks pleasing.
I'm pretty sure this isn't a rounding error that is causing it. On Chrome this code should use CSS transitions for the animation so no calculation is made for middle steps in Javascript.
from limejs.
So, I need fast animations within my code. It seems that when you animate slowing with LimeJS, everything looks good.
But when you speed it up, it all kind of falls apart.
I'm currently doing this within my code, on 5 elements, each 4200 pixels tall.
var moveDown = new lime.animation.MoveTo(position.x, 2200)
.setDuration(2).enableOptimizations();
var moveUp = new lime.animation.MoveTo(position.x, -2200)
.setDuration(2).enableOptimizations();
this.runAction(new lime.animation.Loop(
new lime.animation.Sequence(
moveDown, //new lime.animation.Delay().setDuration(1),
moveUp //new lime.animation.Delay().setDuration(1)
)
));
Even when I don't specify easing, it seems that by default it's doing an EASEINOUT.
I'm starting to think it's in the easeout function that is making the animation choppy.
I currently remove all easing functions from my code and it's still choppy.
Originally, before I tried the moveTo function, I just tried to keep a constant velocity and I failed to have smooth animation with that.
lime.scheduleManager.schedule(this.spin, this);
lime.scheduleManager.scheduleWithDelay(this.stopSpin, this, 3000, 1);
dd.Reel.prototype.spin = function (dt) {
var position = this.getPosition();
var velocity = Math.floor(900 * (dt / 1000.0));
position.y += velocity;
this.setPosition(position);
if(position.y > 2200) {
position.y = 0;
}
}
dd.Reel.prototype.stopSpin = function () {
lime.scheduleManager.unschedule(this.spin, this);
}
Everything that I try, I can't get smooth fast animations. I would love to use this engine because of it's simplicity, but if I can't get smooth animations, nothing else matters.
from limejs.
I don't believe it was the same issue as #22. I was using this with Chrome on the Desktop.
from limejs.
Turns out phpStorm was really affecting the performance I was seeing.
from limejs.
Related Issues (20)
- appendChild() broken for dom elements
- update box2d HOT 2
- firefox 25 removes createGainNode and noteOn/noteOff HOT 1
- TMX example not working HOT 4
- Button click/mousup doesn't work HOT 6
- Pause keeps updating tasks delta HOT 2
- Frame fill issues in Chrome when image isn't already cached
- When calling setPauesd(false) function in director, game is stopped. HOT 2
- webgl support HOT 1
- Wrong click position when rotate the director.
- Animation events should be documented
- Chrome animationFrame bug
- `Error: Invalid module name "undefined"` after clean installation HOT 3
- bug of pong HOT 1
- Error in clean installation HOT 1
- Video
- IOError: [Errno socket error] [Errno 65] No route to host HOT 1
- UnicodeDecodeError
- unzipping error when im bin\lime.py init HOT 2
- mousedown bug fixed(chrome)
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 limejs.