Open jbphet opened 4 years ago
Two of the proposals above are:
phet.joist.sim.display.hasVisibleTrailTo( node );
node.isVisibleOnDisplay( phet.joist.sim.display );
Is the latter more developer friendly since it is documented in Node? I don't have a strong preference between these options.
Regarding the two proposals above, @jonathanolson mentioned that the first makes more sense because this should not be information on the Node, it should be the responsibility of the Display.
The team was convinced, and we are going to try phet.joist.sim.display.hasVisibleTrailTo( node )
for now.
@jessegreenberg will work on this.
While implementing the sound design for Faraday's Law, I need to add a sound for the case where the needle on the voltmeter "pegs" at a max or min value. It seemed like the most logical place for this sound generation to occur was in the node that represented the gauge, which is
VoltmeterGauge.js
. However, the sound should only be generated when the gauge is visible, and it is several levels down in the scene graph from the place where the overall visibility of the voltmeter is controlled. I asked on Slack what the best way for a node to determine whether it was visible to the user, and a fairly long dialog ensued. For reference, here is the dialog:Marking for dev meeting so we can finalize the solution and determine the priority.