@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
35 lines (34 loc) • 1.34 kB
TypeScript
import { Vector2, Vector3, BufferAttribute, InstancedBufferAttribute, InterleavedBufferAttribute } from 'three';
import { AttribValue } from '../../types/GlobalTypes';
import { AttribSize, GroupString } from './Constant';
export declare enum Attribute {
POINT_INDEX = "ptnum",
VERTEX_INDEX = "vtxnum",
PRIMITIVE_INDEX = "primnum",
OBJECT_INDEX = "objnum",
OBJECT_NAME = "objname",
COLOR = "color",
NORMAL = "normal",
POSITION = "position",
PSCALE = "pscale",
UP = "up",
UV = "uv",
SCALE = "scale",
TANGENT = "tangent",
ID = "id"
}
export declare enum ObjectAttribute {
HOVERED = "hovered"
}
export declare class CoreAttribute {
static remapName(name: string): string;
static arrayToIndexedArrays(array: string[]): {
indices: number[];
values: string[];
};
static defaultValue(size: number): 0 | Vector2 | Vector3;
static copy(src: BufferAttribute, dest: BufferAttribute, markAsNeedsUpdate?: boolean): void;
static attribSizeFromValue(val: AttribValue): AttribSize | null;
static attribNamesMatchingMask(masksString: GroupString, existingAttribNames: string[]): string[];
}
export declare function markAttributeAsNeedsUpdateForFrame(attribute: BufferAttribute | InstancedBufferAttribute | InterleavedBufferAttribute, frame: number): void;