How to Make Classes

Is there a way to create JS functions in Tumult without them being directly called by some user action? (i.e. that are called by other functions instead)

At the moment I’m specifically interested in making my own classes/constructors. Is this possible in Tumult?

use a normal hype function to construct it and access it using the hypeDocument.functions(). API

Plenty of examples on site showithe API

How do I create a normal hype function that is not tied to a specific action? The only way I have found to make java script functions is by using the ‘actions’ for clicking a button, scrolling, etc. Is there a way to make a function outside of this?

Open the Resource Inspector, click the + button


But even if you did it the hard way as you detail. You can still late remove the action but keep the function.

The ability to create and call a function from within the action selection is just a convenience .


Note that you can also add a <script> tag to the head HTML (accessible in the Document Inspector) or drag in .js files that contain functions. In these cases, you do not need to access via the hypeDocument.functions() call since they would be global.


Is there a way to change the function’s parameters?

Do you mean like this