Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

retejs/stage0-render-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stage0 Render

This repo is not maintained any more

====

Rete.js plugin

Rete renderer using https://www.npmjs.com/package/stage0 (~1.6 kB framework)

Example: https://codepen.io/anon/pen/jQBxKe

This package features a separate CSS stylesheet which you can, for example, reference in your index.html:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/stage0-menu-plugin.debug.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/stage0-render-plugin.debug.css">
import Stage0RenderPlugin from 'rete-stage0-render-plugin';

editor.use(Stage0RenderPlugin);
import CustomNodeComponent from './CustomNodeComponent.js';

class MyComponent extends Rete.Component {
    constructor(){
        // ...
        this.data.render = 'stage0';
        this.data.component = CustomNodeComponent; // stage0.js component, not required
        this.data.props = {}; // props for the component above, not required
    }
}
const node = editor.nodes[0];
const control = node.controls.get('ctrl');

node.update(); // force update
control.update(); // of view

// in some cases you can gt stage0.js context
node.stage0Context
control.stage0Context

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •