Skip to content

Chlumsky/shadron-example-extension

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Shadron Example Extension

This extension serves as an introduction to the Shadron extension API. You may use this as a basis for your own extension or as a reference. See the full documentation to make sure you use the API correctly.

Build and installation

Windows

Use Microsoft Visual Studio 2015 or later to build the project in release configuration, and run install-to-shadron.bat to copy the DLL to the appropriate location. Shadron searches for extensions in the extensions subdirectory within its own directory, and in %APPDATA%\Shadron\extensions.

Mac

Run make to build shadron-example.dylib and then run make install, which will copy it to ~/.config/Shadron/extensions where it will be detected by Shadron.

Usage

To use an extension in a script, it must first be enabled with the #extension directive:

#extension example

Now, you may generate an example image or an animation with this extension like so:

image ImageTest = example();
animation AnimationTest = example();

You can use the premade extension test script, which does this.