1.0.8 • Published 4 years ago

@jim-fx/nodez v1.0.8

Weekly downloads
5
License
ISC
Repository
-
Last release
4 years ago

Extensible Node System à la Blender

pipeline coverage bundle size code style: prettier npm version

Table of Contents

About The Project

This project came out of another project where i needed a node interface.

Getting Started

Installation

NPM:

yarn add @jim-fx/nodez

CDN:

<script src="https://unpkg.com/@jim-fx/nodez/dist/index.umd.js"></script>

Usage

Import it as module:

import { NodeSystem } from '@jim-fx/nodez';

Then use it like so:

const system = new NodeSystem();

If you want to register your own node types:

system.registerNodeType({
  name: 'subtract',
  inputs: ['number', 'number'],
  outputs: ['number'],
  // I strongly recommend to destructure and use defaults
  compute([input1 = 0, input2 = 0], state) {
    return input1 - input2;
  },
});

Saving and loading of systems

// save the node system
const save = system.deserialize();
// Download/Upload/stringify the save

// Load the node system
system.serialize(save);
1.0.8

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.0

4 years ago