-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed of ray animation #71
Comments
@arouinfar will play with the simulation.
|
But I've tried changing |
I've renamed the constant and documented it better. It's now |
@pixelzoom: There are two constants that govern the animation of the rays. One is the speed of the rays and the other it the animation time. The product of them gives the distance travelled.
The distance travelled should be at least larger than the width of the screen. The two constants, as defined, are probably not as orthogonal as they should be since changing the animation time to a small value, one is forced to increase the speed value in order to have the rays span the screen. |
It should be possible to have a less heuristic approach. I'll also mention that one could not set any maximum animation time and let the animation go on forever. It didn't seem to have any performance effects on our laptops but I suspect this is not the case on all devices. |
@veillette thank you for the explanation, that all makes sense. In the above commit, I increased RAY_ANIMATION_TIME to 10 seconds, and I replaced LIGHT_SPEED with this // speed of light in centimeters per second, for the purpose of the light rays animation
lightSpeed: {
type: 'number',
defaultValue: 500,
isValidValue: value => ( value >= 100 )
} @arouinfar please review, let me know if you'd like to change the default (500) to something else. Note the constraint that |
The behavior in master feels pretty good to me and is sufficient for the prototype. @ariel-phet can you test out |
@arouinfar @pixelzoom I have a slight preference for If 400 still feels good to you @pixelzoom go with it. If you prefer 500, stick with that. |
I like @ariel-phet's suggestion here. Slightly slower (400) feels good to me too. I have made it so in the above commit. Closing. |
How fast should the rays be drawn?
The text was updated successfully, but these errors were encountered: