Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

trsh/stage0-rete-context-menu-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rete Stage0 renderer menu plugin

Rete.js plugin

import Stage0MenuPlugin from 'stage0-rete-menu-plugin';

editor.use(MenuPlugin, {
    searchBar: false,
    delay: 100,
    docked: true, // If you want Blender style docked menu
    allocate(component) {
        if (component.name == "Number") {
            return false; // Don't add
        }
        return ["submenu", "subsubmenu"];
    },
    items: { // Hand crafted menu
        "Menu": {
            "Add component": components[1],
            "Fn": () => {
                alert("Fn");
            }
        }
    }
});
Options Description Default
searchBar Showing search bar true
delay Delay hide, ms 1000
allocate function for placing of components into submenu () => []

You can arbitrarily put a component in a submenu. Examples:

allocate() { return ["Single submenu"] }
allocate(component) { return component.path } // where path is a stack of menu for every component

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published