@xifu/shader-graph-glsl 0.2.0 → 0.4.0

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.
@@ -1,4 +1,4 @@
1
- /* packages/editor/src/editor.css */
1
+ /* packages/editor/src/editor.less */
2
2
  .rete-node-view:hover {
3
3
  z-index: 1;
4
4
  }
@@ -432,6 +432,9 @@
432
432
  left: 0;
433
433
  will-change: transform;
434
434
  }
435
+ .sg-popup-can {
436
+ position: relative;
437
+ }
435
438
  .sg-popup-mask {
436
439
  position: fixed;
437
440
  top: 0;
@@ -985,3 +988,1091 @@
985
988
  .sg-popup-title {
986
989
  color: white;
987
990
  }
991
+
992
+ /* src/view/Block.less */
993
+ .sg-block {
994
+ min-width: 180px;
995
+ }
996
+
997
+ /* src/view/common/ContextIO.less */
998
+ .sg-context-input {
999
+ margin: 0 10px;
1000
+ }
1001
+ .sg-context-input-can {
1002
+ position: absolute;
1003
+ top: -13px;
1004
+ left: 0;
1005
+ right: 0;
1006
+ height: 0;
1007
+ display: flex;
1008
+ justify-content: center;
1009
+ }
1010
+ .sg-context-input-title {
1011
+ position: absolute;
1012
+ top: 0;
1013
+ right: 0;
1014
+ font-size: 13px;
1015
+ transform: translate(calc(100% + 5px), -100%);
1016
+ }
1017
+ .sg-context-output {
1018
+ margin: 0 10px;
1019
+ }
1020
+ .sg-context-output-can {
1021
+ position: absolute;
1022
+ left: 0;
1023
+ right: 0;
1024
+ bottom: 13px;
1025
+ height: 0;
1026
+ display: flex;
1027
+ justify-content: center;
1028
+ }
1029
+ .sg-context-output-title {
1030
+ position: absolute;
1031
+ bottom: 0;
1032
+ right: 0;
1033
+ transform: translate(calc(100% + 5px), 100%);
1034
+ font-size: 13px;
1035
+ }
1036
+
1037
+ /* src/view/common/Socket.less */
1038
+ .sg-socket {
1039
+ border: 1px solid white;
1040
+ border-radius: 100%;
1041
+ width: 10px;
1042
+ height: 10px;
1043
+ z-index: 2;
1044
+ box-sizing: border-box;
1045
+ position: relative;
1046
+ background-color: rgba(0, 0, 0, 0.7);
1047
+ }
1048
+ .sg-socket-can {
1049
+ cursor: pointer;
1050
+ padding: 8px 6px;
1051
+ position: relative;
1052
+ }
1053
+ .sg-socket-can[data-type=default] {
1054
+ pointer-events: none;
1055
+ }
1056
+ .sg-socket-can[data-type=output]::before,
1057
+ .sg-socket-can[data-type=input]::before {
1058
+ content: " ";
1059
+ position: absolute;
1060
+ width: 100%;
1061
+ height: 100%;
1062
+ top: 50%;
1063
+ left: 50%;
1064
+ z-index: 1;
1065
+ }
1066
+ .sg-socket-can[data-type=output]::before {
1067
+ transform: translate(0%, -50%) scale(2, 1.3);
1068
+ }
1069
+ .sg-socket-can[data-type=input]::before {
1070
+ transform: translate(-100%, -50%) scale(2, 1.3);
1071
+ }
1072
+ .sg-socket-can[data-vertical]::before {
1073
+ transform: translate(-50%, -50%) scale(1.2);
1074
+ }
1075
+ .sg-socket-can:hover .sg-socket-inner,
1076
+ .sg-socket[data-connected=true] .sg-socket-inner {
1077
+ opacity: 1;
1078
+ }
1079
+ .sg-socket[data-type=default] {
1080
+ cursor: unset;
1081
+ border-color: rgba(0, 0, 0, 0.822) !important;
1082
+ }
1083
+ .sg-socket[data-type=default] .sg-socket-inner {
1084
+ opacity: 1 !important;
1085
+ }
1086
+ .sg-socket-inner {
1087
+ width: 5px;
1088
+ height: 5px;
1089
+ border-radius: 100%;
1090
+ position: absolute;
1091
+ top: 0;
1092
+ left: 0;
1093
+ right: 0;
1094
+ bottom: 0;
1095
+ margin: auto;
1096
+ opacity: 0;
1097
+ }
1098
+
1099
+ /* src/view/common/IO.less */
1100
+ .sg-node-io-can {
1101
+ display: flex;
1102
+ width: 100%;
1103
+ user-select: none;
1104
+ }
1105
+ .sg-node-io-can[data-gap-top=true] {
1106
+ border-top: 1px solid rgba(0, 0, 0, 0.5);
1107
+ }
1108
+ .sg-node-io-can[data-gap-bottom=true] {
1109
+ border-bottom: 1px solid rgba(0, 0, 0, 0.5);
1110
+ }
1111
+ .sg-node-io-gap {
1112
+ width: 1px;
1113
+ flex: none;
1114
+ background-color: rgba(0, 0, 0, 0.5);
1115
+ }
1116
+ .sg-node-input {
1117
+ position: relative;
1118
+ z-index: 0;
1119
+ display: flex;
1120
+ justify-content: left;
1121
+ align-items: center;
1122
+ padding: 4px 10px 4px 0;
1123
+ }
1124
+ .sg-node-input-can {
1125
+ flex: 1;
1126
+ background-color: rgba(255, 255, 255, 0.15);
1127
+ }
1128
+ .sg-node-input-control {
1129
+ position: absolute;
1130
+ left: 0;
1131
+ transform: translateX(-100%);
1132
+ }
1133
+ .sg-node-input-title {
1134
+ white-space: nowrap;
1135
+ }
1136
+ .sg-node-output {
1137
+ display: flex;
1138
+ justify-content: right;
1139
+ align-items: center;
1140
+ padding: 4px 0px 4px 10px;
1141
+ }
1142
+ .sg-node-output-can {
1143
+ flex: 1;
1144
+ background-color: rgba(255, 255, 255, 0.05);
1145
+ }
1146
+ .sg-node-output-title {
1147
+ white-space: nowrap;
1148
+ }
1149
+
1150
+ /* src/view/controls/DefaultValueCan.less */
1151
+ .sg-default-value-can {
1152
+ background-color: rgba(255, 255, 255, 0.1);
1153
+ transform: translateX(-10px);
1154
+ display: flex;
1155
+ flex-wrap: nowrap;
1156
+ border-radius: 2px;
1157
+ align-items: center;
1158
+ border: 1px solid #202020;
1159
+ cursor: default;
1160
+ }
1161
+ .sg-default-value-line {
1162
+ width: 24px;
1163
+ height: 4px;
1164
+ position: absolute;
1165
+ top: 0;
1166
+ bottom: 0;
1167
+ right: 0;
1168
+ margin: auto;
1169
+ transform: translateX(calc(100% - 7px));
1170
+ z-index: -1;
1171
+ pointer-events: none;
1172
+ }
1173
+
1174
+ /* src/view/controls/ChannelMixerControl.less */
1175
+ .sg-channelmixer-channels {
1176
+ display: flex;
1177
+ justify-content: space-between;
1178
+ }
1179
+ .sg-channelmixer-btn {
1180
+ flex: 1;
1181
+ margin: 10px 2px;
1182
+ border-radius: 5px;
1183
+ background-color: #676767;
1184
+ position: relative;
1185
+ text-align: center;
1186
+ }
1187
+ .sg-channelmixer-btn::after {
1188
+ content: " ";
1189
+ display: block;
1190
+ border-radius: 5px;
1191
+ width: 100%;
1192
+ height: 10px;
1193
+ background-color: #242424;
1194
+ position: absolute;
1195
+ z-index: -1;
1196
+ left: 0;
1197
+ bottom: -10px;
1198
+ }
1199
+ .sg-channelmixer-btn[data-aria-selected=true] {
1200
+ background-color: #85aef4;
1201
+ }
1202
+
1203
+ /* src/view/controls/CustomFunctionControl.less */
1204
+ .sg-custom-fn {
1205
+ position: absolute;
1206
+ left: 100%;
1207
+ }
1208
+ .sg-custom-fn-can {
1209
+ position: absolute;
1210
+ top: 0;
1211
+ left: 0;
1212
+ z-index: 2;
1213
+ transform-origin: top left;
1214
+ background-color: #2b2b2b;
1215
+ }
1216
+ .sg-custom-fn-btn {
1217
+ user-select: none;
1218
+ cursor: pointer;
1219
+ }
1220
+ .sg-custom-fn-btn-toogle {
1221
+ width: 35px;
1222
+ height: 35px;
1223
+ font-size: 25px;
1224
+ text-align: center;
1225
+ line-height: 35px;
1226
+ position: absolute;
1227
+ }
1228
+ .sg-custom-fn-btn-help {
1229
+ margin: 0 5px;
1230
+ }
1231
+ .sg-custom-fn-head {
1232
+ height: 35px;
1233
+ display: flex;
1234
+ align-items: center;
1235
+ padding-left: 35px;
1236
+ }
1237
+ .sg-custom-fn-name {
1238
+ margin: 0 5px;
1239
+ }
1240
+ .sg-custom-fn-editor {
1241
+ text-align: left;
1242
+ min-height: 300px;
1243
+ height: 300px;
1244
+ width: 600px;
1245
+ position: relative;
1246
+ }
1247
+ .sg-custom-fn-editor .cm-tooltip {
1248
+ position: absolute !important;
1249
+ top: unset !important;
1250
+ left: 0 !important;
1251
+ bottom: 0 !important;
1252
+ transform: translateY(100%);
1253
+ }
1254
+ .sg-custom-fn-textarea-fallback {
1255
+ width: 100%;
1256
+ height: 300px !important;
1257
+ background: #1e1e1e;
1258
+ color: #ccc;
1259
+ border: 1px solid #333;
1260
+ padding: 8px;
1261
+ font-family: monospace;
1262
+ font-size: 13px;
1263
+ resize: vertical;
1264
+ }
1265
+
1266
+ /* src/view/common/Moveable.less */
1267
+ .sg-popup-movable {
1268
+ position: absolute;
1269
+ top: 0;
1270
+ left: 0;
1271
+ will-change: transform;
1272
+ }
1273
+
1274
+ /* src/view/common/Popup.less */
1275
+ .sg-popup-can {
1276
+ position: relative;
1277
+ }
1278
+ .sg-popup-mask {
1279
+ position: fixed;
1280
+ top: 0;
1281
+ left: 0;
1282
+ width: 100vw;
1283
+ height: 100vh;
1284
+ }
1285
+ .sg-popup-title {
1286
+ user-select: none;
1287
+ padding: 3px 5px 0 5px;
1288
+ }
1289
+
1290
+ /* src/view/common/Preview.less */
1291
+ .sg-preview {
1292
+ background-color: rgba(255, 255, 255, 0.1);
1293
+ display: flex;
1294
+ justify-content: center;
1295
+ position: relative;
1296
+ }
1297
+ .sg-preview-btn {
1298
+ width: 50px;
1299
+ height: 20px;
1300
+ display: flex;
1301
+ justify-content: center;
1302
+ align-items: center;
1303
+ cursor: pointer;
1304
+ user-select: none;
1305
+ }
1306
+ .sg-preview-btn:hover {
1307
+ background-color: rgba(0, 0, 0, 0.2);
1308
+ }
1309
+ .sg-preview-btn[data-aria-expanded=true] {
1310
+ transform: rotate(180deg);
1311
+ position: absolute;
1312
+ top: 10px;
1313
+ left: 0;
1314
+ right: 0;
1315
+ width: 20px;
1316
+ height: 20px;
1317
+ font-size: 18px;
1318
+ margin: auto;
1319
+ border: 1px solid white;
1320
+ border-radius: 2px;
1321
+ display: inline-flex;
1322
+ align-items: center;
1323
+ opacity: 0;
1324
+ background-color: rgba(0, 0, 0, 0.5);
1325
+ }
1326
+ .sg-preview-btn[data-aria-expanded=true]:hover {
1327
+ background-color: rgba(0, 0, 0, 0.7);
1328
+ opacity: 1 !important;
1329
+ }
1330
+ .sg-preview-canvas {
1331
+ width: 200px;
1332
+ height: 200px;
1333
+ }
1334
+ .sg-preview-canvas-can {
1335
+ background-color: #2b2b2b;
1336
+ }
1337
+ .sg-node:hover .sg-preview-btn[data-aria-expanded=true] {
1338
+ opacity: 0.5;
1339
+ }
1340
+
1341
+ /* src/view/common/Tree.less */
1342
+ .sg-tree-item {
1343
+ display: flex;
1344
+ user-select: none;
1345
+ }
1346
+ .sg-tree-item-name {
1347
+ color: #bababa;
1348
+ margin-right: 5px;
1349
+ text-align: left;
1350
+ }
1351
+ .sg-tree-item-name span[data-highlighted=true] {
1352
+ color: #eec670;
1353
+ }
1354
+ .sg-tree-item-name:nth-child(1):hover {
1355
+ color: white;
1356
+ }
1357
+ .sg-tree-item-head {
1358
+ flex: none;
1359
+ }
1360
+ .sg-tree-item-body {
1361
+ flex: 1;
1362
+ }
1363
+ .sg-tree-item-btn-expand {
1364
+ color: #686868;
1365
+ margin-right: 5px;
1366
+ opacity: 0;
1367
+ display: inline-block;
1368
+ }
1369
+ .sg-tree-item-btn-expand[data-aria-expanded=true] {
1370
+ transform: rotate(90deg);
1371
+ }
1372
+ .sg-tree-item-btn-expand[data-visible=true] {
1373
+ cursor: pointer;
1374
+ opacity: 1;
1375
+ }
1376
+ .sg-tree-item-btn-expand:hover {
1377
+ color: white;
1378
+ }
1379
+
1380
+ /* src/view/common/Title.less */
1381
+ .sg-title {
1382
+ flex: auto;
1383
+ text-align: left;
1384
+ padding: 8px 12px;
1385
+ }
1386
+ .sg-title-can {
1387
+ display: flex;
1388
+ position: relative;
1389
+ align-items: center;
1390
+ background-color: rgba(255, 255, 255, 0.2);
1391
+ }
1392
+ .sg-title-can .sg-btn-fold {
1393
+ margin-right: 12px;
1394
+ }
1395
+ .sg-btn-fold {
1396
+ width: 20px;
1397
+ height: 20px;
1398
+ display: inline-flex;
1399
+ justify-content: center;
1400
+ align-items: center;
1401
+ opacity: 0;
1402
+ cursor: pointer;
1403
+ transform: rotate(90deg);
1404
+ }
1405
+ .sg-btn-fold:hover {
1406
+ background-color: rgba(0, 0, 0, 0.2);
1407
+ }
1408
+ .sg-node:hover .sg-btn-fold {
1409
+ opacity: 1 !important;
1410
+ }
1411
+ .sg-btn-fold[data-aria-disabled=true] {
1412
+ background-color: transparent !important;
1413
+ color: gray;
1414
+ }
1415
+ .sg-btn-fold[data-aria-expanded=true] {
1416
+ transform: rotate(0deg);
1417
+ }
1418
+
1419
+ /* src/view/common/Select.less */
1420
+ .sg-select {
1421
+ margin: 5px;
1422
+ }
1423
+
1424
+ /* src/view/common/Label.less */
1425
+ .sg-label {
1426
+ flex: 1;
1427
+ display: flex;
1428
+ align-items: center;
1429
+ padding-left: 10px;
1430
+ }
1431
+ .sg-label-can {
1432
+ width: 100%;
1433
+ display: flex;
1434
+ }
1435
+ .sg-label[data-aria-disabled=true] {
1436
+ color: gray;
1437
+ }
1438
+
1439
+ /* src/view/common/MenuList.less */
1440
+ .sg-menu-list {
1441
+ background-color: #ececec;
1442
+ user-select: none;
1443
+ padding: 5px;
1444
+ border-radius: 5px;
1445
+ position: absolute;
1446
+ z-index: 1;
1447
+ }
1448
+ .sg-menu-list-can {
1449
+ opacity: 0;
1450
+ }
1451
+ .sg-menu-item {
1452
+ text-align: left;
1453
+ display: flex;
1454
+ color: black;
1455
+ padding: 0 5px;
1456
+ border-radius: 5px;
1457
+ font-size: 14px;
1458
+ min-width: 80px;
1459
+ position: relative;
1460
+ z-index: 0;
1461
+ }
1462
+ .sg-menu-item-name {
1463
+ flex: 1;
1464
+ }
1465
+ .sg-menu-item[data-aria-disabled=true] {
1466
+ color: #acacac;
1467
+ }
1468
+ .sg-menu-item[data-aria-disabled=true]:hover {
1469
+ color: #acacac;
1470
+ background-color: unset;
1471
+ }
1472
+ .sg-menu-item:hover {
1473
+ color: white;
1474
+ background-color: #2667d9;
1475
+ }
1476
+ .sg-menu-item:hover .sg-menu-submenu {
1477
+ display: block;
1478
+ }
1479
+ .sg-menu-submenu {
1480
+ position: absolute;
1481
+ top: -5px;
1482
+ display: none;
1483
+ }
1484
+ .sg-menu-submenu[data-position=right] {
1485
+ right: 0;
1486
+ transform: translateX(100%);
1487
+ }
1488
+ .sg-menu-submenu[data-position=left] {
1489
+ left: 0;
1490
+ transform: translateX(-100%);
1491
+ }
1492
+ .sg-menu-divider {
1493
+ margin: 5px;
1494
+ height: 1px;
1495
+ background-color: #d2d2d2;
1496
+ }
1497
+
1498
+ /* src/view/common/InputFloat.less */
1499
+ .sg-float-input {
1500
+ min-width: 0;
1501
+ width: 26px;
1502
+ }
1503
+ .sg-float-label {
1504
+ padding: 0 8px;
1505
+ cursor: ew-resize;
1506
+ }
1507
+
1508
+ /* src/view/common/InputAsset.less */
1509
+ .sg-input-asset {
1510
+ border: 1px solid #202020;
1511
+ border-radius: 5px;
1512
+ overflow: hidden;
1513
+ display: flex;
1514
+ align-items: center;
1515
+ max-width: 200px;
1516
+ width: 100%;
1517
+ }
1518
+ .sg-input-asset:hover {
1519
+ border-color: #656565;
1520
+ }
1521
+ .sg-input-asset-icon {
1522
+ flex: none;
1523
+ flex-shrink: 0;
1524
+ width: 15px;
1525
+ height: 15px;
1526
+ border: 1px solid #2d6cc2;
1527
+ margin: 0 5px;
1528
+ border-radius: 2px;
1529
+ }
1530
+ .sg-input-asset-label {
1531
+ flex: auto;
1532
+ flex-shrink: 1;
1533
+ white-space: nowrap;
1534
+ text-overflow: ellipsis;
1535
+ overflow: hidden;
1536
+ color: white;
1537
+ }
1538
+ .sg-input-asset-btn {
1539
+ flex: none;
1540
+ flex-shrink: 0;
1541
+ width: 28px;
1542
+ height: 100%;
1543
+ min-height: 25px;
1544
+ position: relative;
1545
+ z-index: 0;
1546
+ cursor: pointer;
1547
+ }
1548
+ .sg-input-asset-btn:hover {
1549
+ background-color: rgba(255, 255, 255, 0.15);
1550
+ }
1551
+ .sg-input-asset-btn::after,
1552
+ .sg-input-asset-btn::before {
1553
+ content: " ";
1554
+ display: block;
1555
+ position: absolute;
1556
+ top: 0;
1557
+ left: 0;
1558
+ right: 0;
1559
+ bottom: 0;
1560
+ margin: auto;
1561
+ border: 1px solid #c4c4c4;
1562
+ border-radius: 100%;
1563
+ }
1564
+ .sg-input-asset-btn::after {
1565
+ width: 12px;
1566
+ height: 12px;
1567
+ }
1568
+ .sg-input-asset-btn::before {
1569
+ width: 3px;
1570
+ height: 3px;
1571
+ background-color: #c4c4c4;
1572
+ }
1573
+
1574
+ /* src/view/common/Tab.less */
1575
+ .sg-tab-head {
1576
+ display: flex;
1577
+ align-items: center;
1578
+ flex-wrap: nowrap;
1579
+ overflow: auto;
1580
+ }
1581
+ .sg-tab-title {
1582
+ padding: 2px 6px;
1583
+ position: relative;
1584
+ z-index: 0;
1585
+ background-color: rgba(0, 0, 0, 0.2);
1586
+ }
1587
+ .sg-tab-title:hover {
1588
+ background-color: unset;
1589
+ }
1590
+ .sg-tab-title[data-aria-selected=true] {
1591
+ background-color: unset;
1592
+ }
1593
+ .sg-tab-title[data-aria-selected=true]::before {
1594
+ content: " ";
1595
+ display: block;
1596
+ position: absolute;
1597
+ top: 0;
1598
+ left: 0;
1599
+ right: 0;
1600
+ border-top: 2px solid #4979b6;
1601
+ }
1602
+
1603
+ /* src/view/common/InputGrid.less */
1604
+ .sg-input-grid {
1605
+ width: 100%;
1606
+ }
1607
+ .sg-input-grid-item {
1608
+ width: 30px;
1609
+ margin: 2px;
1610
+ }
1611
+
1612
+ /* src/view/common/InputList.less */
1613
+ .sg-input-list {
1614
+ border-top-left-radius: 3px;
1615
+ border-top-right-radius: 3px;
1616
+ overflow: hidden;
1617
+ }
1618
+ .sg-input-list-label {
1619
+ background-color: #b6b6b6;
1620
+ padding: 2px 5px;
1621
+ color: #0c0c0c;
1622
+ border-bottom: 1px solid #a4a4a4;
1623
+ font-size: 14.5px;
1624
+ }
1625
+ .sg-input-list-body {
1626
+ border-bottom-left-radius: 3px;
1627
+ border-bottom-right-radius: 3px;
1628
+ overflow: hidden;
1629
+ background-color: #c8c8c8;
1630
+ }
1631
+ .sg-input-list-body-placeholder {
1632
+ color: #0c0c0c;
1633
+ padding: 2px 5px;
1634
+ font-size: 14px;
1635
+ }
1636
+ .sg-input-list-btn {
1637
+ width: 30px;
1638
+ height: 20px;
1639
+ text-align: center;
1640
+ line-height: 16px;
1641
+ background-color: #c8c8c8;
1642
+ overflow: hidden;
1643
+ color: #555555;
1644
+ font-weight: bold;
1645
+ cursor: pointer;
1646
+ }
1647
+ .sg-input-list-btn:hover {
1648
+ background-color: #c1c1c1;
1649
+ }
1650
+ .sg-input-list-btn[data-aria-disabled=true] {
1651
+ color: #8e8e8e;
1652
+ cursor: default;
1653
+ }
1654
+ .sg-input-list-btn[data-aria-disabled=true]:hover {
1655
+ background-color: #c8c8c8;
1656
+ }
1657
+ .sg-input-list-btn-add {
1658
+ border-bottom-left-radius: 3px;
1659
+ }
1660
+ .sg-input-list-btn-del {
1661
+ border-bottom-right-radius: 3px;
1662
+ }
1663
+ .sg-input-list-btn-can {
1664
+ display: flex;
1665
+ justify-content: right;
1666
+ padding-right: 10px;
1667
+ }
1668
+
1669
+ /* src/view/common/Settings.less */
1670
+ .sg-inspector-setting {
1671
+ display: flex;
1672
+ font-size: 16px;
1673
+ align-items: center;
1674
+ margin: 2px 10px;
1675
+ }
1676
+ .sg-inspector-setting-select {
1677
+ margin: 0;
1678
+ }
1679
+ .sg-inspector-setting-label {
1680
+ flex-grow: 0;
1681
+ flex-shrink: 0;
1682
+ width: 120px;
1683
+ }
1684
+ .sg-inspector-setting-body,
1685
+ .sg-inspector-setting-select {
1686
+ width: 100%;
1687
+ }
1688
+
1689
+ /* src/view/common/Slider.less */
1690
+ .sg-slider-range {
1691
+ -webkit-appearance: none;
1692
+ width: 100%;
1693
+ height: 2px;
1694
+ background: #5e5e5e;
1695
+ outline: none;
1696
+ margin: 12px 10px;
1697
+ }
1698
+ .sg-slider-range:hover::-moz-range-thumb {
1699
+ background: #eaeaea;
1700
+ }
1701
+ .sg-slider-range:hover::-webkit-slider-thumb {
1702
+ background: #eaeaea;
1703
+ }
1704
+ .sg-slider-range::-webkit-slider-thumb {
1705
+ -webkit-appearance: none;
1706
+ appearance: none;
1707
+ width: 13px;
1708
+ height: 13px;
1709
+ background: #999999;
1710
+ cursor: pointer;
1711
+ border-radius: 100%;
1712
+ }
1713
+ .sg-slider-range::-moz-range-thumb {
1714
+ width: 13px;
1715
+ height: 13px;
1716
+ background: #999999;
1717
+ cursor: pointer;
1718
+ border-radius: 100%;
1719
+ }
1720
+ .sg-slider-number {
1721
+ width: 40px;
1722
+ }
1723
+
1724
+ /* src/view/Node.less */
1725
+ .sg-node {
1726
+ background-color: rgba(0, 0, 0, 0.5) !important;
1727
+ user-select: none;
1728
+ }
1729
+ .sg-node::after {
1730
+ content: " ";
1731
+ display: block;
1732
+ width: calc(100% + 3px);
1733
+ height: calc(100% + 3px);
1734
+ position: absolute;
1735
+ top: -2.5px;
1736
+ left: -2.5px;
1737
+ border: 1px solid transparent;
1738
+ border-radius: 5px;
1739
+ z-index: -1;
1740
+ }
1741
+ .sg-node:hover::after {
1742
+ border-color: #306782;
1743
+ }
1744
+ .sg-node.selected::after,
1745
+ .sg-node.highlight::after {
1746
+ border-color: #268bbd;
1747
+ border-width: 2px;
1748
+ top: -3.5px;
1749
+ left: -3.5px;
1750
+ }
1751
+ .sg-node.highlight::after {
1752
+ border-color: #17d3dd !important;
1753
+ }
1754
+ .sg-node-control-can {
1755
+ background-color: rgba(255, 255, 255, 0.15);
1756
+ }
1757
+
1758
+ /* src/view/Rete.less */
1759
+ .rete-node-view:hover {
1760
+ z-index: 1;
1761
+ }
1762
+ .rete-area-select {
1763
+ border: 1.5px dashed #7b5622;
1764
+ position: absolute;
1765
+ top: 0;
1766
+ left: 0;
1767
+ will-change: width, height;
1768
+ pointer-events: none;
1769
+ opacity: 0;
1770
+ }
1771
+ .rete-area-select.rete-area-select-active {
1772
+ opacity: 1;
1773
+ }
1774
+
1775
+ /* src/view/Context.less */
1776
+ .sg-context {
1777
+ padding: 8px 14px 5px 14px;
1778
+ background-color: rgba(0, 0, 0, 0.3);
1779
+ border-radius: 10px;
1780
+ user-select: none;
1781
+ position: relative;
1782
+ z-index: 0;
1783
+ }
1784
+ .sg-context::after {
1785
+ content: " ";
1786
+ display: block;
1787
+ width: calc(100% + 0px);
1788
+ height: calc(100% + 0px);
1789
+ position: absolute;
1790
+ top: -1px;
1791
+ left: -1px;
1792
+ border: 1px solid transparent;
1793
+ border-radius: 10px;
1794
+ z-index: -1;
1795
+ }
1796
+ .sg-context:hover::after {
1797
+ border-color: #306782;
1798
+ }
1799
+ .sg-context[data-aria-selected=true]::after {
1800
+ border-color: #268bbd;
1801
+ border-width: 2px;
1802
+ top: -2px;
1803
+ left: -2px;
1804
+ }
1805
+ .sg-context-title {
1806
+ text-align: left;
1807
+ margin-bottom: 5px;
1808
+ }
1809
+ .sg-context-block {
1810
+ margin-bottom: 10px;
1811
+ position: relative;
1812
+ z-index: 0;
1813
+ }
1814
+ .sg-context-block-can {
1815
+ cursor: grab;
1816
+ }
1817
+ .sg-context-block[data-indicator-show=top]::before,
1818
+ .sg-context-block[data-indicator-show=bottom]::before {
1819
+ content: " ";
1820
+ display: block;
1821
+ position: absolute;
1822
+ left: 0;
1823
+ right: 0;
1824
+ height: 5px;
1825
+ background-color: #ca9934;
1826
+ }
1827
+ .sg-context-block[data-indicator-show=top]::before {
1828
+ top: -5px;
1829
+ }
1830
+ .sg-context-block[data-indicator-show=bottom]::before {
1831
+ bottom: -5px;
1832
+ }
1833
+ .sg-context-block-placeholder {
1834
+ min-width: 150px;
1835
+ padding: 3px;
1836
+ border: 1px solid rgba(0, 0, 0, 0.3);
1837
+ background-color: rgba(255, 255, 255, 0.3);
1838
+ margin-bottom: 8px;
1839
+ border-radius: 5px;
1840
+ font-size: 14px;
1841
+ }
1842
+
1843
+ /* src/view/Parameter.less */
1844
+ .sg-parameter {
1845
+ border-radius: 15px;
1846
+ overflow: hidden;
1847
+ display: flex;
1848
+ align-items: center;
1849
+ background-color: #545455;
1850
+ padding: 3px 8px 3px 10px;
1851
+ }
1852
+ .sg-parameter:hover {
1853
+ outline: 1px solid #67bff9;
1854
+ }
1855
+ .sg-parameter.selected {
1856
+ outline: 2px solid #67bff9;
1857
+ }
1858
+ .sg-parameter-output {
1859
+ padding: 0 !important;
1860
+ }
1861
+ .sg-parameter-output-can {
1862
+ background: unset !important;
1863
+ }
1864
+
1865
+ /* src/plugins/connect-plugin/index.less */
1866
+ .connection {
1867
+ overflow: visible !important;
1868
+ position: absolute;
1869
+ z-index: -1;
1870
+ pointer-events: none;
1871
+ }
1872
+ .rete-connection-path {
1873
+ cursor: pointer;
1874
+ fill: none;
1875
+ stroke-width: 5px;
1876
+ pointer-events: all;
1877
+ }
1878
+ .rete-connection-path:hover {
1879
+ stroke-width: 7px;
1880
+ }
1881
+ .rete-connection-path.selected {
1882
+ stroke: #67bff9 !important;
1883
+ }
1884
+ .rete-connection-path.disable-hover {
1885
+ pointer-events: none;
1886
+ }
1887
+ svg,
1888
+ svg * {
1889
+ pointer-events: none;
1890
+ }
1891
+
1892
+ /* src/plugins/PreviewPlugin/PreviewServer.less */
1893
+ .sg-preview-server-canvas {
1894
+ position: absolute;
1895
+ top: 0;
1896
+ left: 0;
1897
+ width: 100%;
1898
+ height: 100%;
1899
+ pointer-events: none;
1900
+ z-index: 100;
1901
+ display: block;
1902
+ }
1903
+
1904
+ /* src/view/popups/PopupNodeAdd.less */
1905
+ .sg-popup-node-add {
1906
+ background-color: #272727;
1907
+ border: 1px solid #060606;
1908
+ border-radius: 2px;
1909
+ }
1910
+ .sg-popup-node-add-search {
1911
+ display: flex;
1912
+ align-items: center;
1913
+ margin: 0 5px 5px 5px;
1914
+ background-color: #454545;
1915
+ border-radius: 5px;
1916
+ }
1917
+ .sg-popup-node-add-search::before {
1918
+ content: "\1f50d";
1919
+ margin: 0 3px 0 5px;
1920
+ flex: none;
1921
+ }
1922
+ .sg-popup-node-add-search-input {
1923
+ border: none;
1924
+ display: block;
1925
+ min-width: 0px;
1926
+ flex: 1;
1927
+ background-color: unset;
1928
+ }
1929
+ .sg-popup-node-add-search-input:focus {
1930
+ outline: none;
1931
+ }
1932
+ .sg-popup-node-add-tree {
1933
+ padding-left: 10px;
1934
+ background-color: #383838;
1935
+ overflow-y: auto;
1936
+ height: 220px;
1937
+ min-width: 210px;
1938
+ }
1939
+ .sg-popup-title {
1940
+ color: white;
1941
+ }
1942
+
1943
+ /* src/view/popups/BlackBoard.less */
1944
+ .sg-blackboard {
1945
+ background-color: #2b2b2b;
1946
+ border: 1px solid #191919;
1947
+ border-radius: 5px;
1948
+ user-select: none;
1949
+ overflow: hidden;
1950
+ }
1951
+ .sg-blackboard-head {
1952
+ background-color: #393939;
1953
+ padding: 5px 10px;
1954
+ }
1955
+ .sg-blackboard-body {
1956
+ min-height: 250px;
1957
+ max-height: 500px;
1958
+ min-width: 220px;
1959
+ overflow: auto;
1960
+ }
1961
+ .sg-blackboard-title {
1962
+ font-size: 20px;
1963
+ }
1964
+ .sg-blackboard-h2 {
1965
+ display: flex;
1966
+ align-items: center;
1967
+ }
1968
+ .sg-blackboard-subtitle {
1969
+ color: #5f5f5f;
1970
+ flex: 1;
1971
+ margin-right: 10px;
1972
+ }
1973
+ .sg-blackboard-btn-add {
1974
+ width: 30px;
1975
+ height: 30px;
1976
+ border: 1px solid transparent;
1977
+ text-align: center;
1978
+ line-height: 27px;
1979
+ border-radius: 5px;
1980
+ font-size: 20px;
1981
+ cursor: pointer;
1982
+ }
1983
+ .sg-blackboard-btn-add:hover {
1984
+ border-color: #191919;
1985
+ background-color: #676767;
1986
+ }
1987
+ .sg-parameter-item {
1988
+ border-radius: 15px;
1989
+ width: fit-content;
1990
+ flex: none;
1991
+ display: flex;
1992
+ align-items: center;
1993
+ padding: 0px 10px;
1994
+ background-color: #3e3e3f;
1995
+ cursor: grab;
1996
+ }
1997
+ .sg-parameter-item:hover {
1998
+ outline: 1px solid #67bff9;
1999
+ }
2000
+ .sg-parameter-item-head {
2001
+ display: flex;
2002
+ align-items: center;
2003
+ padding: 5px;
2004
+ box-sizing: border-box;
2005
+ }
2006
+ .sg-parameter-item-exposed {
2007
+ width: 5px;
2008
+ height: 5px;
2009
+ background-color: #acea78;
2010
+ margin-right: 5px;
2011
+ border-radius: 5px;
2012
+ }
2013
+ .sg-parameter-item-type {
2014
+ flex: 1;
2015
+ text-align: right;
2016
+ color: #7c7c7c;
2017
+ margin: 0 10px;
2018
+ }
2019
+ .sg-parameter-item-btn-expand {
2020
+ flex: none;
2021
+ font-size: 13px;
2022
+ padding: 3px;
2023
+ cursor: pointer;
2024
+ color: #7c7c7c;
2025
+ margin: 0 3px;
2026
+ }
2027
+ .sg-parameter-item-btn-expand:hover {
2028
+ color: white;
2029
+ }
2030
+ .sg-parameter-item-btn-expand[data-aria-expanded=true] {
2031
+ transform: rotate(90deg);
2032
+ }
2033
+ .sg-parameter-item-input {
2034
+ min-width: 0px;
2035
+ width: 150px;
2036
+ }
2037
+ .sg-parameter-item-body {
2038
+ padding: 5px;
2039
+ margin-left: 20px;
2040
+ }
2041
+ .sg-parameter-item-setting {
2042
+ display: flex;
2043
+ color: #7c7c7c;
2044
+ }
2045
+ .sg-parameter-item-setting-label {
2046
+ width: 80px;
2047
+ }
2048
+
2049
+ /* src/view/popups/MainPreview.less */
2050
+ .sg-main-preview {
2051
+ background-color: #2b2b2b;
2052
+ border: 1px solid #191919;
2053
+ user-select: none;
2054
+ border-radius: 5px;
2055
+ overflow: hidden;
2056
+ }
2057
+ .sg-main-preview-title {
2058
+ background-color: rgba(255, 255, 255, 0.12);
2059
+ color: #b4b4b4;
2060
+ padding: 5px 13px;
2061
+ }
2062
+ .sg-main-preview-canvas {
2063
+ width: 200px;
2064
+ height: 200px;
2065
+ display: block;
2066
+ }
2067
+ .sg-main-preview-canvas-can {
2068
+ background-color: #2b2b2b;
2069
+ }
2070
+
2071
+ /* src/view/popups/Inspector.less */
2072
+ .sg-inspector-title {
2073
+ padding: 5px 5px 10px 5px;
2074
+ font-size: 17px;
2075
+ }
2076
+ .sg-inspector-body {
2077
+ max-height: 300px !important;
2078
+ }
@@ -3369,19 +3369,23 @@ var MenuList = ({ items, x, y, z, root }) => {
3369
3369
  const resizeObserver = new ResizeObserver((entries) => {
3370
3370
  const { width, height } = entries[0].contentRect;
3371
3371
  const gap = 20;
3372
+ let boundW = innerWidth;
3373
+ let boundH = innerHeight;
3372
3374
  let px = x;
3373
3375
  let py = y;
3374
3376
  if (root) {
3375
3377
  const rootRect = root.getBoundingClientRect();
3376
3378
  px -= rootRect.left;
3377
3379
  py -= rootRect.top;
3380
+ boundW = rootRect.width;
3381
+ boundH = rootRect.height;
3378
3382
  }
3379
- const nx = Math.min(innerWidth - width - gap, px);
3380
- const ny = Math.min(innerHeight - height - gap, py);
3383
+ const nx = Math.min(boundW - width - gap, px);
3384
+ const ny = Math.min(boundH - height - gap, py);
3381
3385
  el.style.top = ny + "px";
3382
3386
  el.style.left = nx + "px";
3383
3387
  el.style.opacity = "1";
3384
- if (x > innerWidth - width * 2 - gap) setSubmenuPosition("left");
3388
+ if (x > boundW - width * 2 - gap) setSubmenuPosition("left");
3385
3389
  });
3386
3390
  resizeObserver.observe(el);
3387
3391
  return () => resizeObserver.disconnect();
@@ -14158,7 +14162,7 @@ var ListIOItem = ({ list, value, onChange }) => {
14158
14162
  // package.json
14159
14163
  var package_default = {
14160
14164
  name: "@xifu/shader-graph-glsl",
14161
- version: "0.2.0",
14165
+ version: "0.4.0",
14162
14166
  description: "Shader Graph GLSL \u2014 visual node-based shader editor & runtime engine",
14163
14167
  type: "module",
14164
14168
  private: false,
@@ -14174,7 +14178,8 @@ var package_default = {
14174
14178
  "./editor": {
14175
14179
  types: "./dist/editor/index.d.ts",
14176
14180
  import: "./dist/editor/index.js"
14177
- }
14181
+ },
14182
+ "./dist/*": "./dist/*"
14178
14183
  },
14179
14184
  scripts: {
14180
14185
  dev: "vite",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xifu/shader-graph-glsl",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Shader Graph GLSL — visual node-based shader editor & runtime engine",
5
5
  "type": "module",
6
6
  "private": false,
@@ -16,7 +16,8 @@
16
16
  "./editor": {
17
17
  "types": "./dist/editor/index.d.ts",
18
18
  "import": "./dist/editor/index.js"
19
- }
19
+ },
20
+ "./dist/*": "./dist/*"
20
21
  },
21
22
  "scripts": {
22
23
  "dev": "vite",
@@ -69,4 +70,4 @@
69
70
  "publishConfig": {
70
71
  "access": "public"
71
72
  }
72
- }
73
+ }