UNPKG

polygonjs-engine

Version:

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

27 lines (26 loc) 980 B
/** * Returns the centroid of a geometry, or the component of the centroid. * * @remarks * It takes 1 or 2 arguments. * * centroid(<input_index_or_node_path\>, <vector_component\>) * * - **<input_index_or_node_path\>** is a number or a string * - **<vector_component\>** is a string, either 'x', 'y' or 'z' * * ## Usage * * - `centroid(0)` - returns the centroid of the input node, as a THREE.Box3 * - `centroid('/geo1/box')` - returns the centroid of the node /geo1/box, as a THREE.Box3 * - `centroid('/geo1/box', 'x')` - returns the x component of centroid of the bbox, as a number * */ import { BaseMethod } from './_Base'; import { MethodDependency } from '../MethodDependency'; export declare class CentroidExpression extends BaseMethod { protected _require_dependency: boolean; static required_arguments(): string[][]; find_dependency(index_or_path: number | string): MethodDependency | null; process_arguments(args: any[]): Promise<any>; }