Getting Started - geofs-plugins/plugin-manager-V2 GitHub Wiki
Getting Started
This page will help you create your own plugin. All of Sky'x plugins have to be hosted at github and as a result, open source.
Setting up your repo
First create a github account and a github repo (it has to be public). After that create a branch and call it release
, make sure the spelling is exactly the same and all lower case.
The release branch is where all of your plugin's source code and setting files should be.
You can as many branches you want, but remember that if it's not on release
it does not count.
Creating a config file
After your created your release
branch, you need to create a settings file that will contain all of your plugin's metadata.
Create a file and call it main.js
and fill it in according to the following template :
(function(ext) {
ext.name = "My Awesome First Extension!";
ext.version = "0.1";
ext.author = "Yotam Salmon";
ext.load = function(geofs, skyx) {
// For loading the extension
};
ext.loop = function(geofs, skyx) {
// For performing a repetitive task
};
ext.dispose = function(geofs, skyx) {
// For folding the extension
};
return ext;
})({});
Source Code
Your main source code file is main.js
. If you want to divide your source code into several files than add a source
parameter to main.js
and pass that parameter a list of source file names, which will be loaded according to the order of the list.
Advanced settings
If your file depends on some other SkyX plugins, you can add a dependencies
parameter to your settings file. Then specify a list of SkyX plugins that you wish to use in your plugin and we will take care of the rest 😄 .