geonodes-web-render 0.3.25 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed.js +17 -16
- package/package.json +1 -1
package/dist/embed.js
CHANGED
|
@@ -8178,7 +8178,7 @@ function Df(e) {
|
|
|
8178
8178
|
}
|
|
8179
8179
|
return r;
|
|
8180
8180
|
}
|
|
8181
|
-
function Of(e, t) {
|
|
8181
|
+
function Of(e, t, n) {
|
|
8182
8182
|
if (e.type === "NodeReroute") {
|
|
8183
8183
|
let t = e.outputs[0]?.color ?? e.inputs[0]?.color ?? "#888888";
|
|
8184
8184
|
return {
|
|
@@ -8196,6 +8196,7 @@ function Of(e, t) {
|
|
|
8196
8196
|
}
|
|
8197
8197
|
};
|
|
8198
8198
|
}
|
|
8199
|
+
let r = e.type === "NodeGroupInput" ? e.outputs.filter((e) => n.has(e.id)) : e.outputs;
|
|
8199
8200
|
return {
|
|
8200
8201
|
id: e.id,
|
|
8201
8202
|
type: "gnNode",
|
|
@@ -8209,7 +8210,7 @@ function Of(e, t) {
|
|
|
8209
8210
|
width: e.width,
|
|
8210
8211
|
headerColor: e.headerColor,
|
|
8211
8212
|
inputs: e.inputs,
|
|
8212
|
-
outputs:
|
|
8213
|
+
outputs: r,
|
|
8213
8214
|
connectedInputIds: e.inputs.filter((e) => t.has(e.id)).map((e) => e.id),
|
|
8214
8215
|
floatCurve: e.floatCurve,
|
|
8215
8216
|
colorRamp: e.colorRamp,
|
|
@@ -8244,20 +8245,20 @@ function kf(e, t, n) {
|
|
|
8244
8245
|
return l;
|
|
8245
8246
|
}
|
|
8246
8247
|
function Af(e) {
|
|
8247
|
-
let t = new Set(e.edges.map((e) => e.targetSocketId)), n =
|
|
8248
|
-
if (
|
|
8249
|
-
let t = kf(
|
|
8248
|
+
let t = new Set(e.edges.map((e) => e.targetSocketId)), n = new Set(e.edges.map((e) => e.sourceSocketId)), r = Df(e), i = e.nodes.filter((e) => e.type !== "NodeFrame").map((e) => Of(e, t, n)), a = e.nodes.find((e) => e.type === "GeometryNodeSimulationInput"), o = e.nodes.find((e) => e.type === "GeometryNodeSimulationOutput"), s = i;
|
|
8249
|
+
if (a && o) {
|
|
8250
|
+
let t = kf(a.id, o.id, e);
|
|
8250
8251
|
if (t.size > 0) {
|
|
8251
|
-
let n = new Map(e.nodes.map((e) => [e.id, e])),
|
|
8252
|
+
let n = new Map(e.nodes.map((e) => [e.id, e])), r = Infinity, c = -Infinity;
|
|
8252
8253
|
for (let e of t) {
|
|
8253
8254
|
let t = n.get(e);
|
|
8254
|
-
t && (
|
|
8255
|
+
t && (r = Math.min(r, t.position.y), c = Math.max(c, t.position.y + Tf(t)));
|
|
8255
8256
|
}
|
|
8256
|
-
let l =
|
|
8257
|
-
if (Number.isFinite(
|
|
8258
|
-
let e = d, t =
|
|
8259
|
-
|
|
8260
|
-
id: `zone:simulation:${
|
|
8257
|
+
let l = a.position.x + a.width / 2, u = o.position.x + o.width / 2, d = Math.min(l, u), f = Math.max(l, u);
|
|
8258
|
+
if (Number.isFinite(r) && Number.isFinite(c) && Number.isFinite(d) && Number.isFinite(f)) {
|
|
8259
|
+
let e = d, t = r - 26, n = f - d, o = c - r + 52;
|
|
8260
|
+
s = [{
|
|
8261
|
+
id: `zone:simulation:${a.id}`,
|
|
8261
8262
|
type: "simulationZone",
|
|
8262
8263
|
position: {
|
|
8263
8264
|
x: e,
|
|
@@ -8269,15 +8270,15 @@ function Af(e) {
|
|
|
8269
8270
|
data: {},
|
|
8270
8271
|
style: {
|
|
8271
8272
|
width: n,
|
|
8272
|
-
height:
|
|
8273
|
+
height: o,
|
|
8273
8274
|
zIndex: -10
|
|
8274
8275
|
}
|
|
8275
|
-
}, ...
|
|
8276
|
+
}, ...i];
|
|
8276
8277
|
}
|
|
8277
8278
|
}
|
|
8278
8279
|
}
|
|
8279
8280
|
return {
|
|
8280
|
-
nodes: [...
|
|
8281
|
+
nodes: [...r, ...s],
|
|
8281
8282
|
edges: e.edges.map((e) => ({
|
|
8282
8283
|
id: e.id,
|
|
8283
8284
|
source: e.sourceNodeId,
|
|
@@ -9044,7 +9045,7 @@ function vp(e) {
|
|
|
9044
9045
|
className: "gn-top-left",
|
|
9045
9046
|
children: [/* @__PURE__ */ _("span", {
|
|
9046
9047
|
className: "gn-version-badge",
|
|
9047
|
-
children: ["node-web-render v", "0.3.
|
|
9048
|
+
children: ["node-web-render v", "0.3.26"]
|
|
9048
9049
|
}), i.length > 1 ? /* @__PURE__ */ g("nav", {
|
|
9049
9050
|
className: "gn-breadcrumbs",
|
|
9050
9051
|
"aria-label": "Node group path",
|
package/package.json
CHANGED