Skip to content

Commit a238945

Browse files
committed
fix for top level gl compositions
1 parent 20de45d commit a238945

File tree

3 files changed

+373
-24
lines changed

3 files changed

+373
-24
lines changed
Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
{
2+
"schemaType": "flow",
3+
"schemaVersion": "0.0.1",
4+
"id": "1234",
5+
"flows": {
6+
"flow": {
7+
"flowType": "flow",
8+
"nodes": [
9+
{
10+
"id": "5bfcbfde-9445-4213-b984-e2c4c476fe21",
11+
"x": -18.910383818631928,
12+
"y": -537.7519447545573,
13+
"width": 199.9999904278737,
14+
"height": 154.99999760696844,
15+
"nodeType": "Shape",
16+
"nodeInfo": {
17+
"type": "uv-node",
18+
"formValues": {},
19+
"nodeCannotBeReplaced": false,
20+
"showFormOnlyInPopup": false,
21+
"useInCompositionOnly": false,
22+
"keepPopupOpenAfterUpdate": false,
23+
"taskType": "uv-node"
24+
}
25+
},
26+
{
27+
"id": "13d20998-ef7e-4e35-829d-8887024c781b",
28+
"x": 836.2635422388732,
29+
"y": -513.3071557404312,
30+
"width": 219.99996274219947,
31+
"height": 204.99999760696844,
32+
"nodeType": "Shape",
33+
"nodeInfo": {
34+
"type": "output-color-node",
35+
"formValues": {},
36+
"taskType": "output-color-node"
37+
}
38+
},
39+
{
40+
"id": "bbcb074c-22e6-47c7-bb6d-71180ffe14fb",
41+
"x": 181.0896066092418,
42+
"y": -407.75194475455726,
43+
"endX": 431.5773177712002,
44+
"endY": -398.443763353466,
45+
"startNodeId": "5bfcbfde-9445-4213-b984-e2c4c476fe21",
46+
"endNodeId": "b241be6e-bb7f-4e99-92e1-7a26abed5726",
47+
"startThumbName": "vector",
48+
"endThumbName": "c5052266-dc9b-40f7-bfb3-22fa15e104d0",
49+
"lineType": "BezierCubic",
50+
"nodeType": "Connection",
51+
"layer": 1,
52+
"nodeInfo": {}
53+
},
54+
{
55+
"id": "e7166984-c806-4e8d-9ce0-59c275368c1c",
56+
"x": 631.5773094825711,
57+
"y": -398.443763353466,
58+
"endX": 836.2635422388732,
59+
"endY": -483.3071557404312,
60+
"startNodeId": "b241be6e-bb7f-4e99-92e1-7a26abed5726",
61+
"endNodeId": "13d20998-ef7e-4e35-829d-8887024c781b",
62+
"startThumbName": "948b2022-4fc9-4ca3-a731-d1a107d96716",
63+
"endThumbName": "r",
64+
"lineType": "BezierCubic",
65+
"nodeType": "Connection",
66+
"layer": 1,
67+
"nodeInfo": {}
68+
},
69+
{
70+
"id": "b241be6e-bb7f-4e99-92e1-7a26abed5726",
71+
"x": 431.5773177712002,
72+
"y": -456.8968792474459,
73+
"width": 199.9999917113709,
74+
"height": 111.45310473337453,
75+
"nodeType": "Shape",
76+
"nodeInfo": {
77+
"type": "composition-2d0a6f75-8307-408f-b8e1-28b9a2446e47",
78+
"formValues": {},
79+
"nodeCannotBeReplaced": false,
80+
"showFormOnlyInPopup": false,
81+
"useInCompositionOnly": false,
82+
"keepPopupOpenAfterUpdate": false,
83+
"isComposition": true,
84+
"compositionId": "2d0a6f75-8307-408f-b8e1-28b9a2446e47",
85+
"taskType": "composition-2d0a6f75-8307-408f-b8e1-28b9a2446e47"
86+
}
87+
}
88+
]
89+
}
90+
},
91+
"compositions": {
92+
"2d0a6f75-8307-408f-b8e1-28b9a2446e47": {
93+
"id": "2d0a6f75-8307-408f-b8e1-28b9a2446e47",
94+
"name": "test",
95+
"nodes": [
96+
{
97+
"id": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
98+
"x": 502.46416825182564,
99+
"y": -471.4347437877871,
100+
"width": 200,
101+
"height": 40,
102+
"nodeType": "Shape",
103+
"nodeInfo": {
104+
"type": "vector-length",
105+
"formValues": {},
106+
"nodeCannotBeReplaced": false,
107+
"showFormOnlyInPopup": false,
108+
"useInCompositionOnly": false,
109+
"keepPopupOpenAfterUpdate": false
110+
},
111+
"connections": [
112+
{
113+
"id": "24cdcb89-cab3-406a-b32e-792d74baa595",
114+
"x": 171.7623966637363,
115+
"y": -435.26655472228197,
116+
"endX": 502.46416825182564,
117+
"endY": -451.4347437877871,
118+
"startNodeId": "c5052266-dc9b-40f7-bfb3-22fa15e104d0",
119+
"endNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
120+
"startThumbName": "output",
121+
"endThumbName": "vector",
122+
"lineType": "BezierCubic",
123+
"nodeType": "Connection",
124+
"layer": 1,
125+
"nodeInfo": {},
126+
"connections": []
127+
},
128+
{
129+
"id": "ba03a811-aab7-4f55-b600-c87f881e9a7d",
130+
"x": 702.4641682518256,
131+
"y": -451.4347437877871,
132+
"endX": 971.76238709161,
133+
"endY": -435.26655472228197,
134+
"startNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
135+
"endNodeId": "948b2022-4fc9-4ca3-a731-d1a107d96716",
136+
"startThumbName": "output",
137+
"endThumbName": "input",
138+
"lineType": "BezierCubic",
139+
"nodeType": "Connection",
140+
"layer": 1,
141+
"nodeInfo": {},
142+
"connections": []
143+
}
144+
]
145+
},
146+
{
147+
"id": "c5052266-dc9b-40f7-bfb3-22fa15e104d0",
148+
"x": -28.237603336263703,
149+
"y": -533.766554722282,
150+
"width": 200,
151+
"height": 197,
152+
"nodeType": "Shape",
153+
"nodeInfo": {
154+
"type": "thumb-input",
155+
"formValues": {
156+
"valueType": "vec2",
157+
"thumbName": "Vector length"
158+
},
159+
"nodeCannotBeReplaced": false,
160+
"showFormOnlyInPopup": false,
161+
"useInCompositionOnly": false,
162+
"keepPopupOpenAfterUpdate": false
163+
},
164+
"connections": [
165+
{
166+
"id": "24cdcb89-cab3-406a-b32e-792d74baa595",
167+
"x": 171.7623966637363,
168+
"y": -435.26655472228197,
169+
"endX": 502.46416825182564,
170+
"endY": -451.4347437877871,
171+
"startNodeId": "c5052266-dc9b-40f7-bfb3-22fa15e104d0",
172+
"endNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
173+
"startThumbName": "output",
174+
"endThumbName": "vector",
175+
"lineType": "BezierCubic",
176+
"nodeType": "Connection",
177+
"layer": 1,
178+
"nodeInfo": {},
179+
"connections": []
180+
}
181+
]
182+
},
183+
{
184+
"id": "948b2022-4fc9-4ca3-a731-d1a107d96716",
185+
"x": 971.76238709161,
186+
"y": -533.766554722282,
187+
"width": 200.00006103515625,
188+
"height": 197,
189+
"nodeType": "Shape",
190+
"nodeInfo": {
191+
"type": "thumb-output",
192+
"formValues": {
193+
"valueType": "value",
194+
"thumbName": "output"
195+
},
196+
"nodeCannotBeReplaced": false,
197+
"showFormOnlyInPopup": false,
198+
"useInCompositionOnly": false,
199+
"keepPopupOpenAfterUpdate": false
200+
},
201+
"connections": [
202+
{
203+
"id": "ba03a811-aab7-4f55-b600-c87f881e9a7d",
204+
"x": 702.4641682518256,
205+
"y": -451.4347437877871,
206+
"endX": 971.76238709161,
207+
"endY": -435.26655472228197,
208+
"startNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
209+
"endNodeId": "948b2022-4fc9-4ca3-a731-d1a107d96716",
210+
"startThumbName": "output",
211+
"endThumbName": "input",
212+
"lineType": "BezierCubic",
213+
"nodeType": "Connection",
214+
"layer": 1,
215+
"nodeInfo": {},
216+
"connections": []
217+
}
218+
]
219+
},
220+
{
221+
"id": "24cdcb89-cab3-406a-b32e-792d74baa595",
222+
"x": 171.7623966637363,
223+
"y": -435.26655472228197,
224+
"endX": 502.46416825182564,
225+
"endY": -451.4347437877871,
226+
"startNodeId": "c5052266-dc9b-40f7-bfb3-22fa15e104d0",
227+
"endNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
228+
"startThumbName": "output",
229+
"endThumbName": "vector",
230+
"lineType": "BezierCubic",
231+
"nodeType": "Connection",
232+
"layer": 1,
233+
"nodeInfo": {},
234+
"connections": []
235+
},
236+
{
237+
"id": "ba03a811-aab7-4f55-b600-c87f881e9a7d",
238+
"x": 702.4641682518256,
239+
"y": -451.4347437877871,
240+
"endX": 971.76238709161,
241+
"endY": -435.26655472228197,
242+
"startNodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
243+
"endNodeId": "948b2022-4fc9-4ca3-a731-d1a107d96716",
244+
"startThumbName": "output",
245+
"endThumbName": "input",
246+
"lineType": "BezierCubic",
247+
"nodeType": "Connection",
248+
"layer": 1,
249+
"nodeInfo": {},
250+
"connections": []
251+
}
252+
],
253+
"thumbs": [
254+
{
255+
"thumbIndex": 0,
256+
"thumbType": "EndConnectorLeft",
257+
"connectionType": "end",
258+
"prefixLabel": "Vector length",
259+
"name": "vector_0",
260+
"internalName": "vector",
261+
"thumbConstraint": "vec2",
262+
"color": "white",
263+
"thumbIdentifierWithinNode": "1257e29c-cba9-4401-9f78-41fb4b2faa38",
264+
"nodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9"
265+
},
266+
{
267+
"thumbIndex": 0,
268+
"thumbType": "StartConnectorRight",
269+
"connectionType": "start",
270+
"name": "output_0",
271+
"internalName": "output",
272+
"thumbConstraint": "value",
273+
"color": "white",
274+
"thumbIdentifierWithinNode": "f6993d00-63e3-4ae3-85be-56cf31a20823",
275+
"nodeId": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9"
276+
}
277+
],
278+
"inputNodes": [
279+
{
280+
"id": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
281+
"x": 371.7623966637363,
282+
"y": -433.76655472228197,
283+
"width": 199.9999904278737,
284+
"height": 39.999944628651555,
285+
"nodeType": "Shape",
286+
"nodeInfo": {
287+
"type": "vector-length",
288+
"formValues": {},
289+
"nodeCannotBeReplaced": false,
290+
"showFormOnlyInPopup": false,
291+
"useInCompositionOnly": false,
292+
"keepPopupOpenAfterUpdate": false,
293+
"taskType": "vector-length"
294+
}
295+
}
296+
],
297+
"outputNodes": [
298+
{
299+
"id": "ebb02b6e-a1bd-4e5f-8944-2d1be011ebe9",
300+
"x": 371.7623966637363,
301+
"y": -433.76655472228197,
302+
"width": 199.9999904278737,
303+
"height": 39.999944628651555,
304+
"nodeType": "Shape",
305+
"nodeInfo": {
306+
"type": "vector-length",
307+
"formValues": {},
308+
"nodeCannotBeReplaced": false,
309+
"showFormOnlyInPopup": false,
310+
"useInCompositionOnly": false,
311+
"keepPopupOpenAfterUpdate": false,
312+
"taskType": "vector-length"
313+
}
314+
}
315+
]
316+
}
317+
}
318+
}

