-
Notifications
You must be signed in to change notification settings - Fork 5
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
Particles outside of box #419
Comments
This is a known problem from #331, but surprising that it only occurred in Wave Interference and not Waves Intro. I'll take a look. |
Also, I wonder about the performance improvements @pixelzoom and @jonathanolson discussed for Gas Properties. If we can eliminate the requirement to use WebGL on iOS without sacrificing performance, we can address the clipping problem. |
In the preceding commit, I made it so Waves Intro uses WebGL on mobile safari to improve performance, as we decided for Wave Interference. Good catch @lmulhall-phet! I'll move the preceding comment to #331. |
@samreid Before investigating WebGL, you might consider making some straightforward optimizations to your First, if your array is large, rather than using - for ( let i = 0; i < intensityValues.length; i++ ) {
+ for ( let i = intensityValues.length - 1; i >= 0; i-- ) { Second, if your exit condition is a constant, factor it out, do not put it in the - for ( let i = 0; i < this.width - this.dampX * 2; i++ ) {
+ const iMax = this.width - this.dampX * 2;
+ for ( let i = 0; i < iMax; i++ ) { |
I measured the profiler frame rate with throttle x4, then replaced all of the UPDATE: To clarify, I tested both water waves (38fps) and sound particles (24fps) in requirejs mode. |
In #322 we got good performance on the particles via WebGL, but did not add clipping due to the amount of time and complexity it would take to implement. This problem is noted in #331. @arouinfar or @ariel-phet do you want to work on that further before we publish? |
@samreid this is really a question of priorities and desired publication timeline. I believe the goal was to have these sims published in time for the next school year (which has already started in some parts of the country). I am fine with continuing to defer the clipping issue, but @ariel-phet should make that call. |
I am fine with deferring. @samreid perhaps keep this task in mind for an intern. |
Deferring sounds great. Some notes for when we revisit this issue:
|
Test Device
Hopper
Operating System
iOS 12.4
Browser
Safari
Problem Description
For phetsims/qa#389. I've only seen this in Wave Interference, not in Waves Intro. See the title and visuals. This bug is present in the published version.
Steps to Reproduce
Visuals
The text was updated successfully, but these errors were encountered: