Hi guys,
You know what, I barely understood this when my colleague explained it to me so God knows how I expected anyone else to understand what this animation is supposed to show right off the bat. Sorry I'll try and explain!
I actually paid someone on Codementor to build this with me. I was originally using CSS @keyframes but Greensock seemed a better option. Because of this, I still only 50% understand the code on here, as I'll be honest, I didn't know exactly what my mentor was doing, as he worked through this animation. I'm really not offay with javascript but am trying to get my head around it. I've been using Codecademy but none of it seems similar to this haha
So the animation demonstrates the difference in molecular bond vibrations according to changes in energy levels interacting with them. In this case, infrared light waves. We make infrared spectroscopy accessories where I work, so this is a diagram to demonstrate some of the theories involved in what we do. So after Button 1 is clicked:
• a light wave comes in
• the ball pauses to allow the arrow to extend (showing an increase in energy)
• the ball moves further left and right, actually from the start-to-end of that next white line above the arrow, to show a more vigorous molecular vibration
@mikel thanks for your link I'm going to read through that and do my best to adopt a smarter way to organise timelines, etc. That's a cool Star Wars animation by the way!
@Greensock you've actually given me almost exactly what I needed to achieve! After pressing "Button 1" the blue balll (and the spring it's 'connected' to) need to go further left and right, meeting the ends of the white line above the arrow. I also need to figure out a way to allow the "Button 1" to work again after Reset is clicked.
Do you think it'd be better to try and start this from scratch, or are there things I can easily to do save this animation?