import { Graph, Graph as Graph$1, GraphEdge, GraphNode, LiteralKeys, Ref, RefList, RefMap, RefMap as RefMap$1, RefSet, RefSet as RefSet$1 } from "property-graph";

//#region src/constants.d.ts
/**
 * Current version of the package.
 * @hidden
 */
declare const VERSION: string;
/**
 * TypeScript utility for nullable types.
 * @hidden
 */
type Nullable<T> = { [P in keyof T]: T[P] | null };
/**
 * 2-dimensional vector.
 * @hidden
 */
type vec2 = [number, number];
/**
 * 3-dimensional vector.
 * @hidden
 */
type vec3 = [number, number, number];
/**
 * 4-dimensional vector, e.g. RGBA or a quaternion.
 * @hidden
 */
type vec4 = [number, number, number, number];
/**
 * 3x3 matrix, e.g. an affine transform of a 2D vector.
 * @hidden
 */
type mat3 = [number, number, number, number, number, number, number, number, number];
/**
 * 4x4 matrix, e.g. an affine transform of a 3D vector.
 * @hidden
 */
type mat4 = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
/** @hidden */
type bbox = {
  min: vec3;
  max: vec3;
};
/** @hidden */
declare const GLB_BUFFER = "@glb.bin";
/**
 * Abstraction representing any one of the typed array classes supported by glTF and JavaScript.
 * @hidden
 */
type TypedArray = Float64Array<ArrayBuffer> | Float32Array<ArrayBuffer> | Float16Array<ArrayBuffer> | Uint32Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | Uint8Array<ArrayBuffer> | Int16Array<ArrayBuffer> | Int8Array<ArrayBuffer>;
/**
 * Abstraction representing the typed array constructors supported by glTF and JavaScript.
 * @hidden
 */
type TypedArrayConstructor = Float64ArrayConstructor | Float32ArrayConstructor | Float16ArrayConstructor | Uint32ArrayConstructor | Uint16ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Int8ArrayConstructor;
/** String IDs for core {@link Property} types. */
declare enum PropertyType {
  ACCESSOR = "Accessor",
  ANIMATION = "Animation",
  ANIMATION_CHANNEL = "AnimationChannel",
  ANIMATION_SAMPLER = "AnimationSampler",
  BUFFER = "Buffer",
  CAMERA = "Camera",
  MATERIAL = "Material",
  MESH = "Mesh",
  PRIMITIVE = "Primitive",
  PRIMITIVE_TARGET = "PrimitiveTarget",
  NODE = "Node",
  ROOT = "Root",
  SCENE = "Scene",
  SKIN = "Skin",
  TEXTURE = "Texture",
  TEXTURE_INFO = "TextureInfo"
}
/** Vertex layout method. */
declare enum VertexLayout {
  /**
   * Stores vertex attributes in a single buffer view per mesh primitive. Interleaving vertex
   * data may improve performance by reducing page-thrashing in GPU memory.
   */
  INTERLEAVED = "interleaved",
  /**
   * Stores each vertex attribute in a separate buffer view. May decrease performance by causing
   * page-thrashing in GPU memory. Some 3D engines may prefer this layout, e.g. for simplicity.
   */
  SEPARATE = "separate"
}
/** Accessor usage. */
declare enum BufferViewUsage {
  ARRAY_BUFFER = "ARRAY_BUFFER",
  ELEMENT_ARRAY_BUFFER = "ELEMENT_ARRAY_BUFFER",
  INVERSE_BIND_MATRICES = "INVERSE_BIND_MATRICES",
  OTHER = "OTHER",
  SPARSE = "SPARSE"
}
/** Texture channels. */
declare enum TextureChannel {
  R = 4096,
  G = 256,
  B = 16,
  A = 1
}
declare enum Format {
  GLTF = "GLTF",
  GLB = "GLB"
}
declare const ComponentTypeToTypedArray: Record<string, TypedArrayConstructor>;
//#endregion
//#region src/types/gltf.d.ts
/**
 * Module for glTF 2.0 Interface
 */
declare namespace GLTF {
  /** Data type of the values composing each element in the accessor. */
  type AccessorComponentType = 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | 5130 | 5131;
  /** Element type contained by the accessor (SCALAR, VEC2, ...). */
  type AccessorType = 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4';
  /** Name of the property to be modified by an animation channel. */
  type AnimationChannelTargetPath = 'translation' | 'rotation' | 'scale' | 'weights';
  /** Interpolation method. */
  type AnimationSamplerInterpolation = 'LINEAR' | 'STEP' | 'CUBICSPLINE';
  /** Projection type used by a camera. */
  type CameraType = 'perspective' | 'orthographic';
  /** The alpha rendering mode of the material. */
  type MaterialAlphaMode = 'OPAQUE' | 'MASK' | 'BLEND';
  /** The type of the GL primitives to render. */
  type MeshPrimitiveMode = 0 | 1 | 2 | 3 | 4 | 5 | 6;
  /** Magnification filter.  Values match to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR). */
  type TextureMagFilter = 9728 | 9729;
  /** Minification filter.  All valid values correspond to WebGL enums. */
  type TextureMinFilter = 9728 | 9729 | 9984 | 9985 | 9986 | 9987;
  /** S (U) wrapping mode.  All valid values correspond to WebGL enums. */
  type TextureWrapMode = 33071 | 33648 | 10497;
  /**
   * glTF Property
   */
  interface IProperty {
    /**
     * Dictionary object with extension-specific objects
     */
    extensions?: Record<string, unknown>;
    /**
     * Application-Specific data
     */
    extras?: Record<string, unknown>;
  }
  /**
   * glTF Child of Root Property
   */
  interface IChildRootProperty extends IProperty {
    /**
     * The user-defined name of this object
     */
    name?: string;
  }
  /**
   * Indices of those attributes that deviate from their initialization value
   */
  interface IAccessorSparseIndices extends IProperty {
    /**
     * The index of the bufferView with sparse indices. Referenced bufferView can't have
     * ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target
     */
    bufferView: number;
    /**
     * The offset relative to the start of the bufferView in bytes. Must be aligned
     */
    byteOffset?: number;
    /**
     * The indices data type.  Valid values correspond to WebGL enums: 5121 (UNSIGNED_BYTE),
     * 5123 (UNSIGNED_SHORT), 5125 (UNSIGNED_INT)
     */
    componentType: AccessorComponentType;
  }
  /**
   * Array of size accessor.sparse.count times number of components storing the displaced accessor
   * attributes pointed by accessor.sparse.indices
   */
  interface IAccessorSparseValues extends IProperty {
    /**
     * The index of the bufferView with sparse values. Referenced bufferView can't have
     * ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target
     */
    bufferView: number;
    /**
     * The offset relative to the start of the bufferView in bytes. Must be aligned
     */
    byteOffset?: number;
  }
  /**
   * Sparse storage of attributes that deviate from their initialization value
   */
  interface IAccessorSparse extends IProperty {
    /**
     * The number of attributes encoded in this sparse accessor
     */
    count: number;
    /**
     * Index array of size count that points to those accessor attributes that deviate from
     * their initialization value. Indices must strictly increase
     */
    indices: IAccessorSparseIndices;
    /**
     * Array of size count times number of components, storing the displaced accessor attributes
     * pointed by indices. Substituted values must have the same componentType and number of
     * components as the base accessor
     */
    values: IAccessorSparseValues;
  }
  /**
   * A typed view into a bufferView.  A bufferView contains raw binary data.  An accessor provides
   * a typed view into a bufferView or a subset of a bufferView similar to how WebGL's
   * vertexAttribPointer() defines an attribute in a buffer
   */
  interface IAccessor extends IChildRootProperty {
    /**
     * The index of the bufferview
     */
    bufferView?: number;
    /**
     * The offset relative to the start of the bufferView in bytes
     */
    byteOffset?: number;
    /**
     * The datatype of components in the attribute
     */
    componentType: AccessorComponentType;
    /**
     * Specifies whether integer data values should be normalized
     */
    normalized?: boolean;
    /**
     * The number of attributes referenced by this accessor
     */
    count: number;
    /**
     * Specifies if the attribute is a scalar, vector, or matrix
     */
    type: AccessorType;
    /**
     * Maximum value of each component in this attribute
     */
    max?: number[];
    /**
     * Minimum value of each component in this attribute
     */
    min?: number[];
    /**
     * Sparse storage of attributes that deviate from their initialization value
     */
    sparse?: IAccessorSparse;
  }
  /**
   * Targets an animation's sampler at a node's property
   */
  interface IAnimationChannel extends IProperty {
    /**
     * The index of a sampler in this animation used to compute the value for the target
     */
    sampler: number;
    /**
     * The index of the node and TRS property to target
     */
    target: IAnimationChannelTarget;
  }
  /**
   * The index of the node and TRS property that an animation channel targets
   */
  interface IAnimationChannelTarget extends IProperty {
    /**
     * The index of the node to target, when undefined, the animated object MAY be defined by an extension.
     */
    node?: number;
    /**
     * The name of the node's TRS property to modify, or the weights of the Morph Targets it
     * instantiates
     */
    path: AnimationChannelTargetPath;
  }
  /**
   * Combines input and output accessors with an interpolation algorithm to define a keyframe
   * graph (but not its target)
   */
  interface IAnimationSampler extends IProperty {
    /**
     * The index of an accessor containing keyframe input values, e.g., time
     */
    input: number;
    /**
     * Interpolation algorithm
     */
    interpolation?: AnimationSamplerInterpolation;
    /**
     * The index of an accessor, containing keyframe output values
     */
    output: number;
  }
  /**
   * A keyframe animation
   */
  interface IAnimation extends IChildRootProperty {
    /**
     * An array of channels, each of which targets an animation's sampler at a node's property
     */
    channels: IAnimationChannel[];
    /**
     * An array of samplers that combines input and output accessors with an interpolation
     * algorithm to define a keyframe graph (but not its target)
     */
    samplers: IAnimationSampler[];
  }
  /**
   * Metadata about the glTF asset
   */
  interface IAsset extends IChildRootProperty {
    /**
     * A copyright message suitable for display to credit the content creator
     */
    copyright?: string;
    /**
     * Tool that generated this glTF model.  Useful for debugging
     */
    generator?: string;
    /**
     * The glTF version that this asset targets
     */
    version: string;
    /**
     * The minimum glTF version that this asset targets
     */
    minVersion?: string;
  }
  /**
   * A buffer points to binary geometry, animation, or skins
   */
  interface IBuffer extends IChildRootProperty {
    /**
     * The uri of the buffer.  Relative paths are relative to the .gltf file.  Instead of
     * referencing an external file, the uri can also be a data-uri
     */
    uri?: string;
    /**
     * The length of the buffer in bytes
     */
    byteLength: number;
  }
  /**
   * A view into a buffer generally representing a subset of the buffer
   */
  interface IBufferView extends IChildRootProperty {
    /**
     * The index of the buffer
     */
    buffer: number;
    /**
     * The offset into the buffer in bytes
     */
    byteOffset?: number;
    /**
     * The length of the bufferView in bytes
     */
    byteLength: number;
    /**
     * The stride, in bytes
     */
    byteStride?: number;
    /**
     * The target that the GPU buffer should be bound to
     */
    target?: number;
  }
  /**
   * An orthographic camera containing properties to create an orthographic projection matrix
   */
  interface ICameraOrthographic extends IProperty {
    /**
     * The floating-point horizontal magnification of the view. Must not be zero
     */
    xmag: number;
    /**
     * The floating-point vertical magnification of the view. Must not be zero
     */
    ymag: number;
    /**
     * The floating-point distance to the far clipping plane. zfar must be greater than znear
     */
    zfar: number;
    /**
     * The floating-point distance to the near clipping plane
     */
    znear: number;
  }
  /**
   * A perspective camera containing properties to create a perspective projection matrix
   */
  interface ICameraPerspective extends IProperty {
    /**
     * The floating-point aspect ratio of the field of view
     */
    aspectRatio?: number;
    /**
     * The floating-point vertical field of view in radians
     */
    yfov: number;
    /**
     * The floating-point distance to the far clipping plane
     */
    zfar?: number;
    /**
     * The floating-point distance to the near clipping plane
     */
    znear: number;
  }
  /**
   * A camera's projection.  A node can reference a camera to apply a transform to place the
   * camera in the scene
   */
  interface ICamera extends IChildRootProperty {
    /**
     * An orthographic camera containing properties to create an orthographic projection matrix
     */
    orthographic?: ICameraOrthographic;
    /**
     * A perspective camera containing properties to create a perspective projection matrix
     */
    perspective?: ICameraPerspective;
    /**
     * Specifies if the camera uses a perspective or orthographic projection
     */
    type: CameraType;
  }
  /**
   * Image data used to create a texture. Image can be referenced by URI or bufferView index.
   * mimeType is required in the latter case
   */
  interface IImage extends IChildRootProperty {
    /**
     * The uri of the image.  Relative paths are relative to the .gltf file.  Instead of
     * referencing an external file, the uri can also be a data-uri.  The image format must be
     * jpg or png
     */
    uri?: string;
    /**
     * The image's MIME type
     */
    mimeType?: string;
    /**
     * The index of the bufferView that contains the image. Use this instead of the image's uri
     * property
     */
    bufferView?: number;
  }
  /**
   * Material Normal Texture Info
   */
  interface IMaterialNormalTextureInfo extends ITextureInfo {
    /**
     * The scalar multiplier applied to each normal vector of the normal texture
     */
    scale?: number;
  }
  /**
   * Material Occlusion Texture Info
   */
  interface IMaterialOcclusionTextureInfo extends ITextureInfo {
    /**
     * A scalar multiplier controlling the amount of occlusion applied
     */
    strength?: number;
  }
  /**
   * A set of parameter values that are used to define the metallic-roughness material model from
   * Physically-Based Rendering (PBR) methodology
   */
  interface IMaterialPbrMetallicRoughness {
    /**
     * The material's base color factor
     */
    baseColorFactor?: number[];
    /**
     * The base color texture
     */
    baseColorTexture?: ITextureInfo;
    /**
     * The metalness of the material
     */
    metallicFactor?: number;
    /**
     * The roughness of the material
     */
    roughnessFactor?: number;
    /**
     * The metallic-roughness texture
     */
    metallicRoughnessTexture?: ITextureInfo;
  }
  /**
   * The material appearance of a primitive
   */
  interface IMaterial extends IChildRootProperty {
    /**
     * A set of parameter values that are used to define the metallic-roughness material model
     * from Physically-Based Rendering (PBR) methodology. When not specified, all the default
     * values of pbrMetallicRoughness apply
     */
    pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
    /**
     * The normal map texture
     */
    normalTexture?: IMaterialNormalTextureInfo;
    /**
     * The occlusion map texture
     */
    occlusionTexture?: IMaterialOcclusionTextureInfo;
    /**
     * The emissive map texture
     */
    emissiveTexture?: ITextureInfo;
    /**
     * The RGB components of the emissive color of the material. These values are linear. If
     * an emissiveTexture is specified, this value is multiplied with the texel values
     */
    emissiveFactor?: number[];
    /**
     * The alpha rendering mode of the material
     */
    alphaMode?: MaterialAlphaMode;
    /**
     * The alpha cutoff value of the material
     */
    alphaCutoff?: number;
    /**
     * Specifies whether the material is double sided
     */
    doubleSided?: boolean;
  }
  /**
   * Geometry to be rendered with the given material
   */
  interface IMeshPrimitive extends IProperty {
    /**
     * A dictionary object, where each key corresponds to mesh attribute semantic and each
     * value is the index of the accessor containing attribute's data
     */
    attributes: {
      [name: string]: number;
    };
    /**
     * The index of the accessor that contains the indices
     */
    indices?: number;
    /**
     * The index of the material to apply to this primitive when rendering
     */
    material?: number;
    /**
     * The type of primitives to render. All valid values correspond to WebGL enums
     */
    mode?: MeshPrimitiveMode;
    /**
     * An array of Morph Targets, each  Morph Target is a dictionary mapping attributes (only
     * POSITION, NORMAL, and TANGENT supported) to their deviations in the Morph Target
     */
    targets?: {
      [name: string]: number;
    }[];
  }
  /**
   * A set of primitives to be rendered.  A node can contain one mesh.  A node's transform
   * places the mesh in the scene
   */
  interface IMesh extends IChildRootProperty {
    /**
     * An array of primitives, each defining geometry to be rendered with a material
     */
    primitives: IMeshPrimitive[];
    /**
     * Array of weights to be applied to the Morph Targets
     */
    weights?: number[];
  }
  /**
   * A node in the node hierarchy
   */
  interface INode extends IChildRootProperty {
    /**
     * The index of the camera referenced by this node
     */
    camera?: number;
    /**
     * The indices of this node's children
     */
    children?: number[];
    /**
     * The index of the skin referenced by this node
     */
    skin?: number;
    /**
     * A floating-point 4x4 transformation matrix stored in column-major order
     */
    matrix?: number[];
    /**
     * The index of the mesh in this node
     */
    mesh?: number;
    /**
     * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar
     */
    rotation?: number[];
    /**
     * The node's non-uniform scale, given as the scaling factors along the x, y, and z axes
     */
    scale?: number[];
    /**
     * The node's translation along the x, y, and z axes
     */
    translation?: number[];
    /**
     * The weights of the instantiated Morph Target. Number of elements must match number of
     * Morph Targets of used mesh
     */
    weights?: number[];
  }
  /**
   * Texture sampler properties for filtering and wrapping modes
   */
  interface ISampler extends IChildRootProperty {
    /**
     * Magnification filter.  Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729
     * (LINEAR)
     */
    magFilter?: TextureMagFilter;
    /**
     * Minification filter.  All valid values correspond to WebGL enums
     */
    minFilter?: TextureMinFilter;
    /**
     * S (U) wrapping mode.  All valid values correspond to WebGL enums
     */
    wrapS?: TextureWrapMode;
    /**
     * T (V) wrapping mode.  All valid values correspond to WebGL enums
     */
    wrapT?: TextureWrapMode;
  }
  /**
   * The root nodes of a scene
   */
  interface IScene extends IChildRootProperty {
    /**
     * The indices of each root node
     */
    nodes: number[];
  }
  /**
   * Joints and matrices defining a skin
   */
  interface ISkin extends IChildRootProperty {
    /**
     * The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The
     * default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind
     * matrices were pre-applied
     */
    inverseBindMatrices?: number;
    /**
     * The index of the node used as a skeleton root. When undefined, joints transforms resolve
     * to scene root
     */
    skeleton?: number;
    /**
     * Indices of skeleton nodes, used as joints in this skin.  The array length must be the
     * same as the count property of the inverseBindMatrices accessor (when defined)
     */
    joints: number[];
  }
  /**
   * A texture and its sampler
   */
  interface ITexture extends IChildRootProperty {
    /**
     * The index of the sampler used by this texture. When undefined, a sampler with repeat
     * wrapping and auto filtering should be used
     */
    sampler?: number;
    /**
     * The index of the image used by this texture
     */
    source?: number;
  }
  /**
   * Reference to a texture
   */
  interface ITextureInfo extends IProperty {
    /**
     * The index of the texture
     */
    index: number;
    /**
     * The set index of texture's TEXCOORD attribute used for texture coordinate mapping
     */
    texCoord?: number;
  }
  /**
   * The root object for a glTF asset
   */
  interface IGLTF extends IProperty {
    /**
     * An array of accessors. An accessor is a typed view into a bufferView
     */
    accessors?: IAccessor[];
    /**
     * An array of keyframe animations
     */
    animations?: IAnimation[];
    /**
     * Metadata about the glTF asset
     */
    asset: IAsset;
    /**
     * An array of buffers.  A buffer points to binary geometry, animation, or skins
     */
    buffers?: IBuffer[];
    /**
     * An array of bufferViews.  A bufferView is a view into a buffer generally representing
     * a subset of the buffer
     */
    bufferViews?: IBufferView[];
    /**
     * An array of cameras
     */
    cameras?: ICamera[];
    /**
     * Names of glTF extensions used somewhere in this asset
     */
    extensionsUsed?: string[];
    /**
     * Names of glTF extensions required to properly load this asset
     */
    extensionsRequired?: string[];
    /**
     * An array of images.  An image defines data used to create a texture
     */
    images?: IImage[];
    /**
     * An array of materials.  A material defines the appearance of a primitive
     */
    materials?: IMaterial[];
    /**
     * An array of meshes.  A mesh is a set of primitives to be rendered
     */
    meshes?: IMesh[];
    /**
     * An array of nodes
     */
    nodes?: INode[];
    /**
     * An array of samplers.  A sampler contains properties for texture filtering and wrapping
     * modes
     */
    samplers?: ISampler[];
    /**
     * The index of the default scene
     */
    scene?: number;
    /**
     * An array of scenes
     */
    scenes?: IScene[];
    /**
     * An array of skins.  A skin is defined by joints and matrices
     */
    skins?: ISkin[];
    /**
     * An array of textures
     */
    textures?: ITexture[];
  }
}
//#endregion
//#region src/json-document.d.ts
/**
 * *Raw glTF asset, with its JSON and binary resources.*
 *
 * A JSONDocument is a plain object containing the raw JSON of a glTF file, and any binary or image
 * resources referenced by that file. When modifying the file, it should generally be first
 * converted to the more useful {@link Document} wrapper.
 *
 * When loading glTF data that is in memory, or which the I/O utilities cannot otherwise access,
 * you might assemble the JSONDocument yourself, then convert it to a Document with
 * {@link PlatformIO.readJSON}(jsonDocument).
 *
 * Usage:
 *
 * ```ts
 * import fs from 'fs/promises';
 *
 * const jsonDocument = {
 * 	// glTF JSON schema.
 * 	json: {
 * 		asset: {version: '2.0'},
 * 		images: [{uri: 'image1.png'}, {uri: 'image2.png'}]
 * 	},
 *
 * 	// URI → Uint8Array mapping.
 * 	resources: {
 * 		'image1.png': await fs.readFile('image1.png'),
 * 		'image2.png': await fs.readFile('image2.png'),
 * 	}
 * };
 *
 * const document = await new NodeIO().readJSON(jsonDocument);
 * ```
 *
 * @category Documents
 */
