How to use rete - 10 common examples

To help you get started, we’ve selected a few rete examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Ni55aN / allmatter / src / editor / components / input / curve.js View on Github external
builder(node) {
        const out = new Output('output', 'Curve', sockets.curve);
        const ctrl = new FieldControl(this.editor, 'name', {value: ''});
        // var ctrl2 = new Rete.Control('<div style="width: 140px; height: 140px; border: 2px solid red"></div>');
        
        return node
            .addOutput(out)
            .addControl(ctrl)
            // .addControl(ctrl2);
    }
}
github Ni55aN / allmatter / src / editor / components / texture / lightness.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('image', 'Image', sockets.image);
        const inp2 = new Input('scalar', 'Scalar', sockets.num);

        inp2.addControl(new FieldControl(this.editor, 'scalar', {type: 'number', value: 1}));

        return node
            .addInput(inp)
            .addInput(inp2);
    }
github Ni55aN / allmatter / src / editor / components / texture / gradient.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('image', 'Image', sockets.image);
        const inp2 = new Input('curve', 'Curve', sockets.curve);

        return node
            .addInput(inp)
            .addInput(inp2);
    }
}
github Ni55aN / allmatter / src / editor / components / texture / invert.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('image', 'Image', sockets.image);

        return node.addInput(inp);
    }
github Ni55aN / allmatter / src / editor / components / texture / transform.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('image', 'Image', sockets.image);
        const inpX = new Input('x', 'Translate X', sockets.num);
        const inpY = new Input('y', 'Translate Y', sockets.num);
        const inputRepeat = new Input('repeat', 'Repeat', sockets.num);

        inpX.addControl(new FieldControl(this.editor, 'x', {type: 'number', value: 0}));
        inpY.addControl(new FieldControl(this.editor, 'y', {type: 'number', value: 0}));
        inputRepeat.addControl(new FieldControl(this.editor, 'repeat', {type: 'number', value: 1}));

        return node
            .addInput(inp)
            .addInput(inpX)
            .addInput(inpY)
            .addInput(inputRepeat)
    }
github Ni55aN / allmatter / src / editor / components / generator / brick.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('count', 'Count', sockets.num);
        const inp2 = new Input('margin', 'Margin', sockets.num);

        const ctrl = new FieldControl(this.editor, 'count', {type: 'number', value: 12});
        const ctrl2 = new FieldControl(this.editor, 'margin', {type: 'number', value: 0.04})

        inp.addControl(ctrl);
        inp2.addControl(ctrl2);

        return node
            .addInput(inp)
            .addInput(inp2);
    }
github Ni55aN / allmatter / src / editor / components / output / material.js View on Github external
builder(node) {
        const inp1 = new Input('diffuse', 'Diffuse', sockets.image);
        const inp2 = new Input('normal', 'Normal', sockets.image);
        const inp3 = new Input('rough', 'Roughness', sockets.image);
        const inp4 = new Input('metal', 'Metalness', sockets.image);
        const inp5 = new Input('emis', 'Emissive', sockets.image);
        const inp6 = new Input('disp', 'Displacement', sockets.image);
        const inp7 = new Input('alpha', 'Alpha', sockets.image);

        return node
            .addInput(inp1)
            .addInput(inp2)
            .addInput(inp3)
            .addInput(inp4)
            .addInput(inp5)
            .addInput(inp6)
            .addInput(inp7);
    }
github retejs / rete.js.org / src / rete / components / add-component.js View on Github external
builder(node) {
        var Field = this.CustomFieldControl || FieldControl;
        var inp1 = new Input('num1',"Number", Socket.num);
        var inp2 = new Input('num2', "Number", Socket.num);
        var out = new Output('num', "Number", Socket.num);

        inp1.addControl(new Field(this.editor, 'num1', 'number'))
        inp2.addControl(new Field(this.editor, 'num2', 'number'))

        return node
            .addInput(inp1)
            .addInput(inp2)
            .addControl(new Field(this.editor, 'preview',  'number', true))
            .addOutput(out);
    }
github Ni55aN / allmatter / src / editor / components / texture / blur.js View on Github external
builder(node) {
        super.builder(node);

        const inp = new Input('image', 'Image', sockets.image);
        const inp2 = new Input('radius', 'Radius', sockets.image);

        inp2.addControl(new FieldControl(this.editor, 'radius', {type: 'number', value: 1}));

        return node
            .addInput(inp)
            .addInput(inp2);
    }
github retejs / rete.js.org / src / rete / components / alert-component.js View on Github external
builder(node) {
      const ctrl = new FieldControl(this.editor, 'msg', false);
      
      ctrl.setValue(node.data.msg);

      node
        .addControl(ctrl)
        .addInput(new Input('act', '', Socket.action));
    }

rete

JavaScript framework

MIT
Latest version published 3 months ago

Package Health Score

87 / 100
Full package analysis