libs/app-canvas/src/app/gl-app.element.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,17 +1709,19 @@ export class GLAppElement extends AppElement<GLNodeInfo> {
17091709
const inputs: Record<string, string> = {};
17101710
(node?.connections ?? []).forEach((connection) => {
17111711
if (connection.endNode?.id === node.id) {
1712-
if (
1713-
connection.endNodeThumb?.thumbIdentifierWithinNode &&
1714-
connection.startNode
1715-
) {
1716-
inputs[connection.endNodeThumb.thumbIdentifierWithinNode] =
1717-
this.getNodeOutput(
1718-
connection.startNode,
1719-
connection.startNodeThumb?.thumbName ?? '',
1720-
connection.startNodeThumb?.thumbIdentifierWithinNode ?? ''
1721-
);
1722-
} else if (connection.endNodeThumb?.thumbName && connection.startNode) {
1712+
// if (
1713+
// connection.endNodeThumb?.thumbIdentifierWithinNode &&
1714+
// connection.startNode
1715+
// ) {
1716+
// inputs[connection.endNodeThumb.thumbIdentifierWithinNode] =
1717+
// this.getNodeOutput(
1718+
// connection.startNode,
1719+
// connection.startNodeThumb?.thumbName ?? '',
1720+
// connection.startNodeThumb?.thumbIdentifierWithinNode ?? ''
1721+
// );
1722+
// } else
1723+
1724+
if (connection.endNodeThumb?.thumbName && connection.startNode) {
17231725
inputs[connection.endNodeThumb.thumbName] = this.getNodeOutput(
17241726
connection.startNode,
17251727
connection.startNodeThumb?.thumbName ?? '',

0 commit comments

Comments
 (0)