Tools / MIT
View on GitHub HypeDocumentLoad
This function implements the missing HypeDocumentLoad as a workaround to be triggered as a native Hype Function called HypeDocumentLoad
Hype Document Load
Overview
The Hype Document Load extension is a very simple extension designed for Tumult Hype, enabling animators to easily manage and handle document load events within their Hype projects. This extension provides a streamlined way to execute functions when a Hype document is fully loaded, enhancing the interactivity and responsiveness of Hype animations and applications.
Features
- Automatic Event Handling: The extension automatically attaches to the HypeDocumentLoad event, ensuring that your custom functions are called precisely when the Hype document finishes loading.
- Easy Integration: Simply including the extension in your project allows you to start using its features without complex setup.
- Function Invocation: The extension checks for a corresponding function in
hypeDocument.functions()and executes it if present, allowing for a modular and organized approach to scripting.
Usage
To use the Hype Document Load extension in your Tumult Hype project:
- Include the Extension: Add the Hype Document Load JavaScript file to your project.
- Define Your Function: The resource panel define
HypeDocumentLoad. - Automatic Execution: On document load, your
HypeDocumentLoadfunction will be automatically executed.
Example Hype Function:
function HypeDocumentLoad(hypeDocument, element, event) {
// Your custom code here
};
Installation
- Download the
HypeDocumentLoad.min.jsfile from the repository. - Include the script in the head of your HTML or as an external JavaScript file in your Hype project.
Version History
- 1.0.0: Initial release
License
This project is licensed under the MIT License - see the LICENSE file for details.
