Skip to content

Commit

Permalink
Dynamic wavelength display
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrustyPwo committed Mar 9, 2024
1 parent 48ffb0b commit adfbdcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/simulations/interference.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class InterferenceSimulation extends Simulation {
this.wave2.setRect(this.wave2.x1, this.wave2.y1, this.pointer.x - 20, this.pointer.y);
this.wave1.update();
this.wave2.update();
this.wave1.drawWavelength(1);
this.wave2.drawWavelength(0);
this.wave1.drawWavelength(this.wave1.y1 <= this.wave2.y1);
this.wave2.drawWavelength(this.wave1.y1 > this.wave2.y1);

this.pointer.draw();
this.screen.draw();
Expand Down

0 comments on commit adfbdcd

Please sign in to comment.