interface JSONDocument {
  json: GLTF.IGLTF;
  resources: {
    [s: string]: Uint8Array<ArrayBuffer>;
  };
}
//#endregion
//#region src/utils/buffer-utils.d.ts
/**
 * *Common utilities for working with Uint8Array and Buffer objects.*
 *
 * @category Utilities
 */
declare class BufferUtils {
  /** Creates a byte array from a Data URI. */
  static createBufferFromDataURI(dataURI: string): Uint8Array<ArrayBuffer>;
  /** Encodes text to a byte array. */
  static encodeText(text: string): Uint8Array;
  /** Decodes a byte array to text. */
  static decodeText(array: Uint8Array): string;
  /**
   * Concatenates N byte arrays.
   */
  static concat(arrays: Uint8Array[]): Uint8Array<ArrayBuffer>;
  /**
   * Pads a Uint8Array to the next 4-byte boundary.
   *
   * Reference: [glTF → Data Alignment](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment)
   */
  static pad(srcArray: Uint8Array, paddingByte?: number): Uint8Array;
  /** Pads a number to 4-byte boundaries. */
  static padNumber(v: number): number;
  /** Returns true if given byte array instances are equal. */
  static equals(a: Uint8Array, b: Uint8Array): boolean;
  /**
   * Returns a Uint8Array view of a typed array, with the same underlying ArrayBuffer.
   *
   * A shorthand for:
   *
   * ```js
   * const buffer = new Uint8Array(
   * 	array.buffer,
   * 	array.byteOffset + byteOffset,
   * 	Math.min(array.byteLength, byteLength)
   * );
   * ```
   *
   */
  static toView(a: TypedArray, byteOffset?: number, byteLength?: number): Uint8Array<ArrayBuffer>;
  static assertView(view: Uint8Array): Uint8Array<ArrayBuffer>;
  static assertView(view: Uint8Array | null): Uint8Array<ArrayBuffer> | null;
}
//#endregion
//#region src/utils/color-utils.d.ts
/**
 * *Common utilities for working with colors in vec3, vec4, or hexadecimal form.*
 *
 * Provides methods to convert linear components (vec3, vec4) to sRGB hex values. All colors in
 * the glTF specification, excluding color textures, are linear. Hexadecimal values, in sRGB
 * colorspace, are accessible through helper functions in the API as a convenience.
 *
 * ```typescript
 * // Hex (sRGB) to factor (linear).
 * const factor = ColorUtils.hexToFactor(0xFFCCCC, []);
 *
 * // Factor (linear) to hex (sRGB).
 * const hex = ColorUtils.factorToHex([1, .25, .25])
 * ```
 *
 * @category Utilities
 */
declare class ColorUtils {
  /**
   * Converts sRGB hexadecimal to linear components.
   * @typeParam T vec3 or vec4 linear components.
   */
  static hexToFactor<T = vec3 | vec4>(hex: number, target: T): T;
  /**
   * Converts linear components to sRGB hexadecimal.
   * @typeParam T vec3 or vec4 linear components.
   */
  static factorToHex<T = vec3 | vec4>(factor: T): number;
  /**
   * Converts sRGB components to linear components.
   * @typeParam T vec3 or vec4 linear components.
   */
  static convertSRGBToLinear<T = vec3 | vec4>(source: T, target: T): T;
  /**
   * Converts linear components to sRGB components.
   * @typeParam T vec3 or vec4 linear components.
   */
  static convertLinearToSRGB<T = vec3 | vec4>(source: T, target: T): T;
}
//#endregion
//#region src/utils/file-utils.d.ts
/**
 * *Utility class for working with file systems and URI paths.*
 *
 * @category Utilities
 */
declare class FileUtils {
  /**
   * Extracts the basename from a file path, e.g. "folder/model.glb" -> "model".
   * See: {@link HTTPUtils.basename}
   */
  static basename(uri: string): string;
  /**
   * Extracts the extension from a file path, e.g. "folder/model.glb" -> "glb".
   * See: {@link HTTPUtils.extension}
   */
  static extension(uri: string): string;
}
//#endregion
//#region src/properties/property.d.ts
type PropertyResolver<T extends Property> = (p: T) => T;
declare const COPY_IDENTITY: <T extends Property>(t: T) => T;
interface IProperty$1 {
  name: string;
  extras: Record<string, unknown>;
}
/**
 * *Properties represent distinct resources in a glTF asset, referenced by other properties.*
 *
 * For example, each material and texture is a property, with material properties holding
 * references to the textures. All properties are created with factory methods on the
 * {@link Document} in which they should be constructed. Properties are destroyed by calling
 * {@link Property.dispose}().
 *
 * Usage:
 *
 * ```ts
 * const texture = doc.createTexture('myTexture');
 * doc.listTextures(); // → [texture x 1]
 *
 * // Attach a texture to a material.
 * material.setBaseColorTexture(texture);
 * material.getBaseColortexture(); // → texture
 *
 * // Detaching a texture removes any references to it, except from the doc.
 * texture.detach();
 * material.getBaseColorTexture(); // → null
 * doc.listTextures(); // → [texture x 1]
 *
 * // Disposing a texture removes all references to it, and its own references.
 * texture.dispose();
 * doc.listTextures(); // → []
 * ```
 *
 * Reference:
 * - [glTF → Concepts](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#concepts)
 *
 * @category Properties
 */
declare abstract class Property<T extends IProperty$1 = IProperty$1> extends GraphNode<T> {
  /** Property type. */
  abstract readonly propertyType: string;
  /**
   * Internal graph used to search and maintain references.
   * @override
   * @hidden
   */
  protected readonly graph: Graph$1<Property>;
  /** @hidden */
  constructor(graph: Graph$1<Property>, name?: string);
  /**
   * Initializes instance data for a subclass. Because subclass constructors run after the
   * constructor of the parent class, and 'create' events dispatched by the parent class
   * assume the instance is fully initialized, it's best to do any initialization here.
   * @hidden
   */
  protected abstract init(): void;
  /**
   * Returns the Graph associated with this Property. For internal use.
   * @hidden
   * @experimental
   */
  getGraph(): Graph$1<Property>;
  /**
   * Returns default attributes for the property. Empty lists and maps should be initialized
   * to empty arrays and objects. Always invoke `super.getDefaults()` and extend the result.
   */
  protected getDefaults(): Nullable<T>;
  /** @hidden */
  protected set<K extends LiteralKeys<T>>(attribute: K, value: T[K]): this;
  /**********************************************************************************************
   * Name.
   */
  /**
   * Returns the name of this property. While names are not required to be unique, this is
   * encouraged, and non-unique names will be overwritten in some tools. For custom data about
   * a property, prefer to use Extras.
   */
  getName(): string;
  /**
   * Sets the name of this property. While names are not required to be unique, this is
   * encouraged, and non-unique names will be overwritten in some tools. For custom data about
   * a property, prefer to use Extras.
   */
  setName(name: string): this;
  /**********************************************************************************************
   * Extras.
   */
  /**
   * Returns a reference to the Extras object, containing application-specific data for this
   * Property. Extras should be an Object, not a primitive value, for best portability.
   */
  getExtras(): Record<string, unknown>;
  /**
   * Updates the Extras object, containing application-specific data for this Property. Extras
   * should be an Object, not a primitive value, for best portability.
   */
  setExtras(extras: Record<string, unknown>): this;
  /**********************************************************************************************
   * Graph state.
   */
  /**
   * Makes a copy of this property, with the same resources (by reference) as the original.
   */
  clone(): this;
  /**
   * Copies all data from another property to this one. Child properties are copied by reference,
   * unless a 'resolve' function is given to override that.
   * @param other Property to copy references from.
   * @param resolve Function to resolve each Property being transferred. Default is identity.
   */
  copy(other: this, resolve?: PropertyResolver<Property>): this;
  /**
   * Returns true if two properties are deeply equivalent, recursively comparing the attributes
   * of the properties. Optionally, a 'skip' set may be included, specifying attributes whose
   * values should not be considered in the comparison.
   *
   * Example: Two {@link Primitive Primitives} are equivalent if they have accessors and
   * materials with equivalent content — but not necessarily the same specific accessors
   * and materials.
   */
  equals(other: this, skip?: Set<string>): boolean;
  detach(): this;
  /**
   * Returns a list of all properties that hold a reference to this property. For example, a
   * material may hold references to various textures, but a texture does not hold references
   * to the materials that use it.
   *
   * It is often necessary to filter the results for a particular type: some resources, like
   * {@link Accessor}s, may be referenced by different types of properties. Most properties
   * include the {@link Root} as a parent, which is usually not of interest.
   *
   * Usage:
   *
   * ```ts
   * const materials = texture
   * 	.listParents()
   * 	.filter((p) => p instanceof Material)
   * ```
   */
  listParents(): Property[];
}
//#endregion
//#region src/properties/extension-property.d.ts
/**
 * *Base class for all {@link Property} types that can be attached by an {@link Extension}.*
 *
 * After an {@link Extension} is attached to a glTF {@link Document}, the Extension may be used to
 * construct ExtensionProperty instances, to be referenced throughout the document as prescribed by
 * the Extension. For example, the `KHR_materials_clearcoat` Extension defines a `Clearcoat`
 * ExtensionProperty, which is referenced by {@link Material} Properties in the Document, and may
 * contain references to {@link Texture} properties of its own.
 *
 * For more information on available extensions and their usage, see [Extensions](/extensions).
 *
 * Reference:
 * - [glTF → Extensions](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#specifying-extensions)
 *
 * @category Properties
 */
declare abstract class ExtensionProperty<T extends IProperty$1 = IProperty$1> extends Property<T> {
  static EXTENSION_NAME: string;
  abstract readonly extensionName: string;
  /** List of supported {@link Property} types. */
  abstract readonly parentTypes: string[];
  /** @hidden */
  _validateParent(parent: ExtensibleProperty): void;
}
//#endregion
//#region src/properties/extensible-property.d.ts
interface IExtensibleProperty extends IProperty$1 {
  extensions: RefMap$1<ExtensionProperty>;
}
/**
 * *A {@link Property} that can have {@link ExtensionProperty} instances attached.*
 *
 * Most properties are extensible. See the {@link Extension} documentation for information about
 * how to use extensions.
 *
 * @category Properties
 */
