New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jim-fx/nodez

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jim-fx/nodez

Package to do blender type node stuff in the browser.

latest
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

Extensible Node System à la Blender

pipeline coverage bundle size code style: prettier npm version

@jim-fx/nodez

Extensible/Serializable visual NodeSystem Library à la Blender.

Demo · Docs

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);

FAQs

Package last updated on 04 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts