/** if set to true some nodes like Formula would be allowed to evaluate code that comes from unsafe sources (like node configuration), which could lead to exploits */
* returns the bounding of the object, used for rendering purposes
* @return [x, y, width, height]
*/
getBounding():Vector4;
/** checks if a point is inside the shape of a node */
isPointInside(
x:number,
y:number,
margin?:number,
skipTitle?:boolean
):boolean;
/** checks if a point is inside a node slot, and returns info about which slot */
getSlotInPosition(
x:number,
y:number
):{
input?:INodeInputSlot;
output?:INodeOutputSlot;
slot:number;
link_pos:Vector2;
};
/**
* returns the input slot with a given name (used for dynamic slots), -1 if not found
* @param name the name of the slot
* @return the slot (-1 if not found)
*/
findInputSlot(name:string):number;
/**
* returns the output slot with a given name (used for dynamic slots), -1 if not found
* @param name the name of the slot
* @return the slot (-1 if not found)
*/
findOutputSlot(name:string):number;
/**
* connect this node output to the input of another node
* @param slot (could be the number of the slot or the string with the name of the slot)
* @param targetNode the target node
* @param targetSlot the input slot of the target node (could be the number of the slot or the string with the name of the slot, or -1 to connect a trigger)
* @return {Object} the link_info is created, otherwise null
*/
connect<T=any>(
slot:number|string,
targetNode:LGraphNode,
targetSlot:number|string
):T|null;
/**
* disconnect one output to an specific node
* @param slot (could be the number of the slot or the string with the name of the slot)
* @param target_node the target node to which this slot is connected [Optional, if not target_node is specified all nodes will be disconnected]
/** binds mouse, keyboard, touch and drag events to the canvas */
bindEvents():void;
/** unbinds mouse events from the canvas */
unbindEvents():void;
/**
* this function allows to render the canvas using WebGL instead of Canvas2D
* this is useful if you plant to render 3D objects inside your nodes, it uses litegl.js for webgl and canvas2DtoWebGL to emulate the Canvas2D calls in webGL
**/
enableWebGL():void;
/**
* marks as dirty the canvas, this way it will be rendered again
* @param fg if the foreground canvas is dirty (the one containing the nodes)
* @param bg if the background canvas is dirty (the one containing the wires)
*/
setDirty(fg:boolean,bg:boolean):void;
/**
* Used to attach the canvas in a popup
* @return the window where the canvas is attached (the DOM root node)
*/
getCanvasWindow():Window;
/** starts rendering the content of the canvas when needed */
startRendering():void;
/** stops rendering the content of the canvas (to save resources) */
/** renders the whole canvas content, by rendering in two separated canvas, one containing the background grid and the connections, and one containing the nodes) */
draw(forceFG?:boolean,forceBG?:boolean):void;
/** draws the front canvas (the one containing all the nodes) */
drawFrontCanvas():void;
/** draws some useful stats in the corner of the canvas */