Giter Site home page Giter Site logo

riicchhaarrd / nodes Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 463 KB

Quick example of a Node system in Javascript and Canvas

License: MIT License

HTML 1.15% JavaScript 98.85%
javascript nodes node-system canvas html visual-nodes visual-programming visual-programming-editor

nodes's Introduction

nodes

Quick example of a Node system in Javascript and Canvas.
Uses Vue to create a context menu, but it's a very small part and easily removed. It's mostly written in pure HTML / JS / Canvas.

til

til

til

nodes's People

Contributors

kungfooman avatar riicchhaarrd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

killtube

nodes's Issues

Adding JSDoc for improved type checking

Simple example from PlayCanvas:

/**
 * @class
 * @name pc.Vec3
 * @classdesc A 3-dimensional vector.
 * @description Creates a new Vec3 object.
 * @param {number|number[]} [x] - The x value. If x is an array of length 3, the array will be used to populate all components.
 * @param {number} [y] - The y value.
 * @param {number} [z] - The z value.
 * @example
 * var v = new pc.Vec3(1, 2, 3);
 */
function Vec3(x, y, z) {
    if (x && x.length === 3) {
        this.x = x[0];
        this.y = x[1];
        this.z = x[2];
    } else {
        this.x = x || 0;
        this.y = y || 0;
        this.z = z || 0;
    }
}

This allows TypeScript/VSCode to deduce all types for near-perfect type checking/autocompletion

Fix/update graph after deletions

Just working on the JS module structure, so I am currently not sure if this is my bug (because I am not finished with converted to JS modules) or generic bug:

image

Scissor to cut/remove links

  1. If not on node/signal: Drag/drop showing a line
  2. Collision check between Bezier/Line
  3. Cut links for every intersection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.