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

How can I get the best performance? #8

Open
lovoror opened this issue Jul 30, 2020 · 3 comments
Open

How can I get the best performance? #8

lovoror opened this issue Jul 30, 2020 · 3 comments

Comments

@lovoror
Copy link

lovoror commented Jul 30, 2020

Is there a best guide?

@eXponenta
Copy link
Member

eXponenta commented Jul 30, 2020

  1. Not use huge lib, like Nape/Box2D or use external JS version for it.
  2. Not use a lot of getPixels/getPixel32/ getData, and all pixel operations on BitmapData that set/return buffers or pixels. Include floodFill, getColorBoundingRect, because it require stop render and grab pixels from GPU
  3. Not use a long property chain's in scrips, because it degraded compiler.
  4. Use blendmodes from list: normal, add, multiple ... Other not supported now.
  5. Not use a lot of separated sprites, 100 unique sprites is drop perf. Use ImageBitmap.draw to manual caching because cacheAsBitmap not supported now.
    ...
    ...

@lovoror
Copy link
Author

lovoror commented Jul 31, 2020

How to show the drawcall on the screen?

@lovoror
Copy link
Author

lovoror commented Jul 31, 2020

If I have converted vector graphics to bitmaps in swf file , could the performance be improved?

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