Hello everyone, this is my first post on the forums, however, I’ve been lurking the forums and using Hype since 2018. I’ve took a break from banner building when I quit my job at a digital advertising agency, but now I’m going to start working at a new one this month, so I want to brush off my tumult skills.
So, I’ve got 2 questions basically, one regarding SVG’s and one regarding Timelines/Javascript timelines.
First question : From what I’ve understood from reading the forums, its not yet possible to import editable SVG files into Hype (yet). So, since I want to important existing SVG logo’s that are animated into Hype, I wondered what is the best pipeline for getting my JSON/CSS animated SVG’s into hype?
I’ve done some reading, and found these 4 tools.
• Keyshape
• Spiritapp
• Aftereffects + Bodymovin, with (or without) Lottie?
• Svgator
Does anyone have experience which one is the smallest (for ad purposes) and getting these exports into hype?
Second question : As I am not a programmer, I have little to no experience with Javascript. For a test banner I created I wanted 3 buttons in my banner that when clicked show the right color car, and slide away the cars not of that color.
So, I tried to do this with creating 3 different timelines (1 for each color), that plays when the right button is pressed. At the same time I reverse the other 2 timelines of the other two colors so that the non-selected color slides away. So for example when I press the Brown button, the BrownCar timeplays plays, and the Black and Grey timeline play in reverse to slide out of frame.
However, this gave me the issue that when pressed atleast 1 car was spawned out of nowhere that wasn’t on the screen, and slides away. The same thing happens when the button is spammed, it just spawns cars (since its reverse playing the timelines of it coming in).
So what I did, as a Javascript noob, I’ve found GSAP and imported it into the banner due to the ability of animating with the gsap.to methods, so cars out of frame would stay idle, and only the correct car would be called into frame.
tlBlack
.to(".CarBlack", 1, { x: '87px', ease: 'power2', })
.to(".CarGrey", 1, { x: '-300px', delay: -1, })
.to(".CarBrown", 1, { x: '-300px', delay: -2, })
tlGrey
.to(".CarGrey", 1, { x: '87px', ease: 'power2', })
.to(".CarBlack", 1, { x: '-300px', delay: -1, })
.to(".CarBrown", 1, { x: '-300px', delay: -2, })
tlBrown
.to(".CarBrown", 1, { x: '87px', ease: 'power2', })
.to(".CarGrey", 1, { x: '-300px', delay: -1, })
.to(".CarBlack", 1, { x: '-300px', delay: -2, })
This works great, see the live working demo here:
http://mitchvdakker.nl/banners/tumult/index.html
Although this works great, I'd like to avoid using other libraries and coding as a whole, to keep time (for a coding noob like me) and a file size down. Eventhough GSAP is allowed by Google.
So any suggestions how I could achieved the same within just hype? (and as little coding as possible for a Javascript noob like me).