geonodes-web-render 0.3.25 → 0.3.27
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 +38 -18
- package/package.json +1 -1
package/dist/embed.js
CHANGED
|
@@ -8110,7 +8110,26 @@ function wf(e) {
|
|
|
8110
8110
|
parentFrameId: e.parentFrameId
|
|
8111
8111
|
})), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
8112
8112
|
for (let e of t) for (let t of [...e.inputs, ...e.outputs]) n.set(t.id, e.id), r.set(t.id, t);
|
|
8113
|
-
let i =
|
|
8113
|
+
let i = /* @__PURE__ */ new Map();
|
|
8114
|
+
for (let t of e.links) i.set(t.toSocketId, t.fromSocketId);
|
|
8115
|
+
let a = /* @__PURE__ */ new Map();
|
|
8116
|
+
for (let e of t) e.type === "NodeReroute" && e.outputs[0] && a.set(e.outputs[0].id, e);
|
|
8117
|
+
function o(e, t) {
|
|
8118
|
+
if (t.has(e.id)) return;
|
|
8119
|
+
t.add(e.id);
|
|
8120
|
+
let n = e.inputs[0]?.id;
|
|
8121
|
+
if (n == null) return;
|
|
8122
|
+
let s = i.get(n);
|
|
8123
|
+
if (s == null) return;
|
|
8124
|
+
let c = a.get(s);
|
|
8125
|
+
return c ? o(c, t) : r.get(s);
|
|
8126
|
+
}
|
|
8127
|
+
for (let e of t) {
|
|
8128
|
+
if (e.type !== "NodeReroute") continue;
|
|
8129
|
+
let t = o(e, /* @__PURE__ */ new Set());
|
|
8130
|
+
if (t) for (let n of [...e.inputs, ...e.outputs]) n.color = t.color, n.dataType = t.dataType;
|
|
8131
|
+
}
|
|
8132
|
+
let s = e.links.map((e) => ({
|
|
8114
8133
|
id: e.id,
|
|
8115
8134
|
sourceNodeId: n.get(e.fromSocketId) ?? "",
|
|
8116
8135
|
sourceSocketId: e.fromSocketId,
|
|
@@ -8122,7 +8141,7 @@ function wf(e) {
|
|
|
8122
8141
|
id: e.id,
|
|
8123
8142
|
label: e.label,
|
|
8124
8143
|
nodes: t,
|
|
8125
|
-
edges:
|
|
8144
|
+
edges: s
|
|
8126
8145
|
};
|
|
8127
8146
|
}
|
|
8128
8147
|
//#endregion
|
|
@@ -8178,7 +8197,7 @@ function Df(e) {
|
|
|
8178
8197
|
}
|
|
8179
8198
|
return r;
|
|
8180
8199
|
}
|
|
8181
|
-
function Of(e, t) {
|
|
8200
|
+
function Of(e, t, n) {
|
|
8182
8201
|
if (e.type === "NodeReroute") {
|
|
8183
8202
|
let t = e.outputs[0]?.color ?? e.inputs[0]?.color ?? "#888888";
|
|
8184
8203
|
return {
|
|
@@ -8196,6 +8215,7 @@ function Of(e, t) {
|
|
|
8196
8215
|
}
|
|
8197
8216
|
};
|
|
8198
8217
|
}
|
|
8218
|
+
let r = e.type === "NodeGroupInput" ? e.outputs.filter((e) => n.has(e.id)) : e.outputs;
|
|
8199
8219
|
return {
|
|
8200
8220
|
id: e.id,
|
|
8201
8221
|
type: "gnNode",
|
|
@@ -8209,7 +8229,7 @@ function Of(e, t) {
|
|
|
8209
8229
|
width: e.width,
|
|
8210
8230
|
headerColor: e.headerColor,
|
|
8211
8231
|
inputs: e.inputs,
|
|
8212
|
-
outputs:
|
|
8232
|
+
outputs: r,
|
|
8213
8233
|
connectedInputIds: e.inputs.filter((e) => t.has(e.id)).map((e) => e.id),
|
|
8214
8234
|
floatCurve: e.floatCurve,
|
|
8215
8235
|
colorRamp: e.colorRamp,
|
|
@@ -8244,20 +8264,20 @@ function kf(e, t, n) {
|
|
|
8244
8264
|
return l;
|
|
8245
8265
|
}
|
|
8246
8266
|
function Af(e) {
|
|
8247
|
-
let t = new Set(e.edges.map((e) => e.targetSocketId)), n =
|
|
8248
|
-
if (
|
|
8249
|
-
let t = kf(
|
|
8267
|
+
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;
|
|
8268
|
+
if (a && o) {
|
|
8269
|
+
let t = kf(a.id, o.id, e);
|
|
8250
8270
|
if (t.size > 0) {
|
|
8251
|
-
let n = new Map(e.nodes.map((e) => [e.id, e])),
|
|
8271
|
+
let n = new Map(e.nodes.map((e) => [e.id, e])), r = Infinity, c = -Infinity;
|
|
8252
8272
|
for (let e of t) {
|
|
8253
8273
|
let t = n.get(e);
|
|
8254
|
-
t && (
|
|
8274
|
+
t && (r = Math.min(r, t.position.y), c = Math.max(c, t.position.y + Tf(t)));
|
|
8255
8275
|
}
|
|
8256
|
-
let l =
|
|
8257
|
-
if (Number.isFinite(
|
|
8258
|
-
let e = d, t =
|
|
8259
|
-
|
|
8260
|
-
id: `zone:simulation:${
|
|
8276
|
+
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);
|
|
8277
|
+
if (Number.isFinite(r) && Number.isFinite(c) && Number.isFinite(d) && Number.isFinite(f)) {
|
|
8278
|
+
let e = d, t = r - 26, n = f - d, o = c - r + 52;
|
|
8279
|
+
s = [{
|
|
8280
|
+
id: `zone:simulation:${a.id}`,
|
|
8261
8281
|
type: "simulationZone",
|
|
8262
8282
|
position: {
|
|
8263
8283
|
x: e,
|
|
@@ -8269,15 +8289,15 @@ function Af(e) {
|
|
|
8269
8289
|
data: {},
|
|
8270
8290
|
style: {
|
|
8271
8291
|
width: n,
|
|
8272
|
-
height:
|
|
8292
|
+
height: o,
|
|
8273
8293
|
zIndex: -10
|
|
8274
8294
|
}
|
|
8275
|
-
}, ...
|
|
8295
|
+
}, ...i];
|
|
8276
8296
|
}
|
|
8277
8297
|
}
|
|
8278
8298
|
}
|
|
8279
8299
|
return {
|
|
8280
|
-
nodes: [...
|
|
8300
|
+
nodes: [...r, ...s],
|
|
8281
8301
|
edges: e.edges.map((e) => ({
|
|
8282
8302
|
id: e.id,
|
|
8283
8303
|
source: e.sourceNodeId,
|
|
@@ -9044,7 +9064,7 @@ function vp(e) {
|
|
|
9044
9064
|
className: "gn-top-left",
|
|
9045
9065
|
children: [/* @__PURE__ */ _("span", {
|
|
9046
9066
|
className: "gn-version-badge",
|
|
9047
|
-
children: ["node-web-render v", "0.3.
|
|
9067
|
+
children: ["node-web-render v", "0.3.27"]
|
|
9048
9068
|
}), i.length > 1 ? /* @__PURE__ */ g("nav", {
|
|
9049
9069
|
className: "gn-breadcrumbs",
|
|
9050
9070
|
"aria-label": "Node group path",
|
package/package.json
CHANGED