loadUrl
Loads a model from a URL.
By default removes existing models before loading the new model.
Example
Usage
const options = {
append: true,
modelId: "my-model-id",
modelName: "My Model Name"
};
const url = "https://api.catenda.com/v2/projects/{PROJECT_ID}/viewer2d/geometry?token=YOUR_TOKEN";
const modelInfosPromise = viewer2d.loadUrl(url, options);Parameters
url
URL to the model.
Type | Required |
|---|---|
String | Yes |
options
Options for loading the model.
Type | Required |
|---|---|
Object | No |
Properties
Name | Type | Required | Description |
|---|---|---|---|
append | Boolean | No | Append model to existing loaded models |
modelId | String | No | User provided id for the loaded model |
modelName | String | No | User provided name for the loaded model |
Return Value
Promise that resolves to a list of model information for the loaded models.
Type |
|---|
Promise => Array[Object] |
modelInfo
Name | Type | Description |
|---|---|---|
id | String | Id of the loaded model |
boundingBox | Box3 | Bounding box of the loaded model |