graphCanvas.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. #graph-canvas {
  2. width: 100%;
  3. height: 100%;
  4. margin: 0;
  5. padding: 0;
  6. font: 14px "acumin-pro";
  7. user-select: none;
  8. overflow: hidden;
  9. cursor: move;
  10. background-image:
  11. linear-gradient(to right, #4F4E4F 1px, transparent 1px),
  12. linear-gradient(to bottom, #4F4E4F 1px, transparent 1px);
  13. #selection-container {
  14. pointer-events: none;
  15. .selection-box {
  16. z-index: 10;
  17. position: absolute;
  18. background: rgba(72, 72, 196, 0.5);
  19. border: blue solid 2px;
  20. }
  21. }
  22. .port {
  23. border-radius: 20px;
  24. width: 20px;
  25. height: 20px;
  26. align-self: center;
  27. .img {
  28. width: 100%;
  29. }
  30. img.selected {
  31. box-shadow: 0 0 0 2px;
  32. border-radius: 50%;
  33. }
  34. &:hover, &.selected {
  35. filter: brightness(2);
  36. }
  37. }
  38. .portLine {
  39. height: 24px;
  40. display: grid;
  41. grid-template-rows: 100%;
  42. }
  43. .port-label {
  44. align-items: center;
  45. }
  46. .inputsContainer {
  47. grid-row: 1;
  48. grid-column: 1;
  49. .portLine {
  50. grid-template-columns: 12px calc(100% - 15px);
  51. .port-label {
  52. grid-row: 1;
  53. grid-column: 2;
  54. }
  55. .port {
  56. grid-row: 1;
  57. grid-column: 1;
  58. transform: translateX(-12px);
  59. }
  60. }
  61. }
  62. .outputsContainer {
  63. grid-row: 1;
  64. grid-column: 2;
  65. .portLine {
  66. grid-template-columns: calc(100% - 10px) 12px;
  67. .port-label {
  68. grid-row: 1;
  69. grid-column: 1;
  70. text-align: right;
  71. }
  72. .port {
  73. grid-row: 1;
  74. grid-column: 2;
  75. transform: translateX(2px);
  76. }
  77. }
  78. }
  79. #graph-container {
  80. width: 100%;
  81. height: 100%;
  82. left: 0;
  83. top: 0;
  84. transform-origin: left top;
  85. display: grid;
  86. grid-template-rows: 100%;
  87. grid-template-columns: 100%;
  88. #frame-container {
  89. overflow: visible;
  90. grid-row: 1;
  91. grid-column: 1;
  92. position: relative;
  93. width: 100%;
  94. height: 100%;
  95. }
  96. .frame-box {
  97. position: absolute;
  98. background: rgba(72, 72, 72, 0.7);
  99. display: grid;
  100. grid-template-rows: 40px calc(100% - 40px);
  101. grid-template-columns: 100%;
  102. box-sizing: border-box;
  103. &.collapsed {
  104. height: auto !important;
  105. width: 200px !important;
  106. z-index: 3;
  107. .frame-box-header {
  108. font-size: 16px;
  109. grid-template-columns: calc(100% - 37px) 30px 7px;
  110. .frame-box-header-collapse {
  111. margin-top: -2px;
  112. }
  113. .frame-box-header-close {
  114. display: none;
  115. }
  116. }
  117. .frame-comments.has-comments{
  118. .frame-comment-span{
  119. white-space: nowrap;
  120. text-overflow: ellipsis;
  121. overflow: hidden;
  122. }
  123. }
  124. }
  125. .frame-box-border {
  126. grid-row: 1 / span 2;
  127. grid-column: 1;
  128. width: 100%;
  129. height: 100%;
  130. border: transparent solid 4px;
  131. pointer-events: none;
  132. box-sizing: border-box;
  133. }
  134. .frame-box-header {
  135. grid-row: 1;
  136. grid-column: 1;
  137. background: rgba(72, 72, 72, 1);
  138. color: white;
  139. font-size: 24px;
  140. text-align: center;
  141. display: grid;
  142. grid-template-rows: 100%;
  143. grid-template-columns: calc(100% - 74px) 30px 7px 30px 7px;
  144. align-content: center;
  145. overflow: hidden;
  146. .frame-box-header-button {
  147. cursor: pointer;
  148. align-self: center;
  149. transform-origin: 50% 50%;
  150. transform: scale(1);
  151. stroke: transparent;
  152. fill: white;
  153. display: grid;
  154. &.down {
  155. transform: scale(0.90);
  156. }
  157. }
  158. .frame-box-header-collapse {
  159. grid-column: 2;
  160. grid-row: 1;
  161. }
  162. .frame-box-header-close {
  163. grid-column: 4;
  164. grid-row: 1;
  165. }
  166. .frame-box-header-title {
  167. grid-column: 1;
  168. grid-row: 1;
  169. display: grid;
  170. height: 100%;
  171. width: 100%;
  172. align-self: stretch;
  173. align-items: center;
  174. margin-top: -2px;
  175. }
  176. }
  177. .port-container {
  178. margin-top: 6px;
  179. margin-bottom: 6px;
  180. margin-left: 4px;
  181. margin-right: 4px;
  182. color: white;
  183. grid-row: 2;
  184. grid-column: 1;
  185. display: grid;
  186. grid-template-rows: 100%;
  187. grid-template-columns: 50% 50%;
  188. z-index: 2;
  189. }
  190. .frame-comments.has-comments{
  191. display: grid;
  192. grid-row: 2;
  193. grid-column: 1;
  194. padding: 0 10px;
  195. font-style: italic;
  196. word-wrap: break-word;
  197. }
  198. &.selected {
  199. .frame-box-border {
  200. border-color: white;
  201. }
  202. }
  203. .right-handle {
  204. grid-area: 1 / 2 / 3 / 2;
  205. width: 4px;
  206. background-color: transparent;
  207. cursor: ew-resize;
  208. &::after{
  209. content: "";
  210. width: 8px;
  211. position: absolute;
  212. top: 0;
  213. bottom: 0;
  214. margin-left: -4px;
  215. cursor: ew-resize;
  216. }
  217. &.collapsed {
  218. cursor: pointer;
  219. }
  220. }
  221. .top-right-corner-handle{
  222. background-color: transparent;
  223. height: 4px;
  224. z-index: 21;
  225. cursor: ne-resize;
  226. width: 4px;
  227. margin-left: -6px;
  228. &::after {
  229. background-color: transparent;
  230. cursor: ne-resize;
  231. margin-left: unset;
  232. top: -4px;
  233. height: 10px;
  234. width: 10px;
  235. }
  236. }
  237. .bottom-right-corner-handle{
  238. background-color: transparent;
  239. height: 0px;
  240. z-index: 21;
  241. cursor: nw-resize;
  242. grid-area: 4 / 2 / 4 / 2;;
  243. margin-left: -2px;
  244. &::after {
  245. background-color: transparent;
  246. height: 10px;
  247. cursor: nw-resize;
  248. top: unset;
  249. bottom: -4px;
  250. width: 10px;
  251. }
  252. }
  253. .left-handle {
  254. grid-area: 1 / 1 / 3 / 1;
  255. width: 4px;
  256. background-color: transparent;
  257. cursor: ew-resize;
  258. &::before{
  259. content: "";
  260. width: 8px;
  261. position: absolute;
  262. top: 0;
  263. bottom: 0;
  264. margin-left: -4px;
  265. }
  266. }
  267. .top-left-corner-handle{
  268. background-color: transparent;
  269. height: 4px;
  270. z-index: 21;
  271. cursor: nw-resize;
  272. width: 4px;
  273. margin-left: -4px;
  274. &::before {
  275. background-color: transparent;
  276. cursor: nw-resize;
  277. margin-left: unset;
  278. top: -4px;
  279. height: 10px;
  280. width: 10px;
  281. }
  282. }
  283. .bottom-left-corner-handle{
  284. background-color: transparent;
  285. height: 0px;
  286. z-index: 21;
  287. cursor: sw-resize;
  288. grid-area: 4 / 1 / 4 / 1;
  289. &::before {
  290. background-color: transparent;
  291. height: 10px;
  292. cursor: sw-resize;
  293. top: unset;
  294. bottom: -4px;
  295. width: 10px;
  296. }
  297. }
  298. .top-handle {
  299. grid-area: 1 / 1 / 1 / 1;
  300. background-color: transparent;
  301. height: 4px;
  302. cursor: ns-resize;
  303. &::before{
  304. content: "";
  305. width: 100%;
  306. position: absolute;
  307. top: -4px;
  308. bottom: 100%;
  309. right: 0;
  310. left: 0;
  311. margin-bottom: -8px;
  312. cursor: ns-resize;
  313. height: 8px;
  314. }
  315. }
  316. .bottom-handle {
  317. grid-area: 3 / 1 / 3 / 1;
  318. background-color: transparent;
  319. height: 4px;
  320. cursor: ns-resize;
  321. &::after {
  322. content: "";
  323. width: 100%;
  324. position: absolute;
  325. top: 100%;
  326. bottom: 0;
  327. right: 0;
  328. left: 0;
  329. margin-top: -8px;
  330. cursor: ns-resize;
  331. height: 12px;
  332. }
  333. }
  334. &.collapsed{
  335. .top-handle, .top-right-corner-handle, .right-handle, .bottom-right-corner-handle, .bottom-handle, .bottom-left-corner-handle, .left-handle, .top-left-corner-handle {
  336. cursor: default;
  337. }
  338. .right-handle, .bottom-handle, .top-right-corner-handle, .bottom-right-corner-handle{
  339. &::after{
  340. cursor: default;
  341. }
  342. }
  343. .left-handle, .top-handle, .top-left-corner-handle, .bottom-left-corner-handle{
  344. &::before{
  345. cursor: default;
  346. }
  347. }
  348. }
  349. }
  350. #graph-svg-container {
  351. grid-row: 1;
  352. grid-column: 1;
  353. position: relative;
  354. width: 100%;
  355. height: 100%;
  356. overflow: visible;
  357. pointer-events: none;
  358. z-index: 2;
  359. .link {
  360. stroke-width: 4px;
  361. &.selected {
  362. stroke: white !important;
  363. stroke-dasharray: 10, 2;
  364. }
  365. &.hidden {
  366. display: none;
  367. }
  368. }
  369. .selection-link {
  370. pointer-events: all;
  371. stroke-width: 16px;
  372. opacity: 0;
  373. transition: opacity 75ms;
  374. stroke: transparent;
  375. cursor: pointer;
  376. &.hidden {
  377. display: none;
  378. }
  379. &:hover, &.selected {
  380. stroke: white !important;
  381. opacity: 0.4;
  382. }
  383. }
  384. }
  385. #graph-canvas-container {
  386. grid-row: 1;
  387. grid-column: 1;
  388. position: relative;
  389. width: 100%;
  390. height: 100%;
  391. .visual {
  392. z-index: 4;
  393. width: 200px;
  394. position: absolute;
  395. left: 0;
  396. top: 0;
  397. background: gray;
  398. border: 4px solid black;
  399. border-radius: 12px;
  400. display: grid;
  401. grid-template-rows: 30px auto;
  402. grid-template-columns: 100%;
  403. color: white;
  404. &.hidden {
  405. display: none;
  406. }
  407. .comments {
  408. position: absolute;
  409. top: -50px;
  410. width: 200px;
  411. height: 45px;
  412. overflow: hidden;
  413. font-style: italic;
  414. opacity: 0.8;
  415. display: grid;
  416. align-items: flex-end;
  417. pointer-events: none;
  418. }
  419. .selection-border {
  420. grid-row: 1 / span 3;
  421. grid-column: 1;
  422. margin: -4px;
  423. transition: border-color 100ms;
  424. border: 4px solid black;
  425. border-radius: 12px;
  426. }
  427. &.selected {
  428. .selection-border {
  429. border-color: white;
  430. }
  431. }
  432. .header {
  433. grid-row: 1;
  434. grid-column: 1;
  435. border: 4px solid black;
  436. border-top-right-radius: 7px;
  437. border-top-left-radius: 7px;
  438. font-size: 16px;
  439. text-align: center;
  440. margin-top: -1px;
  441. margin-left: -1px;
  442. margin-right: -1px;
  443. white-space: nowrap;
  444. text-overflow: ellipsis;
  445. overflow: hidden;
  446. background: black;
  447. color: white;
  448. &.constant {
  449. border-color: #464348;
  450. background: #464348;
  451. }
  452. &.inspector {
  453. border-color: #66491b;
  454. background: #66491b;
  455. }
  456. }
  457. .connections {
  458. grid-row: 2;
  459. grid-column: 1;
  460. display: grid;
  461. grid-template-columns: 50% 50%;
  462. }
  463. .content {
  464. min-height: 20px;
  465. grid-row: 3;
  466. grid-column: 1;
  467. &.input-block {
  468. grid-row: 2;
  469. min-height: 34px;
  470. text-align: center;
  471. font-size: 18px;
  472. font-weight: bold;
  473. margin: 0 10px 5px;
  474. display: grid;
  475. align-content: center;
  476. &.small-font {
  477. font-size: 17px;
  478. }
  479. }
  480. &.output-block {
  481. min-height: 0px;
  482. height: 5px;
  483. }
  484. &.clamp-block {
  485. grid-row: 2;
  486. height: 34px;
  487. text-align: center;
  488. font-size: 18px;
  489. font-weight: bold;
  490. margin: 0 10px;
  491. }
  492. &.gradient-block {
  493. grid-row: 2;
  494. height: 34px;
  495. }
  496. &.texture-block {
  497. grid-row: 3;
  498. height: 140px;
  499. width: 140px;
  500. overflow: hidden;
  501. border-bottom-left-radius: 7px;
  502. border: black 4px solid;
  503. border-left: 0px;
  504. border-bottom: 0px;
  505. img {
  506. width: 100%;
  507. height: 100%;
  508. pointer-events: none;
  509. &.empty {
  510. display: none;
  511. }
  512. }
  513. }
  514. &.regular-texture-block {
  515. margin-top: -115px;
  516. }
  517. &.remap-block {
  518. height: 34px;
  519. text-align: center;
  520. font-size: 18px;
  521. font-weight: bold;
  522. margin: 0 10px;
  523. }
  524. &.trigonometry-block {
  525. grid-row: 2;
  526. height: 34px;
  527. text-align: center;
  528. font-size: 18px;
  529. font-weight: bold;
  530. margin: 0 10px;
  531. }
  532. }
  533. }
  534. }
  535. }
  536. }