declare abstract class ExtensibleProperty<T extends IExtensibleProperty = IExtensibleProperty> extends Property<T> {
  protected getDefaults(): Nullable<T>;
  /** Returns an {@link ExtensionProperty} attached to this Property, if any. */
  getExtension<Prop extends ExtensionProperty>(name: string): Prop | null;
  /**
   * Attaches the given {@link ExtensionProperty} to this Property. For a given extension, only
   * one ExtensionProperty may be attached to any one Property at a time.
   */
  setExtension<Prop extends ExtensionProperty>(name: string, extensionProperty: Prop | null): this;
  /** Lists all {@link ExtensionProperty} instances attached to this Property. */
  listExtensions(): ExtensionProperty[];
}
//#endregion
//#region src/properties/buffer.d.ts
interface IBuffer$1 extends IExtensibleProperty {
  uri: string;
}
/**
 * *Buffers are low-level storage units for binary data.*
 *
 * glTF 2.0 has three concepts relevant to binary storage: accessors, buffer views, and buffers.
 * In glTF Transform, an {@link Accessor} is referenced by any property that requires numeric typed
 * array data. Meshes, Primitives, and Animations all reference Accessors. Buffers define how that
 * data is organized into transmitted file(s). A `.glb` file has only a single Buffer, and when
 * exporting to `.glb` your resources should be grouped accordingly. A `.gltf` file may reference
 * one or more `.bin` files — each `.bin` is a Buffer — and grouping Accessors under different
 * Buffers allow you to specify that structure.
 *
 * For engines that can dynamically load portions of a glTF file, splitting data into separate
 * buffers can allow you to avoid loading data until it is needed. For example, you might put
 * binary data for specific meshes into a different `.bin` buffer, or put each animation's binary
 * payload into its own `.bin`.
 *
 * Buffer Views define how Accessors are organized within a given Buffer. glTF Transform creates an
 * efficient Buffer View layout automatically at export: there is no Buffer View property exposed
 * by the glTF Transform API, simplifying data management.
 *
 * Usage:
 *
 * ```ts
 * // Create two buffers with custom filenames.
 * const buffer1 = doc.createBuffer('buffer1')
 * 	.setURI('part1.bin');
 * const buffer2 = doc.createBuffer('buffer2')
 * 	.setURI('part2.bin');
 *
 * // Assign the attributes of two meshes to different buffers. If the meshes
 * // had indices or morph target attributes, you would also want to relocate
 * // those accessors.
 * mesh1
 * 	.listPrimitives()
 * 	.forEach((primitive) => primitive.listAttributes()
 * 		.forEach((attribute) => attribute.setBuffer(buffer1)));
 * mesh2
 * 	.listPrimitives()
 * 	.forEach((primitive) => primitive.listAttributes()
 * 		.forEach((attribute) => attribute.setBuffer(buffer2)));
 *
 * // Write to disk. Each mesh's binary data will be in a separate binary file;
 * // any remaining accessors will be in a third (default) buffer.
 * await new NodeIO().write('scene.gltf', doc);
 * // → scene.gltf, part1.bin, part2.bin
 * ```
 *
 * References:
 * - [glTF → Buffers and Buffer Views](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#buffers-and-buffer-views)
 * - [glTF → Accessors](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#accessors)
 *
 * @category Properties
 */
declare class Buffer extends ExtensibleProperty<IBuffer$1> {
  propertyType: PropertyType.BUFFER;
  protected init(): void;
  protected getDefaults(): Nullable<IBuffer$1>;
  /**
   * Returns the URI (or filename) of this buffer (e.g. 'myBuffer.bin'). URIs are strongly
   * encouraged to be relative paths, rather than absolute. Use of a protocol (like `file://`)
   * is possible for custom applications, but will limit the compatibility of the asset with most
   * tools.
   *
   * Buffers commonly use the extension `.bin`, though this is not required.
   */
  getURI(): string;
  /**
   * Sets the URI (or filename) of this buffer (e.g. 'myBuffer.bin'). URIs are strongly
   * encouraged to be relative paths, rather than absolute. Use of a protocol (like `file://`)
   * is possible for custom applications, but will limit the compatibility of the asset with most
   * tools.
   *
   * Buffers commonly use the extension `.bin`, though this is not required.
   */
  setURI(uri: string): this;
}
//#endregion
//#region src/properties/accessor.d.ts
interface IAccessor$1 extends IExtensibleProperty {
  array: TypedArray | null;
  type: GLTF.AccessorType;
  componentType: GLTF.AccessorComponentType;
  normalized: boolean;
  sparse: boolean;
  buffer: Buffer;
}
/**
 * *Accessors store lists of numeric, vector, or matrix elements in a typed array.*
 *
 * All large data for {@link Mesh}, {@link Skin}, and {@link Animation} properties is stored in
 * {@link Accessor}s, organized into one or more {@link Buffer}s. Each accessor provides data in
 * typed arrays, with two abstractions:
 *
 * *Elements* are the logical divisions of the data into useful types: `"SCALAR"`, `"VEC2"`,
 * `"VEC3"`, `"VEC4"`, `"MAT3"`, or `"MAT4"`. The element type can be determined with the
 * {@link Accessor.getType getType}() method, and the number of elements in the accessor determine its
 * {@link Accessor.getCount getCount}(). The number of components in an element — e.g. 9 for `"MAT3"` — are its
 * {@link Accessor.getElementSize getElementSize}(). See {@link Accessor.Type}.
 *
 * *Components* are the numeric values within an element — e.g. `.x` and `.y` for `"VEC2"`. Various
 * component types are available: `BYTE`, `UNSIGNED_BYTE`, `SHORT`, `UNSIGNED_SHORT`,
 * `UNSIGNED_INT`, and `FLOAT`. The component type can be determined with the
 * {@link Accessor.getComponentType getComponentType} method, and the number of bytes in each component determine its
 * {@link Accessor.getComponentSize getComponentSize}. See {@link Accessor.ComponentType}.
 *
 * Usage:
 *
 * ```typescript
 * const accessor = doc.createAccessor('myData')
 * 	.setArray(new Float32Array([1,2,3,4,5,6,7,8,9,10,11,12]))
 * 	.setType(Accessor.Type.VEC3)
 * 	.setBuffer(doc.getRoot().listBuffers()[0]);
 *
 * accessor.getCount();        // → 4
 * accessor.getElementSize();  // → 3
 * accessor.getByteLength();   // → 48
 * accessor.getElement(1, []); // → [4, 5, 6]
 *
 * accessor.setElement(0, [10, 20, 30]);
 * ```
 *
 * Data access through the {@link Accessor.getElement getElement} and {@link Accessor.setElement setElement}
 * methods reads or overwrites the content of the underlying typed array. These methods use
 * element arrays intended to be compatible with the [gl-matrix](https://github.com/toji/gl-matrix)
 * library, or with the `toArray`/`fromArray` methods of libraries like three.js and babylon.js.
 *
 * Each Accessor must be assigned to a {@link Buffer}, which determines where the accessor's data
 * is stored in the final file. Assigning Accessors to different Buffers allows the data to be
 * written to different `.bin` files.
 *
 * glTF Transform does not expose many details of sparse, normalized, or interleaved accessors
 * through its API. It reads files using those techniques, presents a simplified view of the data
 * for editing, and attempts to write data back out with optimizations. For example, vertex
 * attributes will typically be interleaved by default, regardless of the input file.
 *
 * References:
 * - [glTF → Accessors](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#accessors)
 *
 * @category Properties
 */
declare class Accessor extends ExtensibleProperty<IAccessor$1> {
  propertyType: PropertyType.ACCESSOR;
  /**********************************************************************************************
   * Constants.
   */
  /** Element type contained by the accessor (SCALAR, VEC2, ...). */
  static Type: Record<string, GLTF.AccessorType>;
  /** Data type of the values composing each element in the accessor. */
  static ComponentType: Record<string, GLTF.AccessorComponentType>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<IAccessor$1>;
  /**********************************************************************************************
   * Static.
   */
  /** Returns size of a given element type, in components. */
  static getElementSize(type: GLTF.AccessorType): number;
  /** Returns size of a given component type, in bytes. */
  static getComponentSize(componentType: GLTF.AccessorComponentType): number;
  /**********************************************************************************************
   * Min/max bounds.
   */
  /**
   * Minimum value of each component in this attribute. Unlike in a final glTF file, values
   * returned by this method will reflect the minimum accounting for {@link .normalized}
   * state.
   */
  getMinNormalized(target: number[]): number[];
  /**
   * Minimum value of each component in this attribute. Values returned by this method do not
   * reflect normalization: use {@link .getMinNormalized} in that case.
   */
  getMin(target: number[]): number[];
  /**
   * Maximum value of each component in this attribute. Unlike in a final glTF file, values
   * returned by this method will reflect the minimum accounting for {@link .normalized}
   * state.
   */
  getMaxNormalized(target: number[]): number[];
  /**
   * Maximum value of each component in this attribute. Values returned by this method do not
   * reflect normalization: use {@link .getMinNormalized} in that case.
   */
  getMax(target: number[]): number[];
  /**********************************************************************************************
   * Layout.
   */
  /**
   * Number of elements in the accessor. An array of length 30, containing 10 `VEC3` elements,
   * will have a count of 10.
   */
  getCount(): number;
  /** Type of element stored in the accessor. `VEC2`, `VEC3`, etc. */
  getType(): GLTF.AccessorType;
  /**
   * Sets type of element stored in the accessor. `VEC2`, `VEC3`, etc. Array length must be a
   * multiple of the component size (`VEC2` = 2, `VEC3` = 3, ...) for the selected type.
   */
  setType(type: GLTF.AccessorType): Accessor;
  /**
   * Number of components in each element of the accessor. For example, the element size of a
   * `VEC2` accessor is 2. This value is determined automatically based on array length and
   * accessor type, specified with {@link Accessor.setType setType()}.
   */
  getElementSize(): number;
  /**
   * Size of each component (a value in the raw array), in bytes. For example, the
   * `componentSize` of data backed by a `float32` array is 4 bytes.
   */
  getComponentSize(): number;
  /**
   * Component type (float32, uint16, etc.). This value is determined automatically, and can only
   * be modified by replacing the underlying array.
   */
  getComponentType(): GLTF.AccessorComponentType;
  /**********************************************************************************************
   * Normalization.
   */
  /**
   * Specifies whether integer data values should be normalized (true) to [0, 1] (for unsigned
   * types) or [-1, 1] (for signed types), or converted directly (false) when they are accessed.
   * This property is defined only for accessors that contain vertex attributes or animation
   * output data.
   */
  getNormalized(): boolean;
  /**
   * Specifies whether integer data values should be normalized (true) to [0, 1] (for unsigned
   * types) or [-1, 1] (for signed types), or converted directly (false) when they are accessed.
   * This property is defined only for accessors that contain vertex attributes or animation
   * output data.
   */
  setNormalized(normalized: boolean): this;
  /**********************************************************************************************
   * Data access.
   */
  /**
   * Returns the scalar element value at the given index. For
   * {@link Accessor.getNormalized normalized} integer accessors, values are
   * decoded and returned in floating-point form.
   */
  getScalar(index: number): number;
  /**
   * Assigns the scalar element value at the given index. For
   * {@link Accessor.getNormalized normalized} integer accessors, "value" should be
   * given in floating-point form — it will be integer-encoded before writing
   * to the underlying array.
   */
  setScalar(index: number, x: number): this;
  /**
   * Returns the vector or matrix element value at the given index. For
   * {@link Accessor.getNormalized normalized} integer accessors, values are
   * decoded and returned in floating-point form.
   *
   * Example:
   *
   * ```javascript
   * import { add } from 'gl-matrix/add';
   *
   * const element = [];
   * const offset = [1, 1, 1];
   *
   * for (let i = 0; i < accessor.getCount(); i++) {
   * 	accessor.getElement(i, element);
   * 	add(element, element, offset);
   * 	accessor.setElement(i, element);
   * }
   * ```
   */
  getElement<T extends number[]>(index: number, target: T): T;
  /**
   * Assigns the vector or matrix element value at the given index. For
   * {@link Accessor.getNormalized normalized} integer accessors, "value" should be
   * given in floating-point form — it will be integer-encoded before writing
   * to the underlying array.
   *
   * Example:
   *
   * ```javascript
   * import { add } from 'gl-matrix/add';
   *
   * const element = [];
   * const offset = [1, 1, 1];
   *
   * for (let i = 0; i < accessor.getCount(); i++) {
   * 	accessor.getElement(i, element);
   * 	add(element, element, offset);
   * 	accessor.setElement(i, element);
   * }
   * ```
   */
  setElement(index: number, value: number[]): this;
  /**********************************************************************************************
   * Raw data storage.
   */
  /**
   * Specifies whether the accessor should be stored sparsely. When written to a glTF file, sparse
   * accessors store only values that differ from base values. When loaded in glTF Transform (or most
   * runtimes) a sparse accessor can be treated like any other accessor. Currently, glTF Transform always
   * uses zeroes for the base values when writing files.
   * @experimental
   */
  getSparse(): boolean;
  /**
   * Specifies whether the accessor should be stored sparsely. When written to a glTF file, sparse
   * accessors store only values that differ from base values. When loaded in glTF Transform (or most
   * runtimes) a sparse accessor can be treated like any other accessor. Currently, glTF Transform always
   * uses zeroes for the base values when writing files.
   * @experimental
   */
  setSparse(sparse: boolean): this;
  /** Returns the {@link Buffer} into which this accessor will be organized. */
  getBuffer(): Buffer | null;
  /** Assigns the {@link Buffer} into which this accessor will be organized. */
  setBuffer(buffer: Buffer | null): this;
  /** Returns the raw typed array underlying this accessor. */
  getArray(): TypedArray | null;
  /** Assigns the raw typed array underlying this accessor. */
  setArray(array: TypedArray | null): this;
  /** Returns the total bytelength of this accessor, exclusive of padding. */
  getByteLength(): number;
}
//#endregion
//#region src/properties/animation-sampler.d.ts
interface IAnimationSampler$1 extends IExtensibleProperty {
  interpolation: GLTF.AnimationSamplerInterpolation;
  input: Accessor;
  output: Accessor;
}
/**
 * *Reusable collection of keyframes affecting particular property of an object.*
 *
 * Each AnimationSampler refers to an input and an output {@link Accessor}. Input contains times
 * (in seconds) for each keyframe. Output contains values (of any {@link Accessor.Type}) for the
 * animated property at each keyframe. Samplers using `CUBICSPLINE` interpolation will also contain
 * in/out tangents in the output, with the layout:
 *
 * in<sub>1</sub>, value<sub>1</sub>, out<sub>1</sub>,
 * in<sub>2</sub>, value<sub>2</sub>, out<sub>2</sub>,
 * in<sub>3</sub>, value<sub>3</sub>, out<sub>3</sub>, ...
 *
 * Usage:
 *
 * ```ts
 * // Create accessor containing input times, in seconds.
 * const input = doc.createAccessor('bounceTimes')
 * 	.setArray(new Float32Array([0, 1, 2]))
 * 	.setType(Accessor.Type.SCALAR);
 *
 * // Create accessor containing output values, in local units.
 * const output = doc.createAccessor('bounceValues')
 * 	.setArray(new Float32Array([
 * 		0, 0, 0, // y = 0
 * 		0, 1, 0, // y = 1
 * 		0, 0, 0, // y = 0
 * 	]))
 * 	.setType(Accessor.Type.VEC3);
 *
 * // Create sampler.
 * const sampler = doc.createAnimationSampler('bounce')
 * 	.setInput(input)
 * 	.setOutput(output)
 * 	.setInterpolation('LINEAR');
 * ```
 *
 * Reference
 * - [glTF → Animations](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#animations)
 *
 * @category Properties
 */
