@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
33 lines (32 loc) • 2.91 kB
TypeScript
import { BufferGeometry, Object3D, Vector3, BufferAttribute } from 'three';
import { CoreObjectType, ObjectContent } from '../../ObjectContent';
import { CorePoint } from '../../entities/point/CorePoint';
import { PointAttributesDict } from '../../entities/point/Common';
import { Attribute } from '../../Attribute';
import { NumericAttribValue } from '../../../../types/GlobalTypes';
import { TraversedRelatedEntityData } from '../../entities/utils/TraversedRelatedEntities';
import { CoreEntityWithObject } from '../../CoreEntity';
export declare class ThreejsPoint extends CorePoint<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: BufferAttribute): void;
static attributes<T extends CoreObjectType>(object: ObjectContent<T>): PointAttributesDict | undefined;
static entitiesCount<T extends CoreObjectType>(object: ObjectContent<T>): number;
static positionAttributeName<T extends CoreObjectType>(object: ObjectContent<T>): Attribute.POSITION | import("../../Instancer").InstanceAttrib.POSITION | null;
static position<T extends CoreObjectType>(object: ObjectContent<T>, index: number, target: Vector3): Vector3 | null;
position(target: Vector3): Vector3;
normal(target: Vector3): Vector3;
static computeNormals<T extends CoreObjectType>(object: ObjectContent<T>): null | undefined;
static markAttribAsNeedsUpdate<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string): null | undefined;
static userDataAttribs<T extends CoreObjectType>(object: ObjectContent<T>): any;
static setIndexedAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, values: string[], indices: number[]): void;
static attribValueIndex<T extends CoreObjectType>(object: ObjectContent<T>, index: number, attribName: string): number;
static renameAttribute<T extends CoreObjectType>(object: ObjectContent<T>, oldName: string, newName: string): BufferGeometry<import("three").NormalBufferAttributes> | undefined;
static deleteAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string): BufferGeometry<import("three").NormalBufferAttributes> | undefined;
static addNumericAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, size?: number, defaultValue?: NumericAttribValue): void;
static relatedVertexIds<T extends CoreObjectType>(object: ObjectContent<T>, pointIndex: number, target: number[], traversedRelatedEntityData?: TraversedRelatedEntityData): void;
static relatedVertexClass<T extends CoreObjectType>(object: ObjectContent<T>): typeof CoreEntityWithObject<T>;
}