Hype 4 polygon = HYPE-full.min.js

I’ve mentioned here before how Hype 4 requires the full runtime js when using curved motion paths, but I just realized that it also requires it when adding a polygon shape. The polygon shape doesn’t even need to be animated, just the addition of a polygon shape immediately forces full runtime.

This means an additional 39KB toward our typical 200KB limit for banners. I’m sure a full runtime for a polygon makes sense in the big picture, but I feel like Hype is moving slightly backwards for being the tool to create banner ads.

Is there some way there could be an option in Hype, where curved motion paths, polygons and other items I haven’t stumbled across yet don’t force HYPE-full.min.js?

This has been changed back in Hype v4.0.2 – motion paths are now included as part of thin runtime. Thus the thin runtime grew in size 2.0 KB from 4.0.1 to 4.0.2 for this feature.

No, as if all features were pulled into the thin runtime it would not be thin anymore. For example, including Vector Shape support alone would add 9.8 KB.

The full list is of features that would trigger using the full runtime (as of v4.0.2) is:

Physics
Vector Shapes
Motion Paths
Audio
Swap Transition
Page Turn Transition
Control Element Position when in a flexible scene
IE 6-9 suppprt (determined when visiting the page, not statically)

Note that both physics and waypoints usage will also trigger additional files (HYPE-NNN.physics.min.js and HYPE-NNN.waypoints.min.js) being loaded. Physics still requires the full runtime because that contains the integration code between the Hype runtime and physics file, which is essentially just matter.js.

The opposite is the intention - we do a lot of work to try to keep the runtime as small as possible, hence these changes. Over the course of many years of minification work there's not a lot of optimization left to do other than removing features that we don't think would be used in digital ads. We reverted on Motion Paths after hearing feedback on how commonly used this was. It is all a delicate balance between features, CDN-ability, and filesize.

1 Like

I appreciate the amount of detail included here, Jonathan – thanks for listing the full runtime triggers. A big part of my frustration on these has been when I’ve run into them unknowingly and then having to sleuth out what’s causing it.

I’m super glad to hear digital ads is a big consideration with Hype. I really like this tool and chose it from the beginning after testing all other options. At that time, Hype came in with the lowest file size for an identical banner created in each.

Keep up the good work!

Thanks - and I definitely appreciate hearing your feedback and about your needs. Sometimes there aren’t immediate ways to make changes, but knowing about your constraints can keep this in mind for the future :slight_smile:.