Skip to main content
Version: Next

Interface: ModelDataProvider

Defined in: packages/data-providers/src/ModelDataProvider.ts:10

Provides data for 3D models.

Extends​

Methods​

getBinaryFile()​

getBinaryFile(baseUrl, fileName, abortSignal?): Promise<ArrayBuffer>

Defined in: packages/data-providers/src/types.ts:31

Downloads a binary blob.

Parameters​

baseUrl​

string

Base URL of the model. Pass empty string to treat fileName as a full signed URL.

fileName​

string

Filename of binary file, or a full signed URL when baseUrl is empty.

abortSignal?​

AbortSignal

Optional abort signal that can be used to cancel an in progress fetch.

Returns​

Promise<ArrayBuffer>

Inherited from​

BinaryFileProvider.getBinaryFile


getFileUrlsForModel()?​

optional getFileUrlsForModel(baseUrl, modelIdentifier, fileNameFilter?): Promise<SignedFileItem[]>

Defined in: packages/data-providers/src/types.ts:40

Retrieves signed URLs for files belonging to a model revision.

Parameters​

baseUrl​

string

Base URL of the signed files endpoint.

modelIdentifier​

ModelIdentifier

Identifier of the model revision to fetch URLs for.

fileNameFilter?​

string

Optional filename to filter results to a single file.

Returns​

Promise<SignedFileItem[]>

Inherited from​

SignedFileProvider.getFileUrlsForModel


getJsonFile()​

getJsonFile(baseUrl, fileName): Promise<any>

Defined in: packages/data-providers/src/types.ts:21

Download and parse a JSON file and return the resulting struct.

Parameters​

baseUrl​

string

Base URL of the model. Pass empty string to treat fileName as a full signed URL.

fileName​

string

Filename of JSON file, or a full signed URL when baseUrl is empty.

Returns​

Promise<any>

Inherited from​

JsonFileProvider.getJsonFile