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

Investigate reported issues of lag on IE11 #453

Closed
lehni opened this issue Apr 11, 2014 · 6 comments
Closed

Investigate reported issues of lag on IE11 #453

lehni opened this issue Apr 11, 2014 · 6 comments
Assignees

Comments

@lehni
Copy link
Member

lehni commented Apr 11, 2014

https://connect.microsoft.com/IE/feedback/details/836652/ie11-bug-paper-js

@lehni lehni self-assigned this Apr 11, 2014
@iconexperience
Copy link
Contributor

The big difference between InternetExplorer and Chrome is certainly, that direct in Item.draw() is true in Chrome and false in InternetExplorer. Setting it manually to true in InternetExplorer makes a huge difference.

@iconexperience
Copy link
Contributor

I printed all parameters that are used to determine direct and here are the results:

Chrome / Firefox

opacity 1
param.dontStart undefined
param.clip false
nativeBlend 170
normalBlend false
this._canComposite() true`

InternetExplorer

opacity 1
param.dontStart undefined
param.clip false
nativeBlend false
normalBlend false
this._canComposite() true

As you can see, the only difference is nativeBlend

@iconexperience
Copy link
Contributor

The reason why nativeBlendis false in InternetExplorer is that CanvasRenderingContext2D.globalCompositeOperation does not support blend modes, only composite operations.

@iconexperience
Copy link
Contributor

If you only want to have CandyCrash run faster on InternetExplorer, you should simply remove blendMode: 'screen' in the CandyCrash code, but this way you lose the nice color effect on crashes.

Or you have to find a way to improve non-native blending.

@iconexperience
Copy link
Contributor

I played a little bit more with the parameters and in my opinion the best solution is to set blendMode: 'lighter', which gives a very similar effect to screen and improves performance on InternetExplorer significantly. It then actually runs faster than on Firefox.

@lehni
Copy link
Member Author

lehni commented Jan 8, 2016

Great, thanks for spotting this!

@lehni lehni closed this as completed in ec5e8ff Jan 8, 2016
lehni added a commit to paperjs/paperjs.org that referenced this issue Jan 8, 2016
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