Skip to main content

Plugin Types

With MotorCortex anyone can create their own reusable and parametric Incidents and handily pack them and distribute them as plugins. Plugins expose Incidents that can be used on Clips. The two most common types of exposed Incidents (99% of the time with MC you’ll find yourself using them) are Effects and Animations.

Animations are full Clips that can be used either as stand alone Clips or as Incidents on other Clips. In both use cases they accept parameters on construction and dynamically adjust content and action on the fly, on run time.

Effects on the other hand don’t have a body (context). They only tween the attribute values of selected elements of the Clip they belong to. The most characteristic example of Effect is the Anime Incident of the Anime Plugin.

Aside from the Animations & Effects, there are three, less common but equally important types of Incidents exposed by plugins:

Custom Clip: MotorCortex provides out of the box the “HTMLClip” which has DOM context. The browser though doesn't stop there. WebGL and canvas APIs are two great examples of non-DOM contexts that run on our browsers just as natively. MotorCortex’s API provides all the tools to create Custom Clips that manipulate different contexts. Custom Clips can be created following a very specific set of rules (which we will analyse), just by extending the BrowserClip Class. As we will see, Custom Clips can only accept Incidents explicitly developed for them. Three.js is a great example of a plugin that exposes a Custom Clip.

Audio can be used both on Animations and Custom Clips but it can also be used in isolation for the development of pure audio plugins.

Aside from audio, other types of media playback Incidents, such as videos, youtube, etc can be developed by extending the MediaIncident Class

Last but not least is the only type of plugins that doesn’t expose Incidents. The Players, plugins for the control of the Clip’s execution. MotorCortex exposes a rich API for anyone to create a fully functional Player. A great example of a Player plugin is our official Teo MotorCortex Player.