Skip to content

Commit 787fbdf

Browse files
author
Christoffer Henne
committed
2 parents bc38406 + 8888535 commit 787fbdf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ StreamBIM.connect().then(function() {
1919

2020
### CDN
2121

22-
We don't currently have a CDN solution, but you can download, bundle and load the [minified script](https://raw.githubusercontent.com/rendra-tech/streambim-widget-api/master/dist/streambim-widget-api.min.js), in which case the
22+
We don't currently have a CDN solution, but you can download, bundle and load the [minified script](https://raw.githubusercontent.com/streambim/streambim-widget-api/master/dist/streambim-widget-api.min.js), in which case the
2323
library will be available on `window.StreamBIM`
2424
```html
2525
<script src="streambim-widget-api.min.js"></script>
@@ -63,6 +63,9 @@ This establishes the connection from the widget to StreamBIM. The function retur
6363
* `spacesChanged` (function, optional) Function to be called whenever the user enteres or leaves a space. The function has one argument which is an array of IFC space GUIDs, sorted from the smallest to the largest space.
6464

6565

66+
### `getProjectId()`
67+
Returns a promise which is resolved with the project's ID.
68+
6669
### `getCameraState()`
6770
Returns a promise which is resolved with an object containing the camera's position and quaternion.
6871

@@ -85,8 +88,8 @@ Returns a promise which is resolved with an array of GUIDs of the spaces the use
8588
### `getObjectInfo(guid)`
8689
Returns a promise which is resolved with an object with various information about the object.
8790

88-
### `gotoObject(guid)`
89-
It the GUID is for a space, the camera is moved to the center of the space. If the GUID is for an object, the camera is moved and rotated to look at the object.
91+
### `gotoSpace(guid)`
92+
Move the camera to the center of the space.
9093

9194
### `highlightObject(guid)`
9295

@@ -122,6 +125,9 @@ Resets the viewport and applies the state, which should be on the same form as r
122125

123126
Returns a promise which is resolved with a dataUrl of the 3D screenshot.
124127

128+
## Errors
129+
All API calls return promises which, if an error occurs, are rejected with an object which has a `code` and a `detail` field. Code is one of the following: `invalid`, `notFound`, `unknown`, `unauthorized` and `notAllowed`. Detail can contain anything and should only be used for debugging purposes.
130+
125131
## Demo
126132
Please take a look at the [demo](/demo/index.html) widget for a complete implementation example.
127133

0 commit comments

Comments
 (0)