Hype JS library

What do you want to see in Hype?

A Hype-specific JavaScript library for doing some more advanced things in terms of interacting with the runtime. Things like properties to programmatically modify stage elements that aren't covered by plain JavaScript.

One example might be to set pinning, sizing and scaling like so:
mySymbolInstance.hypeProperty.pinning = ['top', 'right', 'bottom', 'left'];
mySymbolInstance.hypeProperty.zoomContents = false;
mySymbolInstance.hypeProperty.scaleBehavior = 'expand';

another idea was something for working with dynamic content:
hypeDocument.addSymbolToStage ('mySymbolName');

or properties that deal with document export:
hypeDocument.hypeExportOptions.exportScript = 'organizedAssets';

Have you found a workaround for this problem?

Not yet but it's not a big deal. Just an idea.

Are there examples of other apps with this feature? Or, have you seen examples of this elsewhere on the web? (Please include a URL)

I haven't seen any that come to mind.

How high of a priority is this for you?

[ X ] Nice to Have
[ ] Important
[ ] Can't use Hype without it

1 Like

Thanks for the request! A lot of the reason features aren't exposed has been to keep the runtime size down, but it clearly makes sense that this is holding back programmatic control/creativity.

This is less of a runtime item but more of an export one... can you elaborate a little more on your use case? Thanks!

1 Like

@jonathan a good use case would be when I worked in advertising, I would have to export for multiple ad platforms. Pop that is a switch statement and use a custom variable to determine which settings to use.

Moreover, this feature could be VERY useful when dealing with responsive content across multiple scenes and layouts.

mySymbolInstance.hypeProperty.pinning = ['top', 'right', 'bottom', 'left'];
mySymbolInstance.hypeProperty.zoomContents = false;
mySymbolInstance.hypeProperty.scaleBehavior = 'expand';

1 Like

Oh I understand now - like based on your export settings, you may want different behaviors at runtime. Got it, thanks!

Definitely.

1 Like