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

51 lines
788 B
TypeScript
Raw Normal View History

2023-02-16 14:19:00 +01:00
2023-02-14 17:16:40 +01:00
class TimeNode extends LogicNode {
2024-01-17 18:53:31 +01:00
constructor() {
2023-12-12 14:57:44 +01:00
super();
2023-02-14 17:16:40 +01:00
}
2024-01-17 18:53:31 +01:00
override get = (from: i32, done: (a: any)=>void) => {
2024-02-05 20:57:20 +01:00
if (from == 0) done(time_time());
else if (from == 1) done(time_delta());
2023-02-27 21:13:25 +01:00
else done(Context.raw.brushTime);
2023-02-14 17:16:40 +01:00
}
2023-02-22 19:52:02 +01:00
2024-02-06 19:32:21 +01:00
static def: zui_node_t = {
2023-02-22 19:52:02 +01:00
id: 0,
name: _tr("Time"),
type: "TimeNode",
x: 0,
y: 0,
color: 0xff4982a0,
inputs: [],
outputs: [
{
id: 0,
node_id: 0,
name: _tr("Time"),
type: "VALUE",
color: 0xffa1a1a1,
default_value: 0.0
},
{
id: 0,
node_id: 0,
name: _tr("Delta"),
type: "VALUE",
color: 0xffa1a1a1,
default_value: 0.0
},
{
id: 0,
node_id: 0,
name: _tr("Brush"),
type: "VALUE",
color: 0xffa1a1a1,
default_value: 0.0
}
],
buttons: []
};
2023-02-14 17:16:40 +01:00
}