angular-three-soba 4.0.8 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-three-soba-loaders.mjs","sources":["../../../../libs/soba/loaders/src/lib/fbx-resource.ts","../../../../libs/soba/loaders/src/lib/fbx-loader.ts","../../../../libs/soba/loaders/src/lib/font-resource.ts","../../../../libs/soba/loaders/src/lib/font-loader.ts","../../../../libs/soba/loaders/src/lib/gltf-loader.ts","../../../../libs/soba/loaders/src/lib/gltf-resource.ts","../../../../libs/soba/loaders/src/lib/progress.ts","../../../../libs/soba/loaders/src/lib/loader.ts","../../../../libs/soba/loaders/src/lib/texture-loader.ts","../../../../libs/soba/loaders/src/lib/texture-resource.ts","../../../../libs/soba/loaders/src/angular-three-soba-loaders.ts"],"sourcesContent":["import { Injector } from '@angular/core';\nimport { loaderResource } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { FBXLoader } from 'three-stdlib';\n\n/**\n * Creates a resource for loading FBX 3D models using Angular's resource API.\n *\n * This function wraps the FBXLoader from three-stdlib and provides a reactive\n * resource-based approach to loading FBX files. It supports loading single files,\n * arrays of files, or record objects mapping keys to URLs.\n *\n * @param input - Signal of the URL(s) of the FBX file(s) to load\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded FBX Group(s)\n *\n * @example\n * ```typescript\n * // Single file\n * const fbx = fbxResource(() => '/models/character.fbx');\n * // Access: fbx.value()\n *\n * // Multiple files\n * const fbxs = fbxResource(() => ['/models/a.fbx', '/models/b.fbx']);\n *\n * // Named files\n * const models = fbxResource(() => ({ hero: '/models/hero.fbx', enemy: '/models/enemy.fbx' }));\n * ```\n */\nexport function fbxResource<TUrl extends string | string[] | Record<string, string>>(\n\tinput: () => TUrl,\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(fbxResource, injector, () => {\n\t\treturn loaderResource(() => FBXLoader, input);\n\t});\n}\n\n/**\n * Preloads FBX models into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the FBX file(s) to preload\n *\n * @example\n * ```typescript\n * // Preload a single model\n * fbxResource.preload('/models/character.fbx');\n *\n * // Preload multiple models\n * fbxResource.preload(['/models/a.fbx', '/models/b.fbx']);\n * ```\n */\nfbxResource.preload = <TUrl extends string | string[] | Record<string, string>>(input: TUrl) => {\n\tloaderResource.preload(FBXLoader, input);\n};\n","import { Injector } from '@angular/core';\nimport { injectLoader } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { FBXLoader } from 'three-stdlib';\nimport { fbxResource } from './fbx-resource';\n\n/**\n * Loads FBX models using the FBXLoader from three-stdlib.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the URL(s) of the FBX file(s) to load\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A readonly signal containing the loaded FBX Group(s)\n */\nfunction _injectFBX<TUrl extends string | string[] | Record<string, string>>(\n\tinput: () => TUrl,\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(_injectFBX, injector, () => {\n\t\tconst resource = fbxResource(input, { injector });\n\t\treturn resource.value.asReadonly();\n\t});\n}\n\n_injectFBX.preload = <TUrl extends string | string[] | Record<string, string>>(input: () => TUrl) => {\n\tinjectLoader.preload(() => FBXLoader, input);\n};\n\n/**\n * Type definition for the injectFBX function, including its static preload method.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n */\nexport type NgtsFBXLoader = typeof _injectFBX;\n\n/**\n * Injectable function for loading FBX 3D models.\n *\n * Supports loading single files, arrays of files, or record objects mapping keys to URLs.\n * Includes a static `preload` method for preloading assets.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Single file\n * const fbx = injectFBX(() => '/models/character.fbx');\n *\n * // Multiple files\n * const fbxs = injectFBX(() => ['/models/a.fbx', '/models/b.fbx']);\n *\n * // Preload\n * injectFBX.preload(() => '/models/character.fbx');\n * ```\n */\nexport const injectFBX: NgtsFBXLoader = _injectFBX;\n","import { Injector, resource } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { Font, FontLoader } from 'three-stdlib';\n\n/**\n * Represents a single glyph in a font.\n */\ntype Glyph = {\n\t/** Cached outline paths for the glyph */\n\t_cachedOutline: string[];\n\t/** Horizontal advance width */\n\tha: number;\n\t/** Outline path data */\n\to: string;\n};\n\n/**\n * Font data structure compatible with typeface.js format.\n */\ntype FontData = {\n\t/** Bounding box dimensions */\n\tboundingBox: {\n\t\t/** Maximum Y coordinate */\n\t\tyMax: number;\n\t\t/** Minimum Y coordinate */\n\t\tyMin: number;\n\t};\n\t/** Font family name */\n\tfamilyName: string;\n\t/** Map of character codes to glyph data */\n\tglyphs: {\n\t\t[k: string]: Glyph;\n\t};\n\t/** Font resolution in units per em */\n\tresolution: number;\n\t/** Thickness of underline stroke */\n\tunderlineThickness: number;\n};\n\n/**\n * Input type for font loading functions.\n * Can be either a URL string pointing to a typeface.js JSON file,\n * or a pre-loaded FontData object.\n */\nexport type NgtsFontInput = string | FontData;\n\nlet fontLoader: FontLoader | null = null;\n\nasync function loadFontData(font: NgtsFontInput): Promise<FontData> {\n\treturn typeof font === 'string' ? await (await fetch(font)).json() : font;\n}\n\nfunction parseFontData(fontData: FontData) {\n\tif (!fontLoader) {\n\t\tfontLoader = new FontLoader();\n\t}\n\treturn fontLoader.parse(fontData);\n}\n\nconst cache = new Map<NgtsFontInput, Font>();\n\n/**\n * Creates a resource for loading font files for use with Three.js TextGeometry.\n *\n * This function provides a reactive resource-based approach to loading fonts.\n * It supports loading from URLs (typeface.js JSON format) or pre-loaded font data.\n * Results are cached for efficient reuse.\n *\n * @param input - Signal of the font URL or font data object\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded Font instance\n *\n * @example\n * ```typescript\n * // Load font from URL\n * const font = fontResource(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Use in template or effect\n * effect(() => {\n * const f = font.value();\n * if (f) {\n * const geometry = new TextGeometry('Hello', { font: f, size: 1 });\n * }\n * });\n * ```\n */\nexport function fontResource(input: () => NgtsFontInput, { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(fontResource, injector, () => {\n\t\treturn resource({\n\t\t\tparams: input,\n\t\t\tloader: async ({ params }) => {\n\t\t\t\tif (cache.has(params)) {\n\t\t\t\t\treturn cache.get(params) as Font;\n\t\t\t\t}\n\n\t\t\t\tconst fontData = await loadFontData(params);\n\t\t\t\tconst parsed = parseFontData(fontData);\n\t\t\t\tcache.set(params, parsed);\n\t\t\t\treturn parsed;\n\t\t\t},\n\t\t});\n\t});\n}\n\n/**\n * Preloads a font into the cache for faster subsequent loading.\n *\n * @param input - The font URL or font data to preload\n *\n * @example\n * ```typescript\n * // Preload font before component renders\n * fontResource.preload('/fonts/helvetiker_regular.typeface.json');\n * ```\n */\nfontResource.preload = (input: NgtsFontInput) => {\n\tloadFontData(input).then((data) => {\n\t\tconst parsed = parseFontData(data);\n\t\tcache.set(input, parsed);\n\t});\n};\n\n/**\n * Clears cached font data.\n *\n * @param input - Optional font URL or data to clear from cache.\n * If not provided, clears all cached fonts.\n *\n * @example\n * ```typescript\n * // Clear specific font\n * fontResource.clear('/fonts/helvetiker_regular.typeface.json');\n *\n * // Clear all cached fonts\n * fontResource.clear();\n * ```\n */\nfontResource.clear = (input?: NgtsFontInput) => {\n\tif (input) {\n\t\tcache.delete(input);\n\t} else {\n\t\tcache.clear();\n\t}\n};\n","import { Injector } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { fontResource, type NgtsFontInput } from './font-resource';\n\n/**\n * Injectable function for loading font files for use with TextGeometry.\n *\n * Loads JSON font files (typeface.js format) or accepts pre-loaded font data.\n * Includes static `preload` and `clear` methods for cache management.\n *\n * @deprecated Use fontResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the font URL or font data object\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A readonly signal containing the loaded Font instance\n *\n * @example\n * ```typescript\n * // Load font from URL\n * const font = injectFont(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Preload font\n * injectFont.preload(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Clear cached font\n * injectFont.clear(() => '/fonts/helvetiker_regular.typeface.json');\n * ```\n */\nexport function injectFont(input: () => NgtsFontInput, { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(injectFont, injector, () => {\n\t\tconst resource = fontResource(input, { injector });\n\t\treturn resource.value.asReadonly();\n\t});\n}\n\n/**\n * Preloads a font into the cache for faster subsequent loading.\n *\n * @param input - Signal of the font URL or font data to preload\n */\ninjectFont.preload = (input: () => NgtsFontInput) => {\n\tfontResource.preload(input());\n};\n\n/**\n * Clears cached font data.\n *\n * @param input - Optional Signal of the font to clear. If not provided, clears all cached fonts.\n */\ninjectFont.clear = (input?: () => NgtsFontInput) => {\n\tfontResource.clear(input?.());\n};\n","import { computed, Injector, Signal } from '@angular/core';\nimport { injectLoader, NgtLoaderResults, NgtObjectMap } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { DRACOLoader, GLTF, GLTFLoader, MeshoptDecoder } from 'three-stdlib';\n\nlet dracoLoader: DRACOLoader | null = null;\nlet decoderPath = 'https://www.gstatic.com/draco/versioned/decoders/1.5.5/';\n\nfunction _extensions(useDraco: boolean | string, useMeshOpt: boolean, extensions?: (loader: GLTFLoader) => void) {\n\treturn (loader: THREE.Loader) => {\n\t\tif (extensions) {\n\t\t\textensions(loader as GLTFLoader);\n\t\t}\n\n\t\tif (useDraco) {\n\t\t\tif (!dracoLoader) {\n\t\t\t\tdracoLoader = new DRACOLoader();\n\t\t\t}\n\n\t\t\tdracoLoader.setDecoderPath(typeof useDraco === 'string' ? useDraco : decoderPath);\n\t\t\t(loader as GLTFLoader).setDRACOLoader(dracoLoader);\n\t\t}\n\t\tif (useMeshOpt) {\n\t\t\t(loader as GLTFLoader).setMeshoptDecoder(\n\t\t\t\ttypeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder,\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * Maps a GLTF type to its corresponding URL input type.\n */\ntype InjectGLTFUrl<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF\n\t? string\n\t: TGltf extends GLTF[]\n\t\t? string[]\n\t\t: TGltf extends Record<string, GLTF>\n\t\t\t? Record<string, string>\n\t\t\t: never;\n\n/**\n * Maps a GLTF type to its result type with NgtObjectMap for easy access to nodes and materials.\n */\ntype InjectGLTFObjectMap<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF\n\t? TGltf & NgtObjectMap\n\t: TGltf extends Array<infer _GLTF extends GLTF>\n\t\t? Array<_GLTF & NgtObjectMap>\n\t\t: TGltf extends Record<string, infer _GLTF extends GLTF>\n\t\t\t? Record<string, _GLTF & NgtObjectMap>\n\t\t\t: never;\n\n/**\n * Loads GLTF/GLB 3D models with support for Draco compression and Meshopt optimization.\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n */\nfunction _injectGLTF<\n\tTGltf extends GLTF | GLTF[] | Record<string, GLTF> = GLTF,\n\tTUrl extends string | string[] | Record<string, string> = InjectGLTFUrl<TGltf>,\n>(\n\tpath: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\tinjector,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\tuseDraco?: boolean | string;\n\t\tuseMeshOpt?: boolean;\n\t\tinjector?: Injector;\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\tonLoad?: (data: InjectGLTFObjectMap<TGltf>) => void;\n\t} = {},\n): Signal<InjectGLTFObjectMap<TGltf> | null> & { scene: Signal<GLTF['scene'] | null> } {\n\treturn assertInjector(_injectGLTF, injector, () => {\n\t\tconst result = injectLoader(() => GLTFLoader, path, {\n\t\t\textensions: _extensions(useDraco, useMeshOpt, extensions),\n\t\t\t// @ts-expect-error - we know the type of the data\n\t\t\tonLoad,\n\t\t});\n\n\t\tObject.defineProperty(result, 'scene', {\n\t\t\tvalue: computed(() => {\n\t\t\t\tconst gltf = result() as unknown as GLTF;\n\t\t\t\tif (!gltf) return null;\n\t\t\t\treturn gltf.scene;\n\t\t\t}),\n\t\t});\n\n\t\treturn result;\n\t}) as Signal<InjectGLTFObjectMap<TGltf> | null> & { scene: Signal<GLTF['scene'] | null> };\n}\n\n_injectGLTF.preload = <TUrl extends string | string[] | Record<string, string>>(\n\tpath: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\tuseDraco?: boolean | string;\n\t\tuseMeshOpt?: boolean;\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\tonLoad?: (data: NgtLoaderResults<TUrl, GLTF & NgtObjectMap>) => void;\n\t} = {},\n) => {\n\tinjectLoader.preload(\n\t\t() => GLTFLoader,\n\t\tpath,\n\t\t_extensions(useDraco, useMeshOpt, extensions) as any,\n\t\t// @ts-expect-error - we know the type of the data\n\t\tonLoad,\n\t);\n};\n\n_injectGLTF.setDecoderPath = (path: string) => {\n\tdecoderPath = path;\n};\n\n/**\n * Type definition for the injectGLTF function, including its static methods.\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n */\nexport type NgtsGLTFLoader = typeof _injectGLTF;\n\n/**\n * Injectable function for loading GLTF/GLB 3D models.\n *\n * Supports Draco compression and Meshopt optimization out of the box.\n * Returns a signal with the loaded GLTF data including an NgtObjectMap\n * for easy access to nodes and materials by name.\n *\n * Includes static methods:\n * - `preload`: Preload models into cache\n * - `setDecoderPath`: Set custom Draco decoder path\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Basic usage\n * const gltf = injectGLTF(() => '/models/robot.glb');\n *\n * // With typed nodes\n * interface RobotGLTF extends GLTF {\n * nodes: { Head: THREE.Mesh; Body: THREE.Mesh };\n * }\n * const robot = injectGLTF<RobotGLTF>(() => '/models/robot.glb');\n *\n * // Access scene directly\n * const scene = gltf.scene;\n *\n * // Preload\n * injectGLTF.preload(() => '/models/robot.glb');\n * ```\n */\nexport const injectGLTF: NgtsGLTFLoader = _injectGLTF;\n","import { computed, Injector, ResourceRef, Signal } from '@angular/core';\nimport { loaderResource, type NgtObjectMap } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { DRACOLoader, type GLTF, GLTFLoader, MeshoptDecoder } from 'three-stdlib';\n\nlet dracoLoader: DRACOLoader | null = null;\nlet decoderPath = 'https://www.gstatic.com/draco/versioned/decoders/1.5.5/';\n\n/**\n * Maps a GLTF type to its corresponding URL input type.\n */\ntype GLTFUrl<TGLTF extends GLTF | GLTF[] | Record<string, GLTF>> = TGLTF extends GLTF\n\t? string\n\t: TGLTF extends GLTF[]\n\t\t? string[]\n\t\t: TGLTF extends Record<string, GLTF>\n\t\t\t? Record<string, string>\n\t\t\t: never;\n\n/**\n * Maps a GLTF type to its result type with NgtObjectMap for easy access to nodes and materials.\n */\ntype GLTFObjectMap<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF>,\n\tTUrl extends string | string[] | Record<string, string>,\n> = [TGLTF, TUrl] extends [GLTF, string]\n\t? TGLTF & NgtObjectMap\n\t: [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]]\n\t\t? Array<_GLTF & NgtObjectMap>\n\t\t: [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>]\n\t\t\t? { [Key in keyof TGLTF]: _GLTF & NgtObjectMap }\n\t\t\t: [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>]\n\t\t\t\t? TUrl extends string[]\n\t\t\t\t\t? Array<TGLTF & NgtObjectMap>\n\t\t\t\t\t: { [K in keyof TUrl]: TGLTF & NgtObjectMap }\n\t\t\t\t: never;\n\n/**\n * Maps a GLTF type to its scene type(s).\n */\ntype GLTFObjectSceneMap<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF>,\n\tTUrl extends string | string[] | Record<string, string>,\n> = [TGLTF, TUrl] extends [GLTF, string]\n\t? GLTF['scene']\n\t: [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]]\n\t\t? Array<_GLTF['scene']>\n\t\t: [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>]\n\t\t\t? { [Key in keyof TGLTF]: _GLTF['scene'] }\n\t\t\t: [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>]\n\t\t\t\t? TUrl extends string[]\n\t\t\t\t\t? Array<GLTF['scene']>\n\t\t\t\t\t: { [K in keyof TUrl]: GLTF['scene'] }\n\t\t\t\t: never;\n\nfunction _extensions(useDraco: boolean | string, useMeshOpt: boolean, extensions?: (loader: GLTFLoader) => void) {\n\treturn (loader: THREE.Loader) => {\n\t\tif (extensions) {\n\t\t\textensions(loader as GLTFLoader);\n\t\t}\n\n\t\tif (useDraco) {\n\t\t\tif (!dracoLoader) {\n\t\t\t\tdracoLoader = new DRACOLoader();\n\t\t\t}\n\n\t\t\tdracoLoader.setDecoderPath(typeof useDraco === 'string' ? useDraco : decoderPath);\n\t\t\t(loader as GLTFLoader).setDRACOLoader(dracoLoader);\n\t\t}\n\t\tif (useMeshOpt) {\n\t\t\t(loader as GLTFLoader).setMeshoptDecoder(\n\t\t\t\ttypeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder,\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * Creates a resource for loading GLTF/GLB 3D models using Angular's resource API.\n *\n * This function wraps the GLTFLoader from three-stdlib and provides a reactive\n * resource-based approach to loading GLTF files. It supports Draco compression\n * and Meshopt optimization out of the box.\n *\n * The returned resource includes a `scene` computed signal for direct access to\n * the loaded scene(s).\n *\n * @param input - Signal of the URL(s) of the GLTF/GLB file(s) to load\n * @param options - Configuration options\n * @param options.useDraco - Enable Draco compression support. Pass a string to specify custom decoder path\n * @param options.useMeshOpt - Enable Meshopt optimization support\n * @param options.injector - Optional injector for dependency injection context\n * @param options.extensions - Custom extensions callback for the GLTFLoader\n * @param options.onLoad - Callback fired when loading completes\n * @returns A ResourceRef containing the loaded GLTF data with a `scene` signal\n *\n * @example\n * ```typescript\n * // Basic usage\n * const gltf = gltfResource(() => '/models/robot.glb');\n *\n * // With typed nodes\n * interface RobotGLTF extends GLTF {\n * nodes: { Head: THREE.Mesh; Body: THREE.Mesh };\n * }\n * const robot = gltfResource<RobotGLTF>(() => '/models/robot.glb');\n *\n * // Access scene directly via computed signal\n * effect(() => {\n * const scene = robot.scene();\n * if (scene) { ... }\n * });\n *\n * // Disable Draco\n * const gltf = gltfResource(() => '/models/simple.glb', { useDraco: false });\n * ```\n */\nexport function gltfResource<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF> = GLTF,\n\tTUrl extends string | string[] | Record<string, string> = GLTFUrl<TGLTF>,\n>(\n\tinput: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\tinjector,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\t/** Enable Draco compression. Pass string for custom decoder path. @default true */\n\t\tuseDraco?: boolean | string;\n\t\t/** Enable Meshopt optimization. @default true */\n\t\tuseMeshOpt?: boolean;\n\t\t/** Optional injector for DI context */\n\t\tinjector?: Injector;\n\t\t/** Custom extensions callback for GLTFLoader */\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\t/** Callback fired when loading completes */\n\t\tonLoad?: (data: GLTFObjectMap<TGLTF, TUrl>) => void;\n\t} = {},\n) {\n\treturn assertInjector(gltfResource, injector, () => {\n\t\tconst resource = loaderResource(() => GLTFLoader, input, {\n\t\t\textensions: _extensions(useDraco, useMeshOpt, extensions),\n\t\t\t// @ts-expect-error - we know the type of the data\n\t\t\tonLoad,\n\t\t}) as ResourceRef<GLTFObjectMap<TGLTF, TUrl> | undefined> & {\n\t\t\tscene: Signal<GLTFObjectSceneMap<TGLTF, TUrl> | null>;\n\t\t};\n\n\t\tObject.defineProperty(resource, 'scene', {\n\t\t\tvalue: computed(() => {\n\t\t\t\tconst data = resource.value();\n\t\t\t\tif (!data) return null;\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\treturn data.map((item) => item.scene);\n\t\t\t\t}\n\t\t\t\tif ('parser' in data) {\n\t\t\t\t\treturn data.scene;\n\t\t\t\t}\n\t\t\t\treturn Object.keys(data).reduce(\n\t\t\t\t\t(acc, key) => {\n\t\t\t\t\t\tacc[key] = data[key as keyof typeof data].scene;\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{} as Record<string, THREE.Group>,\n\t\t\t\t);\n\t\t\t}),\n\t\t});\n\n\t\treturn resource;\n\t});\n}\n\n/**\n * Preloads GLTF/GLB models into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the GLTF/GLB file(s) to preload\n * @param options - Configuration options\n * @param options.useDraco - Enable Draco compression support\n * @param options.useMeshOpt - Enable Meshopt optimization support\n * @param options.extensions - Custom extensions callback for the GLTFLoader\n *\n * @example\n * ```typescript\n * // Preload a model\n * gltfResource.preload('/models/robot.glb');\n *\n * // Preload with custom Draco decoder path\n * gltfResource.preload('/models/robot.glb', { useDraco: '/draco/' });\n * ```\n */\ngltfResource.preload = <TUrl extends string | string[] | Record<string, string>>(\n\tinput: TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\textensions,\n\t}: {\n\t\t/** Enable Draco compression. Pass string for custom decoder path. @default true */\n\t\tuseDraco?: boolean | string;\n\t\t/** Enable Meshopt optimization. @default true */\n\t\tuseMeshOpt?: boolean;\n\t\t/** Custom extensions callback for GLTFLoader */\n\t\textensions?: (loader: GLTFLoader) => void;\n\t} = {},\n) => {\n\tloaderResource.preload(GLTFLoader, input, _extensions(useDraco, useMeshOpt, extensions));\n};\n\n/**\n * Sets the global Draco decoder path for all subsequent GLTF loads.\n *\n * @param path - The URL path to the Draco decoder files\n *\n * @example\n * ```typescript\n * // Use local Draco decoder files\n * gltfResource.setDecoderPath('/draco/');\n * ```\n */\ngltfResource.setDecoderPath = (path: string) => {\n\tdecoderPath = path;\n};\n","import { DestroyRef, inject, Injector } from '@angular/core';\nimport { signalState } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Creates a reactive state object that tracks Three.js asset loading progress.\n *\n * This function hooks into THREE.DefaultLoadingManager to monitor all asset\n * loading operations and provides reactive signals for progress tracking.\n * The state includes progress percentage, active status, error tracking, and\n * details about the currently loading item.\n *\n * The loading manager hooks are automatically cleaned up when the injection\n * context is destroyed.\n *\n * @param injector - Optional injector for dependency injection context\n * @returns A signal state object with the following properties:\n * - `errors`: Array of URLs that failed to load\n * - `active`: Whether loading is currently in progress\n * - `progress`: Loading progress percentage (0-100)\n * - `item`: URL of the currently loading item\n * - `loaded`: Number of items loaded\n * - `total`: Total number of items to load\n *\n * @example\n * ```typescript\n * // In a component or service\n * const loadingState = progress();\n *\n * effect(() => {\n * if (loadingState.active()) {\n * console.log(`Loading: ${loadingState.progress()}%`);\n * }\n * });\n *\n * // Check for errors\n * effect(() => {\n * const errors = loadingState.errors();\n * if (errors.length > 0) {\n * console.error('Failed to load:', errors);\n * }\n * });\n * ```\n */\nexport function progress(injector?: Injector) {\n\treturn assertInjector(progress, injector, () => {\n\t\tconst progressState = signalState<{\n\t\t\terrors: string[];\n\t\t\tactive: boolean;\n\t\t\tprogress: number;\n\t\t\titem: string;\n\t\t\tloaded: number;\n\t\t\ttotal: number;\n\t\t}>({ errors: [], active: false, progress: 0, item: '', loaded: 0, total: 0 });\n\n\t\tconst defaultOnStart = THREE.DefaultLoadingManager.onStart?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnLoad = THREE.DefaultLoadingManager.onLoad?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnError = THREE.DefaultLoadingManager.onError?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnProgress = THREE.DefaultLoadingManager.onProgress?.bind(THREE.DefaultLoadingManager);\n\n\t\tlet saveLastTotalLoaded = 0;\n\n\t\tTHREE.DefaultLoadingManager.onStart = (item, loaded, total) => {\n\t\t\tprogressState.update({\n\t\t\t\tactive: true,\n\t\t\t\titem,\n\t\t\t\tloaded,\n\t\t\t\ttotal,\n\t\t\t\tprogress: ((loaded - saveLastTotalLoaded) / (total - saveLastTotalLoaded)) * 100,\n\t\t\t});\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onLoad = () => {\n\t\t\tprogressState.update({ active: false });\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onError = (url) => {\n\t\t\tprogressState.update((prev) => ({ errors: [...prev.errors, url] }));\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onProgress = (item, loaded, total) => {\n\t\t\tif (loaded === total) saveLastTotalLoaded = total;\n\n\t\t\tprogressState.update({\n\t\t\t\titem,\n\t\t\t\tloaded,\n\t\t\t\ttotal,\n\t\t\t\tprogress: ((loaded - saveLastTotalLoaded) / (total - saveLastTotalLoaded)) * 100 || 100,\n\t\t\t});\n\t\t};\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tTHREE.DefaultLoadingManager.onStart = defaultOnStart;\n\t\t\tTHREE.DefaultLoadingManager.onLoad = defaultOnLoad;\n\t\t\tTHREE.DefaultLoadingManager.onError = defaultOnError;\n\t\t\tTHREE.DefaultLoadingManager.onProgress = defaultOnProgress;\n\t\t});\n\n\t\treturn progressState;\n\t});\n}\n\n/**\n * Alias for the `progress` function.\n *\n * @deprecated Use `progress` instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @see {@link progress}\n */\nexport const injectProgress = progress;\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tsignal,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport { progress } from './progress';\n\nconst defaultDataInterpolation = (p: number) => `Loading ${p.toFixed(2)}%`;\n\n/**\n * Configuration options for the NgtsLoader component.\n */\nexport interface NgtsLoaderOptions {\n\t/**\n\t * CSS class to apply to the outer container element.\n\t * @default ''\n\t */\n\tcontainerClass?: string;\n\t/**\n\t * CSS class to apply to the inner wrapper element.\n\t * @default ''\n\t */\n\tinnerClass?: string;\n\t/**\n\t * CSS class to apply to the progress bar element.\n\t * @default ''\n\t */\n\tbarClass?: string;\n\t/**\n\t * CSS class to apply to the data/percentage text element.\n\t * @default ''\n\t */\n\tdataClass?: string;\n\t/**\n\t * Function to format the progress percentage display text.\n\t * @param value - Current progress value (0-100)\n\t * @returns Formatted string to display\n\t * @default (p) => `Loading ${p.toFixed(2)}%`\n\t */\n\tdataInterpolation: (value: number) => string;\n\t/**\n\t * Function to determine initial visibility state.\n\t * @param value - Current active loading state\n\t * @returns Whether the loader should be shown initially\n\t * @default (value) => value\n\t */\n\tinitialState: (value: boolean) => boolean;\n}\n\nconst defaultOptions: NgtsLoaderOptions = {\n\tcontainerClass: '',\n\tinnerClass: '',\n\tbarClass: '',\n\tdataClass: '',\n\tdataInterpolation: defaultDataInterpolation,\n\tinitialState: (value) => value,\n};\n\n/**\n * A loading indicator component that displays asset loading progress.\n *\n * This component automatically tracks Three.js asset loading progress using the\n * DefaultLoadingManager and displays an animated progress bar with percentage.\n *\n * The loader fades in when loading starts and fades out when complete.\n * CSS classes can be customized via options for styling flexibility.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <ngts-loader />\n *\n * <!-- With custom options -->\n * <ngts-loader [options]=\"{\n * containerClass: 'my-loader',\n * dataInterpolation: (p) => `${Math.round(p)}% loaded`\n * }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-loader',\n\ttemplate: `\n\t\t@if (shown()) {\n\t\t\t<div\n\t\t\t\tclass=\"ngts-loader-container\"\n\t\t\t\t[class]=\"containerClass() || ''\"\n\t\t\t\t[style.--ngts-loader-container-opacity]=\"active() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<div class=\"ngts-loader-inner\" [class]=\"innerClass() || ''\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"ngts-loader-bar\"\n\t\t\t\t\t\t\t[class]=\"barClass() || ''\"\n\t\t\t\t\t\t\t[style.--ngts-loader-bar-scale]=\"progress() / 100\"\n\t\t\t\t\t\t></div>\n\t\t\t\t\t\t<span #progressSpanRef class=\"ngts-loader-data\" [class]=\"dataClass() || ''\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t`,\n\tstyleUrls: ['./loader.css'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsLoader {\n\tprivate progressState = progress();\n\n\tprotected active = this.progressState.active;\n\tprotected progress = this.progressState.progress;\n\n\t/**\n\t * Configuration options for the loader appearance and behavior.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprotected containerClass = pick(this.options, 'containerClass');\n\tprotected innerClass = pick(this.options, 'innerClass');\n\tprotected barClass = pick(this.options, 'barClass');\n\tprotected dataClass = pick(this.options, 'dataClass');\n\tprivate initialState = pick(this.options, 'initialState');\n\tprivate dataInterpolation = pick(this.options, 'dataInterpolation');\n\n\tprivate progressSpanRef = viewChild<ElementRef<HTMLSpanElement>>('progressSpanRef');\n\n\tprotected shown = signal(this.initialState()(this.active()));\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst [active, lastShown] = [this.active(), untracked(this.shown)];\n\t\t\tif (lastShown !== active) {\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tthis.shown.set(active);\n\t\t\t\t}, 300);\n\t\t\t\tonCleanup(() => clearTimeout(timeoutId));\n\t\t\t}\n\t\t});\n\n\t\tlet progressRef = 0;\n\t\tlet rafId: ReturnType<typeof requestAnimationFrame>;\n\t\teffect((onCleanup) => {\n\t\t\tconst [dataInterpolation, progress] = [this.dataInterpolation(), this.progress()];\n\t\t\tconst updateProgress = () => {\n\t\t\t\tconst progressSpan = this.progressSpanRef()?.nativeElement;\n\t\t\t\tif (!progressSpan) return;\n\t\t\t\tprogressRef += (progress - progressRef) / 2;\n\t\t\t\tif (progressRef > 0.95 * progress || progress === 100) progressRef = progress;\n\t\t\t\tprogressSpan.innerText = dataInterpolation(progressRef);\n\t\t\t\tif (progressRef < progress) {\n\t\t\t\t\trafId = requestAnimationFrame(updateProgress);\n\t\t\t\t}\n\t\t\t};\n\t\t\tupdateProgress();\n\t\t\tonCleanup(() => cancelAnimationFrame(rafId));\n\t\t});\n\t}\n}\n","import { effect, Injector, Signal } from '@angular/core';\nimport { injectLoader, injectStore, is, NgtLoaderResults } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Loads texture images using THREE.TextureLoader.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the URL(s) of the texture(s) to load\n * @param options - Configuration options\n * @param options.onLoad - Callback fired when textures are loaded\n * @param options.injector - Optional injector for dependency injection context\n * @returns A signal containing the loaded texture(s)\n */\nfunction _injectTexture<TInput extends string[] | string | Record<string, string>>(\n\tinput: () => TInput,\n\t{ onLoad, injector }: { onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector } = {},\n): Signal<NgtLoaderResults<TInput, THREE.Texture> | null> {\n\treturn assertInjector(_injectTexture, injector, () => {\n\t\tconst store = injectStore();\n\t\tconst result = injectLoader(() => THREE.TextureLoader, input);\n\n\t\teffect(() => {\n\t\t\tconst textures = result();\n\t\t\tif (!textures) return;\n\t\t\tconst gl = store.snapshot.gl;\n\t\t\tif ('initTexture' in gl) {\n\t\t\t\tconst array = Array.isArray(textures)\n\t\t\t\t\t? textures\n\t\t\t\t\t: is.three<THREE.Texture>(textures, 'isTexture')\n\t\t\t\t\t\t? [textures]\n\t\t\t\t\t\t: Object.values(textures);\n\t\t\t\tif (onLoad) onLoad(array);\n\t\t\t\tarray.forEach(gl.initTexture.bind(gl));\n\t\t\t}\n\t\t});\n\n\t\treturn result;\n\t});\n}\n\n_injectTexture.preload = <TInput extends string[] | string | Record<string, string>>(input: () => TInput) => {\n\tinjectLoader.preload(() => THREE.TextureLoader, input);\n};\n\n/**\n * Type definition for the injectTexture function, including its static preload method.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n */\nexport type NgtsTextureLoader = typeof _injectTexture;\n\n/**\n * Injectable function for loading texture images.\n *\n * Loads textures using THREE.TextureLoader and automatically initializes them\n * with the WebGL renderer for optimal performance. Supports loading single textures,\n * arrays of textures, or record objects mapping keys to URLs.\n *\n * Includes a static `preload` method for preloading textures.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Single texture\n * const texture = injectTexture(() => '/textures/diffuse.jpg');\n *\n * // Multiple textures\n * const textures = injectTexture(() => ['/textures/diffuse.jpg', '/textures/normal.jpg']);\n *\n * // Named textures\n * const maps = injectTexture(() => ({\n * diffuse: '/textures/diffuse.jpg',\n * normal: '/textures/normal.jpg'\n * }));\n *\n * // Preload\n * injectTexture.preload(() => '/textures/diffuse.jpg');\n * ```\n */\nexport const injectTexture: NgtsTextureLoader = _injectTexture;\n","import { effect, Injector } from '@angular/core';\nimport { injectStore, is, loaderResource, NgtLoaderResults } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Creates a resource for loading texture images using Angular's resource API.\n *\n * This function wraps THREE.TextureLoader and provides a reactive resource-based\n * approach to loading textures. Loaded textures are automatically initialized\n * with the WebGL renderer for optimal performance.\n *\n * Supports loading single textures, arrays of textures, or record objects mapping\n * keys to URLs.\n *\n * @param input - Signal of the URL(s) of the texture(s) to load\n * @param options - Configuration options\n * @param options.onLoad - Callback fired when textures are loaded\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded texture(s)\n *\n * @example\n * ```typescript\n * // Single texture\n * const texture = textureResource(() => '/textures/diffuse.jpg');\n *\n * // Multiple textures\n * const textures = textureResource(() => ['/textures/diffuse.jpg', '/textures/normal.jpg']);\n *\n * // Named textures\n * const maps = textureResource(() => ({\n * diffuse: '/textures/diffuse.jpg',\n * normal: '/textures/normal.jpg'\n * }));\n *\n * // With onLoad callback\n * const texture = textureResource(() => '/textures/diffuse.jpg', {\n * onLoad: (tex) => console.log('Texture loaded:', tex)\n * });\n * ```\n */\nexport function textureResource<TUrl extends string[] | string | Record<string, string>>(\n\tinput: () => TUrl,\n\t{\n\t\tonLoad,\n\t\tinjector,\n\t}: {\n\t\t/** Callback fired when textures are loaded */\n\t\tonLoad?: (result: NgtLoaderResults<TUrl, THREE.Texture>) => void;\n\t\t/** Optional injector for DI context */\n\t\tinjector?: Injector;\n\t} = {},\n) {\n\treturn assertInjector(textureResource, injector, () => {\n\t\tconst store = injectStore();\n\t\tconst resource = loaderResource(() => THREE.TextureLoader, input);\n\n\t\teffect(() => {\n\t\t\tif (!resource.hasValue()) return;\n\t\t\tconst result = resource.value();\n\n\t\t\tif (onLoad) onLoad(result);\n\n\t\t\tconst gl = store.snapshot.gl;\n\t\t\tif ('initTexture' in gl) {\n\t\t\t\tlet textures: THREE.Texture[];\n\n\t\t\t\tif (Array.isArray(result)) {\n\t\t\t\t\ttextures = result;\n\t\t\t\t} else if (is.three<THREE.Texture>(result, 'isTexture')) {\n\t\t\t\t\ttextures = [result];\n\t\t\t\t} else {\n\t\t\t\t\ttextures = Object.values(result);\n\t\t\t\t}\n\n\t\t\t\ttextures.forEach(gl.initTexture.bind(gl));\n\t\t\t}\n\t\t});\n\n\t\treturn resource;\n\t});\n}\n\n/**\n * Preloads textures into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the texture(s) to preload\n *\n * @example\n * ```typescript\n * // Preload a single texture\n * textureResource.preload('/textures/diffuse.jpg');\n *\n * // Preload multiple textures\n * textureResource.preload(['/textures/diffuse.jpg', '/textures/normal.jpg']);\n * ```\n */\ntextureResource.preload = <TUrl extends string[] | string | Record<string, string>>(input: TUrl) => {\n\tloaderResource.preload(THREE.TextureLoader, input);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dracoLoader","decoderPath","_extensions"],"mappings":";;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACG,SAAU,WAAW,CAC1B,KAAiB,EACjB,EAAE,QAAQ,KAA8B,EAAE,EAAA;AAE1C,IAAA,OAAO,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAK;QACjD,OAAO,cAAc,CAAC,MAAM,SAAS,EAAE,KAAK,CAAC;AAC9C,IAAA,CAAC,CAAC;AACH;AAEA;;;;;;;;;;;;;AAaG;AACH,WAAW,CAAC,OAAO,GAAG,CAA0D,KAAW,KAAI;AAC9F,IAAA,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC;AACzC,CAAC;;ACjDD;;;;;;;;;;AAUG;AACH,SAAS,UAAU,CAClB,KAAiB,EACjB,EAAE,QAAQ,KAA8B,EAAE,EAAA;AAE1C,IAAA,OAAO,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAK;QAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC;AACjD,QAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,UAAU,EAAE;AACnC,IAAA,CAAC,CAAC;AACH;AAEA,UAAU,CAAC,OAAO,GAAG,CAA0D,KAAiB,KAAI;IACnG,YAAY,CAAC,OAAO,CAAC,MAAM,SAAS,EA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;AACH,eAAe,CAAC,OAAO,GAAG,CAA0D,KAAW,KAAI;IAClG,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;AACnD,CAAC;;ACnGD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-three-soba-loaders.mjs","sources":["../../../../libs/soba/loaders/src/lib/fbx-resource.ts","../../../../libs/soba/loaders/src/lib/fbx-loader.ts","../../../../libs/soba/loaders/src/lib/font-resource.ts","../../../../libs/soba/loaders/src/lib/font-loader.ts","../../../../libs/soba/loaders/src/lib/gltf-loader.ts","../../../../libs/soba/loaders/src/lib/gltf-resource.ts","../../../../libs/soba/loaders/src/lib/progress.ts","../../../../libs/soba/loaders/src/lib/loader.ts","../../../../libs/soba/loaders/src/lib/texture-loader.ts","../../../../libs/soba/loaders/src/lib/texture-resource.ts","../../../../libs/soba/loaders/src/angular-three-soba-loaders.ts"],"sourcesContent":["import { Injector } from '@angular/core';\nimport { loaderResource } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { FBXLoader } from 'three-stdlib';\n\n/**\n * Creates a resource for loading FBX 3D models using Angular's resource API.\n *\n * This function wraps the FBXLoader from three-stdlib and provides a reactive\n * resource-based approach to loading FBX files. It supports loading single files,\n * arrays of files, or record objects mapping keys to URLs.\n *\n * @param input - Signal of the URL(s) of the FBX file(s) to load\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded FBX Group(s)\n *\n * @example\n * ```typescript\n * // Single file\n * const fbx = fbxResource(() => '/models/character.fbx');\n * // Access: fbx.value()\n *\n * // Multiple files\n * const fbxs = fbxResource(() => ['/models/a.fbx', '/models/b.fbx']);\n *\n * // Named files\n * const models = fbxResource(() => ({ hero: '/models/hero.fbx', enemy: '/models/enemy.fbx' }));\n * ```\n */\nexport function fbxResource<TUrl extends string | string[] | Record<string, string>>(\n\tinput: () => TUrl,\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(fbxResource, injector, () => {\n\t\treturn loaderResource(() => FBXLoader, input);\n\t});\n}\n\n/**\n * Preloads FBX models into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the FBX file(s) to preload\n *\n * @example\n * ```typescript\n * // Preload a single model\n * fbxResource.preload('/models/character.fbx');\n *\n * // Preload multiple models\n * fbxResource.preload(['/models/a.fbx', '/models/b.fbx']);\n * ```\n */\nfbxResource.preload = <TUrl extends string | string[] | Record<string, string>>(input: TUrl) => {\n\tloaderResource.preload(FBXLoader, input);\n};\n","import { Injector } from '@angular/core';\nimport { injectLoader } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { FBXLoader } from 'three-stdlib';\nimport { fbxResource } from './fbx-resource';\n\n/**\n * Loads FBX models using the FBXLoader from three-stdlib.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the URL(s) of the FBX file(s) to load\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A readonly signal containing the loaded FBX Group(s)\n */\nfunction _injectFBX<TUrl extends string | string[] | Record<string, string>>(\n\tinput: () => TUrl,\n\t{ injector }: { injector?: Injector } = {},\n) {\n\treturn assertInjector(_injectFBX, injector, () => {\n\t\tconst resource = fbxResource(input, { injector });\n\t\treturn resource.value.asReadonly();\n\t});\n}\n\n_injectFBX.preload = <TUrl extends string | string[] | Record<string, string>>(input: () => TUrl) => {\n\tinjectLoader.preload(() => FBXLoader, input);\n};\n\n/**\n * Type definition for the injectFBX function, including its static preload method.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n */\nexport type NgtsFBXLoader = typeof _injectFBX;\n\n/**\n * Injectable function for loading FBX 3D models.\n *\n * Supports loading single files, arrays of files, or record objects mapping keys to URLs.\n * Includes a static `preload` method for preloading assets.\n *\n * @deprecated Use fbxResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Single file\n * const fbx = injectFBX(() => '/models/character.fbx');\n *\n * // Multiple files\n * const fbxs = injectFBX(() => ['/models/a.fbx', '/models/b.fbx']);\n *\n * // Preload\n * injectFBX.preload(() => '/models/character.fbx');\n * ```\n */\nexport const injectFBX: NgtsFBXLoader = _injectFBX;\n","import { Injector, resource } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { Font, FontLoader } from 'three-stdlib';\n\n/**\n * Represents a single glyph in a font.\n */\ntype Glyph = {\n\t/** Cached outline paths for the glyph */\n\t_cachedOutline: string[];\n\t/** Horizontal advance width */\n\tha: number;\n\t/** Outline path data */\n\to: string;\n};\n\n/**\n * Font data structure compatible with typeface.js format.\n */\ntype FontData = {\n\t/** Bounding box dimensions */\n\tboundingBox: {\n\t\t/** Maximum Y coordinate */\n\t\tyMax: number;\n\t\t/** Minimum Y coordinate */\n\t\tyMin: number;\n\t};\n\t/** Font family name */\n\tfamilyName: string;\n\t/** Map of character codes to glyph data */\n\tglyphs: {\n\t\t[k: string]: Glyph;\n\t};\n\t/** Font resolution in units per em */\n\tresolution: number;\n\t/** Thickness of underline stroke */\n\tunderlineThickness: number;\n};\n\n/**\n * Input type for font loading functions.\n * Can be either a URL string pointing to a typeface.js JSON file,\n * or a pre-loaded FontData object.\n */\nexport type NgtsFontInput = string | FontData;\n\nlet fontLoader: FontLoader | null = null;\n\nasync function loadFontData(font: NgtsFontInput): Promise<FontData> {\n\treturn typeof font === 'string' ? await (await fetch(font)).json() : font;\n}\n\nfunction parseFontData(fontData: FontData) {\n\tif (!fontLoader) {\n\t\tfontLoader = new FontLoader();\n\t}\n\treturn fontLoader.parse(fontData);\n}\n\nconst cache = new Map<NgtsFontInput, Font>();\n\n/**\n * Creates a resource for loading font files for use with Three.js TextGeometry.\n *\n * This function provides a reactive resource-based approach to loading fonts.\n * It supports loading from URLs (typeface.js JSON format) or pre-loaded font data.\n * Results are cached for efficient reuse.\n *\n * @param input - Signal of the font URL or font data object\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded Font instance\n *\n * @example\n * ```typescript\n * // Load font from URL\n * const font = fontResource(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Use in template or effect\n * effect(() => {\n * const f = font.value();\n * if (f) {\n * const geometry = new TextGeometry('Hello', { font: f, size: 1 });\n * }\n * });\n * ```\n */\nexport function fontResource(input: () => NgtsFontInput, { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(fontResource, injector, () => {\n\t\treturn resource({\n\t\t\tparams: input,\n\t\t\tloader: async ({ params }) => {\n\t\t\t\tif (cache.has(params)) {\n\t\t\t\t\treturn cache.get(params) as Font;\n\t\t\t\t}\n\n\t\t\t\tconst fontData = await loadFontData(params);\n\t\t\t\tconst parsed = parseFontData(fontData);\n\t\t\t\tcache.set(params, parsed);\n\t\t\t\treturn parsed;\n\t\t\t},\n\t\t});\n\t});\n}\n\n/**\n * Preloads a font into the cache for faster subsequent loading.\n *\n * @param input - The font URL or font data to preload\n *\n * @example\n * ```typescript\n * // Preload font before component renders\n * fontResource.preload('/fonts/helvetiker_regular.typeface.json');\n * ```\n */\nfontResource.preload = (input: NgtsFontInput) => {\n\tloadFontData(input).then((data) => {\n\t\tconst parsed = parseFontData(data);\n\t\tcache.set(input, parsed);\n\t});\n};\n\n/**\n * Clears cached font data.\n *\n * @param input - Optional font URL or data to clear from cache.\n * If not provided, clears all cached fonts.\n *\n * @example\n * ```typescript\n * // Clear specific font\n * fontResource.clear('/fonts/helvetiker_regular.typeface.json');\n *\n * // Clear all cached fonts\n * fontResource.clear();\n * ```\n */\nfontResource.clear = (input?: NgtsFontInput) => {\n\tif (input) {\n\t\tcache.delete(input);\n\t} else {\n\t\tcache.clear();\n\t}\n};\n","import { Injector } from '@angular/core';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport { fontResource, type NgtsFontInput } from './font-resource';\n\n/**\n * Injectable function for loading font files for use with TextGeometry.\n *\n * Loads JSON font files (typeface.js format) or accepts pre-loaded font data.\n * Includes static `preload` and `clear` methods for cache management.\n *\n * @deprecated Use fontResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the font URL or font data object\n * @param options - Configuration options\n * @param options.injector - Optional injector for dependency injection context\n * @returns A readonly signal containing the loaded Font instance\n *\n * @example\n * ```typescript\n * // Load font from URL\n * const font = injectFont(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Preload font\n * injectFont.preload(() => '/fonts/helvetiker_regular.typeface.json');\n *\n * // Clear cached font\n * injectFont.clear(() => '/fonts/helvetiker_regular.typeface.json');\n * ```\n */\nexport function injectFont(input: () => NgtsFontInput, { injector }: { injector?: Injector } = {}) {\n\treturn assertInjector(injectFont, injector, () => {\n\t\tconst resource = fontResource(input, { injector });\n\t\treturn resource.value.asReadonly();\n\t});\n}\n\n/**\n * Preloads a font into the cache for faster subsequent loading.\n *\n * @param input - Signal of the font URL or font data to preload\n */\ninjectFont.preload = (input: () => NgtsFontInput) => {\n\tfontResource.preload(input());\n};\n\n/**\n * Clears cached font data.\n *\n * @param input - Optional Signal of the font to clear. If not provided, clears all cached fonts.\n */\ninjectFont.clear = (input?: () => NgtsFontInput) => {\n\tfontResource.clear(input?.());\n};\n","import { computed, Injector, Signal } from '@angular/core';\nimport { injectLoader, NgtLoaderResults, NgtObjectMap } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { DRACOLoader, GLTF, GLTFLoader, MeshoptDecoder } from 'three-stdlib';\n\nlet dracoLoader: DRACOLoader | null = null;\nlet decoderPath = 'https://www.gstatic.com/draco/versioned/decoders/1.5.5/';\n\nfunction _extensions(useDraco: boolean | string, useMeshOpt: boolean, extensions?: (loader: GLTFLoader) => void) {\n\treturn (loader: THREE.Loader) => {\n\t\tif (extensions) {\n\t\t\textensions(loader as GLTFLoader);\n\t\t}\n\n\t\tif (useDraco) {\n\t\t\tif (!dracoLoader) {\n\t\t\t\tdracoLoader = new DRACOLoader();\n\t\t\t}\n\n\t\t\tdracoLoader.setDecoderPath(typeof useDraco === 'string' ? useDraco : decoderPath);\n\t\t\t(loader as GLTFLoader).setDRACOLoader(dracoLoader);\n\t\t}\n\t\tif (useMeshOpt) {\n\t\t\t(loader as GLTFLoader).setMeshoptDecoder(\n\t\t\t\ttypeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder,\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * Maps a GLTF type to its corresponding URL input type.\n */\ntype InjectGLTFUrl<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF\n\t? string\n\t: TGltf extends GLTF[]\n\t\t? string[]\n\t\t: TGltf extends Record<string, GLTF>\n\t\t\t? Record<string, string>\n\t\t\t: never;\n\n/**\n * Maps a GLTF type to its result type with NgtObjectMap for easy access to nodes and materials.\n */\ntype InjectGLTFObjectMap<TGltf extends GLTF | GLTF[] | Record<string, GLTF>> = TGltf extends GLTF\n\t? TGltf & NgtObjectMap\n\t: TGltf extends Array<infer _GLTF extends GLTF>\n\t\t? Array<_GLTF & NgtObjectMap>\n\t\t: TGltf extends Record<string, infer _GLTF extends GLTF>\n\t\t\t? Record<string, _GLTF & NgtObjectMap>\n\t\t\t: never;\n\n/**\n * Loads GLTF/GLB 3D models with support for Draco compression and Meshopt optimization.\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n */\nfunction _injectGLTF<\n\tTGltf extends GLTF | GLTF[] | Record<string, GLTF> = GLTF,\n\tTUrl extends string | string[] | Record<string, string> = InjectGLTFUrl<TGltf>,\n>(\n\tpath: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\tinjector,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\tuseDraco?: boolean | string;\n\t\tuseMeshOpt?: boolean;\n\t\tinjector?: Injector;\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\tonLoad?: (data: InjectGLTFObjectMap<TGltf>) => void;\n\t} = {},\n): Signal<InjectGLTFObjectMap<TGltf> | null> & { scene: Signal<GLTF['scene'] | null> } {\n\treturn assertInjector(_injectGLTF, injector, () => {\n\t\tconst result = injectLoader(() => GLTFLoader, path, {\n\t\t\textensions: _extensions(useDraco, useMeshOpt, extensions),\n\t\t\t// @ts-expect-error - we know the type of the data\n\t\t\tonLoad,\n\t\t});\n\n\t\tObject.defineProperty(result, 'scene', {\n\t\t\tvalue: computed(() => {\n\t\t\t\tconst gltf = result() as unknown as GLTF;\n\t\t\t\tif (!gltf) return null;\n\t\t\t\treturn gltf.scene;\n\t\t\t}),\n\t\t});\n\n\t\treturn result;\n\t}) as Signal<InjectGLTFObjectMap<TGltf> | null> & { scene: Signal<GLTF['scene'] | null> };\n}\n\n_injectGLTF.preload = <TUrl extends string | string[] | Record<string, string>>(\n\tpath: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\tuseDraco?: boolean | string;\n\t\tuseMeshOpt?: boolean;\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\tonLoad?: (data: NgtLoaderResults<TUrl, GLTF & NgtObjectMap>) => void;\n\t} = {},\n) => {\n\tinjectLoader.preload(\n\t\t() => GLTFLoader,\n\t\tpath,\n\t\t_extensions(useDraco, useMeshOpt, extensions) as any,\n\t\t// @ts-expect-error - we know the type of the data\n\t\tonLoad,\n\t);\n};\n\n_injectGLTF.setDecoderPath = (path: string) => {\n\tdecoderPath = path;\n};\n\n/**\n * Type definition for the injectGLTF function, including its static methods.\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n */\nexport type NgtsGLTFLoader = typeof _injectGLTF;\n\n/**\n * Injectable function for loading GLTF/GLB 3D models.\n *\n * Supports Draco compression and Meshopt optimization out of the box.\n * Returns a signal with the loaded GLTF data including an NgtObjectMap\n * for easy access to nodes and materials by name.\n *\n * Includes static methods:\n * - `preload`: Preload models into cache\n * - `setDecoderPath`: Set custom Draco decoder path\n *\n * @deprecated Use gltfResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Basic usage\n * const gltf = injectGLTF(() => '/models/robot.glb');\n *\n * // With typed nodes\n * interface RobotGLTF extends GLTF {\n * nodes: { Head: THREE.Mesh; Body: THREE.Mesh };\n * }\n * const robot = injectGLTF<RobotGLTF>(() => '/models/robot.glb');\n *\n * // Access scene directly\n * const scene = gltf.scene;\n *\n * // Preload\n * injectGLTF.preload(() => '/models/robot.glb');\n * ```\n */\nexport const injectGLTF: NgtsGLTFLoader = _injectGLTF;\n","import { computed, Injector, ResourceRef, Signal } from '@angular/core';\nimport { loaderResource, type NgtObjectMap } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\nimport { DRACOLoader, type GLTF, GLTFLoader, MeshoptDecoder } from 'three-stdlib';\n\nlet dracoLoader: DRACOLoader | null = null;\nlet decoderPath = 'https://www.gstatic.com/draco/versioned/decoders/1.5.5/';\n\n/**\n * Maps a GLTF type to its corresponding URL input type.\n */\ntype GLTFUrl<TGLTF extends GLTF | GLTF[] | Record<string, GLTF>> = TGLTF extends GLTF\n\t? string\n\t: TGLTF extends GLTF[]\n\t\t? string[]\n\t\t: TGLTF extends Record<string, GLTF>\n\t\t\t? Record<string, string>\n\t\t\t: never;\n\n/**\n * Maps a GLTF type to its result type with NgtObjectMap for easy access to nodes and materials.\n */\ntype GLTFObjectMap<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF>,\n\tTUrl extends string | string[] | Record<string, string>,\n> = [TGLTF, TUrl] extends [GLTF, string]\n\t? TGLTF & NgtObjectMap\n\t: [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]]\n\t\t? Array<_GLTF & NgtObjectMap>\n\t\t: [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>]\n\t\t\t? { [Key in keyof TGLTF]: _GLTF & NgtObjectMap }\n\t\t\t: [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>]\n\t\t\t\t? TUrl extends string[]\n\t\t\t\t\t? Array<TGLTF & NgtObjectMap>\n\t\t\t\t\t: { [K in keyof TUrl]: TGLTF & NgtObjectMap }\n\t\t\t\t: never;\n\n/**\n * Maps a GLTF type to its scene type(s).\n */\ntype GLTFObjectSceneMap<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF>,\n\tTUrl extends string | string[] | Record<string, string>,\n> = [TGLTF, TUrl] extends [GLTF, string]\n\t? GLTF['scene']\n\t: [TGLTF, TUrl] extends [Array<infer _GLTF extends GLTF>, string[]]\n\t\t? Array<_GLTF['scene']>\n\t\t: [TGLTF, TUrl] extends [Record<string, infer _GLTF extends GLTF>, Record<string, string>]\n\t\t\t? { [Key in keyof TGLTF]: _GLTF['scene'] }\n\t\t\t: [TGLTF, TUrl] extends [GLTF, string[] | Record<string, string>]\n\t\t\t\t? TUrl extends string[]\n\t\t\t\t\t? Array<GLTF['scene']>\n\t\t\t\t\t: { [K in keyof TUrl]: GLTF['scene'] }\n\t\t\t\t: never;\n\nfunction _extensions(useDraco: boolean | string, useMeshOpt: boolean, extensions?: (loader: GLTFLoader) => void) {\n\treturn (loader: THREE.Loader) => {\n\t\tif (extensions) {\n\t\t\textensions(loader as GLTFLoader);\n\t\t}\n\n\t\tif (useDraco) {\n\t\t\tif (!dracoLoader) {\n\t\t\t\tdracoLoader = new DRACOLoader();\n\t\t\t}\n\n\t\t\tdracoLoader.setDecoderPath(typeof useDraco === 'string' ? useDraco : decoderPath);\n\t\t\t(loader as GLTFLoader).setDRACOLoader(dracoLoader);\n\t\t}\n\t\tif (useMeshOpt) {\n\t\t\t(loader as GLTFLoader).setMeshoptDecoder(\n\t\t\t\ttypeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder,\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * Creates a resource for loading GLTF/GLB 3D models using Angular's resource API.\n *\n * This function wraps the GLTFLoader from three-stdlib and provides a reactive\n * resource-based approach to loading GLTF files. It supports Draco compression\n * and Meshopt optimization out of the box.\n *\n * The returned resource includes a `scene` computed signal for direct access to\n * the loaded scene(s).\n *\n * @param input - Signal of the URL(s) of the GLTF/GLB file(s) to load\n * @param options - Configuration options\n * @param options.useDraco - Enable Draco compression support. Pass a string to specify custom decoder path\n * @param options.useMeshOpt - Enable Meshopt optimization support\n * @param options.injector - Optional injector for dependency injection context\n * @param options.extensions - Custom extensions callback for the GLTFLoader\n * @param options.onLoad - Callback fired when loading completes\n * @returns A ResourceRef containing the loaded GLTF data with a `scene` signal\n *\n * @example\n * ```typescript\n * // Basic usage\n * const gltf = gltfResource(() => '/models/robot.glb');\n *\n * // With typed nodes\n * interface RobotGLTF extends GLTF {\n * nodes: { Head: THREE.Mesh; Body: THREE.Mesh };\n * }\n * const robot = gltfResource<RobotGLTF>(() => '/models/robot.glb');\n *\n * // Access scene directly via computed signal\n * effect(() => {\n * const scene = robot.scene();\n * if (scene) { ... }\n * });\n *\n * // Disable Draco\n * const gltf = gltfResource(() => '/models/simple.glb', { useDraco: false });\n * ```\n */\nexport function gltfResource<\n\tTGLTF extends GLTF | GLTF[] | Record<string, GLTF> = GLTF,\n\tTUrl extends string | string[] | Record<string, string> = GLTFUrl<TGLTF>,\n>(\n\tinput: () => TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\tinjector,\n\t\textensions,\n\t\tonLoad,\n\t}: {\n\t\t/** Enable Draco compression. Pass string for custom decoder path. @default true */\n\t\tuseDraco?: boolean | string;\n\t\t/** Enable Meshopt optimization. @default true */\n\t\tuseMeshOpt?: boolean;\n\t\t/** Optional injector for DI context */\n\t\tinjector?: Injector;\n\t\t/** Custom extensions callback for GLTFLoader */\n\t\textensions?: (loader: GLTFLoader) => void;\n\t\t/** Callback fired when loading completes */\n\t\tonLoad?: (data: GLTFObjectMap<TGLTF, TUrl>) => void;\n\t} = {},\n) {\n\treturn assertInjector(gltfResource, injector, () => {\n\t\tconst resource = loaderResource(() => GLTFLoader, input, {\n\t\t\textensions: _extensions(useDraco, useMeshOpt, extensions),\n\t\t\t// @ts-expect-error - we know the type of the data\n\t\t\tonLoad,\n\t\t}) as ResourceRef<GLTFObjectMap<TGLTF, TUrl> | undefined> & {\n\t\t\tscene: Signal<GLTFObjectSceneMap<TGLTF, TUrl> | null>;\n\t\t};\n\n\t\tObject.defineProperty(resource, 'scene', {\n\t\t\tvalue: computed(() => {\n\t\t\t\tconst data = resource.value();\n\t\t\t\tif (!data) return null;\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\treturn data.map((item) => item.scene);\n\t\t\t\t}\n\t\t\t\tif ('parser' in data) {\n\t\t\t\t\treturn data.scene;\n\t\t\t\t}\n\t\t\t\treturn Object.keys(data).reduce(\n\t\t\t\t\t(acc, key) => {\n\t\t\t\t\t\tacc[key] = data[key as keyof typeof data].scene;\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t},\n\t\t\t\t\t{} as Record<string, THREE.Group>,\n\t\t\t\t);\n\t\t\t}),\n\t\t});\n\n\t\treturn resource;\n\t});\n}\n\n/**\n * Preloads GLTF/GLB models into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the GLTF/GLB file(s) to preload\n * @param options - Configuration options\n * @param options.useDraco - Enable Draco compression support\n * @param options.useMeshOpt - Enable Meshopt optimization support\n * @param options.extensions - Custom extensions callback for the GLTFLoader\n *\n * @example\n * ```typescript\n * // Preload a model\n * gltfResource.preload('/models/robot.glb');\n *\n * // Preload with custom Draco decoder path\n * gltfResource.preload('/models/robot.glb', { useDraco: '/draco/' });\n * ```\n */\ngltfResource.preload = <TUrl extends string | string[] | Record<string, string>>(\n\tinput: TUrl,\n\t{\n\t\tuseDraco = true,\n\t\tuseMeshOpt = true,\n\t\textensions,\n\t}: {\n\t\t/** Enable Draco compression. Pass string for custom decoder path. @default true */\n\t\tuseDraco?: boolean | string;\n\t\t/** Enable Meshopt optimization. @default true */\n\t\tuseMeshOpt?: boolean;\n\t\t/** Custom extensions callback for GLTFLoader */\n\t\textensions?: (loader: GLTFLoader) => void;\n\t} = {},\n) => {\n\tloaderResource.preload(GLTFLoader, input, _extensions(useDraco, useMeshOpt, extensions));\n};\n\n/**\n * Sets the global Draco decoder path for all subsequent GLTF loads.\n *\n * @param path - The URL path to the Draco decoder files\n *\n * @example\n * ```typescript\n * // Use local Draco decoder files\n * gltfResource.setDecoderPath('/draco/');\n * ```\n */\ngltfResource.setDecoderPath = (path: string) => {\n\tdecoderPath = path;\n};\n","import { DestroyRef, inject, Injector } from '@angular/core';\nimport { signalState } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Creates a reactive state object that tracks Three.js asset loading progress.\n *\n * This function hooks into THREE.DefaultLoadingManager to monitor all asset\n * loading operations and provides reactive signals for progress tracking.\n * The state includes progress percentage, active status, error tracking, and\n * details about the currently loading item.\n *\n * The loading manager hooks are automatically cleaned up when the injection\n * context is destroyed.\n *\n * @param injector - Optional injector for dependency injection context\n * @returns A signal state object with the following properties:\n * - `errors`: Array of URLs that failed to load\n * - `active`: Whether loading is currently in progress\n * - `progress`: Loading progress percentage (0-100)\n * - `item`: URL of the currently loading item\n * - `loaded`: Number of items loaded\n * - `total`: Total number of items to load\n *\n * @example\n * ```typescript\n * // In a component or service\n * const loadingState = progress();\n *\n * effect(() => {\n * if (loadingState.active()) {\n * console.log(`Loading: ${loadingState.progress()}%`);\n * }\n * });\n *\n * // Check for errors\n * effect(() => {\n * const errors = loadingState.errors();\n * if (errors.length > 0) {\n * console.error('Failed to load:', errors);\n * }\n * });\n * ```\n */\nexport function progress(injector?: Injector) {\n\treturn assertInjector(progress, injector, () => {\n\t\tconst progressState = signalState<{\n\t\t\terrors: string[];\n\t\t\tactive: boolean;\n\t\t\tprogress: number;\n\t\t\titem: string;\n\t\t\tloaded: number;\n\t\t\ttotal: number;\n\t\t}>({ errors: [], active: false, progress: 0, item: '', loaded: 0, total: 0 });\n\n\t\tconst defaultOnStart = THREE.DefaultLoadingManager.onStart?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnLoad = THREE.DefaultLoadingManager.onLoad?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnError = THREE.DefaultLoadingManager.onError?.bind(THREE.DefaultLoadingManager);\n\t\tconst defaultOnProgress = THREE.DefaultLoadingManager.onProgress?.bind(THREE.DefaultLoadingManager);\n\n\t\tlet saveLastTotalLoaded = 0;\n\n\t\tTHREE.DefaultLoadingManager.onStart = (item, loaded, total) => {\n\t\t\tprogressState.update({\n\t\t\t\tactive: true,\n\t\t\t\titem,\n\t\t\t\tloaded,\n\t\t\t\ttotal,\n\t\t\t\tprogress: ((loaded - saveLastTotalLoaded) / (total - saveLastTotalLoaded)) * 100,\n\t\t\t});\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onLoad = () => {\n\t\t\tprogressState.update({ active: false });\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onError = (url) => {\n\t\t\tprogressState.update((prev) => ({ errors: [...prev.errors, url] }));\n\t\t};\n\n\t\tTHREE.DefaultLoadingManager.onProgress = (item, loaded, total) => {\n\t\t\tif (loaded === total) saveLastTotalLoaded = total;\n\n\t\t\tprogressState.update({\n\t\t\t\tactive: true,\n\t\t\t\titem,\n\t\t\t\tloaded,\n\t\t\t\ttotal,\n\t\t\t\tprogress: ((loaded - saveLastTotalLoaded) / (total - saveLastTotalLoaded)) * 100 || 100,\n\t\t\t});\n\t\t};\n\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tTHREE.DefaultLoadingManager.onStart = defaultOnStart;\n\t\t\tTHREE.DefaultLoadingManager.onLoad = defaultOnLoad;\n\t\t\tTHREE.DefaultLoadingManager.onError = defaultOnError;\n\t\t\tTHREE.DefaultLoadingManager.onProgress = defaultOnProgress;\n\t\t});\n\n\t\treturn progressState;\n\t});\n}\n\n/**\n * Alias for the `progress` function.\n *\n * @deprecated Use `progress` instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @see {@link progress}\n */\nexport const injectProgress = progress;\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\teffect,\n\tinput,\n\tsignal,\n\tuntracked,\n\tviewChild,\n} from '@angular/core';\nimport { pick } from 'angular-three';\nimport { mergeInputs } from 'ngxtension/inject-inputs';\nimport { progress } from './progress';\n\nconst defaultDataInterpolation = (p: number) => `Loading ${p.toFixed(2)}%`;\n\n/**\n * Configuration options for the NgtsLoader component.\n */\nexport interface NgtsLoaderOptions {\n\t/**\n\t * CSS class to apply to the outer container element.\n\t * @default ''\n\t */\n\tcontainerClass?: string;\n\t/**\n\t * CSS class to apply to the inner wrapper element.\n\t * @default ''\n\t */\n\tinnerClass?: string;\n\t/**\n\t * CSS class to apply to the progress bar element.\n\t * @default ''\n\t */\n\tbarClass?: string;\n\t/**\n\t * CSS class to apply to the data/percentage text element.\n\t * @default ''\n\t */\n\tdataClass?: string;\n\t/**\n\t * Function to format the progress percentage display text.\n\t * @param value - Current progress value (0-100)\n\t * @returns Formatted string to display\n\t * @default (p) => `Loading ${p.toFixed(2)}%`\n\t */\n\tdataInterpolation: (value: number) => string;\n\t/**\n\t * Function to determine initial visibility state.\n\t * @param value - Current active loading state\n\t * @returns Whether the loader should be shown initially\n\t * @default (value) => value\n\t */\n\tinitialState: (value: boolean) => boolean;\n}\n\nconst defaultOptions: NgtsLoaderOptions = {\n\tcontainerClass: '',\n\tinnerClass: '',\n\tbarClass: '',\n\tdataClass: '',\n\tdataInterpolation: defaultDataInterpolation,\n\tinitialState: (value) => value,\n};\n\n/**\n * A loading indicator component that displays asset loading progress.\n *\n * This component automatically tracks Three.js asset loading progress using the\n * DefaultLoadingManager and displays an animated progress bar with percentage.\n *\n * The loader fades in when loading starts and fades out when complete.\n * CSS classes can be customized via options for styling flexibility.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <ngts-loader />\n *\n * <!-- With custom options -->\n * <ngts-loader [options]=\"{\n * containerClass: 'my-loader',\n * dataInterpolation: (p) => `${Math.round(p)}% loaded`\n * }\" />\n * ```\n */\n@Component({\n\tselector: 'ngts-loader',\n\ttemplate: `\n\t\t@if (shown()) {\n\t\t\t<div\n\t\t\t\tclass=\"ngts-loader-container\"\n\t\t\t\t[class]=\"containerClass() || ''\"\n\t\t\t\t[style.--ngts-loader-container-opacity]=\"active() ? 1 : 0\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<div class=\"ngts-loader-inner\" [class]=\"innerClass() || ''\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"ngts-loader-bar\"\n\t\t\t\t\t\t\t[class]=\"barClass() || ''\"\n\t\t\t\t\t\t\t[style.--ngts-loader-bar-scale]=\"progress() / 100\"\n\t\t\t\t\t\t></div>\n\t\t\t\t\t\t<span #progressSpanRef class=\"ngts-loader-data\" [class]=\"dataClass() || ''\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t`,\n\tstyleUrls: ['./loader.css'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgtsLoader {\n\tprivate progressState = progress();\n\n\tprotected active = this.progressState.active;\n\tprotected progress = this.progressState.progress;\n\n\t/**\n\t * Configuration options for the loader appearance and behavior.\n\t */\n\toptions = input(defaultOptions, { transform: mergeInputs(defaultOptions) });\n\n\tprotected containerClass = pick(this.options, 'containerClass');\n\tprotected innerClass = pick(this.options, 'innerClass');\n\tprotected barClass = pick(this.options, 'barClass');\n\tprotected dataClass = pick(this.options, 'dataClass');\n\tprivate initialState = pick(this.options, 'initialState');\n\tprivate dataInterpolation = pick(this.options, 'dataInterpolation');\n\n\tprivate progressSpanRef = viewChild<ElementRef<HTMLSpanElement>>('progressSpanRef');\n\n\tprotected shown = signal(this.initialState()(this.active()));\n\n\tconstructor() {\n\t\teffect((onCleanup) => {\n\t\t\tconst [active, lastShown] = [this.active(), untracked(this.shown)];\n\t\t\tif (lastShown !== active) {\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tthis.shown.set(active);\n\t\t\t\t}, 300);\n\t\t\t\tonCleanup(() => clearTimeout(timeoutId));\n\t\t\t}\n\t\t});\n\n\t\tlet progressRef = 0;\n\t\tlet rafId: ReturnType<typeof requestAnimationFrame>;\n\t\teffect((onCleanup) => {\n\t\t\tconst [dataInterpolation, progress] = [this.dataInterpolation(), this.progress()];\n\t\t\tconst updateProgress = () => {\n\t\t\t\tconst progressSpan = this.progressSpanRef()?.nativeElement;\n\t\t\t\tif (!progressSpan) return;\n\t\t\t\tprogressRef += (progress - progressRef) / 2;\n\t\t\t\tif (progressRef > 0.95 * progress || progress === 100) progressRef = progress;\n\t\t\t\tprogressSpan.innerText = dataInterpolation(progressRef);\n\t\t\t\tif (progressRef < progress) {\n\t\t\t\t\trafId = requestAnimationFrame(updateProgress);\n\t\t\t\t}\n\t\t\t};\n\t\t\tupdateProgress();\n\t\t\tonCleanup(() => cancelAnimationFrame(rafId));\n\t\t});\n\t}\n}\n","import { effect, Injector, Signal } from '@angular/core';\nimport { injectLoader, injectStore, is, NgtLoaderResults } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Loads texture images using THREE.TextureLoader.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @param input - Signal of the URL(s) of the texture(s) to load\n * @param options - Configuration options\n * @param options.onLoad - Callback fired when textures are loaded\n * @param options.injector - Optional injector for dependency injection context\n * @returns A signal containing the loaded texture(s)\n */\nfunction _injectTexture<TInput extends string[] | string | Record<string, string>>(\n\tinput: () => TInput,\n\t{ onLoad, injector }: { onLoad?: (texture: THREE.Texture[]) => void; injector?: Injector } = {},\n): Signal<NgtLoaderResults<TInput, THREE.Texture> | null> {\n\treturn assertInjector(_injectTexture, injector, () => {\n\t\tconst store = injectStore();\n\t\tconst result = injectLoader(() => THREE.TextureLoader, input);\n\n\t\teffect(() => {\n\t\t\tconst textures = result();\n\t\t\tif (!textures) return;\n\t\t\tconst gl = store.snapshot.gl;\n\t\t\tif ('initTexture' in gl) {\n\t\t\t\tconst array = Array.isArray(textures)\n\t\t\t\t\t? textures\n\t\t\t\t\t: is.three<THREE.Texture>(textures, 'isTexture')\n\t\t\t\t\t\t? [textures]\n\t\t\t\t\t\t: Object.values(textures);\n\t\t\t\tif (onLoad) onLoad(array);\n\t\t\t\tarray.forEach(gl.initTexture.bind(gl));\n\t\t\t}\n\t\t});\n\n\t\treturn result;\n\t});\n}\n\n_injectTexture.preload = <TInput extends string[] | string | Record<string, string>>(input: () => TInput) => {\n\tinjectLoader.preload(() => THREE.TextureLoader, input);\n};\n\n/**\n * Type definition for the injectTexture function, including its static preload method.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n */\nexport type NgtsTextureLoader = typeof _injectTexture;\n\n/**\n * Injectable function for loading texture images.\n *\n * Loads textures using THREE.TextureLoader and automatically initializes them\n * with the WebGL renderer for optimal performance. Supports loading single textures,\n * arrays of textures, or record objects mapping keys to URLs.\n *\n * Includes a static `preload` method for preloading textures.\n *\n * @deprecated Use textureResource instead. Will be removed in v5.0.0\n * @since v4.0.0\n *\n * @example\n * ```typescript\n * // Single texture\n * const texture = injectTexture(() => '/textures/diffuse.jpg');\n *\n * // Multiple textures\n * const textures = injectTexture(() => ['/textures/diffuse.jpg', '/textures/normal.jpg']);\n *\n * // Named textures\n * const maps = injectTexture(() => ({\n * diffuse: '/textures/diffuse.jpg',\n * normal: '/textures/normal.jpg'\n * }));\n *\n * // Preload\n * injectTexture.preload(() => '/textures/diffuse.jpg');\n * ```\n */\nexport const injectTexture: NgtsTextureLoader = _injectTexture;\n","import { effect, Injector } from '@angular/core';\nimport { injectStore, is, loaderResource, NgtLoaderResults } from 'angular-three';\nimport { assertInjector } from 'ngxtension/assert-injector';\nimport * as THREE from 'three';\n\n/**\n * Creates a resource for loading texture images using Angular's resource API.\n *\n * This function wraps THREE.TextureLoader and provides a reactive resource-based\n * approach to loading textures. Loaded textures are automatically initialized\n * with the WebGL renderer for optimal performance.\n *\n * Supports loading single textures, arrays of textures, or record objects mapping\n * keys to URLs.\n *\n * @param input - Signal of the URL(s) of the texture(s) to load\n * @param options - Configuration options\n * @param options.onLoad - Callback fired when textures are loaded\n * @param options.injector - Optional injector for dependency injection context\n * @returns A ResourceRef containing the loaded texture(s)\n *\n * @example\n * ```typescript\n * // Single texture\n * const texture = textureResource(() => '/textures/diffuse.jpg');\n *\n * // Multiple textures\n * const textures = textureResource(() => ['/textures/diffuse.jpg', '/textures/normal.jpg']);\n *\n * // Named textures\n * const maps = textureResource(() => ({\n * diffuse: '/textures/diffuse.jpg',\n * normal: '/textures/normal.jpg'\n * }));\n *\n * // With onLoad callback\n * const texture = textureResource(() => '/textures/diffuse.jpg', {\n * onLoad: (tex) => console.log('Texture loaded:', tex)\n * });\n * ```\n */\nexport function textureResource<TUrl extends string[] | string | Record<string, string>>(\n\tinput: () => TUrl,\n\t{\n\t\tonLoad,\n\t\tinjector,\n\t}: {\n\t\t/** Callback fired when textures are loaded */\n\t\tonLoad?: (result: NgtLoaderResults<TUrl, THREE.Texture>) => void;\n\t\t/** Optional injector for DI context */\n\t\tinjector?: Injector;\n\t} = {},\n) {\n\treturn assertInjector(textureResource, injector, () => {\n\t\tconst store = injectStore();\n\t\tconst resource = loaderResource(() => THREE.TextureLoader, input);\n\n\t\teffect(() => {\n\t\t\tif (!resource.hasValue()) return;\n\t\t\tconst result = resource.value();\n\n\t\t\tif (onLoad) onLoad(result);\n\n\t\t\tconst gl = store.snapshot.gl;\n\t\t\tif ('initTexture' in gl) {\n\t\t\t\tlet textures: THREE.Texture[];\n\n\t\t\t\tif (Array.isArray(result)) {\n\t\t\t\t\ttextures = result;\n\t\t\t\t} else if (is.three<THREE.Texture>(result, 'isTexture')) {\n\t\t\t\t\ttextures = [result];\n\t\t\t\t} else {\n\t\t\t\t\ttextures = Object.values(result);\n\t\t\t\t}\n\n\t\t\t\ttextures.forEach(gl.initTexture.bind(gl));\n\t\t\t}\n\t\t});\n\n\t\treturn resource;\n\t});\n}\n\n/**\n * Preloads textures into the cache for faster subsequent loading.\n *\n * @param input - The URL(s) of the texture(s) to preload\n *\n * @example\n * ```typescript\n * // Preload a single texture\n * textureResource.preload('/textures/diffuse.jpg');\n *\n * // Preload multiple textures\n * textureResource.preload(['/textures/diffuse.jpg', '/textures/normal.jpg']);\n * ```\n */\ntextureResource.preload = <TUrl extends string[] | string | Record<string, string>>(input: TUrl) => {\n\tloaderResource.preload(THREE.TextureLoader, input);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dracoLoader","decoderPath","_extensions"],"mappings":";;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACG,SAAU,WAAW,CAC1B,KAAiB,EACjB,EAAE,QAAQ,KAA8B,EAAE,EAAA;AAE1C,IAAA,OAAO,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAK;QACjD,OAAO,cAAc,CAAC,MAAM,SAAS,EAAE,KAAK,CAAC;AAC9C,IAAA,CAAC,CAAC;AACH;AAEA;;;;;;;;;;;;;AAaG;AACH,WAAW,CAAC,OAAO,GAAG,CAA0D,KAAW,KAAI;AAC9F,IAAA,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC;AACzC,CAAC;;ACjDD;;;;;;;;;;AAUG;AACH,SAAS,UAAU,CAClB,KAAiB,EACjB,EAAE,QAAQ,KAA8B,EAAE,EAAA;AAE1C,IAAA,OAAO,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAK;QAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC;AACjD,QAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,UAAU,EAAE;AACnC,IAAA,CAAC,CAAC;AACH;AAEA,UAAU,CAAC,OAAO,GAAG,CAA0D,KAAiB,KAAI;IACnG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A,OAAO,QAAQ;AAChB,IAAA,CAAC,CAAC;AACH;AAEA;;;;;;;;;;;;;AAaG;AACH,eAAe,CAAC,OAAO,GAAG,CAA0D,KAAW,KAAI;IAClG,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;AACnD,CAAC;;ACnGD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -340,7 +340,7 @@ declare class NgtsInstances {
|
|
|
340
340
|
*/
|
|
341
341
|
options: _angular_core.InputSignalWithTransform<NgtsInstancesOptions, "" | Partial<NgtsInstancesOptions>>;
|
|
342
342
|
/** @internal */
|
|
343
|
-
protected parameters: _angular_core.Signal<Omit<NgtsInstancesOptions, "
|
|
343
|
+
protected parameters: _angular_core.Signal<Omit<NgtsInstancesOptions, "range" | "limit" | "frames">>;
|
|
344
344
|
/**
|
|
345
345
|
* Reference to the underlying THREE.InstancedMesh element.
|
|
346
346
|
*/
|
|
@@ -544,7 +544,7 @@ declare class NgtsPointsInstances {
|
|
|
544
544
|
/**
|
|
545
545
|
* Computed parameters passed to the underlying Points object.
|
|
546
546
|
*/
|
|
547
|
-
parameters: _angular_core.Signal<Omit<NgtsPointsInstancesOptions, "
|
|
547
|
+
parameters: _angular_core.Signal<Omit<NgtsPointsInstancesOptions, "range" | "limit">>;
|
|
548
548
|
/**
|
|
549
549
|
* Reference to the underlying THREE.Points element.
|
|
550
550
|
*/
|
|
@@ -209,9 +209,9 @@ interface MeshRefractionMaterialOptions {
|
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
211
211
|
declare const MeshRefractionMaterial: (new (parameters?: (THREE.ShaderMaterialParameters & Partial<{
|
|
212
|
-
[name: string]: number | boolean | any[] | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 |
|
|
212
|
+
[name: string]: number | boolean | any[] | THREE.Color | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | null;
|
|
213
213
|
}>) | undefined) => THREE.ShaderMaterial & {
|
|
214
|
-
[name: string]: number | boolean | any[] | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 |
|
|
214
|
+
[name: string]: number | boolean | any[] | THREE.Color | THREE.CubeTexture<unknown> | THREE.Texture<unknown> | Int32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | THREE.Matrix4 | THREE.Matrix3 | THREE.Quaternion | THREE.Vector4 | THREE.Vector3 | THREE.Vector2 | null;
|
|
215
215
|
}) & {
|
|
216
216
|
key: string;
|
|
217
217
|
};
|