@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
38 lines (37 loc) • 1.62 kB
TypeScript
import { Object3D, Material, Matrix4, Box3, Sphere } from 'three';
import { CsgGeometryType, CsgTypeMap, CSGTesselationParams } from './CsgCommon';
import { ObjectContent, CoreObjectType } from '../../ObjectContent';
export declare class CsgObject<T extends CsgGeometryType> implements ObjectContent<CoreObjectType.CSG> {
private _geometry;
visible: boolean;
get geometry(): import("./CsgCommon").CsgGeometry;
get type(): T;
userData: {};
name: string;
castShadow: boolean;
receiveShadow: boolean;
renderOrder: number;
frustumCulled: boolean;
matrixAutoUpdate: boolean;
material: Material | undefined;
children: ObjectContent<CoreObjectType.CSG>[];
parent: ObjectContent<CoreObjectType.CSG> | null;
private _type;
constructor(_geometry: CsgTypeMap[T]);
setGeometry<TE extends CsgGeometryType>(geometry: CsgTypeMap[TE]): void;
private _validate;
csgGeometry(): CsgTypeMap[T];
dispose(): void;
applyMatrix4(matrix: Matrix4): void;
add(...object: ObjectContent<CoreObjectType>[]): void;
remove(...object: ObjectContent<CoreObjectType>[]): void;
dispatchEvent(event: {
type: string;
}): void;
traverse(callback: (object: CsgObject<T>) => any): void;
clone(): CsgObject<T>;
toObject3D(tesselationParams: CSGTesselationParams): Object3D | Object3D[] | undefined;
static toObject3D<T extends CsgGeometryType>(csgObject: CsgObject<T>, type: T, tesselationParams: CSGTesselationParams): Object3D | Object3D[] | undefined;
boundingBox(target: Box3): void;
boundingSphere(target: Sphere): void;
}