@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
30 lines (29 loc) • 2.06 kB
TypeScript
import { Vector3 } from 'three';
import { CoreVertex } from '../../entities/vertex/CoreVertex';
import { CoreObjectType, ObjectContent } from '../../ObjectContent';
import { UserDataWithVertexAttributes, VertexAttributesDict } from '../../entities/vertex/Common';
import { QuadGeometry } from './QuadGeometry';
import { QuadObject } from './QuadObject';
import { BaseVertexAttribute } from '../../entities/vertex/VertexAttribute';
import { NumericAttribValue } from '../../../../types/GlobalTypes';
import { CoreEntityWithObject } from '../../CoreEntity';
export interface QuadGeometryWithVertexAttributes extends QuadGeometry {
userData: UserDataWithVertexAttributes;
}
export declare class QuadVertex extends CoreVertex<CoreObjectType.QUAD> {
protected _geometry?: QuadGeometryWithVertexAttributes;
constructor(object: QuadObject, index: number);
setIndex(index: number, object?: QuadObject): this;
private _updateGeometry;
geometry(): QuadGeometryWithVertexAttributes | undefined;
static addAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, attribute: BaseVertexAttribute): void;
static addNumericAttribute<T extends CoreObjectType>(object: ObjectContent<T>, attribName: string, size?: number, defaultValue?: NumericAttribValue): void;
static entitiesCount<T extends CoreObjectType>(object: ObjectContent<T>): number;
static attributes<T extends CoreObjectType>(object: ObjectContent<T>): VertexAttributesDict | undefined;
position(target: Vector3): Vector3;
normal(target: Vector3): Vector3;
static relatedPrimitiveIds<T extends CoreObjectType>(object: ObjectContent<T>, vertexIndex: number, target: number[]): void;
static relatedPointIds<T extends CoreObjectType>(object: ObjectContent<T>, vertexIndex: number, target: number[]): void;
static relatedPointClass<T extends CoreObjectType>(object: ObjectContent<T>): typeof CoreEntityWithObject<T>;
static relatedPrimitiveClass<T extends CoreObjectType>(object: ObjectContent<T>): typeof CoreEntityWithObject<T>;
}