import type { Count, Index, VectorComponentN } from '../../types/CommonTypes'; import { EnumClass, type EnumIO } from '../misc/EnumIO'; type ComponentChar = 'X' | 'Y' | 'Z' | 'W'; export type VertexAttributeTypeName = 'UNKNOWN' | 'POSITION' | 'NORMAL' | 'TANGENT' | 'TEXCOORD_0' | 'TEXCOORD_1' | 'TEXCOORD_2' | 'COLOR_0' | 'JOINTS_0' | 'WEIGHTS_0' | 'INSTANCE' | 'FACE_NORMAL' | 'BARY_CENTRIC_COORD'; export type VertexAttributeComponent = `${VertexAttributeTypeName}.${ComponentChar}`; export type VertexAttributeSemanticsJoinedString = `${string}.${ComponentChar}` | `${string}.${ComponentChar},${string}.${ComponentChar}` | `${string}.${ComponentChar},${string}.${ComponentChar},${string}.${ComponentChar}` | `${string}.${ComponentChar},${string}.${ComponentChar},${string}.${ComponentChar},${string}.${ComponentChar}`; export interface VertexAttributeEnum extends EnumIO { getAttributeSlot(): Index; shaderStr: string; /** Whether this attribute is an integer type (uvec4, ivec4, etc.) in shader */ isIntegerType: boolean; X: VertexAttributeComponent; Y: VertexAttributeComponent; Z: VertexAttributeComponent; W: VertexAttributeComponent; XY: VertexAttributeSemanticsJoinedString; XYZ: VertexAttributeSemanticsJoinedString; XYZW: VertexAttributeSemanticsJoinedString; } type VertexAttributeDescriptor = { str: VertexAttributeTypeName; shaderStr: string; attributeSlot: Index; gltfComponentN: Count; /** Whether this attribute is an integer type (uvec4, ivec4, etc.) in shader */ isIntegerType?: boolean; }; export declare class VertexAttributeClass extends EnumClass implements VertexAttributeEnum { private static __indexCount; private __attributeSlot; private __shaderStr; private __gltfComponentN; private __isIntegerType; private constructor(); getAttributeSlot(): Index; get shaderStr(): string; get isIntegerType(): boolean; get attributeTypeName(): VertexAttributeTypeName; _setShaderStr(str: string): void; get X(): VertexAttributeComponent; get Y(): VertexAttributeComponent; get Z(): VertexAttributeComponent; get W(): VertexAttributeComponent; get XY(): VertexAttributeSemanticsJoinedString; get XYZ(): VertexAttributeSemanticsJoinedString; get XYZW(): VertexAttributeSemanticsJoinedString; getVertexAttributeComponentsAsGltf(): VertexAttributeSemanticsJoinedString; static __createVertexAttributeClass(desc: VertexAttributeDescriptor): VertexAttributeClass; } declare const Position: VertexAttributeEnum; declare const Normal: VertexAttributeEnum; declare const Tangent: VertexAttributeEnum; declare const Texcoord0: VertexAttributeEnum; declare const Texcoord1: VertexAttributeEnum; declare const Color0: VertexAttributeEnum; declare const Joints0: VertexAttributeEnum; declare const Weights0: VertexAttributeEnum; declare function isInstanceOfVertexAttributeClass(obj: unknown): obj is VertexAttributeClass; declare function from(index: number): VertexAttributeEnum; declare function fromString(str: string): VertexAttributeEnum; type Gltf2VertexAttributeEnums = typeof Position | typeof Color0 | typeof Normal | typeof Tangent | typeof Texcoord0 | typeof Texcoord1 | typeof Joints0 | typeof Weights0; declare function toVertexAttributeSemanticJoinedStringAsGltfStyle(attribute: Gltf2VertexAttributeEnums): VertexAttributeSemanticsJoinedString; declare function toAttributeSlotFromJoinedString(str: VertexAttributeSemanticsJoinedString): Index; declare function toVectorComponentN(joinedString: VertexAttributeSemanticsJoinedString): VectorComponentN; export declare const VertexAttribute: Readonly<{ Unknown: VertexAttributeEnum; Position: VertexAttributeEnum; Normal: VertexAttributeEnum; Tangent: VertexAttributeEnum; Texcoord0: VertexAttributeEnum; Texcoord1: VertexAttributeEnum; Color0: VertexAttributeEnum; Joints0: VertexAttributeEnum; Weights0: VertexAttributeEnum; Instance: VertexAttributeEnum; FaceNormal: VertexAttributeEnum; BaryCentricCoord: VertexAttributeEnum; AttributeTypeNumber: number; integerTypeAttributes: VertexAttributeEnum[]; isInstanceOfVertexAttributeClass: typeof isInstanceOfVertexAttributeClass; toVertexAttributeSemanticJoinedStringAsGltfStyle: typeof toVertexAttributeSemanticJoinedStringAsGltfStyle; toAttributeSlotFromJoinedString: typeof toAttributeSlotFromJoinedString; toVectorComponentN: typeof toVectorComponentN; from: typeof from; fromString: typeof fromString; }>; export {};