@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
63 lines (62 loc) • 1.37 kB
JavaScript
;
import { NamedFunction2, NamedFunction3, ObjectNamedFunction2 } from "./_Base";
export class box3Set extends NamedFunction3 {
static type() {
return "box3Set";
}
func(min, max, target) {
target.min.copy(min);
target.max.copy(max);
return target;
}
}
export class box3SetFromObject extends ObjectNamedFunction2 {
static type() {
return "box3SetFromObject";
}
func(object, precise, target) {
object.updateMatrix();
target.setFromObject(object, precise);
return target;
}
}
export class box3ContainsPoint extends NamedFunction2 {
static type() {
return "box3ContainsPoint";
}
func(box3, point) {
return box3.containsPoint(point);
}
}
export class box3IntersectsBox3 extends NamedFunction2 {
static type() {
return "box3IntersectsBox3";
}
func(box3a, box3b) {
return box3a.intersectsBox(box3b);
}
}
export class getBox3Center extends NamedFunction2 {
static type() {
return "getBox3Center";
}
func(box3, target) {
return box3.getCenter(target);
}
}
export class getBox3Min extends NamedFunction2 {
static type() {
return "getBox3Min";
}
func(box3, target) {
return target.copy(box3.min);
}
}
export class getBox3Max extends NamedFunction2 {
static type() {
return "getBox3Max";
}
func(box3, target) {
return target.copy(box3.max);
}
}