UNPKG

@polygonjs/polygonjs

Version:

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

25 lines (24 loc) 1.72 kB
import { BufferGeometry, Object3D } from 'three'; import { CoreObjectType, ObjectContent } from '../../ObjectContent'; import { PrimitiveAttributesDict, UserDataWithPrimitiveAttributes } from '../../entities/primitive/Common'; import { CorePrimitive } from '../../entities/primitive/CorePrimitive'; import { BasePrimitiveAttribute } from '../../entities/primitive/PrimitiveAttribute'; import { NumericAttribValue } from '../../../../types/GlobalTypes'; import { CoreEntityWithObject } from '../../CoreEntity'; export interface BufferGeometryWithPrimitiveAttributes extends BufferGeometry { userData: UserDataWithPrimitiveAttributes; } export declare abstract class ThreejsPrimitive extends CorePrimitive<CoreObjectType.THREEJS> { protected _geometry?: BufferGeometry; constructor(object: Object3D, index: number); setIndex(index: number, object?: Object3D): this; private _updateGeometry; geometry(): BufferGeometry<import("three").NormalBufferAttributes> | undefined; static addAttribute(object: Object3D, attribName: string, attribute: BasePrimitiveAttribute): void; static addNumericAttribute(object: Object3D, attribName: string, size?: number, defaultValue?: NumericAttribValue): void; static attributes<T extends CoreObjectType>(object: ObjectContent<T>): PrimitiveAttributesDict | undefined; protected static stride(): number; static relatedVertexIds(object: ObjectContent<CoreObjectType>, primitiveIndex: number, target: number[]): void; static relatedVertexClass<T extends CoreObjectType>(object: ObjectContent<T>): typeof CoreEntityWithObject<T>; static relatedObjectClass<T extends CoreObjectType>(object: ObjectContent<T>): typeof CoreEntityWithObject<T>; }