Skip to content

Commit

Permalink
Add section about initializing with resources (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bates550 authored Jul 31, 2024
1 parent f6fcd7b commit 2b526d9
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion bim_webviewer/bim_web_viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4438,7 +4438,6 @@ The id of the project the model has been published to.

---


`companyId`

##### number
Expand Down Expand Up @@ -4468,6 +4467,7 @@ ID of the associated BIM Model
modelId: 999;
}
```

---

`modelRevisionId`
Expand All @@ -4481,6 +4481,7 @@ ID of the associated BIM Model Revision
modelRevisionId: 888;
}
```

---

`meshUrl`
Expand All @@ -4494,6 +4495,7 @@ URL to mesh binary provided by a Procore service.
meshUrl: 'https://foo.com/geometry/mesh';
}
```

---

`meshnodeUrl`
Expand Down Expand Up @@ -4538,6 +4540,36 @@ ID of the file extraction associated to the model.
}
```

### Initializing with Resources

<p class="heading-link-container"><a class="heading-link" href="#initializing-with-resources"></a></p>

The Web Viewer can also be initialized with resource descriptors, which can take the form of either the [required options for model revision](#required-options-for-model-revision) or the [required options for file extraction](#required-options-for-file-extraction).

Support is coming for passing multiple resources in to be able load multiple models.

```js
// File Extraction Initialization
{
resources: [
{ fileExtractionId: 23 }
],
}

// Model Revision Initialization
{
resources: [
{
modelId: 888,
modelRevisionId: 999,
meshUrl: 'https://foo.com/geometry/mesh'
meshnodeUrl: 'https://foo.com/geometry/meshnode'
nodeUrl: 'https://foo.com/geometry/node'
}
],
}
```

### Optional Options

<p class="heading-link-container"><a class="heading-link" href="#optional-options"></a></p>
Expand Down

0 comments on commit 2b526d9

Please sign in to comment.