mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 10:46:06 +10:00
Initial commit
moved from private version control
This commit is contained in:
26
scripts/nodes/library/eventDraw.js
Normal file
26
scripts/nodes/library/eventDraw.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { createNodeModule } from "../nodeTypes.js";
|
||||
|
||||
/**
|
||||
* Lifecycle event triggered once per visible frame.
|
||||
* @type {import('../nodeTypes.js').NodeModule}
|
||||
*/
|
||||
export const eventDrawNode = createNodeModule(
|
||||
{
|
||||
id: "event_draw",
|
||||
title: "Event Draw",
|
||||
category: "Events",
|
||||
description: "Called once per visible frame.",
|
||||
searchTags: ["draw", "render", "frame", "loop"],
|
||||
unique: true,
|
||||
inputs: [],
|
||||
outputs: [
|
||||
{ id: "exec_out", name: "Exec", direction: "output", kind: "exec" },
|
||||
],
|
||||
properties: [],
|
||||
},
|
||||
{
|
||||
isEntryPoint: true,
|
||||
eventName: "_draw",
|
||||
emitExec: ({ emitNextExec }) => emitNextExec("exec_out"),
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user