UNPKG

@polygonjs/polygonjs

Version:

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

29 lines (28 loc) 631 B
"use strict"; import { NamedFunction1, NamedFunction2, NamedFunction3 } from "./_Base"; export class sphereSet extends NamedFunction3 { static type() { return "sphereSet"; } func(center, radius, target) { target.center.copy(center); target.radius = radius; return target; } } export class getSphereCenter extends NamedFunction2 { static type() { return "getSphereCenter"; } func(sphere, target) { return target.copy(sphere.center); } } export class getSphereRadius extends NamedFunction1 { static type() { return "getSphereRadius"; } func(sphere) { return sphere.radius; } }