ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Interface FileUrlResolver

    Interface for resolving file URLs

    Implementations can provide different strategies:

    • OCRA API resolver (uses backend API)
    • Static file resolver (uses local/CDN paths)
    • Custom resolver (user-defined logic)
    interface FileUrlResolver {
        resolve(filePath: string, context: FileResolverContext): string;
    }

    Implemented by

    Index

    Methods

    Methods

    • Resolve a file path to a full URL

      Parameters

      • filePath: string

        The file path to resolve (can be relative or absolute)

      • context: FileResolverContext

        Additional context for resolution (e.g., projectId)

      Returns string

      The full URL to load the file from

      // Relative path
      const url = resolver.resolve('model.glb', { projectId: '123' });
      // => 'http://localhost:3000/api/projects/123/files/model.glb'

      // Absolute path (pass through)
      const url = resolver.resolve('http://example.com/model.glb', {});
      // => 'http://example.com/model.glb'