mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 18:56:02 +10:00
update to node site
This commit is contained in:
19
website/scripts/GraphComment.js
Normal file
19
website/scripts/GraphComment.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Represents a comment box for annotating/grouping nodes.
|
||||
* Similar to Unreal Engine blueprint comments.
|
||||
*/
|
||||
export class GraphComment {
|
||||
/**
|
||||
* @param {{ id: string, title: string, position: {x:number,y:number}, size: {width:number,height:number}, color?: string, opacity?: number }} init
|
||||
*/
|
||||
constructor(init) {
|
||||
this.id = init.id;
|
||||
this.title = init.title;
|
||||
this.position = { ...init.position };
|
||||
this.size = { ...init.size };
|
||||
/** @type {string} */
|
||||
this.color = init.color || "#4a5568";
|
||||
/** @type {number} */
|
||||
this.opacity = init.opacity ?? 0.15;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user