declare class AnimationSampler extends ExtensibleProperty<IAnimationSampler$1> {
  propertyType: PropertyType.ANIMATION_SAMPLER;
  /**********************************************************************************************
   * Constants.
   */
  /** Interpolation method. */
  static Interpolation: Record<string, GLTF.AnimationSamplerInterpolation>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaultAttributes(): Nullable<IAnimationSampler$1>;
  /**********************************************************************************************
   * Static.
   */
  /** Interpolation mode: `STEP`, `LINEAR`, or `CUBICSPLINE`. */
  getInterpolation(): GLTF.AnimationSamplerInterpolation;
  /** Interpolation mode: `STEP`, `LINEAR`, or `CUBICSPLINE`. */
  setInterpolation(interpolation: GLTF.AnimationSamplerInterpolation): this;
  /** Times for each keyframe, in seconds. */
  getInput(): Accessor | null;
  /** Times for each keyframe, in seconds. */
  setInput(input: Accessor | null): this;
  /**
   * Values for each keyframe. For `CUBICSPLINE` interpolation, output also contains in/out
   * tangents.
   */
  getOutput(): Accessor | null;
  /**
   * Values for each keyframe. For `CUBICSPLINE` interpolation, output also contains in/out
   * tangents.
   */
  setOutput(output: Accessor | null): this;
}
//#endregion
//#region src/properties/camera.d.ts
interface ICamera$1 extends IExtensibleProperty {
  type: GLTF.CameraType;
  znear: number;
  zfar: number;
  aspectRatio: number | null;
  yfov: number;
  xmag: number;
  ymag: number;
}
/**
 * *Cameras are perspectives through which the {@link Scene} may be viewed.*
 *
 * Projection can be perspective or orthographic. Cameras are contained in nodes and thus can be
 * transformed. The camera is defined such that the local +X axis is to the right, the lens looks
 * towards the local -Z axis, and the top of the camera is aligned with the local +Y axis. If no
 * transformation is specified, the location of the camera is at the origin.
 *
 * Usage:
 *
 * ```typescript
 * const camera = doc.createCamera('myCamera')
 * 	.setType(GLTF.CameraType.PERSPECTIVE)
 * 	.setZNear(0.1)
 * 	.setZFar(100)
 * 	.setYFov(Math.PI / 4)
 * 	.setAspectRatio(1.5);
 *
 * node.setCamera(camera);
 * ```
 *
 * References:
 * - [glTF → Cameras](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#cameras)
 *
 * @category Properties
 */
declare class Camera extends ExtensibleProperty<ICamera$1> {
  propertyType: PropertyType.CAMERA;
  /**********************************************************************************************
   * Constants.
   */
  static Type: Record<string, GLTF.CameraType>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<ICamera$1>;
  /**********************************************************************************************
   * Common.
   */
  /** Specifies if the camera uses a perspective or orthographic projection. */
  getType(): GLTF.CameraType;
  /** Specifies if the camera uses a perspective or orthographic projection. */
  setType(type: GLTF.CameraType): this;
  /** Floating-point distance to the near clipping plane. */
  getZNear(): number;
  /** Floating-point distance to the near clipping plane. */
  setZNear(znear: number): this;
  /**
   * Floating-point distance to the far clipping plane. When defined, zfar must be greater than
   * znear. If zfar is undefined, runtime must use infinite projection matrix.
   */
  getZFar(): number;
  /**
   * Floating-point distance to the far clipping plane. When defined, zfar must be greater than
   * znear. If zfar is undefined, runtime must use infinite projection matrix.
   */
  setZFar(zfar: number): this;
  /**********************************************************************************************
   * Perspective.
   */
  /**
   * Floating-point aspect ratio of the field of view. When undefined, the aspect ratio of the
   * canvas is used.
   */
  getAspectRatio(): number | null;
  /**
   * Floating-point aspect ratio of the field of view. When undefined, the aspect ratio of the
   * canvas is used.
   */
  setAspectRatio(aspectRatio: number | null): this;
  /** Floating-point vertical field of view in radians. */
  getYFov(): number;
  /** Floating-point vertical field of view in radians. */
  setYFov(yfov: number): this;
  /**********************************************************************************************
   * Orthographic.
   */
  /**
   * Floating-point horizontal magnification of the view, and half the view's width
   * in world units.
   */
  getXMag(): number;
  /**
   * Floating-point horizontal magnification of the view, and half the view's width
   * in world units.
   */
  setXMag(xmag: number): this;
  /**
   * Floating-point vertical magnification of the view, and half the view's height
   * in world units.
   */
  getYMag(): number;
  /**
   * Floating-point vertical magnification of the view, and half the view's height
   * in world units.
   */
  setYMag(ymag: number): this;
}
//#endregion
//#region src/properties/texture.d.ts
interface ITexture$1 extends IExtensibleProperty {
  image: Uint8Array<ArrayBuffer> | null;
  mimeType: string;
  uri: string;
}
/**
 * *Texture, or images, referenced by {@link Material} properties.*
 *
 * Textures in glTF Transform are a combination of glTF's `texture` and `image` properties, and
 * should be unique within a document, such that no other texture contains the same
 * {@link Texture.getImage getImage()} data. Where duplicates may already exist, the `dedup({textures: true})`
 * transform can remove them. A {@link Document} with N texture properties will be exported to a
 * glTF file with N `image` properties, and the minimum number of `texture` properties necessary
 * for the materials that use it.
 *
 * For properties associated with a particular _use_ of a texture, see {@link TextureInfo}.
 *
 * Reference:
 * - [glTF → Textures](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#textures)
 * - [glTF → Images](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#images)
 *
 * @category Properties
 */
declare class Texture extends ExtensibleProperty<ITexture$1> {
  propertyType: PropertyType.TEXTURE;
  protected init(): void;
  protected getDefaults(): Nullable<ITexture$1>;
  /**********************************************************************************************
   * MIME type / format.
   */
  /** Returns the MIME type for this texture ('image/jpeg' or 'image/png'). */
  getMimeType(): string;
  /**
   * Sets the MIME type for this texture ('image/jpeg' or 'image/png'). If the texture does not
   * have a URI, a MIME type is required for correct export.
   */
  setMimeType(mimeType: string): this;
  /**********************************************************************************************
   * URI / filename.
   */
  /** Returns the URI (e.g. 'path/to/file.png') for this texture. */
  getURI(): string;
  /**
   * Sets the URI (e.g. 'path/to/file.png') for this texture. If the texture does not have a MIME
   * type, a URI is required for correct export.
   */
  setURI(uri: string): this;
  /**********************************************************************************************
   * Image data.
   */
  /** Returns the raw image data for this texture. */
  getImage(): Uint8Array<ArrayBuffer> | null;
  /** Sets the raw image data for this texture. */
  setImage(image: Uint8Array | null): this;
  /** Returns the size, in pixels, of this texture. */
  getSize(): vec2 | null;
}
//#endregion
//#region src/properties/texture-info.d.ts
interface ITextureInfo$1 extends IExtensibleProperty {
  texCoord: number;
  magFilter: GLTF.TextureMagFilter | null;
  minFilter: GLTF.TextureMinFilter | null;
  wrapS: GLTF.TextureWrapMode;
  wrapT: GLTF.TextureWrapMode;
}
/**
 * *Settings associated with a particular use of a {@link Texture}.*
 *
 * Different materials may reuse the same texture but with different texture coordinates,
 * minFilter/magFilter, or wrapS/wrapT settings. The TextureInfo class contains settings
 * derived from both the "TextureInfo" and "Sampler" properties in the glTF specification,
 * consolidated here for simplicity.
 *
 * TextureInfo properties cannot be directly created. For any material texture slot, such as
 * baseColorTexture, there will be a corresponding method to obtain the TextureInfo for that slot.
 * For example, see {@link Material.getBaseColorTextureInfo}.
 *
 * References:
 * - [glTF → Texture Info](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#reference-textureinfo)
 *
 * @category Properties
 */
declare class TextureInfo extends ExtensibleProperty<ITextureInfo$1> {
  propertyType: PropertyType.TEXTURE_INFO;
  /**********************************************************************************************
   * Constants.
   */
  /** UV wrapping mode. Values correspond to WebGL enums. */
  static WrapMode: Record<string, GLTF.TextureWrapMode>;
  /** Magnification filter. Values correspond to WebGL enums. */
  static MagFilter: Record<string, GLTF.TextureMagFilter>;
  /** Minification filter. Values correspond to WebGL enums. */
  static MinFilter: Record<string, GLTF.TextureMinFilter>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<ITextureInfo$1>;
  /**********************************************************************************************
   * Texture coordinates.
   */
  /** Returns the texture coordinate (UV set) index for the texture. */
  getTexCoord(): number;
  /** Sets the texture coordinate (UV set) index for the texture. */
  setTexCoord(texCoord: number): this;
  /**********************************************************************************************
   * Min/mag filter.
   */
  /** Returns the magnification filter applied to the texture. */
  getMagFilter(): GLTF.TextureMagFilter | null;
  /** Sets the magnification filter applied to the texture. */
  setMagFilter(magFilter: GLTF.TextureMagFilter | null): this;
  /** Sets the minification filter applied to the texture. */
  getMinFilter(): GLTF.TextureMinFilter | null;
  /** Returns the minification filter applied to the texture. */
  setMinFilter(minFilter: GLTF.TextureMinFilter | null): this;
  /**********************************************************************************************
   * UV wrapping.
   */
  /** Returns the S (U) wrapping mode for UVs used by the texture. */
  getWrapS(): GLTF.TextureWrapMode;
  /** Sets the S (U) wrapping mode for UVs used by the texture. */
  setWrapS(wrapS: GLTF.TextureWrapMode): this;
  /** Returns the T (V) wrapping mode for UVs used by the texture. */
  getWrapT(): GLTF.TextureWrapMode;
  /** Sets the T (V) wrapping mode for UVs used by the texture. */
  setWrapT(wrapT: GLTF.TextureWrapMode): this;
}
//#endregion
//#region src/properties/material.d.ts
interface IMaterial$1 extends IExtensibleProperty {
  alphaMode: GLTF.MaterialAlphaMode;
  alphaCutoff: number;
  doubleSided: boolean;
  baseColorFactor: vec4;
  baseColorTexture: Texture;
  baseColorTextureInfo: TextureInfo;
  emissiveFactor: vec3;
  emissiveTexture: Texture;
  emissiveTextureInfo: TextureInfo;
  normalScale: number;
  normalTexture: Texture;
  normalTextureInfo: TextureInfo;
  occlusionStrength: number;
  occlusionTexture: Texture;
  occlusionTextureInfo: TextureInfo;
  roughnessFactor: number;
  metallicFactor: number;
  metallicRoughnessTexture: Texture;
  metallicRoughnessTextureInfo: TextureInfo;
}
/**
 * *Materials describe a surface's appearance and response to light.*
 *
 * Each {@link Primitive} within a {@link Mesh} may be assigned a single Material. The number of
 * GPU draw calls typically increases with both the numbers of Primitives and of Materials in an
 * asset; Materials should be reused wherever possible. Techniques like texture atlasing and vertex
 * colors allow objects to have varied appearances while technically sharing a single Material.
 *
 * Material properties are modified by both scalars (like `baseColorFactor`) and textures (like
 * `baseColorTexture`). When both are available, factors are considered linear multipliers against
 * textures of the same name. In the case of base color, vertex colors (`COLOR_0` attributes) are
 * also multiplied.
 *
 * Textures containing color data (`baseColorTexture`, `emissiveTexture`) are sRGB. All other
 * textures are linear. Like other resources, textures should be reused when possible.
 *
 * Usage:
 *
 * ```typescript
 * const material = doc.createMaterial('myMaterial')
 * 	.setBaseColorFactor([1, 0.5, 0.5, 1]) // RGBA
 * 	.setOcclusionTexture(aoTexture)
 * 	.setOcclusionStrength(0.5);
 *
 * mesh.listPrimitives()
 * 	.forEach((prim) => prim.setMaterial(material));
 * ```
 *
 * @category Properties
 */
