@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
31 lines (30 loc) • 1.21 kB
TypeScript
/**
* Returns the bbox of a geometry, or a component of the bbox.
*
* @remarks
* It takes 1, 2 or 3 arguments.
*
* `bbox(input_index_or_node_path, bbox_vector, vector_component)`
*
* - `input_index_or_node_path` is a number or a string
* - `bbox_vector` is a string, either 'min' or 'max'
* - `vector_component` is a string, either 'x', 'y' or 'z'
*
* ## Usage
*
* - `bbox(0)` - returns the bbox of the input node, as a THREE.Box3
* - `bbox('/geo1/box')` - returns the bbox of the node /geo1/box, as a THREE.Box3
* - `bbox('/geo1/box', 'min')` - returns the min vector of the bbox, as a THREE.Vector3
* - `bbox('/geo1/box', 'min', 'x')` - returns the x component of min vector of the bbox, as a number
*
*/
import { BaseMethodFindDependencyArgs } from './_Base';
import { BaseMethod } from './_Base';
import { MethodDependency } from '../MethodDependency';
import { Vector3, Box3 } from 'three';
export declare class BboxExpression extends BaseMethod {
static requiredArguments(): string[][];
findDependency(args: BaseMethodFindDependencyArgs): MethodDependency | null;
processArguments(args: any[]): Promise<number | Vector3 | Box3>;
private _get_value_from_container;
}