loader.d.ts 1.3 KB

1234567891011121314151617181920212223242526
  1. import { ViewerConfiguration } from './configuration';
  2. /**
  3. * The configuration loader will load the configuration object from any source and will use the defined mapper to
  4. * parse the object and return a conform ViewerConfiguration.
  5. * It is a private member of the scene.
  6. */
  7. export declare class ConfigurationLoader {
  8. private _enableCache;
  9. private _configurationCache;
  10. private _loadRequests;
  11. constructor(_enableCache?: boolean);
  12. /**
  13. * load a configuration object that is defined in the initial configuration provided.
  14. * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
  15. *
  16. * @param initConfig the initial configuration that has the definitions of further configuration to load.
  17. * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
  18. * @returns A promise that delivers the extended viewer configuration, when done.
  19. */
  20. loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
  21. /**
  22. * Dispose the configuration loader. This will cancel file requests, if active.
  23. */
  24. dispose(): void;
  25. private _loadFile(url);
  26. }