@xifu/shader-graph-glsl 0.4.0 → 0.4.2
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/editor/index.js +10 -5
- package/package.json +1 -1
package/dist/editor/index.js
CHANGED
|
@@ -2988,7 +2988,7 @@ var Moveable = ({ gap = 0, children, x = 0, y = 0, z, containerEl }) => {
|
|
|
2988
2988
|
let canRect = [0, 0, innerWidth, innerHeight, 0, 0];
|
|
2989
2989
|
if (containerEl) {
|
|
2990
2990
|
const { x: x2, y: y2, width, height } = containerEl.getBoundingClientRect();
|
|
2991
|
-
const {
|
|
2991
|
+
const { left: offsetLeft, top: offsetTop } = el.parentElement.getBoundingClientRect();
|
|
2992
2992
|
canRect = [x2, y2, width, height, offsetLeft, offsetTop];
|
|
2993
2993
|
}
|
|
2994
2994
|
canRectCache = canRect;
|
|
@@ -3058,7 +3058,7 @@ var Popup = ({ visiable = false, children, view, onShowChange, mask = true, keep
|
|
|
3058
3058
|
if (view) view._setPopupShow = setShow;
|
|
3059
3059
|
setShowRef.current = setShow;
|
|
3060
3060
|
useEffect5(() => {
|
|
3061
|
-
if (show !== visiable) setShow(visiable);
|
|
3061
|
+
if (!view && show !== visiable) setShow(visiable);
|
|
3062
3062
|
}, [visiable]);
|
|
3063
3063
|
const close = (e) => {
|
|
3064
3064
|
e.preventDefault();
|
|
@@ -13873,9 +13873,14 @@ var BlackBoardView = class extends PopupView {
|
|
|
13873
13873
|
return this.data.map((i) => ({ name: i.name, type: i.type, defalutValue: i.defalutValue, exposed: i.exposed, typeEdit: i.typeEdit }));
|
|
13874
13874
|
}
|
|
13875
13875
|
addParameter(type, editing = false, typeEdit, customName) {
|
|
13876
|
-
const nextIndex = this.data.filter((i) => i.type == type).length;
|
|
13877
13876
|
let name = customName || ValueTypeNameMap[type];
|
|
13878
|
-
if (
|
|
13877
|
+
if (name === customName) {
|
|
13878
|
+
const existingCount = this.data.filter((i) => i.name === customName).length;
|
|
13879
|
+
if (existingCount > 0) name = `${customName}(${existingCount})`;
|
|
13880
|
+
} else {
|
|
13881
|
+
const nextIndex = this.data.filter((i) => i.type == type).length;
|
|
13882
|
+
if (nextIndex) name += `(${nextIndex})`;
|
|
13883
|
+
}
|
|
13879
13884
|
this.data.push({ name, type, exposed: true, defalutValue: ValueTypeCtor[type]?.(), editing, typeEdit });
|
|
13880
13885
|
this.update();
|
|
13881
13886
|
}
|
|
@@ -14162,7 +14167,7 @@ var ListIOItem = ({ list, value, onChange }) => {
|
|
|
14162
14167
|
// package.json
|
|
14163
14168
|
var package_default = {
|
|
14164
14169
|
name: "@xifu/shader-graph-glsl",
|
|
14165
|
-
version: "0.4.
|
|
14170
|
+
version: "0.4.2",
|
|
14166
14171
|
description: "Shader Graph GLSL \u2014 visual node-based shader editor & runtime engine",
|
|
14167
14172
|
type: "module",
|
|
14168
14173
|
private: false,
|