Large refactoring and new nodes

* Fix node reference when changing elements

* Fix ScriptVariables parsing

* Fix invariant text and niagara types

* Niagara convert nodes

* Move node tests to own files

* More Niagara tests

* Niagara float and smaller fixes

* More Decoding

* More decoding

* WIP

* Float is real

* WIP

* More types and colors

* Test case and small polish

* WIP

* WIP

* Fix niagara script variables merging

* Fix Niagara variables

* Fixing mirrored ExportPath

* Fix Export paths name adjustments

* Simplify arc calculation

* Simplify a bit arc calculation

* source / destionation => origin / target

* Minor refactoring

* Fix switched link position

* Rename some properties for uniformity

* Fix input escape

* Simplify test

* About window

* Dialog backdrop style

* About dialog touches

* Remove dependency and minot improvement

* Light mode

* Fix link location and css small improvement

* Link direction and minor fixes

* Some minor fixes and refactoring

* Refactoring WIP

* Shorting repetitive bits

* More tests

* Simplify linking tests
This commit is contained in:
BarsDev
2025-02-07 00:36:03 +02:00
committed by GitHub
parent 876b8ce47f
commit 6ba2705386
347 changed files with 10108 additions and 6417 deletions

49
js/decoding/pinColor.js Normal file → Executable file
View File

@@ -1,25 +1,14 @@
import { css } from "lit"
import Configuration from "../Configuration.js"
const p = Configuration.paths
const colors = {
[Configuration.paths.niagaraBool]: css`146, 0, 0`,
[Configuration.paths.niagaraDataInterfaceVolumeTexture]: css`0, 168, 242`,
[Configuration.paths.niagaraFloat]: css`160, 250, 68`,
[Configuration.paths.niagaraMatrix]: css`0, 88, 200`,
[Configuration.paths.niagaraNumeric]: css`0, 88, 200`,
[Configuration.paths.niagaraPosition]: css`251, 146, 251`,
[Configuration.paths.quat4f]: css`0, 88, 200`,
[Configuration.paths.rotator]: css`157, 177, 251`,
[Configuration.paths.transform]: css`227, 103, 0`,
[Configuration.paths.vector]: css`251, 198, 34`,
[Configuration.paths.vector3f]: css`250, 200, 36`,
[Configuration.paths.vector4f]: css`0, 88, 200`,
"Any": css`132, 132, 132`,
"Any[]": css`132, 132, 132`,
"audio": css`252, 148, 252`,
"blue": css`0, 0, 255`,
"bool": css`146, 0, 0`,
"byte": css`0, 109, 99`,
"byte": css`0, 110, 100`,
"class": css`88, 0, 186`,
"default": css`255, 255, 255`,
"delegate": css`255, 56, 56`,
@@ -27,16 +16,16 @@ const colors = {
"exec": css`240, 240, 240`,
"float": css`160, 252, 70`,
"green": css`0, 255, 0`,
"int": css`31, 224, 172`,
"int": css`30, 224, 172`,
"int32": css`30, 224, 172`,
"int64": css`169, 223, 172`,
"int64": css`170, 224, 172`,
"interface": css`238, 252, 168`,
"name": css`201, 128, 251`,
"name": css`200, 128, 252`,
"object": css`0, 168, 242`,
"Param": css`255, 166, 39`,
"Param[]": css`255, 166, 39`,
"Point": css`63, 137, 255`,
"Point[]": css`63, 137, 255`,
"Param": css`255, 166, 40`,
"Param[]": css`255, 166, 40`,
"Point": css`64, 138, 255`,
"Point[]": css`64, 137, 255`,
"real": css`54, 208, 0`,
"red": css`255, 0, 0`,
"string": css`251, 0, 208`,
@@ -48,6 +37,21 @@ const colors = {
"Volume": css`230, 69, 188`,
"Volume[]": css`230, 69, 188`,
"wildcard": css`128, 120, 120`,
[p.linearColor]: css`0, 88, 200`,
[p.niagaraBool]: css`146, 0, 0`,
[p.niagaraDataInterfaceCollisionQuery]: css`0, 168, 242`,
[p.niagaraDataInterfaceCurlNoise]: css`0, 168, 242`,
[p.niagaraDataInterfaceVolumeTexture]: css`0, 168, 242`,
[p.niagaraFloat]: css`160, 250, 68`,
[p.niagaraInt32]: css`30, 224, 172`,
[p.niagaraPosition]: css`251, 146, 251`,
[p.quat4f]: css`0, 88, 200`,
[p.rotator]: css`157, 177, 251`,
[p.transform]: css`227, 103, 0`,
[p.vector]: css`251, 198, 34`,
[p.vector2f]: css`0, 88, 200`,
[p.vector3f]: css`250, 200, 36`,
[p.vector4f]: css`0, 88, 200`,
}
const pinColorMaterial = css`120, 120, 120`
@@ -62,7 +66,8 @@ export default function pinColor(entity) {
} else if (entity.PinType.PinCategory?.toString() === "optional") {
return pinColorMaterial
}
return colors[entity.getType()]
const type = entity.getType()
return colors[type]
?? colors[entity.PinType.PinCategory?.toString().toLowerCase()]
?? colors["default"]
?? (type.startsWith("/Script/Niagara.") ? colors["struct"] : colors["default"])
}