UNPKG

polygonjs-engine

Version:

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

63 lines (62 loc) 2.56 kB
import { NumericAttribValue, PolyDictionary } from '../../types/GlobalTypes'; import { Vector3 } from 'three/src/math/Vector3'; import { Object3D } from 'three/src/core/Object3D'; import { Group } from 'three/src/objects/Group'; import { BufferGeometry } from 'three/src/core/BufferGeometry'; import { Box3 } from 'three/src/math/Box3'; import { CoreObject } from './Object'; import { CoreGeometry } from './Geometry'; import { AttribClass, AttribSize, ObjectData } from './Constant'; export declare type GroupString = string; export interface Object3DWithGeometry extends Object3D { geometry: BufferGeometry; } export declare class CoreGroup { private _timestamp; private _objects; private _objects_with_geo; private _core_objects; private _core_geometries; private _bounding_box; constructor(); timestamp(): number | undefined; touch(): void; reset(): void; clone(): CoreGroup; setObjects(objects: Object3D[]): void; objects(): Object3D[]; objectsWithGeo(): Object3DWithGeometry[]; coreObjects(): CoreObject[]; private _create_core_objects; objectsData(): ObjectData[]; private _objectData; geometries(): BufferGeometry[]; coreGeometries(): CoreGeometry[]; private _createCoreGeometries; static geometryFromObject(object: Object3D): BufferGeometry | null; faces(): import("./Face").CoreFace[]; points(): import("./Point").CorePoint[]; pointsCount(): number; totalPointsCount(): number; pointsFromGroup(group: GroupString): import("./Point").CorePoint[]; static _fromObjects(objects: Object3D[]): CoreGroup; objectsFromGroup(group_name: string): Object3D[]; coreObjectsFromGroup(group_name: string): CoreObject[]; boundingBox(): Box3; center(): Vector3; size(): Vector3; private _compute_bounding_box; computeVertexNormals(): void; hasAttrib(name: string): boolean; attribType(name: string): import("./Constant").AttribType | null; objectAttribType(name: string): import("./Constant").AttribType | null; renameAttrib(old_name: string, new_name: string, attrib_class: AttribClass): void; attribNames(): string[]; objectAttribNames(): string[]; attribNamesMatchingMask(masks_string: GroupString): string[]; attribSizes(): PolyDictionary<AttribSize>; objectAttribSizes(): PolyDictionary<AttribSize>; attribSize(attrib_name: string): number; addNumericVertexAttrib(name: string, size: number, default_value: NumericAttribValue): void; static clone(src_group: Group): Group; }