declare class Material extends ExtensibleProperty<IMaterial$1> {
  propertyType: PropertyType.MATERIAL;
  /**********************************************************************************************
   * Constants.
   */
  static AlphaMode: Record<string, GLTF.MaterialAlphaMode>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<IMaterial$1>;
  /**********************************************************************************************
   * Double-sided / culling.
   */
  /** Returns true when both sides of triangles should be rendered. May impact performance. */
  getDoubleSided(): boolean;
  /** Sets whether to render both sides of triangles. May impact performance. */
  setDoubleSided(doubleSided: boolean): this;
  /**********************************************************************************************
   * Alpha.
   */
  /** Returns material alpha, equivalent to baseColorFactor[3]. */
  getAlpha(): number;
  /** Sets material alpha, equivalent to baseColorFactor[3]. */
  setAlpha(alpha: number): this;
  /**
   * Returns the mode of the material's alpha channels, which are provided by `baseColorFactor`
   * and `baseColorTexture`.
   *
   * - `OPAQUE`: Alpha value is ignored and the rendered output is fully opaque.
   * - `BLEND`: Alpha value is used to determine the transparency each pixel on a surface, and
   * 	the fraction of surface vs. background color in the final result. Alpha blending creates
   *	significant edge cases in realtime renderers, and some care when structuring the model is
   * 	necessary for good results. In particular, transparent geometry should be kept in separate
   * 	meshes or primitives from opaque geometry. The `depthWrite` or `zWrite` settings in engines
   * 	should usually be disabled on transparent materials.
   * - `MASK`: Alpha value is compared against `alphaCutoff` threshold for each pixel on a
   * 	surface, and the pixel is either fully visible or fully discarded based on that cutoff.
   * 	This technique is useful for things like leafs/foliage, grass, fabric meshes, and other
   * 	surfaces where no semitransparency is needed. With a good choice of `alphaCutoff`, surfaces
   * 	that don't require semitransparency can avoid the performance penalties and visual issues
   * 	involved with `BLEND` transparency.
   *
   * Reference:
   * - [glTF → material.alphaMode](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#materialalphamode)
   */
  getAlphaMode(): GLTF.MaterialAlphaMode;
  /** Sets the mode of the material's alpha channels. See {@link Material.getAlphaMode getAlphaMode} for details. */
  setAlphaMode(alphaMode: GLTF.MaterialAlphaMode): this;
  /** Returns the visibility threshold; applied only when `.alphaMode='MASK'`. */
  getAlphaCutoff(): number;
  /** Sets the visibility threshold; applied only when `.alphaMode='MASK'`. */
  setAlphaCutoff(alphaCutoff: number): this;
  /**********************************************************************************************
   * Base color.
   */
  /**
   * Base color / albedo factor; Linear-sRGB components.
   * See {@link Material.getBaseColorTexture getBaseColorTexture}.
   */
  getBaseColorFactor(): vec4;
  /**
   * Base color / albedo factor; Linear-sRGB components.
   * See {@link Material.getBaseColorTexture getBaseColorTexture}.
   */
  setBaseColorFactor(baseColorFactor: vec4): this;
  /**
   * Base color / albedo. The visible color of a non-metallic surface under constant ambient
   * light would be a linear combination (multiplication) of its vertex colors, base color
   * factor, and base color texture. Lighting, and reflections in metallic or smooth surfaces,
   * also effect the final color. The alpha (`.a`) channel of base color factors and textures
   * will have varying effects, based on the setting of {@link Material.getAlphaMode getAlphaMode}.
   *
   * Reference:
   * - [glTF → material.pbrMetallicRoughness.baseColorFactor](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#pbrmetallicroughnessbasecolorfactor)
   */
  getBaseColorTexture(): Texture | null;
  /**
   * Settings affecting the material's use of its base color texture. If no texture is attached,
   * {@link TextureInfo} is `null`.
   */
  getBaseColorTextureInfo(): TextureInfo | null;
  /** Sets base color / albedo texture. See {@link Material.getBaseColorTexture getBaseColorTexture}. */
  setBaseColorTexture(texture: Texture | null): this;
  /**********************************************************************************************
   * Emissive.
   */
  /** Emissive color; Linear-sRGB components. See {@link Material.getEmissiveTexture getEmissiveTexture}. */
  getEmissiveFactor(): vec3;
  /** Emissive color; Linear-sRGB components. See {@link Material.getEmissiveTexture getEmissiveTexture}. */
  setEmissiveFactor(emissiveFactor: vec3): this;
  /**
   * Emissive texture. Emissive color is added to any base color of the material, after any
   * lighting/shadowing are applied. An emissive color does not inherently "glow", or affect
   * objects around it at all. To create that effect, most viewers must also enable a
   * post-processing effect called "bloom".
   *
   * Reference:
   * - [glTF → material.emissiveTexture](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#materialemissivetexture)
   */
  getEmissiveTexture(): Texture | null;
  /**
   * Settings affecting the material's use of its emissive texture. If no texture is attached,
   * {@link TextureInfo} is `null`.
   */
  getEmissiveTextureInfo(): TextureInfo | null;
  /** Sets emissive texture. See {@link Material.getEmissiveTexture getEmissiveTexture}. */
  setEmissiveTexture(texture: Texture | null): this;
  /**********************************************************************************************
   * Normal.
   */
  /** Normal (surface detail) factor; linear multiplier. Affects `.normalTexture`. */
  getNormalScale(): number;
  /** Normal (surface detail) factor; linear multiplier. Affects `.normalTexture`. */
  setNormalScale(scale: number): this;
  /**
   * Normal (surface detail) texture.
   *
   * A tangent space normal map. The texture contains RGB components. Each texel represents the
   * XYZ components of a normal vector in tangent space. Red [0 to 255] maps to X [-1 to 1].
   * Green [0 to 255] maps to Y [-1 to 1]. Blue [128 to 255] maps to Z [1/255 to 1]. The normal
   * vectors use OpenGL conventions where +X is right and +Y is up. +Z points toward the viewer.
   *
   * Reference:
   * - [glTF → material.normalTexture](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#materialnormaltexture)
   */
  getNormalTexture(): Texture | null;
  /**
   * Settings affecting the material's use of its normal texture. If no texture is attached,
   * {@link TextureInfo} is `null`.
   */
  getNormalTextureInfo(): TextureInfo | null;
  /** Sets normal (surface detail) texture. See {@link Material.getNormalTexture getNormalTexture}. */
  setNormalTexture(texture: Texture | null): this;
  /**********************************************************************************************
   * Occlusion.
   */
  /** (Ambient) Occlusion factor; linear multiplier. Affects `.occlusionTexture`. */
  getOcclusionStrength(): number;
  /** Sets (ambient) occlusion factor; linear multiplier. Affects `.occlusionTexture`. */
  setOcclusionStrength(strength: number): this;
  /**
   * (Ambient) Occlusion texture, generally used for subtle 'baked' shadowing effects that are
   * independent of an object's position, such as shading in inset areas and corners. Direct
   * lighting is not affected by occlusion, so at least one indirect light source must be present
   * in the scene for occlusion effects to be visible.
   *
   * The occlusion values are sampled from the R channel. Higher values indicate areas that
   * should receive full indirect lighting and lower values indicate no indirect lighting.
   *
   * Reference:
   * - [glTF → material.occlusionTexture](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#materialocclusiontexture)
   */
  getOcclusionTexture(): Texture | null;
  /**
   * Settings affecting the material's use of its occlusion texture. If no texture is attached,
   * {@link TextureInfo} is `null`.
   */
  getOcclusionTextureInfo(): TextureInfo | null;
  /** Sets (ambient) occlusion texture. See {@link Material.getOcclusionTexture getOcclusionTexture}. */
  setOcclusionTexture(texture: Texture | null): this;
  /**********************************************************************************************
   * Metallic / roughness.
   */
  /**
   * Roughness factor; linear multiplier. Affects roughness channel of
   * `metallicRoughnessTexture`. See {@link Material.getMetallicRoughnessTexture getMetallicRoughnessTexture}.
   */
  getRoughnessFactor(): number;
  /**
   * Sets roughness factor; linear multiplier. Affects roughness channel of
   * `metallicRoughnessTexture`. See {@link Material.getMetallicRoughnessTexture getMetallicRoughnessTexture}.
   */
  setRoughnessFactor(factor: number): this;
  /**
   * Metallic factor; linear multiplier. Affects roughness channel of
   * `metallicRoughnessTexture`. See {@link Material.getMetallicRoughnessTexture getMetallicRoughnessTexture}.
   */
  getMetallicFactor(): number;
  /**
   * Sets metallic factor; linear multiplier. Affects roughness channel of
   * `metallicRoughnessTexture`. See {@link Material.getMetallicRoughnessTexture getMetallicRoughnessTexture}.
   */
  setMetallicFactor(factor: number): this;
  /**
   * Metallic roughness texture. The metalness values are sampled from the B channel. The
   * roughness values are sampled from the G channel. When a material is fully metallic,
   * or nearly so, it may require image-based lighting (i.e. an environment map) or global
   * illumination to appear well-lit.
   *
   * Reference:
   * - [glTF → material.pbrMetallicRoughness.metallicRoughnessTexture](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#pbrmetallicroughnessmetallicroughnesstexture)
   */
  getMetallicRoughnessTexture(): Texture | null;
  /**
   * Settings affecting the material's use of its metallic/roughness texture. If no texture is
   * attached, {@link TextureInfo} is `null`.
   */
  getMetallicRoughnessTextureInfo(): TextureInfo | null;
  /**
   * Sets metallic/roughness texture.
   * See {@link Material.getMetallicRoughnessTexture getMetallicRoughnessTexture}.
   */
  setMetallicRoughnessTexture(texture: Texture | null): this;
}
//#endregion
//#region src/properties/primitive-target.d.ts
interface IPrimitiveTarget extends IExtensibleProperty {
  attributes: RefMap$1<Accessor>;
}
/**
 * *Morph target or shape key used to deform one {@link Primitive} in a {@link Mesh}.*
 *
 * A PrimitiveTarget contains a `POSITION` attribute (and optionally `NORMAL` and `TANGENT`) that
 * can additively deform the base attributes on a {@link Mesh} {@link Primitive}. Vertex values
 * of `0, 0, 0` in the target will have no effect, whereas a value of `0, 1, 0` would offset that
 * vertex in the base geometry by y+=1. Morph targets can be fully or partially applied: their
 * default state is controlled by {@link Mesh.getWeights}, which can also be overridden for a
 * particular instantiation of a {@link Mesh}, using {@link Node.getWeights}.
 *
 * Reference:
 * - [glTF → Morph Targets](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#morph-targets)
 *
 * @category Properties
 */
declare class PrimitiveTarget extends Property<IPrimitiveTarget> {
  propertyType: PropertyType.PRIMITIVE_TARGET;
  protected init(): void;
  protected getDefaults(): Nullable<IPrimitiveTarget>;
  /** Returns a morph target vertex attribute as an {@link Accessor}. */
  getAttribute(semantic: string): Accessor | null;
  /**
   * Sets a morph target vertex attribute to an {@link Accessor}.
   */
  setAttribute(semantic: string, accessor: Accessor | null): this;
  /**
   * Lists all morph target vertex attribute {@link Accessor}s associated. Order will be
   * consistent with the order returned by {@link .listSemantics}().
   */
  listAttributes(): Accessor[];
  /**
   * Lists all morph target vertex attribute semantics associated. Order will be
   * consistent with the order returned by {@link .listAttributes}().
   */
  listSemantics(): string[];
}
//#endregion
//#region src/properties/primitive.d.ts
interface IPrimitive extends IExtensibleProperty {
  mode: GLTF.MeshPrimitiveMode;
  material: Material;
  indices: Accessor;
  attributes: RefMap$1<Accessor>;
  targets: RefSet$1<PrimitiveTarget>;
}
/**
 * *Primitives are individual GPU draw calls comprising a {@link Mesh}.*
 *
 * Meshes typically have only a single Primitive, although various cases may require more. Each
 * primitive may be assigned vertex attributes, morph target attributes, and a material. Any of
 * these properties should be reused among multiple primitives where feasible.
 *
 * Primitives cannot be moved independently of other primitives within the same mesh, except
 * through the use of morph targets and skinning. If independent movement or other runtime
 * behavior is necessary (like raycasting or collisions) prefer to assign each primitive to a
 * different mesh. The number of GPU draw calls is typically not affected by grouping or
 * ungrouping primitives to a mesh.
 *
 * Each primitive may optionally be deformed by one or more morph targets, stored in a
 * {@link PrimitiveTarget}.
 *
 * Usage:
 *
 * ```ts
 * const primitive = doc.createPrimitive()
 * 	.setAttribute('POSITION', positionAccessor)
 * 	.setAttribute('TEXCOORD_0', uvAccessor)
 * 	.setMaterial(material);
 * mesh.addPrimitive(primitive);
 * node.setMesh(mesh);
 * ```
 *
 * References:
 * - [glTF → Geometry](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#geometry)
 *
 * @category Properties
 */
declare class Primitive extends ExtensibleProperty<IPrimitive> {
  propertyType: PropertyType.PRIMITIVE;
  /**********************************************************************************************
   * Constants.
   */
  /** Type of primitives to render. All valid values correspond to WebGL enums. */
  static Mode: Record<string, GLTF.MeshPrimitiveMode>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<IPrimitive>;
  /**********************************************************************************************
   * Primitive data.
   */
  /** Returns an {@link Accessor} with indices of vertices to be drawn. */
  getIndices(): Accessor | null;
  /**
   * Sets an {@link Accessor} with indices of vertices to be drawn. In `TRIANGLES` draw mode,
   * each set of three indices define a triangle. The front face has a counter-clockwise (CCW)
   * winding order.
   */
  setIndices(indices: Accessor | null): this;
  /** Returns a vertex attribute as an {@link Accessor}. */
  getAttribute(semantic: string): Accessor | null;
  /**
   * Sets a vertex attribute to an {@link Accessor}. All attributes must have the same vertex
   * count.
   */
  setAttribute(semantic: string, accessor: Accessor | null): this;
  /**
   * Lists all vertex attribute {@link Accessor}s associated with the primitive, excluding any
   * attributes used for morph targets. For example, `[positionAccessor, normalAccessor,
   * uvAccessor]`. Order will be consistent with the order returned by {@link .listSemantics}().
   */
  listAttributes(): Accessor[];
  /**
   * Lists all vertex attribute semantics associated with the primitive, excluding any semantics
   * used for morph targets. For example, `['POSITION', 'NORMAL', 'TEXCOORD_0']`. Order will be
   * consistent with the order returned by {@link .listAttributes}().
   */
  listSemantics(): string[];
  /** Returns the material used to render the primitive. */
  getMaterial(): Material | null;
  /** Sets the material used to render the primitive. */
  setMaterial(material: Material | null): this;
  /**********************************************************************************************
   * Mode.
   */
  /**
   * Returns the GPU draw mode (`TRIANGLES`, `LINES`, `POINTS`...) as a WebGL enum value.
   *
   * Reference:
   * - [glTF → `primitive.mode`](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#primitivemode)
   */
  getMode(): GLTF.MeshPrimitiveMode;
  /**
   * Sets the GPU draw mode (`TRIANGLES`, `LINES`, `POINTS`...) as a WebGL enum value.
   *
   * Reference:
   * - [glTF → `primitive.mode`](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#primitivemode)
   */
  setMode(mode: GLTF.MeshPrimitiveMode): this;
  /**********************************************************************************************
   * Morph targets.
   */
  /** Lists all morph targets associated with the primitive. */
  listTargets(): PrimitiveTarget[];
  /**
   * Adds a morph target to the primitive. All primitives in the same mesh must have the same
   * number of targets.
   */
  addTarget(target: PrimitiveTarget): this;
  /**
   * Removes a morph target from the primitive. All primitives in the same mesh must have the same
   * number of targets.
   */
  removeTarget(target: PrimitiveTarget): this;
}
//#endregion
//#region src/properties/mesh.d.ts
interface IMesh$1 extends IExtensibleProperty {
  weights: number[];
  primitives: RefSet$1<Primitive>;
}
/**
 * *Meshes define reusable geometry (triangles, lines, or points) and are instantiated by
 * {@link Node}s.*
 *
 * Each draw call required to render a mesh is represented as a {@link Primitive}. Meshes typically
 * have only a single {@link Primitive}, but may have more for various reasons. A mesh manages only
 * a list of primitives — materials, morph targets, and other properties are managed on a per-
 * primitive basis.
 *
 * When the same geometry and material should be rendered at multiple places in the scene, reuse
 * the same Mesh instance and attach it to multiple nodes for better efficiency. Where the geometry
 * is shared but the material is not, reusing {@link Accessor}s under different meshes and
 * primitives can similarly improve transmission efficiency, although some rendering efficiency is
 * lost as the number of materials in a scene increases.
 *
 * Usage:
 *
 * ```ts
 * const primitive = doc.createPrimitive()
 * 	.setAttribute('POSITION', positionAccessor)
 * 	.setAttribute('TEXCOORD_0', uvAccessor);
 * const mesh = doc.createMesh('myMesh')
 * 	.addPrimitive(primitive);
 * node.setMesh(mesh);
 * ```
 *
 * References:
 * - [glTF → Geometry](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#geometry)
 *
 * @category Properties
 */
declare class Mesh extends ExtensibleProperty<IMesh$1> {
  propertyType: PropertyType.MESH;
  protected init(): void;
  protected getDefaults(): Nullable<IMesh$1>;
  /** Adds a {@link Primitive} to the mesh's draw call list. */
  addPrimitive(primitive: Primitive): this;
  /** Removes a {@link Primitive} from the mesh's draw call list. */
  removePrimitive(primitive: Primitive): this;
  /** Lists {@link Primitive} draw calls of the mesh. */
  listPrimitives(): Primitive[];
  /**
   * Initial weights of each {@link PrimitiveTarget} on this mesh. Each {@link Primitive} must
   * have the same number of targets. Most engines only support 4-8 active morph targets at a
   * time.
   */
  getWeights(): number[];
  /**
   * Initial weights of each {@link PrimitiveTarget} on this mesh. Each {@link Primitive} must
   * have the same number of targets. Most engines only support 4-8 active morph targets at a
   * time.
   */
  setWeights(weights: number[]): this;
}
//#endregion
//#region src/properties/skin.d.ts
interface ISkin$1 extends IExtensibleProperty {
  skeleton: Node;
  inverseBindMatrices: Accessor;
  joints: RefSet$1<Node>;
}
/**
 * *Collection of {@link Node} joints and inverse bind matrices used with skinned {@link Mesh}
 * instances.*
 *
 * Reference
 * - [glTF → Skins](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#skins)
 *
 * @category Properties
 */
declare class Skin extends ExtensibleProperty<ISkin$1> {
  propertyType: PropertyType.SKIN;
  protected init(): void;
  protected getDefaults(): Nullable<ISkin$1>;
  /**
   * {@link Node} used as a skeleton root. The node must be the closest common root of the joints
   * hierarchy or a direct or indirect parent node of the closest common root.
   */
  getSkeleton(): Node | null;
  /**
   * {@link Node} used as a skeleton root. The node must be the closest common root of the joints
   * hierarchy or a direct or indirect parent node of the closest common root.
   */
  setSkeleton(skeleton: Node | null): this;
  /**
   * {@link Accessor} containing the floating-point 4x4 inverse-bind matrices. The default is
   * that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were
   * pre-applied.
   */
  getInverseBindMatrices(): Accessor | null;
  /**
   * {@link Accessor} containing the floating-point 4x4 inverse-bind matrices. The default is
   * that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were
   * pre-applied.
   */
  setInverseBindMatrices(inverseBindMatrices: Accessor | null): this;
  /** Adds a joint {@link Node} to this {@link Skin}. */
  addJoint(joint: Node): this;
  /** Removes a joint {@link Node} from this {@link Skin}. */
  removeJoint(joint: Node): this;
  /** Lists joints ({@link Node}s used as joints or bones) in this {@link Skin}. */
  listJoints(): Node[];
}
//#endregion
//#region src/properties/node.d.ts
interface INode$1 extends IExtensibleProperty {
  translation: vec3;
  rotation: vec4;
  scale: vec3;
  weights: number[];
  camera: Camera;
  mesh: Mesh;
  skin: Skin;
  children: RefSet$1<Node>;
}
/**
 * *Nodes are the objects that comprise a {@link Scene}.*
 *
 * Each Node may have one or more children, and a transform (position, rotation, and scale) that
 * applies to all of its descendants. A Node may also reference (or "instantiate") other resources
 * at its location, including {@link Mesh}, Camera, Light, and Skin properties. A Node cannot be
 * part of more than one {@link Scene}.
 *
 * A Node's local transform is represented with array-like objects, intended to be compatible with
 * [gl-matrix](https://github.com/toji/gl-matrix), or with the `toArray`/`fromArray` methods of
 * libraries like three.js and babylon.js.
 *
 * Usage:
 *
 * ```ts
 * const node = doc.createNode('myNode')
 * 	.setMesh(mesh)
 * 	.setTranslation([0, 0, 0])
 * 	.addChild(otherNode);
 * ```
 *
 * References:
 * - [glTF → Nodes and Hierarchy](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#nodes-and-hierarchy)
 *
 * @category Properties
 */
