oliverjam / workstream-website

The new Workstream X marketing site
6 stars 1 forks source link

World image with CSS blipping #15

Closed Jamchiller closed 7 years ago

Jamchiller commented 7 years ago

As discussed, the SVG needs ot be put in, ideally with the CSS blipping coolness

oliverjam commented 7 years ago

So I've implemented this, and it kind of works, with a few issues:

oliverjam commented 7 years ago

@Jazzalenko To clarify why using the SVG in an image tag is preferable:

screen shot 2017-03-20 at 22 37 26

VS

screen shot 2017-03-20 at 22 38 11

lickcreative commented 7 years ago

Okay so what we going to do about this? Is the bloating of the file that bad? Ie. it's a lot more code but still won't add that much file size right? I'm happy to keep it in if you are.

If we do keep it, it's super hard to see. Definitely yellow isn't helping, could we try red? Or is there a way to make the points that animate become larger? And also, could you slow down the animation? Since it seems they appear for about half a second and disappear - I think a slower blipping would be nice. Like 3-5 seconds, before fading out again.

Finally, if you think it would be better as a gif or some other filetype, I could try get that created. Let me know

oliverjam commented 7 years ago

It makes the HTML file over 5 times larger (from 175kb to almost 1mb). This will obviously slow down initial page load, but it also makes the initial parsing of the page much slower as the browser has to read through a thousand lines and parse them before actually showing the content. Loading in the same kilobytes of data in an image or video tag would still be better because the browser can defer that and keep loading the rest of the page (images often appear well after the rest of the page has loaded). This is also ignoring the JavaScript and CSS I had to write to get the animation to work.

Red does look better (do you want to pick a complementary shade of red for me to use?)

I think an .mp4 might be the best route. It's a crazy efficient file format so the overall size probably won't be bigger, and it'll load asynchronously and should work on all devices.

EDIT: Sorry I totally fucked up the numbers lol. Wondered why my base HTML file was so big. It's 175kb with the SVG, and only 12kb without. So it actually makes the file 14.5 times bigger (although the final size is way smaller thank god).

lickcreative commented 7 years ago

Okay I will look at getting an mp4!

Jamchiller commented 7 years ago

Briefed into Lick now.

Jamchiller commented 7 years ago

So spencer has made this but it's not exactly what I was looking for so I'll go back to him with amends...

Jamchiller commented 7 years ago

This is saved in the assets folder now!

oliverjam commented 7 years ago

Done