mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 02:36:04 +10:00
Initial commit
moved from private version control
This commit is contained in:
29
scripts/nodes/library/lua/rawEqual.js
Normal file
29
scripts/nodes/library/lua/rawEqual.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { createNodeModule } from "../../nodeTypes.js";
|
||||
|
||||
/**
|
||||
* Compares two values using rawequal().
|
||||
*/
|
||||
export const luaRawEqualNode = createNodeModule(
|
||||
{
|
||||
id: "lua_rawequal",
|
||||
title: "Raw Equal",
|
||||
category: "Lua",
|
||||
description: "Compare values without metamethods using rawequal().",
|
||||
searchTags: ["rawequal", "compare", "lua"],
|
||||
inputs: [
|
||||
{ id: "a", name: "A", direction: "input", kind: "any" },
|
||||
{ id: "b", name: "B", direction: "input", kind: "any" },
|
||||
],
|
||||
outputs: [
|
||||
{ id: "equal", name: "Equal", direction: "output", kind: "boolean" },
|
||||
],
|
||||
properties: [],
|
||||
},
|
||||
{
|
||||
evaluateValue: ({ resolveValueInput }) => {
|
||||
const a = resolveValueInput("a", "nil");
|
||||
const b = resolveValueInput("b", "nil");
|
||||
return `rawequal(${a}, ${b})`;
|
||||
},
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user