UNPKG

@polygonjs/polygonjs

Version:

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

15 lines (14 loc) 341 B
"use strict"; import { ObjectNamedFunction2 } from "./_Base"; export class getObject extends ObjectNamedFunction2 { static type() { return "getObject"; } func(object3D, getCurrentObject, mask) { if (getCurrentObject) { return object3D; } else { return this.scene.findObjectByMask(mask) || object3D; } } }