Plugins

BUILDNANA uses a flexible plugin system that helps you extend the library’s functionality with new methods, constants, or even new components.

Let’s take a look at how the default plugin myPlugin() is implemented.

// k is the BUILDNANA context, what buildnana() returns
function myPlugin(k) {
    return {
        hi() {
            k.debug.log("Hi from myPlugin!");
        },
    };
}

Now you can use the plugin in your game:

const k = buildnana({
    plugins: [myPlugin],
});

k.hi(); // from myPlugin

Creating a plugin

We recommend using our templates:

Both are minimal and simple templates for create and publish plugins on NPM.

Browse Plugins

Community Plugins

You can explore all plugins made by the community on npm or GitHub.

buildnana logo

Expanding BUILDNANA