Skip to content

Commit

Permalink
fixed Mix node with float2, float3, float4 as C input
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Dec 20, 2024
1 parent 5524166 commit 795668d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 61 deletions.
18 changes: 9 additions & 9 deletions src/BasicBehaveEngine/nodes/math/arithmetic/Mix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ export class Mix extends BehaveEngineNode {
break;
case "float2":
val = [
this.mix(a[0], b[0], c),
this.mix(a[1], b[1], c)
this.mix(a[0], b[0], c[0]),
this.mix(a[1], b[1], c[1])
]
break;
case "float3":
val = [
this.mix(a[0], b[0], c),
this.mix(a[1], b[1], c),
this.mix(a[2], b[2], c),
this.mix(a[0], b[0], c[0]),
this.mix(a[1], b[1], c[1]),
this.mix(a[2], b[2], c[2]),
]
break;
case "float4":
val = [
this.mix(a[0], b[0], c),
this.mix(a[1], b[1], c),
this.mix(a[2], b[2], c),
this.mix(a[3], b[3], c),
this.mix(a[0], b[0], c[0]),
this.mix(a[1], b[1], c[1]),
this.mix(a[2], b[2], c[2]),
this.mix(a[3], b[3], c[3]),
]
break
default:
Expand Down
52 changes: 0 additions & 52 deletions src/authoring/AuthoringNodeSpecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2200,58 +2200,6 @@ export const arithmeticNodes = [
]
}
},
{
type: "math/mix",
description: "Linear interpolation operation",
configuration: [],
input: {
flows: [],
values: [
{
id: "a",
description: "First Arg",
types: [
"float",
"float2",
"float3",
"float4"
]
},
{
id: "b",
description: "Second Arg",
types: [
"float",
"float2",
"float3",
"float4"
]
},
{
id: "c",
description: "Unclamped interpolation coefficient",
types: [
"float"
]
}
]
},
output: {
flows: [],
values: [
{
id: "value",
description: "mix of a and b",
types: [
"float",
"float2",
"float3",
"float4"
]
}
]
}
},
{
type: "math/clamp",
description: "Clamp operation",
Expand Down

0 comments on commit 795668d

Please sign in to comment.