Files
armorpaint/base/Sources/nodes/StringNode.ts
T

22 lines
393 B
TypeScript
Raw Normal View History

2024-01-17 18:53:31 +01:00
// @:keep
class StringNode extends LogicNode {
value: string;
constructor(value = "") {
super();
this.value = value;
}
override get = (from: i32, done: (a: any)=>void) => {
if (this.inputs.length > 0) this.inputs[0].get(done);
else done(this.value);
}
override set = (value: any) => {
if (this.inputs.length > 0) this.inputs[0].set(value);
else this.value = value;
}
}