declare class Node extends ExtensibleProperty<INode$1> {
  propertyType: PropertyType.NODE;
  protected init(): void;
  protected getDefaults(): Nullable<INode$1>;
  copy(other: this, resolve?: typeof COPY_IDENTITY): this;
  /**********************************************************************************************
   * Local transform.
   */
  /** Returns the translation (position) of this Node in local space. */
  getTranslation(): vec3;
  /** Returns the rotation (quaternion) of this Node in local space. */
  getRotation(): vec4;
  /** Returns the scale of this Node in local space. */
  getScale(): vec3;
  /** Sets the translation (position) of this Node in local space. */
  setTranslation(translation: vec3): this;
  /** Sets the rotation (quaternion) of this Node in local space. */
  setRotation(rotation: vec4): this;
  /** Sets the scale of this Node in local space. */
  setScale(scale: vec3): this;
  /** Returns the local matrix of this Node. */
  getMatrix(): mat4;
  /** Sets the local matrix of this Node. Matrix will be decomposed to TRS properties. */
  setMatrix(matrix: mat4): this;
  /**********************************************************************************************
   * World transform.
   */
  /** Returns the translation (position) of this Node in world space. */
  getWorldTranslation(): vec3;
  /** Returns the rotation (quaternion) of this Node in world space. */
  getWorldRotation(): vec4;
  /** Returns the scale of this Node in world space. */
  getWorldScale(): vec3;
  /** Returns the world matrix of this Node. */
  getWorldMatrix(): mat4;
  /**********************************************************************************************
   * Scene hierarchy.
   */
  /**
   * Adds the given Node as a child of this Node.
   *
   * Requirements:
   *
   * 1. Nodes MAY be root children of multiple {@link Scene Scenes}
   * 2. Nodes MUST NOT be children of >1 Node
   * 3. Nodes MUST NOT be children of both Nodes and {@link Scene Scenes}
   *
   * The `addChild` method enforces these restrictions automatically, and will
   * remove the new child from previous parents where needed. This behavior
   * may change in future major releases of the library.
   */
  addChild(child: Node): this;
  /** Removes a Node from this Node's child Node list. */
  removeChild(child: Node): this;
  /** Lists all child Nodes of this Node. */
  listChildren(): Node[];
  /**
   * Returns the Node's unique parent Node within the scene graph. If the
   * Node has no parents, or is a direct child of the {@link Scene}
   * ("root node"), this method returns null.
   *
   * Unrelated to {@link Property.listParents}, which lists all resource
   * references from properties of any type ({@link Skin}, {@link Root}, ...).
   */
  getParentNode(): Node | null;
  /**********************************************************************************************
   * Attachments.
   */
  /** Returns the {@link Mesh}, if any, instantiated at this Node. */
  getMesh(): Mesh | null;
  /**
   * Sets a {@link Mesh} to be instantiated at this Node. A single mesh may be instantiated by
   * multiple Nodes; reuse of this sort is strongly encouraged.
   */
  setMesh(mesh: Mesh | null): this;
  /** Returns the {@link Camera}, if any, instantiated at this Node. */
  getCamera(): Camera | null;
  /** Sets a {@link Camera} to be instantiated at this Node. */
  setCamera(camera: Camera | null): this;
  /** Returns the {@link Skin}, if any, instantiated at this Node. */
  getSkin(): Skin | null;
  /** Sets a {@link Skin} to be instantiated at this Node. */
  setSkin(skin: Skin | null): this;
  /**
   * Initial weights of each {@link PrimitiveTarget} for the mesh instance at this Node.
   * Most engines only support 4-8 active morph targets at a time.
   */
  getWeights(): number[];
  /**
   * Initial weights of each {@link PrimitiveTarget} for the mesh instance at this Node.
   * Most engines only support 4-8 active morph targets at a time.
   */
  setWeights(weights: number[]): this;
  /**********************************************************************************************
   * Helpers.
   */
  /** Visits this {@link Node} and its descendants, top-down. */
  traverse(fn: (node: Node) => void): this;
}
//#endregion
//#region src/properties/animation-channel.d.ts
interface IAnimationChannel$1 extends IExtensibleProperty {
  targetPath: GLTF.AnimationChannelTargetPath | null;
  targetNode: Node;
  sampler: AnimationSampler;
}
/**
 * *A target-path pair within a larger {@link Animation}, which refers to an
 * {@link AnimationSampler} storing the keyframe data for that pair.*
 *
 * A _target_ is always a {@link Node}, in the core glTF spec. A _path_ is any property of that
 * Node that can be affected by animation: `translation`, `rotation`, `scale`, or `weights`. An
 * {@link Animation} affecting the positions and rotations of several {@link Node}s would contain
 * one channel for each Node-position or Node-rotation pair. The keyframe data for an
 * AnimationChannel is stored in an {@link AnimationSampler}, which must be attached to the same
 * {@link Animation}.
 *
 * Usage:
 *
 * ```ts
 * const node = doc.getRoot()
 * 	.listNodes()
 * 	.find((node) => node.getName() === 'Cog');
 *
 * const channel = doc.createAnimationChannel('cogRotation')
 * 	.setTargetPath('rotation')
 * 	.setTargetNode(node)
 * 	.setSampler(rotateSampler);
 * ```
 *
 * Reference
 * - [glTF → Animations](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#animations)
 *
 * @category Properties
 */
declare class AnimationChannel extends ExtensibleProperty<IAnimationChannel$1> {
  propertyType: PropertyType.ANIMATION_CHANNEL;
  /**********************************************************************************************
   * Constants.
   */
  /** Name of the property to be modified by an animation channel. */
  static TargetPath: Record<string, GLTF.AnimationChannelTargetPath>;
  /**********************************************************************************************
   * Instance.
   */
  protected init(): void;
  protected getDefaults(): Nullable<IAnimationChannel$1>;
  /**********************************************************************************************
   * Properties.
   */
  /**
   * Path (property) animated on the target {@link Node}. Supported values include:
   * `translation`, `rotation`, `scale`, or `weights`.
   */
  getTargetPath(): GLTF.AnimationChannelTargetPath | null;
  /**
   * Path (property) animated on the target {@link Node}. Supported values include:
   * `translation`, `rotation`, `scale`, or `weights`.
   */
  setTargetPath(targetPath: GLTF.AnimationChannelTargetPath): this;
  /** Target {@link Node} animated by the channel. */
  getTargetNode(): Node | null;
  /** Target {@link Node} animated by the channel. */
  setTargetNode(targetNode: Node | null): this;
  /**
   * Keyframe data input/output values for the channel. Must be attached to the same
   * {@link Animation}.
   */
  getSampler(): AnimationSampler | null;
  /**
   * Keyframe data input/output values for the channel. Must be attached to the same
   * {@link Animation}.
   */
  setSampler(sampler: AnimationSampler | null): this;
}
//#endregion
//#region src/properties/animation.d.ts
interface IAnimation$1 extends IExtensibleProperty {
  channels: RefSet$1<AnimationChannel>;
  samplers: RefSet$1<AnimationSampler>;
}
/**
 * *Reusable collections of {@link AnimationChannel}s, together representing a discrete animation
 * clip.*
 *
 * One Animation represents one playable unit in an animation system. Each may contain channels
 * affecting multiple paths (`translation`, `rotation`, `scale`, or `weights`) on multiple
 * {@link Node}s. An Animation's channels must be played together, and do not have any meaning in
 * isolation.
 *
 * Multiple Animations _may_ be played together: for example, one character's _Walk_ animation
 * might play while another character's _Run_ animation plays. Or a single character might have
 * both an _Idle_ and a _Talk_ animation playing at the same time. However, glTF does not define
 * any particular relationship between top-level Animations, or any particular playback behavior
 * like looping or sequences of Animations. General-purpose viewers typically autoplay the first
 * animation and provide UI controls for choosing another. Game engines may have significantly
 * more advanced methods of playing and blending animations.
 *
 * For example, a very simple skinned {@link Mesh} might have two Animations, _Idle_ and _Walk_.
 * Each of those Animations might affect the rotations of two bones, _LegL_ and _LegR_, where the
 * keyframes for each target-path pair are stored in {@link AnimationChannel} instances. In  total,
 * this model would contain two Animations and Four {@link AnimationChannel}s.
 *
 * Usage:
 *
 * ```ts
 * const animation = doc.createAnimation('machineRun')
 * 	.addChannel(rotateCog1)
 * 	.addChannel(rotateCog2)
 * 	.addChannel(rotateCog3);
 * ```
 *
 * Reference
 * - [glTF → Animations](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#animations)
 *
 * @category Properties
 */
declare class Animation extends ExtensibleProperty<IAnimation$1> {
  propertyType: PropertyType.ANIMATION;
  protected init(): void;
  protected getDefaults(): Nullable<IAnimation$1>;
  /** Adds an {@link AnimationChannel} to this Animation. */
  addChannel(channel: AnimationChannel): this;
  /** Removes an {@link AnimationChannel} from this Animation. */
  removeChannel(channel: AnimationChannel): this;
  /** Lists {@link AnimationChannel}s in this Animation. */
  listChannels(): AnimationChannel[];
  /** Adds an {@link AnimationSampler} to this Animation. */
  addSampler(sampler: AnimationSampler): this;
  /** Removes an {@link AnimationSampler} from this Animation. */
  removeSampler(sampler: AnimationSampler): this;
  /** Lists {@link AnimationSampler}s in this Animation. */
  listSamplers(): AnimationSampler[];
}
//#endregion
//#region src/properties/scene.d.ts
interface IScene$1 extends IExtensibleProperty {
  children: RefSet$1<Node>;
}
/**
 * *Scenes represent a set of visual objects to render.*
 *
 * Typically a glTF file contains only a single Scene, although more are allowed and useful in some
 * cases. No particular meaning is associated with additional Scenes, except as defined by the
 * application. Scenes reference {@link Node}s, and a single Node cannot be a member of more than
 * one Scene.
 *
 * References:
 * - [glTF → Scenes](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#scenes)
 * - [glTF → Coordinate System and Units](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#coordinate-system-and-units)
 *
 * @category Properties
 */
declare class Scene extends ExtensibleProperty<IScene$1> {
  propertyType: PropertyType.SCENE;
  protected init(): void;
  protected getDefaults(): Nullable<IScene$1>;
  copy(other: this, resolve?: typeof COPY_IDENTITY): this;
  /**
   * Adds a {@link Node} to the Scene.
   *
   * Requirements:
   *
   * 1. Nodes MAY be root children of multiple {@link Scene Scenes}
   * 2. Nodes MUST NOT be children of >1 Node
   * 3. Nodes MUST NOT be children of both Nodes and {@link Scene Scenes}
   *
   * The `addChild` method enforces these restrictions automatically, and will
   * remove the new child from previous parents where needed. This behavior
   * may change in future major releases of the library.
   */
  addChild(node: Node): this;
  /** Removes a {@link Node} from the Scene. */
  removeChild(node: Node): this;
  /**
   * Lists all direct child {@link Node Nodes} in the Scene. Indirect
   * descendants (children of children) are not returned, but may be
   * reached recursively or with {@link Scene.traverse} instead.
   */
  listChildren(): Node[];
  /** Visits each {@link Node} in the Scene, including descendants, top-down. */
  traverse(fn: (node: Node) => void): this;
}
//#endregion
//#region src/properties/root.d.ts
interface IAsset$1 {
  version: string;
  minVersion?: string;
  generator?: string;
  copyright?: string;
  [key: string]: unknown;
}
interface IRoot extends IExtensibleProperty {
  asset: IAsset$1;
  defaultScene: Scene;
  accessors: RefSet$1<Accessor>;
  animations: RefSet$1<Animation>;
  buffers: RefSet$1<Buffer>;
  cameras: RefSet$1<Camera>;
  materials: RefSet$1<Material>;
  meshes: RefSet$1<Mesh>;
  nodes: RefSet$1<Node>;
  scenes: RefSet$1<Scene>;
  skins: RefSet$1<Skin>;
  textures: RefSet$1<Texture>;
}
/**
 * *Root property of a glTF asset.*
 *
 * Any properties to be exported with a particular asset must be referenced (directly or
 * indirectly) by the root. Metadata about the asset's license, generator, and glTF specification
 * version are stored in the asset, accessible with {@link Root.getAsset}.
 *
 * Properties are added to the root with factory methods on its {@link Document}, and removed by
 * calling {@link Property.dispose}() on the resource. Any properties that have been created but
 * not disposed will be included when calling the various `root.list*()` methods.
 *
 * A document's root cannot be removed, and no other root may be created. Unlike other
 * {@link Property} types, the `.dispose()`, `.detach()` methods have no useful function on a
 * Root property.
 *
 * Usage:
 *
 * ```ts
 * const root = document.getRoot();
 * const scene = document.createScene('myScene');
 * const node = document.createNode('myNode');
 * scene.addChild(node);
 *
 * console.log(root.listScenes()); // → [scene x 1]
 * ```
 *
 * Reference: [glTF → Concepts](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#concepts)
 *
 * @category Properties
 */
declare class Root extends ExtensibleProperty<IRoot> {
  propertyType: PropertyType.ROOT;
  private readonly _extensions;
  protected init(): void;
  protected getDefaults(): Nullable<IRoot>;
  clone(): this;
  copy(other: this, resolve?: typeof COPY_IDENTITY): this;
  private _addChildOfRoot;
  /**
   * Returns the `asset` object, which specifies the target glTF version of the asset. Additional
   * metadata can be stored in optional properties such as `generator` or `copyright`.
   *
   * Reference: [glTF → Asset](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#asset)
   */
  getAsset(): IAsset$1;
  /**********************************************************************************************
   * Extensions.
   */
  /** Lists all {@link Extension Extensions} enabled for this root. */
  listExtensionsUsed(): Extension[];
  /** Lists all {@link Extension Extensions} enabled and required for this root. */
  listExtensionsRequired(): Extension[];
  /**********************************************************************************************
   * Properties.
   */
  /** Lists all {@link Scene} properties associated with this root. */
  listScenes(): Scene[];
  /** Default {@link Scene} associated with this root. */
  setDefaultScene(defaultScene: Scene | null): this;
  /** Default {@link Scene} associated with this root. */
  getDefaultScene(): Scene | null;
  /** Lists all {@link Node} properties associated with this root. */
  listNodes(): Node[];
  /** Lists all {@link Camera} properties associated with this root. */
  listCameras(): Camera[];
  /** Lists all {@link Skin} properties associated with this root. */
  listSkins(): Skin[];
  /** Lists all {@link Mesh} properties associated with this root. */
  listMeshes(): Mesh[];
  /** Lists all {@link Material} properties associated with this root. */
  listMaterials(): Material[];
  /** Lists all {@link Texture} properties associated with this root. */
  listTextures(): Texture[];
  /** Lists all {@link Animation} properties associated with this root. */
  listAnimations(): Animation[];
  /** Lists all {@link Accessor} properties associated with this root. */
  listAccessors(): Accessor[];
  /** Lists all {@link Buffer} properties associated with this root. */
  listBuffers(): Buffer[];
}
//#endregion
//#region src/utils/get-bounds.d.ts
/** @hidden Implemented in /core for use by /extensions, publicly exported from /functions. */
declare function getBounds(node: Node | Scene): bbox;
//#endregion
//#region src/utils/http-utils.d.ts
/**
 * *Utility class for working with URLs.*
 *
 * @category Utilities
 */
