/** * An optional glTF extension which replaces normal mesh creation for primitives it handles and * creates an aligned resource collection on the parse result. */ export type GlbResourceExtension = { /** * - The glTF extension name. */ name: string; /** * - Name of the property populated on the parsed resources. */ resourceName: string; /** * - Returns true when the extension * handles the primitive instead of the normal mesh path. */ handlesPrimitive: (primitive: object) => boolean; /** * - * Creates resources for all matching primitives. */ createResources: (device: GraphicsDevice, gltf: object, bufferViews: Uint8Array[]) => any; }; /** * @param {object} handler - The container resource handler. * @ignore */ export function initializeGlbResourceExtensions(handler: object): void; /** * @param {object} handler - The container resource handler. * @param {GlbResourceExtension} extension - The extension implementation. * @returns {boolean} True if the handler supports glTF resource extensions. * @ignore */ export function registerGlbResourceExtension(handler: object, extension: GlbResourceExtension): boolean; /** * @param {object} handler - The container resource handler. * @param {string} name - The glTF extension name. * @ignore */ export function unregisterGlbResourceExtension(handler: object, name: string): void; /** * @param {object} handler - The container resource handler. * @returns {GlbResourceExtension[]} The registered extensions. * @ignore */ export function getGlbResourceExtensions(handler: object): GlbResourceExtension[]; import type { GraphicsDevice } from '../../platform/graphics/graphics-device.js';