Skip to content

Commit

Permalink
Use WebGL for mobile safari to improve performance, see #419
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 2, 2019
1 parent efd4171 commit 2886543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/view/SoundParticleImageLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ define( require => {
this.redSphereImage = canvas;
} );

const images = [];

// At the end of each model step, update all of the particles as a batch.
const update = () => {
if ( model.sceneProperty.value === model.soundScene ) {
Expand All @@ -61,8 +63,6 @@ define( require => {
model.stepEmitter.addListener( update );
model.sceneProperty.link( update );

const images = [];

for ( let i = 0; i < this.model.soundScene.soundParticles.length; i++ ) {
const soundParticle = this.model.soundScene.soundParticles[ i ];

Expand Down

0 comments on commit 2886543

Please sign in to comment.