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

    Class DefaultFileUrlResolver

    Default file URL resolver

    Simple implementation that:

    • Returns absolute URLs unchanged
    • Returns relative URLs unchanged (assumes they're relative to the current page)

    Useful for:

    • Loading files from the same origin
    • Development/testing
    • Simple deployments where files are co-located

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Resolve a file path to a full URL

      Parameters

      • filePath: string

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

      • _context: FileResolverContext

      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'