phetsims / neuron

"Neuron" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

Why was a clip area being used on the particle canvas? #66

Closed jbphet closed 9 years ago

jbphet commented 9 years ago

I'm in the process of migrating Neuron to Scenery 0.2, and as a step in that direction I commented out the WebGL support to restrict it to canvas only mode. This resulted in a case where many of the membrane channels were missing. The following commit resolved the issue:

https://github.com/phetsims/neuron/commit/65cac0582f9670bc3870a3a7cf0c45f9905a071c

I discussed this with @jonathanolson, and neither of us understood why the clip area was there in the first place. Assigning to @AshrafSharf to let us know if there is some reason why this shouldn't be permanently removed.

jbphet commented 9 years ago

@AshrafSharf commented on the commit, but I think he meant to comment here. This is what he said:

This code was introduced during performance optimization for Neuron. I passed clipArea hoping if we restrict the visible area, the canvas might perform well. It is redundant as canvasBounds already this job.We can remove this code.

jbphet commented 9 years ago

Code removed, closing.