Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Positioning from top/left to transform #43

Open
IchordeDionysos opened this issue Jan 8, 2016 · 2 comments
Open

Change Positioning from top/left to transform #43

IchordeDionysos opened this issue Jan 8, 2016 · 2 comments

Comments

@IchordeDionysos
Copy link

It is much better for moving objects to use transform: translate(x, y) instead of absolute positioning with top & left, because changing the top and left attributes it needs Chrome to process 3 operations:

  1. It have to process the layout, because top/left may affect other elements on the page
  2. Damaged Pixels have to be repainted
  3. The Composition has changed so it has to calculate over this step too

A much better choice is to use the transform attribute instead, because this attribute doesn't affect other elements and so no pixels can be damaged and you only have to change your Composition.

It would be a great enhancement.
I saw pages using your Plugin and forced them to FPS under 30 and sometimes 20.

I hope I could help you!

For more information:
http://csstriggers.com/#top
http://csstriggers.com/#transform

@IchordeDionysos
Copy link
Author

Oh well I saw you merged a pull request with this issue to the snowfall.js, I just saw the jquery version, where you still work with top and left!

@loktar00
Copy link
Owner

loktar00 commented Jan 9, 2016

eh yeah I need to keep up more with this plugin honestly, having the two separate versions is kind of weird since they have had a tendency to go their own way. Doing it with a canvas overlay might even be the most performant option but I haven't directly compared the two.

Anyway you're right I just didn't get to actually updating the JQ version after merging the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants