polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
24 lines (23 loc) • 636 B
JavaScript
import Quaternion from "./gl/quaternion.glsl";
import {MathFunctionArg2Factory} from "./_Math_Arg2";
import {GlConnectionPointType} from "../utils/io/connections/Gl";
const DefaultValues = {
start: [0, 0, 1],
end: [1, 0, 0]
};
export class VectorAngleGlNode extends MathFunctionArg2Factory("vectorAngle", {
in: ["start", "end"],
method: "vectorAngle",
functions: [Quaternion]
}) {
_expected_input_types() {
const type = GlConnectionPointType.VEC3;
return [type, type];
}
_expected_output_types() {
return [GlConnectionPointType.FLOAT];
}
param_default_value(name) {
return DefaultValues[name];
}
}