import NamedComponent from "../named-component/index.js"; import BufferView from "../buffer-view/index.js"; import Indexer from "../asset/indexer/index.js"; import { ValueOf } from "ts-essentials"; /** * Accessor component types * @alias ComponentTypes * @enum {number} * @memberof Accessor * @static */ declare const componentTypes: { readonly BYTE: 5120; readonly UNSIGNED_BYTE: 5121; readonly SHORT: 5122; readonly UNSIGNED_SHORT: 5123; readonly UNSIGNED_INT: 5125; readonly FLOAT: 5126; }; type ComponentType = ValueOf; /** * Describes the type of data held by an accessor * @alias AttributeTypes * @enum {string} * @memberof Accessor * @static */ declare const types: { readonly SCALAR: "SCALAR"; readonly VEC2: "VEC2"; readonly VEC3: "VEC3"; readonly VEC4: "VEC4"; readonly MAT2: "MAT2"; readonly MAT3: "MAT3"; readonly MAT4: "MAT4"; }; type Type = ValueOf; /** * Accessor - a builder for a GLTF accessor object * @see {@link https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-accessor| GLTF reference} * @hideconstructor */ export default class Accessor extends NamedComponent<{ type: Type; componentType: ComponentType; min: number[]; max: number[]; bufferView: BufferView; count: number; }> { static get ComponentTypes(): { readonly BYTE: 5120; readonly UNSIGNED_BYTE: 5121; readonly SHORT: 5122; readonly UNSIGNED_SHORT: 5123; readonly UNSIGNED_INT: 5125; readonly FLOAT: 5126; }; static get AttributeTypes(): { readonly SCALAR: "SCALAR"; readonly VEC2: "VEC2"; readonly VEC3: "VEC3"; readonly VEC4: "VEC4"; readonly MAT2: "MAT2"; readonly MAT3: "MAT3"; readonly MAT4: "MAT4"; }; constructor(); componentType(componentType: ComponentType): this; type(type: Type): this; min(min: number[]): this; max(max: number[]): this; bufferView(bufferView: BufferView): this; /** * count - sets the count property on the accessor * * @param {number} count number of attributes referenced by this accessor, * not to be confused with the number of bytes or number of components. * * @returns {Accessor} this */ count(count: number): this; build(indexer: Indexer): object; } export {};