I wrote a fairly simple glowscript (vpython) program that demonstrates weighing a brick on earth and weighing the same mass brick on the moon.
I would like to add buttons so the user can play and reset the animation. I saw the example of buttons and sliders at:
The example above is in glowscript javascript.
Does anyone have an example of a glowscript (vpython) program with play and reset buttons? I would like to embed the simulation into another page. Right now, the glowscript program runs when the page loads. However, I would like the program to draw the scene, pause, and then run after the user presses “play.”
I know I can add buttons within the 3D environment using a box, label, and keyboard interaction. I don’t mind adding the buttons. However, before writing it, I figured I’d find out if anyone has already done this.
Thanks,
Aaron Titus