UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

43 lines (42 loc) 1.14 kB
import { Debug } from "../../core/debug.js"; class GSplatAssetLoaderBase { /** * Initiates loading of a gsplat asset. This is a fire-and-forget operation that starts * the loading process. * * @param {string} url - The URL of the gsplat file to load. * @abstract */ load(url) { Debug.error("GSplatAssetLoaderBase#load: Not implemented"); } /** * Unloads an asset that was previously loaded by this loader. * * @param {string} url - The URL of the asset to unload. * @abstract */ unload(url) { Debug.error("GSplatAssetLoaderBase#unload: Not implemented"); } /** * Gets the resource for a given URL if it has been loaded by this loader. * * @param {string} url - The URL of the asset to retrieve the resource from. * @returns {object|undefined} The loaded resource if found and loaded, undefined otherwise. * @abstract */ getResource(url) { Debug.error("GSplatAssetLoaderBase#getResource: Not implemented"); } /** * Destroys the loader and cleans up any resources it holds. * * @abstract */ destroy() { } } export { GSplatAssetLoaderBase };