Skip to content

Commit

Permalink
added missing math/length registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Dec 18, 2024
1 parent 38255b8 commit 3cf7fdd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BasicBehaveEngine/BasicBehaveEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {SquareRoot} from "./nodes/math/exponential/SquareRoot";
import {CubeRoot} from "./nodes/math/exponential/CubeRoot";
import {Random} from "./nodes/experimental/Random";
import {Dot} from "./nodes/math/vector/Dot";
import {Normalize} from "./nodes/math/vector/Normalize";
import {Rotate2D} from "./nodes/math/vector/Rotate2D";
import {Rotate3D} from "./nodes/math/vector/Rotate3D";
import {VectorLength} from "./nodes/math/vector/VectorLength";
Expand Down Expand Up @@ -389,6 +390,7 @@ export class BasicBehaveEngine implements IBehaveEngine {
this.registerBehaveEngineNode("math/ge", GreaterThanOrEqualTo);
this.registerBehaveEngineNode("math/gt", GreaterThan);
this.registerBehaveEngineNode("math/dot", Dot);
this.registerBehaveEngineNode("math/normalize", Normalize);
this.registerBehaveEngineNode("math/rotate2d", Rotate2D);
this.registerBehaveEngineNode("math/rotate3d", Rotate3D);
this.registerBehaveEngineNode("math/length", VectorLength);
Expand Down
31 changes: 31 additions & 0 deletions src/authoring/AuthoringNodeSpecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3865,6 +3865,37 @@ export const vectorNodes: IAuthoringNode[] = [
]
}
},
{
type: "math/length",
description: "Length of a Vector",
configuration: [],
input: {
flows: [],
values: [
{
id: "a",
description: "Vector",
types: [
"float2",
"float3",
"float4"
]
}
]
},
output: {
flows: [],
values: [
{
id: "value",
description: "Length",
types: [
"float"
]
}
]
}
},
{
type: "math/cross",
description: "Cross Product",
Expand Down

0 comments on commit 3cf7fdd

Please sign in to comment.