UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

30 lines (29 loc) 695 B
"use strict"; import { NamedFunction2, NamedFunction3, NamedFunction4 } from "./_Base"; export class matrix4LookAt extends NamedFunction4 { static type() { return "matrix4LookAt"; } func(eye, lookAtTarget, up, target) { target.lookAt(eye, lookAtTarget, up); return target; } } export class matrix4MakeTranslation extends NamedFunction2 { static type() { return "matrix4MakeTranslation"; } func(t, target) { target.makeTranslation(t.x, t.y, t.z); return target; } } export class matrix4Multiply extends NamedFunction3 { static type() { return "matrix4Multiply"; } func(m1, m2, target) { target.copy(m1).multiply(m2); return target; } }