@pnext/three-loader
Version:
Potree loader for ThreeJS, converted and adapted to Typescript.
53 lines (52 loc) • 1.52 kB
TypeScript
export declare enum PointAttributeName {
POSITION_CARTESIAN = 0,
COLOR_PACKED = 1,
COLOR_FLOATS_1 = 2,
COLOR_FLOATS_255 = 3,
NORMAL_FLOATS = 4,
FILLER = 5,
INTENSITY = 6,
CLASSIFICATION = 7,
NORMAL_SPHEREMAPPED = 8,
NORMAL_OCT16 = 9,
NORMAL = 10
}
export interface PointAttributeType {
ordinal: number;
size: number;
}
export declare const POINT_ATTRIBUTE_TYPES: Record<string, PointAttributeType>;
export interface IPointAttribute {
name: PointAttributeName;
type: PointAttributeType;
numElements: number;
byteSize: number;
}
export interface IPointAttributes {
attributes: IPointAttribute[];
byteSize: number;
size: number;
}
export declare const POINT_ATTRIBUTES: {
POSITION_CARTESIAN: IPointAttribute;
RGBA_PACKED: IPointAttribute;
COLOR_PACKED: IPointAttribute;
RGB_PACKED: IPointAttribute;
NORMAL_FLOATS: IPointAttribute;
FILLER_1B: IPointAttribute;
INTENSITY: IPointAttribute;
CLASSIFICATION: IPointAttribute;
NORMAL_SPHEREMAPPED: IPointAttribute;
NORMAL_OCT16: IPointAttribute;
NORMAL: IPointAttribute;
};
export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
export declare class PointAttributes implements IPointAttributes {
attributes: IPointAttribute[];
byteSize: number;
size: number;
constructor(pointAttributeNames?: PointAttributeStringName[]);
add(pointAttribute: IPointAttribute): void;
hasColors(): boolean;
hasNormals(): boolean;
}