mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-14 17:14:41 +08:00
More Decoding
This commit is contained in:
74
dist/ueblueprint.js
vendored
74
dist/ueblueprint.js
vendored
@@ -4401,23 +4401,46 @@ function nodeTitle(entity) {
|
||||
case "Boolean::LogicNEq": return "!="
|
||||
case "Boolean::LogicNot": return "Logic NOT"
|
||||
case "Boolean::LogicOr": return "Logic OR"
|
||||
case "Matrix::MatrixMultiply": return "Multiply (Matrix * Matrix)"
|
||||
case "Matrix::MatrixVectorMultiply": return "Multiply (Matrix * Vector4)"
|
||||
case "Numeric::Abs": return "Abs"
|
||||
case "Numeric::ArcCosine": return "ArcCosine"
|
||||
case "Numeric::Add": return "+"
|
||||
case "Numeric::DistancePos": return "Distance"
|
||||
case "Numeric::Mul": return String.fromCharCode(0x2a2f)
|
||||
case "Integer::BitLShift": return "Bitwise Left Shift"
|
||||
case "Integer::BitAnd": return "Bitwise AND"
|
||||
case "Integer::BitLShift": return "Bitwise Left Shift"
|
||||
case "Integer::BitNot": return "Bitwise NOT"
|
||||
case "Integer::BitOr": return "Bitwise OR"
|
||||
case "Integer::BitRShift": return "Bitwise Right Shift"
|
||||
case "Integer::BitXOr": return "Bitwise XOR"
|
||||
case "Matrix::MatrixMultiply": return "Multiply (Matrix * Matrix)"
|
||||
case "Matrix::MatrixVectorMultiply": return "Multiply (Matrix * Vector4)"
|
||||
case "Numeric::Abs": return "Abs"
|
||||
case "Numeric::Add": return "+"
|
||||
case "Numeric::ArcCosine": return "ArcCosine"
|
||||
case "Numeric::ArcCosine(Degrees)": return "ArcCos(D)"
|
||||
case "Numeric::ArcCosine(Radians)": return "ArcCos(R)"
|
||||
case "Numeric::ArcSine": return "ArcSine"
|
||||
case "Numeric::ArcSine(Degrees)": return "ArcSin(D)"
|
||||
case "Numeric::ArcSine(Radians)": return "ArcSin(R)"
|
||||
case "Numeric::ArcTangent": return "ArcTangent"
|
||||
case "Numeric::ArcTangent(Degrees)": return "ArcTan(D)"
|
||||
case "Numeric::ArcTangent(Radians)": return "ArcTan(R)"
|
||||
case "Numeric::CmpEQ": return "=="
|
||||
case "Numeric::CmpGE": return ">="
|
||||
case "Numeric::CmpGT": return ">"
|
||||
case "Numeric::CmpLE": return "<="
|
||||
case "Numeric::CmpLT": return "<"
|
||||
case "Numeric::CmpNEQ": return "!="
|
||||
case "Numeric::Cosine(Degrees)": return "Cos(D)"
|
||||
case "Numeric::Cosine(Radians)": return "Cos(R)"
|
||||
case "Numeric::DegreesToRadians": return "DegToRad"
|
||||
case "Numeric::DistancePos": return "Distance"
|
||||
case "Numeric::Div": return String.fromCharCode(0x00f7)
|
||||
case "Numeric::FMod": return "%"
|
||||
case "Numeric::FModFast": return "Modulo Fast"
|
||||
case "Numeric::Length": return "Len"
|
||||
case "Numeric::Madd": return `(A${String.fromCharCode(0x2a2f)}B)+C`
|
||||
case "Numeric::Mul": return String.fromCharCode(0x2a2f)
|
||||
case "Numeric::Negate": return "-A"
|
||||
// case "Integer::BitOr": return "Bitwise OR"
|
||||
// case "Integer::BitOr": return "Bitwise OR"
|
||||
}
|
||||
return Utility.formatStringName(entity.OpName.toString().replaceAll("::", " "))
|
||||
return Utility.formatStringName(entity.OpName.toString().replaceAll(/(?:^\w+(?<!^Matrix))?::/g, " "))
|
||||
}
|
||||
if (entity.FunctionDisplayName) {
|
||||
return Utility.formatStringName(entity.FunctionDisplayName.toString())
|
||||
@@ -9800,7 +9823,40 @@ function nodeTemplateClass(nodeEntity) {
|
||||
"Boolean::LogicNEq",
|
||||
"Numeric::Abs",
|
||||
"Numeric::Add",
|
||||
"Numeric::ArcCosine(Degrees)",
|
||||
"Numeric::ArcCosine(Radians)",
|
||||
"Numeric::ArcSine(Degrees)",
|
||||
"Numeric::ArcSine(Radians)",
|
||||
"Numeric::ArcTangent(Degrees)",
|
||||
"Numeric::ArcTangent(Radians)",
|
||||
"Numeric::Ceil",
|
||||
"Numeric::CmpEQ",
|
||||
"Numeric::CmpGE",
|
||||
"Numeric::CmpGT",
|
||||
"Numeric::CmpLE",
|
||||
"Numeric::CmpLT",
|
||||
"Numeric::CmpNEQ",
|
||||
"Numeric::Cosine(Degrees)",
|
||||
"Numeric::Cosine(Radians)",
|
||||
"Numeric::DegreesToRadians",
|
||||
"Numeric::Div",
|
||||
"Numeric::Dot",
|
||||
"Numeric::Exp",
|
||||
"Numeric::Exp2",
|
||||
"Numeric::Floor",
|
||||
"Numeric::FMod",
|
||||
"Numeric::Frac",
|
||||
"Numeric::Length",
|
||||
"Numeric::Lerp",
|
||||
"Numeric::Log",
|
||||
"Numeric::Log2",
|
||||
"Numeric::Madd",
|
||||
"Numeric::Max",
|
||||
"Numeric::Min",
|
||||
"Numeric::Mul",
|
||||
"Numeric::Negate",
|
||||
"Numeric::Normalize",
|
||||
"Vector3::Cross",
|
||||
].includes(nodeEntity.OpName?.toString())
|
||||
) {
|
||||
return VariableOperationNodeTemplate
|
||||
|
||||
10
dist/ueblueprint.min.js
vendored
10
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -102,7 +102,40 @@ export default function nodeTemplateClass(nodeEntity) {
|
||||
"Boolean::LogicNEq",
|
||||
"Numeric::Abs",
|
||||
"Numeric::Add",
|
||||
"Numeric::ArcCosine(Degrees)",
|
||||
"Numeric::ArcCosine(Radians)",
|
||||
"Numeric::ArcSine(Degrees)",
|
||||
"Numeric::ArcSine(Radians)",
|
||||
"Numeric::ArcTangent(Degrees)",
|
||||
"Numeric::ArcTangent(Radians)",
|
||||
"Numeric::Ceil",
|
||||
"Numeric::CmpEQ",
|
||||
"Numeric::CmpGE",
|
||||
"Numeric::CmpGT",
|
||||
"Numeric::CmpLE",
|
||||
"Numeric::CmpLT",
|
||||
"Numeric::CmpNEQ",
|
||||
"Numeric::Cosine(Degrees)",
|
||||
"Numeric::Cosine(Radians)",
|
||||
"Numeric::DegreesToRadians",
|
||||
"Numeric::Div",
|
||||
"Numeric::Dot",
|
||||
"Numeric::Exp",
|
||||
"Numeric::Exp2",
|
||||
"Numeric::Floor",
|
||||
"Numeric::FMod",
|
||||
"Numeric::Frac",
|
||||
"Numeric::Length",
|
||||
"Numeric::Lerp",
|
||||
"Numeric::Log",
|
||||
"Numeric::Log2",
|
||||
"Numeric::Madd",
|
||||
"Numeric::Max",
|
||||
"Numeric::Min",
|
||||
"Numeric::Mul",
|
||||
"Numeric::Negate",
|
||||
"Numeric::Normalize",
|
||||
"Vector3::Cross",
|
||||
].includes(nodeEntity.OpName?.toString())
|
||||
) {
|
||||
return VariableOperationNodeTemplate
|
||||
|
||||
@@ -430,23 +430,46 @@ export default function nodeTitle(entity) {
|
||||
case "Boolean::LogicNEq": return "!="
|
||||
case "Boolean::LogicNot": return "Logic NOT"
|
||||
case "Boolean::LogicOr": return "Logic OR"
|
||||
case "Matrix::MatrixMultiply": return "Multiply (Matrix * Matrix)"
|
||||
case "Matrix::MatrixVectorMultiply": return "Multiply (Matrix * Vector4)"
|
||||
case "Numeric::Abs": return "Abs"
|
||||
case "Numeric::ArcCosine": return "ArcCosine"
|
||||
case "Numeric::Add": return "+"
|
||||
case "Numeric::DistancePos": return "Distance"
|
||||
case "Numeric::Mul": return String.fromCharCode(0x2a2f)
|
||||
case "Integer::BitLShift": return "Bitwise Left Shift"
|
||||
case "Integer::BitAnd": return "Bitwise AND"
|
||||
case "Integer::BitLShift": return "Bitwise Left Shift"
|
||||
case "Integer::BitNot": return "Bitwise NOT"
|
||||
case "Integer::BitOr": return "Bitwise OR"
|
||||
case "Integer::BitRShift": return "Bitwise Right Shift"
|
||||
case "Integer::BitXOr": return "Bitwise XOR"
|
||||
case "Matrix::MatrixMultiply": return "Multiply (Matrix * Matrix)"
|
||||
case "Matrix::MatrixVectorMultiply": return "Multiply (Matrix * Vector4)"
|
||||
case "Numeric::Abs": return "Abs"
|
||||
case "Numeric::Add": return "+"
|
||||
case "Numeric::ArcCosine": return "ArcCosine"
|
||||
case "Numeric::ArcCosine(Degrees)": return "ArcCos(D)"
|
||||
case "Numeric::ArcCosine(Radians)": return "ArcCos(R)"
|
||||
case "Numeric::ArcSine": return "ArcSine"
|
||||
case "Numeric::ArcSine(Degrees)": return "ArcSin(D)"
|
||||
case "Numeric::ArcSine(Radians)": return "ArcSin(R)"
|
||||
case "Numeric::ArcTangent": return "ArcTangent"
|
||||
case "Numeric::ArcTangent(Degrees)": return "ArcTan(D)"
|
||||
case "Numeric::ArcTangent(Radians)": return "ArcTan(R)"
|
||||
case "Numeric::CmpEQ": return "=="
|
||||
case "Numeric::CmpGE": return ">="
|
||||
case "Numeric::CmpGT": return ">"
|
||||
case "Numeric::CmpLE": return "<="
|
||||
case "Numeric::CmpLT": return "<"
|
||||
case "Numeric::CmpNEQ": return "!="
|
||||
case "Numeric::Cosine(Degrees)": return "Cos(D)"
|
||||
case "Numeric::Cosine(Radians)": return "Cos(R)"
|
||||
case "Numeric::DegreesToRadians": return "DegToRad"
|
||||
case "Numeric::DistancePos": return "Distance"
|
||||
case "Numeric::Div": return String.fromCharCode(0x00f7)
|
||||
case "Numeric::FMod": return "%"
|
||||
case "Numeric::FModFast": return "Modulo Fast"
|
||||
case "Numeric::Length": return "Len"
|
||||
case "Numeric::Madd": return `(A${String.fromCharCode(0x2a2f)}B)+C`
|
||||
case "Numeric::Mul": return String.fromCharCode(0x2a2f)
|
||||
case "Numeric::Negate": return "-A"
|
||||
// case "Integer::BitOr": return "Bitwise OR"
|
||||
// case "Integer::BitOr": return "Bitwise OR"
|
||||
}
|
||||
return Utility.formatStringName(entity.OpName.toString().replaceAll("::", " "))
|
||||
return Utility.formatStringName(entity.OpName.toString().replaceAll(/(?:^\w+(?<!^Matrix))?::/g, " "))
|
||||
}
|
||||
if (entity.FunctionDisplayName) {
|
||||
return Utility.formatStringName(entity.FunctionDisplayName.toString())
|
||||
|
||||
26
tests/nodeNiagaraArcCos(D).spec.js
Normal file
26
tests/nodeNiagaraArcCos(D).spec.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { expect, testNode } from "./fixtures/test.js"
|
||||
|
||||
testNode({
|
||||
name: "Niagara ArcCos(D)",
|
||||
title: "ArcCos(D)",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/NiagaraEditor.NiagaraNodeOp Name="NiagaraNodeOp_0" ExportPath="/Script/NiagaraEditor.NiagaraNodeOp'/Engine/Transient.NewNiagaraScript:NiagaraScriptSource_0.NiagaraGraph_0.NiagaraNodeOp_0'"
|
||||
OpName="Numeric::ArcCosine(Degrees)"
|
||||
ChangeId=0C4903A20D0840D5AFA6E8EA05BA7E92
|
||||
NodePosX=176
|
||||
NodePosY=304
|
||||
NodeGuid=B602FBF53547439C961401D1222D7086
|
||||
CustomProperties Pin (PinId=FDA289829A9C4C7A99071EBDA8BDADBF,PinName="A",PinFriendlyName=NSLOCTEXT("NiagaraOpInfo", "First Function Param", "A"),PinToolTip="A",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="1.0",AutogeneratedDefaultValue="1.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=5BF79FDFF3214BB19F93AA9B8B9B5E40,PinName="Result",PinToolTip="Result",Direction="EGPD_Output",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
size: [14, 2.5],
|
||||
icon: null,
|
||||
pins: 2,
|
||||
delegate: false,
|
||||
development: false,
|
||||
additionalTest: async (node, pins, blueprintPage) => {
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-glass"))).toBeTruthy()
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-default"))).toBeFalsy()
|
||||
},
|
||||
})
|
||||
26
tests/nodeNiagaraArcCos(R).spec.js
Normal file
26
tests/nodeNiagaraArcCos(R).spec.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { expect, testNode } from "./fixtures/test.js"
|
||||
|
||||
testNode({
|
||||
name: "Niagara ArcCos(R)",
|
||||
title: "ArcCos(R)",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/NiagaraEditor.NiagaraNodeOp Name="NiagaraNodeOp_7" ExportPath="/Script/NiagaraEditor.NiagaraNodeOp'/Engine/Transient.NewNiagaraScript:NiagaraScriptSource_0.NiagaraGraph_0.NiagaraNodeOp_7'"
|
||||
OpName="Numeric::ArcCosine(Radians)"
|
||||
ChangeId=59704C7FABF44EDA84E2B675B5EA3763
|
||||
NodePosX=-128
|
||||
NodePosY=400
|
||||
NodeGuid=ACFFA06F43AC4EB4B43361CBABE603FC
|
||||
CustomProperties Pin (PinId=65AB75E707C74676B8E532483CF4CF35,PinName="A",PinFriendlyName=NSLOCTEXT("NiagaraOpInfo", "First Function Param", "A"),PinToolTip="A",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="1.0",AutogeneratedDefaultValue="1.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=7F2F577280224DF0B328776290FFA6A1,PinName="Result",PinToolTip="Result",Direction="EGPD_Output",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
size: [14, 2.5],
|
||||
icon: null,
|
||||
pins: 2,
|
||||
delegate: false,
|
||||
development: false,
|
||||
additionalTest: async (node, pins, blueprintPage) => {
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-glass"))).toBeTruthy()
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-default"))).toBeFalsy()
|
||||
},
|
||||
})
|
||||
33
tests/nodeNiagaraArcSine.spec.js
Normal file
33
tests/nodeNiagaraArcSine.spec.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { css } from "lit"
|
||||
import { expect, testNode } from "./fixtures/test.js"
|
||||
|
||||
testNode({
|
||||
name: "Niagara ArcSine",
|
||||
title: "ArcSine",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/NiagaraEditor.NiagaraNodeOp Name="NiagaraNodeOp_18" ExportPath="/Script/NiagaraEditor.NiagaraNodeOp'/Engine/Transient.NewNiagaraScript:NiagaraScriptSource_0.NiagaraGraph_0.NiagaraNodeOp_18'"
|
||||
OpName="Numeric::ArcSine"
|
||||
ChangeId=CDB4DEA461F34B68942427280486A634
|
||||
NodePosX=-160
|
||||
NodePosY=304
|
||||
NodeGuid=D042EE951EDD4932BC5C4B26D49F6EE7
|
||||
CustomProperties Pin (PinId=91EDD66DBC354E3291B73CA3C445382A,PinName="A",PinFriendlyName=NSLOCTEXT("NiagaraOpInfo", "First Function Param", "A"),PinToolTip="A",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="1.0",AutogeneratedDefaultValue="1.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=B27D869B65AB472FB61EE1CFED16413B,PinName="Period",PinFriendlyName=NSLOCTEXT("NiagaraOpInfo", "Period Name", "Period"),PinToolTip="Value in which a complete rotation has occurred.",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraFloat'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="1.0",AutogeneratedDefaultValue="1.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=D4741D50F35E42A98565E89099D679D4,PinName="Result",PinToolTip="Result",Direction="EGPD_Output",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraNumeric'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
size: [12, 6],
|
||||
icon: null,
|
||||
pins: 3,
|
||||
delegate: false,
|
||||
development: false,
|
||||
additionalTest: async (node, pins, blueprintPage) => {
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-glass"))).toBeFalsy()
|
||||
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-default"))).toBeTruthy()
|
||||
await expect(pins[1].locator("ueb-input")).toHaveText("1.0")
|
||||
await pins[1].locator("ueb-input").fill("3")
|
||||
await blueprintPage.blur()
|
||||
await expect(pins[1].locator("ueb-input")).toHaveText("3.0")
|
||||
expect(await pins[1].evaluate(p => p.entity.pinColor().cssText)).toBe(css`160, 250, 68`.cssText)
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user