UNPKG

@polygonjs/polygonjs

Version:

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

25 lines (24 loc) 1.69 kB
import { Vector3 } from 'three'; import { CorePrimitive } from '../../entities/primitive/CorePrimitive'; import { CoreObjectType, ObjectBuilder, ObjectContent } from '../../ObjectContent'; import { TetObject } from './TetObject'; import { TetGeometry } from './TetGeometry'; import { BasePrimitiveAttribute } from '../../entities/primitive/PrimitiveAttribute'; import { NumericAttribValue } from '../../../../types/GlobalTypes'; import { PrimitiveAttributesDict, UserDataWithPrimitiveAttributes } from '../../entities/primitive/Common'; export interface TetGeometryWithPrimitiveAttributes extends TetGeometry { userData: UserDataWithPrimitiveAttributes; } export declare class TetPrimitive extends CorePrimitive<CoreObjectType.TET> { constructor(object: TetObject, index: number); geometry(): TetGeometry; builder<T extends CoreObjectType>(): ObjectBuilder<T>; static entitiesCount<T extends CoreObjectType>(object: ObjectContent<T>): number; static position<T extends CoreObjectType>(tetObject: ObjectContent<T> | undefined, primitiveIndex: number, target: Vector3): Vector3; static addAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, attribute: BasePrimitiveAttribute): void; static addNumericAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, size?: number, defaultValue?: NumericAttribValue): void; static attributesFromGeometry(geometry: TetGeometry): PrimitiveAttributesDict | undefined; static attributes<T extends CoreObjectType>(object: ObjectContent<T>): PrimitiveAttributesDict | undefined; position(target: Vector3): Vector3; normal(target: Vector3): Vector3; }