declare class HTTPUtils {
  static readonly DEFAULT_INIT: RequestInit;
  static readonly PROTOCOL_REGEXP: RegExp;
  static dirname(path: string): string;
  /**
   * Extracts the basename from a URL, e.g. "folder/model.glb" -> "model".
   * See: {@link FileUtils.basename}
   */
  static basename(uri: string): string;
  /**
   * Extracts the extension from a URL, e.g. "folder/model.glb" -> "glb".
   * See: {@link FileUtils.extension}
   */
  static extension(uri: string): string;
  static resolve(base: string, path: string): string;
  /**
   * Returns true for URLs containing a protocol, and false for both
   * absolute and relative paths.
   */
  static isAbsoluteURL(path: string): boolean;
  /**
   * Returns true for paths that are declared relative to some unknown base
   * path. For example, "foo/bar/" is relative both "/foo/bar/" is not.
   */
  static isRelativePath(path: string): boolean;
}
//#endregion
//#region src/utils/image-utils.d.ts
/** Implements support for an image format in the {@link ImageUtils} class. */
interface ImageUtilsFormat {
  match(buffer: Uint8Array): boolean;
  getSize(buffer: Uint8Array): vec2 | null;
  getChannels(buffer: Uint8Array): number | null;
  getVRAMByteLength?(buffer: Uint8Array): number | null;
}
/**
 * *Common utilities for working with image data.*
 *
 * @category Utilities
 */
declare class ImageUtils {
  static impls: Record<string, ImageUtilsFormat>;
  /** Registers support for a new image format; useful for certain extensions. */
  static registerFormat(mimeType: string, impl: ImageUtilsFormat): void;
  /**
   * Returns detected MIME type of the given image buffer. Note that for image
   * formats with support provided by extensions, the extension must be
   * registered with an I/O class before it can be detected by ImageUtils.
   */
  static getMimeType(buffer: Uint8Array): string | null;
  /** Returns the dimensions of the image. */
  static getSize(buffer: Uint8Array, mimeType: string): vec2 | null;
  /**
   * Returns a conservative estimate of the number of channels in the image. For some image
   * formats, the method may return 4 indicating the possibility of an alpha channel, without
   * the ability to guarantee that an alpha channel is present.
   */
  static getChannels(buffer: Uint8Array, mimeType: string): number | null;
  /** Returns a conservative estimate of the GPU memory required by this image. */
  static getVRAMByteLength(buffer: Uint8Array, mimeType: string): number | null;
  /** Returns the preferred file extension for the given MIME type. */
  static mimeTypeToExtension(mimeType: string): string;
  /** Returns the MIME type for the given file extension. */
  static extensionToMimeType(extension: string): string;
}
//#endregion
//#region src/utils/logger.d.ts
/** Logger verbosity thresholds. */
declare enum Verbosity {
  /** No events are logged. */
  SILENT = 4,
  /** Only error events are logged. */
  ERROR = 3,
  /** Only error and warn events are logged. */
  WARN = 2,
  /** Only error, warn, and info events are logged. (DEFAULT) */
  INFO = 1,
  /** All events are logged. */
  DEBUG = 0
}
interface ILogger {
  debug(text: string): void;
  info(text: string): void;
  warn(text: string): void;
  error(text: string): void;
}
/**
 * *Logger utility class.*
 *
 * @category Utilities
 */
declare class Logger implements ILogger {
  private readonly verbosity;
  /** Logger verbosity thresholds. */
  static Verbosity: typeof Verbosity;
  /** Default logger instance. */
  static DEFAULT_INSTANCE: Logger;
  /** Constructs a new Logger instance. */
  constructor(verbosity: number);
  /** Logs an event at level {@link Logger.Verbosity.DEBUG}. */
  debug(text: string): void;
  /** Logs an event at level {@link Logger.Verbosity.INFO}. */
  info(text: string): void;
  /** Logs an event at level {@link Logger.Verbosity.WARN}. */
  warn(text: string): void;
  /** Logs an event at level {@link Logger.Verbosity.ERROR}. */
  error(text: string): void;
}
//#endregion
//#region src/utils/math-utils.d.ts
/** @hidden */
declare class MathUtils {
  static identity(v: number): number;
  static eq(a: number[], b: number[], tolerance?: number): boolean;
  static clamp(value: number, min: number, max: number): number;
  static decodeNormalizedInt(i: number, componentType: GLTF.AccessorComponentType): number;
  static encodeNormalizedInt(f: number, componentType: GLTF.AccessorComponentType): number;
  /**
   * Decompose a mat4 to TRS properties.
   *
   * Equivalent to the Matrix4 decompose() method in three.js, and intentionally not using the
   * gl-matrix version. See: https://github.com/toji/gl-matrix/issues/408
   *
   * @param srcMat Matrix element, to be decomposed to TRS properties.
   * @param dstTranslation Translation element, to be overwritten.
   * @param dstRotation Rotation element, to be overwritten.
   * @param dstScale Scale element, to be overwritten.
   */
  static decompose(srcMat: mat4, dstTranslation: vec3, dstRotation: vec4, dstScale: vec3): void;
  /**
   * Compose TRS properties to a mat4.
   *
   * Equivalent to the Matrix4 compose() method in three.js, and intentionally not using the
   * gl-matrix version. See: https://github.com/toji/gl-matrix/issues/408
   *
   * @param srcTranslation Translation element of matrix.
   * @param srcRotation Rotation element of matrix.
   * @param srcScale Scale element of matrix.
   * @param dstMat Matrix element, to be modified and returned.
   * @returns dstMat, overwritten to mat4 equivalent of given TRS properties.
   */
  static compose(srcTranslation: vec3, srcRotation: vec4, srcScale: vec3, dstMat: mat4): mat4;
}
//#endregion
//#region src/utils/uuid.d.ts
/**
 * Short ID generator.
 *
 * Generated IDs are short, easy to type, and unique for the duration of the program's execution.
 * Uniqueness across multiple program executions, or on other devices, is not guaranteed. Based on
 * [Short ID Generation in JavaScript](https://tomspencer.dev/blog/2014/11/16/short-id-generation-in-javascript/),
 * with alterations.
 *
 * @category Utilities
 * @hidden
 */
declare const uuid: () => string;
//#endregion
//#region src/io/writer.d.ts
interface WriterOptions {
  format: Format;
  logger?: Logger;
  basename?: string;
  vertexLayout?: VertexLayout;
  dependencies?: {
    [key: string]: unknown;
  };
  extensions?: (typeof Extension)[];
}
//#endregion
//#region src/io/platform-io.d.ts
type PublicWriterOptions = Partial<Pick<WriterOptions, 'format' | 'basename'>>;
/**
 * *Abstract I/O service.*
 *
 * The most common use of the I/O service is to read/write a {@link Document} with a given path.
 * Methods are also available for converting in-memory representations of raw glTF files, both
 * binary (*Uint8Array*) and JSON ({@link JSONDocument}).
 *
 * For platform-specific implementations, see {@link NodeIO}, {@link WebIO}, and {@link DenoIO}.
 *
 * @privateRemarks TODO(v5): Consider renaming class to IO, AbstractIO, BaseIO, CommonIO, etc.
 *
 * @category I/O
 */
declare abstract class PlatformIO {
  protected _logger: ILogger;
  private _extensions;
  private _dependencies;
  private _vertexLayout;
  private _strictResources;
  /** @hidden */
  lastReadBytes: number;
  /** @hidden */
  lastWriteBytes: number;
  /** Sets the {@link Logger} used by this I/O instance. Defaults to Logger.DEFAULT_INSTANCE. */
  setLogger(logger: ILogger): this;
  /** Registers extensions, enabling I/O class to read and write glTF assets requiring them. */
  registerExtensions(extensions: (typeof Extension)[]): this;
  /** Registers dependencies used (e.g. by extensions) in the I/O process. */
  registerDependencies(dependencies: {
    [key: string]: unknown;
  }): this;
  /**
   * Sets the vertex layout method used by this I/O instance. Defaults to
   * VertexLayout.INTERLEAVED.
   */
  setVertexLayout(layout: VertexLayout): this;
  /**
   * Sets whether missing external resources should throw errors (strict mode) or
   * be ignored with warnings. Missing images can be ignored, but missing buffers
   * will currently always result in an error. When strict mode is disabled and
   * missing resources are encountered, the resulting {@link Document} will be
   * created in an invalid state. Manual fixes to the Document may be necessary,
   * resolving null images in {@link Texture Textures} or removing the affected
   * Textures, before the Document can be written to output or used in transforms.
   *
   * Defaults to true (strict mode).
   */
  setStrictResources(strict: boolean): this;
  /**********************************************************************************************
   * Abstract.
   */
  protected abstract readURI(uri: string, type: 'view'): Promise<Uint8Array<ArrayBuffer>>;
  protected abstract readURI(uri: string, type: 'text'): Promise<string>;
  protected abstract readURI(uri: string, type: 'view' | 'text'): Promise<Uint8Array | string>;
  protected abstract resolve(base: string, path: string): string;
  protected abstract dirname(uri: string): string;
  /**********************************************************************************************
   * Public Read API.
   */
  /** Reads a {@link Document} from the given URI. */
  read(uri: string): Promise<Document>;
  /** Loads a URI and returns a {@link JSONDocument} struct, without parsing. */
  readAsJSON(uri: string): Promise<JSONDocument>;
  /** Converts glTF-formatted JSON and a resource map to a {@link Document}. */
  readJSON(jsonDoc: JSONDocument): Promise<Document>;
  /** Converts a GLB-formatted Uint8Array to a {@link JSONDocument}. */
  binaryToJSON(glb: Uint8Array): Promise<JSONDocument>;
  /** Converts a GLB-formatted Uint8Array to a {@link Document}. */
  readBinary(glb: Uint8Array): Promise<Document>;
  /**********************************************************************************************
   * Public Write API.
   */
  /** Converts a {@link Document} to glTF-formatted JSON and a resource map. */
  writeJSON(doc: Document, _options?: PublicWriterOptions): Promise<JSONDocument>;
  /** Converts a {@link Document} to a GLB-formatted Uint8Array. */
  writeBinary(doc: Document): Promise<Uint8Array<ArrayBuffer>>;
  /**********************************************************************************************
   * Internal.
   */
  private _readResourcesExternal;
  private _readResourcesInternal;
  /**
   * Creates a shallow copy of glTF-formatted {@link JSONDocument}.
   *
   * Images, Buffers, and Resources objects are deep copies so that PlatformIO can safely
   * modify them during the parsing process. Other properties are shallow copies, and buffers
   * are passed by reference.
   */
  private _copyJSON;
  /** Internal version of binaryToJSON; does not warn about external resources. */
  private _binaryToJSON;
}
//#endregion
//#region src/io/deno-io.d.ts
/**
 * *I/O service for [Deno](https://deno.land/).*
 *
 * The most common use of the I/O service is to read/write a {@link Document} with a given path.
 * Methods are also available for converting in-memory representations of raw glTF files, both
 * binary (*Uint8Array*) and JSON ({@link JSONDocument}).
 *
 * _*NOTICE:* Support for the Deno environment is currently experimental. See
 * [glTF-Transform#457](https://github.com/donmccurdy/glTF-Transform/issues/457)._
 *
 * Usage:
 *
 * ```typescript
 * import { DenoIO } from 'https://esm.sh/@gltf-transform/core';
 * import * as path from 'https://deno.land/std/path/mod.ts';
 *
 * const io = new DenoIO(path);
 *
 * // Read.
 * let document;
 * document = io.read('model.glb');  // → Document
 * document = io.readBinary(glb);    // Uint8Array → Document
 *
 * // Write.
 * const glb = io.writeBinary(document);  // Document → Uint8Array
 * ```
 *
 * @category I/O
 */
declare class DenoIO extends PlatformIO {
  private _path;
  constructor(path: unknown);
  protected readURI(uri: string, type: 'view'): Promise<Uint8Array<ArrayBuffer>>;
  protected readURI(uri: string, type: 'text'): Promise<string>;
  protected resolve(base: string, path: string): string;
  protected dirname(uri: string): string;
}
//#endregion
//#region src/io/node-io.d.ts
/**
 * *I/O service for Node.js.*
 *
 * The most common use of the I/O service is to read/write a {@link Document} with a given path.
 * Methods are also available for converting in-memory representations of raw glTF files, both
 * binary (*Uint8Array*) and JSON ({@link JSONDocument}).
 *
 * Usage:
 *
 * ```typescript
 * import { NodeIO } from '@gltf-transform/core';
 *
 * const io = new NodeIO();
 *
 * // Read.
 * let document;
 * document = await io.read('model.glb'); // → Document
 * document = await io.readBinary(glb);   // Uint8Array → Document
 *
 * // Write.
 * await io.write('model.glb', document);      // → void
 * const glb = await io.writeBinary(document); // Document → Uint8Array
 * ```
 *
 * By default, NodeIO can only read/write paths on disk. To enable network requests, provide a Fetch
 * API implementation (global [`fetch()`](https://nodejs.org/api/globals.html#fetch) is stable in
 * Node.js v21+, or [`node-fetch`](https://www.npmjs.com/package/node-fetch) may be installed) and enable
 * {@link NodeIO.setAllowNetwork setAllowNetwork}. Network requests may optionally be configured with
 * [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters) parameters.
 *
 * ```typescript
 * const io = new NodeIO(fetch, {headers: {...}}).setAllowNetwork(true);
 *
 * const document = await io.read('https://example.com/path/to/model.glb');
 * ```
 *
 * @category I/O
 */
declare class NodeIO extends PlatformIO {
  private _fs;
  private _path;
  private readonly _fetch;
  private readonly _fetchConfig;
  private _init;
  private _fetchEnabled;
  /**
   * Constructs a new NodeIO service. Instances are reusable. By default, only NodeIO can only
   * read/write paths on disk. To enable HTTP requests, provide a Fetch API implementation and
   * enable {@link NodeIO.setAllowNetwork setAllowNetwork}.
   *
   * @param fetch Implementation of Fetch API.
   * @param fetchConfig Configuration object for Fetch API.
   */
  constructor(_fetch?: unknown, _fetchConfig?: RequestInit);
  init(): Promise<void>;
  setAllowNetwork(allow: boolean): this;
  protected readURI(uri: string, type: 'view'): Promise<Uint8Array<ArrayBuffer>>;
  protected readURI(uri: string, type: 'text'): Promise<string>;
  protected resolve(base: string, path: string): string;
  protected dirname(uri: string): string;
  /**********************************************************************************************
   * Public.
   */
  /** Writes a {@link Document} instance to a local path. */
  write(uri: string, doc: Document): Promise<void>;
}
//#endregion
//#region src/io/reader-context.d.ts
/**
 * Model class providing glTF Transform objects representing each definition in the glTF file, used
 * by a {@link GLTFReader} and its {@link Extension} implementations. Indices of all properties will be
 * consistent with the glTF file.
 *
 * @hidden
 */
declare class ReaderContext {
  readonly jsonDoc: JSONDocument;
  buffers: Buffer[];
  bufferViews: Uint8Array<ArrayBuffer>[];
  bufferViewBuffers: Buffer[];
  accessors: Accessor[];
  textures: Texture[];
  textureInfos: Map<TextureInfo, GLTF.ITextureInfo>;
  materials: Material[];
  meshes: Mesh[];
  cameras: Camera[];
  nodes: Node[];
  skins: Skin[];
  animations: Animation[];
  scenes: Scene[];
  constructor(jsonDoc: JSONDocument);
  setTextureInfo(textureInfo: TextureInfo, textureInfoDef: GLTF.ITextureInfo): void;
}
//#endregion
//#region src/io/web-io.d.ts
/**
 * *I/O service for Web.*
 *
 * The most common use of the I/O service is to read/write a {@link Document} with a given path.
 * Methods are also available for converting in-memory representations of raw glTF files, both
 * binary (*Uint8Array*) and JSON ({@link JSONDocument}).
 *
 * Usage:
 *
 * ```typescript
 * import { WebIO } from '@gltf-transform/core';
 *
 * const io = new WebIO({credentials: 'include'});
 *
 * // Read.
 * let document;
 * document = await io.read('model.glb');  // → Document
 * document = await io.readBinary(glb);    // Uint8Array → Document
 *
 * // Write.
 * const glb = await io.writeBinary(document); // Document → Uint8Array
 * ```
 *
 * @category I/O
 */
