@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
24 lines (23 loc) • 665 B
JavaScript
;
import { NamedFunction2, NamedFunction3 } from "./_Base";
import { ROTATION_ORDERS } from "../../core/Transform";
export class eulerSetFromVector3 extends NamedFunction3 {
static type() {
return "eulerSetFromVector3";
}
func(values, orderIndex, target) {
const order = typeof orderIndex == "number" ? ROTATION_ORDERS[orderIndex] : orderIndex;
target.setFromVector3(values);
target.order = order;
return target;
}
}
export class eulerSetFromQuaternion extends NamedFunction2 {
static type() {
return "eulerSetFromQuaternion";
}
func(values, target) {
target.setFromQuaternion(values);
return target;
}
}