Interface ModelLocator

Resolves URLs for model files and the per-model sidecar files that sit beside them (e.g. coordSys.json).

Keeps every directory-layout and filename concern out of the loader modules and Studio. Custom deployments inject their own locator via StudioConfig.locator; loaders never see paths.

interface ModelLocator {
    resolve(modelId: string, format: string): string;
    resolveSidecar(modelId: string, fileName: string): string;
}

Implemented by

Methods

  • URL of a model file for the given (modelId, format) pair. Studio's loadModel calls this when the caller didn't supply an explicit src.

    Parameters

    • modelId: string
    • format: string

    Returns string

  • URL of a sidecar file beside the model's directory — files that aren't themselves model formats but belong logically to the model (currently just coordSys.json; pattern extends to any future per-model metadata).

    Parameters

    • modelId: string
    • fileName: string

    Returns string