declare class WebIO extends PlatformIO {
  private readonly _fetchConfig;
  /**
   * Constructs a new WebIO service. Instances are reusable.
   * @param fetchConfig Configuration object for Fetch API.
   */
  constructor(fetchConfig?: RequestInit);
  protected readURI(uri: string, type: 'view'): Promise<Uint8Array<ArrayBuffer>>;
  protected readURI(uri: string, type: 'text'): Promise<string>;
  protected resolve(base: string, path: string): string;
  protected dirname(uri: string): string;
}
//#endregion
//#region src/io/writer-context.d.ts
type PropertyDef = GLTF.IScene | GLTF.INode | GLTF.IMaterial | GLTF.ISkin | GLTF.ITexture;
declare enum BufferViewTarget {
  ARRAY_BUFFER = 34962,
  ELEMENT_ARRAY_BUFFER = 34963
}
/**
 * Model class providing writing state to a {@link GLTFWriter} and its {@link Extension}
 * implementations.
 *
 * @hidden
 */
declare class WriterContext {
  private readonly _doc;
  readonly jsonDoc: JSONDocument;
  readonly options: Required<WriterOptions>;
  /** Explicit buffer view targets defined by glTF specification. */
  static readonly BufferViewTarget: typeof BufferViewTarget;
  /**
   * Implicit buffer view usage, not required by glTF specification, but nonetheless useful for
   * proper grouping of accessors into buffer views. Additional usages are defined by extensions,
   * like `EXT_mesh_gpu_instancing`.
   */
  static readonly BufferViewUsage: typeof BufferViewUsage;
  /** Maps usage type to buffer view target. Usages not mapped have undefined targets. */
  static readonly USAGE_TO_TARGET: {
    [key: string]: BufferViewTarget | undefined;
  };
  readonly accessorIndexMap: Map<Accessor, number>;
  readonly animationIndexMap: Map<Animation, number>;
  readonly bufferIndexMap: Map<Buffer, number>;
  readonly cameraIndexMap: Map<Camera, number>;
  readonly skinIndexMap: Map<Skin, number>;
  readonly materialIndexMap: Map<Material, number>;
  readonly meshIndexMap: Map<Mesh, number>;
  readonly nodeIndexMap: Map<Node, number>;
  readonly imageIndexMap: Map<Texture, number>;
  readonly textureDefIndexMap: Map<string, number>;
  readonly textureInfoDefMap: Map<TextureInfo, GLTF.ITextureInfo>;
  readonly samplerDefIndexMap: Map<string, number>;
  readonly sceneIndexMap: Map<Scene, number>;
  readonly imageBufferViews: Uint8Array[];
  readonly otherBufferViews: Map<Buffer, Uint8Array[]>;
  readonly otherBufferViewsIndexMap: Map<Uint8Array, number>;
  readonly extensionData: {
    [key: string]: unknown;
  };
  bufferURIGenerator: UniqueURIGenerator<Buffer>;
  imageURIGenerator: UniqueURIGenerator<Texture>;
  logger: ILogger;
  private readonly _accessorUsageMap;
  readonly accessorUsageGroupedByParent: Set<string>;
  readonly accessorParents: Map<Accessor, Property>;
  constructor(_doc: Document, jsonDoc: JSONDocument, options: Required<WriterOptions>);
  /**
   * Creates a TextureInfo definition, and any Texture or Sampler definitions it requires. If
   * possible, Texture and Sampler definitions are shared.
   */
  createTextureInfoDef(texture: Texture, textureInfo: TextureInfo): GLTF.ITextureInfo;
  createPropertyDef(property: Property): PropertyDef;
  createAccessorDef(accessor: Accessor): GLTF.IAccessor;
  createImageData(imageDef: GLTF.IImage, data: Uint8Array<ArrayBuffer>, texture: Texture): void;
  assignResourceURI(uri: string, data: Uint8Array<ArrayBuffer>, throwOnConflict: boolean): void;
  /**
   * Returns implicit usage type of the given accessor, related to grouping accessors into
   * buffer views. Usage is a superset of buffer view target, including ARRAY_BUFFER and
   * ELEMENT_ARRAY_BUFFER, but also usages that do not match GPU buffer view targets such as
   * IBMs. Additional usages are defined by extensions, like `EXT_mesh_gpu_instancing`.
   */
  getAccessorUsage(accessor: Accessor): BufferViewUsage | string;
  /**
   * Sets usage for the given accessor. Some accessor types must be grouped into
   * buffer views with like accessors. This includes the specified buffer view "targets", but
   * also implicit usage like IBMs or instanced mesh attributes. If unspecified, an accessor
   * will be grouped with other accessors of unspecified usage.
   */
  addAccessorToUsageGroup(accessor: Accessor, usage: BufferViewUsage | string): this;
}
declare class UniqueURIGenerator<T extends Texture | Buffer> {
  private readonly multiple;
  private readonly basename;
  private counter;
  constructor(multiple: boolean, basename: (t: T) => string);
  createURI(object: T, extension: string): string;
}
//#endregion
//#region src/extension.d.ts
/**
 * *Base class for all Extensions.*
 *
 * Extensions enhance a glTF {@link Document} with additional features and schema, beyond the core
 * glTF specification. Common extensions may be imported from the `@gltf-transform/extensions`
 * package, or custom extensions may be created by extending this base class.
 *
 * An extension is added to a Document by calling {@link Document.createExtension} with the
 * extension constructor. The extension object may then be used to construct
 * {@link ExtensionProperty} instances, which are attached to properties throughout the Document
 * as prescribed by the extension itself.
 *
 * For more information on available extensions and their usage, see [Extensions](/extensions).
 *
 * Reference:
 * - [glTF → Extensions](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#specifying-extensions)
 * - [glTF Extension Registry](https://github.com/KhronosGroup/gltf/blob/main/extensions)
 *
 * @category Extensions
 */
declare abstract class Extension {
  /** Official name of the extension. */
  static EXTENSION_NAME: string;
  /** Official name of the extension. */
  readonly extensionName: string;
  /**
   * Before reading, extension should be called for these {@link Property} types. *Most
   * extensions don't need to implement this.*
   * @hidden
   */
  readonly prereadTypes: PropertyType[];
  /**
   * Before writing, extension should be called for these {@link Property} types. *Most
   * extensions don't need to implement this.*
   * @hidden
   */
  readonly prewriteTypes: PropertyType[];
  /** @hidden Dependency IDs needed to read this extension, to be installed before I/O. */
  readonly readDependencies: string[];
  /** @hidden Dependency IDs needed to write this extension, to be installed before I/O. */
  readonly writeDependencies: string[];
  /** @hidden */
  protected readonly document: Document;
  /** @hidden */
  protected required: boolean;
  /** @hidden */
  protected properties: Set<ExtensionProperty>;
  /** @hidden */
  private _listener;
  /** @hidden */
  constructor(document: Document);
  /** Disables and removes the extension from the Document. */
  dispose(): void;
  /** @hidden Performs first-time setup for the extension. Must be idempotent. */
  static register(): void;
  /**
   * Indicates to the client whether it is OK to load the asset when this extension is not
   * recognized. Optional extensions are generally preferred, if there is not a good reason
   * to require a client to completely fail when an extension isn't known.
   */
  isRequired(): boolean;
  /**
   * Indicates to the client whether it is OK to load the asset when this extension is not
   * recognized. Optional extensions are generally preferred, if there is not a good reason
   * to require a client to completely fail when an extension isn't known.
   */
  setRequired(required: boolean): this;
  /**
   * Lists all {@link ExtensionProperty} instances associated with, or created by, this
   * extension. Includes only instances that are attached to the Document's graph; detached
   * instances will be excluded.
   */
  listProperties(): ExtensionProperty[];
  /**********************************************************************************************
   * I/O implementation.
   */
  /** @hidden Installs dependencies required by the extension. */
  install(_key: string, _dependency: unknown): this;
  /**
   * Used by the {@link PlatformIO} utilities when reading a glTF asset. This method may
   * optionally be implemented by an extension, and should then support any property type
   * declared by the Extension's {@link Extension.prereadTypes} list. The Extension will
   * be given a ReaderContext instance, and is expected to update either the context or its
   * {@link JSONDocument} with resources known to the Extension. *Most extensions don't need to
   * implement this.*
   * @hidden
   */
  preread(_readerContext: ReaderContext, _propertyType: PropertyType): this;
  /**
   * Used by the {@link PlatformIO} utilities when writing a glTF asset. This method may
   * optionally be implemented by an extension, and should then support any property type
   * declared by the Extension's {@link Extension.prewriteTypes} list. The Extension will
   * be given a WriterContext instance, and is expected to update either the context or its
   * {@link JSONDocument} with resources known to the Extension. *Most extensions don't need to
   * implement this.*
   * @hidden
   */
  prewrite(_writerContext: WriterContext, _propertyType: PropertyType): this;
  /**
   * Used by the {@link PlatformIO} utilities when reading a glTF asset. This method must be
   * implemented by each extension in order to support reading files. The extension will be
   * given a ReaderContext instance, and should update the current {@link Document} accordingly.
   * @hidden
   */
  abstract read(readerContext: ReaderContext): this;
  /**
   * Used by the {@link PlatformIO} utilities when writing a glTF asset. This method must be
   * implemented by each extension in order to support writing files. The extension will be
   * given a WriterContext instance, and should modify the {@link JSONDocument} output
   * accordingly. Adding the extension name to the `extensionsUsed` and `extensionsRequired` list
   * is done automatically, and should not be included here.
   * @hidden
   */
  abstract write(writerContext: WriterContext): this;
}
//#endregion
//#region src/document.d.ts
interface TransformContext {
  stack: string[];
}
type Transform = (doc: Document, context?: TransformContext) => void;
/**
 * *Wraps a glTF asset and its resources for easier modification.*
 *
 * Documents manage glTF assets and the relationships among dependencies. The document wrapper
 * allow tools to read and write changes without dealing with array indices or byte offsets, which
 * would otherwise require careful management over the course of a file modification. An internal
 * graph structure allows any property in the glTF file to maintain references to its dependencies,
 * and makes it easy to determine where a particular property dependency is being used. For
 * example, finding a list of materials that use a particular texture is as simple as calling
 * {@link Texture.listParents}().
 *
 * A new resource {@link Property} (e.g. a {@link Mesh} or {@link Material}) is created by calling
 * 'create' methods on the document. Resources are destroyed by calling {@link Property.dispose}().
 *
 * ```ts
 * import fs from 'fs/promises';
 * import { Document } from '@gltf-transform/core';
 * import { dedup } from '@gltf-transform/functions';
 *
 * const document = new Document();
 *
 * const texture1 = document.createTexture('myTexture')
 * 	.setImage(await fs.readFile('path/to/image.png'))
 * 	.setMimeType('image/png');
 * const texture2 = document.createTexture('myTexture2')
 * 	.setImage(await fs.readFile('path/to/image2.png'))
 * 	.setMimeType('image/png');
 *
 * // Document containing duplicate copies of the same texture.
 * document.getRoot().listTextures(); // → [texture x 2]
 *
 * await document.transform(
 * 	dedup({textures: true}),
 * 	// ...
 * );
 *
 * // Document with duplicate textures removed.
 * document.getRoot().listTextures(); // → [texture x 1]
 * ```
 *
 * Reference:
 * - [glTF → Basics](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#gltf-basics)
 * - [glTF → Concepts](https://github.com/KhronosGroup/gltf/blob/main/specification/2.0/README.md#concepts)
 *
 * @category Documents
 */
declare class Document {
  private _graph;
  private _root;
  private _logger;
  /**
   * Returns the Document associated with a given Graph, if any.
   * @hidden
   * @experimental
   */
  static fromGraph(graph: Graph$1<Property>): Document | null;
  /** Creates a new Document, representing an empty glTF asset. */
  constructor();
  /** Returns the glTF {@link Root} property. */
  getRoot(): Root;
  /**
   * Returns the {@link Graph} representing connectivity of resources within this document.
   * @hidden
   */
  getGraph(): Graph$1<Property>;
  /** Returns the {@link Logger} instance used for any operations performed on this document. */
  getLogger(): ILogger;
  /**
   * Overrides the {@link Logger} instance used for any operations performed on this document.
   *
   * Usage:
   *
   * ```ts
   * doc
   * 	.setLogger(new Logger(Logger.Verbosity.SILENT))
   * 	.transform(dedup(), weld());
   * ```
   */
  setLogger(logger: ILogger): Document;
  /**
   * Applies a series of modifications to this document. Each transformation is asynchronous,
   * takes the {@link Document} as input, and returns nothing. Transforms are applied in the
   * order given, which may affect the final result.
   *
   * Usage:
   *
   * ```ts
   * await doc.transform(
   * 	dedup(),
   * 	prune()
   * );
   * ```
   *
   * @param transforms List of synchronous transformation functions to apply.
   */
  transform(...transforms: Transform[]): Promise<this>;
  /**********************************************************************************************
   * Extension management methods.
   */
  /**
   * Returns true if an {@link Extension} with the given name exists on the document, otherwise false.
   */
  hasExtension(extensionName: string): boolean;
  /**
   * Creates a new {@link Extension}, for the extension type of the given constructor. If the
   * extension is already enabled for this Document, the previous Extension reference is reused.
   */
  createExtension<T extends Extension>(ctor: new (doc: Document) => T): T;
  /**
   * Disables and removes an {@link Extension} from the Document. If no Extension exists with
   * the given name, this method has no effect.
   */
  disposeExtension(extensionName: string): void;
  /**********************************************************************************************
   * Property factory methods.
   */
  /** Creates a new {@link Scene} attached to this document's {@link Root}. */
  createScene(name?: string): Scene;
  /** Creates a new {@link Node} attached to this document's {@link Root}. */
  createNode(name?: string): Node;
  /** Creates a new {@link Camera} attached to this document's {@link Root}. */
  createCamera(name?: string): Camera;
  /** Creates a new {@link Skin} attached to this document's {@link Root}. */
  createSkin(name?: string): Skin;
  /** Creates a new {@link Mesh} attached to this document's {@link Root}. */
  createMesh(name?: string): Mesh;
  /**
   * Creates a new {@link Primitive}. Primitives must be attached to a {@link Mesh}
   * for use and export; they are not otherwise associated with a {@link Root}.
   */
  createPrimitive(): Primitive;
  /**
   * Creates a new {@link PrimitiveTarget}, or morph target. Targets must be attached to a
   * {@link Primitive} for use and export; they are not otherwise associated with a {@link Root}.
   */
  createPrimitiveTarget(name?: string): PrimitiveTarget;
  /** Creates a new {@link Material} attached to this document's {@link Root}. */
  createMaterial(name?: string): Material;
  /** Creates a new {@link Texture} attached to this document's {@link Root}. */
  createTexture(name?: string): Texture;
  /** Creates a new {@link Animation} attached to this document's {@link Root}. */
  createAnimation(name?: string): Animation;
  /**
   * Creates a new {@link AnimationChannel}. Channels must be attached to an {@link Animation}
   * for use and export; they are not otherwise associated with a {@link Root}.
   */
  createAnimationChannel(name?: string): AnimationChannel;
  /**
   * Creates a new {@link AnimationSampler}. Samplers must be attached to an {@link Animation}
   * for use and export; they are not otherwise associated with a {@link Root}.
   */
  createAnimationSampler(name?: string): AnimationSampler;
  /** Creates a new {@link Accessor} attached to this document's {@link Root}. */
  createAccessor(name?: string, buffer?: Buffer | null): Accessor;
  /** Creates a new {@link Buffer} attached to this document's {@link Root}. */
  createBuffer(name?: string): Buffer;
}
//#endregion
export { Accessor, Animation, AnimationChannel, AnimationSampler, Buffer, BufferUtils, COPY_IDENTITY, Camera, ColorUtils, ComponentTypeToTypedArray, DenoIO, Document, ExtensibleProperty, Extension, ExtensionProperty, FileUtils, Format, GLB_BUFFER, type GLTF, Graph, GraphEdge, HTTPUtils, type ILogger, type IProperty$1 as IProperty, ImageUtils, type ImageUtilsFormat, type JSONDocument, Logger, Material, MathUtils, Mesh, Node, NodeIO, type Nullable, PlatformIO, Primitive, PrimitiveTarget, Property, type PropertyResolver, PropertyType, ReaderContext, type Ref, RefList, RefMap, RefSet, Root, Scene, Skin, Texture, TextureChannel, TextureInfo, type Transform, type TransformContext, type TypedArray, type TypedArrayConstructor, VERSION, Verbosity, VertexLayout, WebIO, WriterContext, type bbox, getBounds, type mat3, type mat4, uuid, type vec2, type vec3, type vec4 };