phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

Current value doesn't update when wire resistivity is changed in pause mode #803

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 2 years ago

Test device Chromebook (and Macbook Air)

Operating System 94.0.4606.124

Browser chrome

Problem description For https://github.com/phetsims/qa/issues/748 This is a minor issue, but it is an inconsistency:

On the lab screen and in the virtual lab, when the sim is paused and I change the value of an element in the circuit (battery voltage, resistivity of bulb/resistor etc), the value of the current updates. This is also true for the source resistivity. However, when the wire resistivity is changed, the current value is not updated until you press play or step forward.

Steps to reproduce

  1. Go to the lab screen or open the virtual lab sim
  2. Make a circuit with a battery, switch, resistor, bulb and ammeter.
  3. Close the switch and pause the sim.
  4. Increase the wire resistivity to 'lots' -- the current will not update
  5. Step forward or press play--the current updates.

Visuals

wireresistivity

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Circuit Construction Kit: AC‬ URL: https://phet-dev.colorado.edu/html/circuit-construction-kit-ac/1.0.0-rc.1/phet/circuit-construction-kit-ac_all_phet.html Version: 1.0.0-rc.1 2021-12-03 15:30:26 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36 Language: en-US Window: 1403x633 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 80) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
samreid commented 2 years ago

Thanks, I'll transfer this issue using the "Transfer issue" button.

samreid commented 2 years ago

@arouinfar and I discussed this, and I have an idea how to investigate. I'll take a look.

samreid commented 2 years ago

An older performance optimization was delaying updates to the stepInTime() phase, I removed it and now it seems that updating resistivity or wire length when paused works properly. We will want to make sure dragging a wire is still smooth enough on our slow platforms.

Nancy-Salpepi commented 2 years ago

This looks fixed in rc2.