You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
@@ -63,6 +63,9 @@ This establishes the connection from the widget to StreamBIM. The function retur
63
63
*`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.
64
64
65
65
66
+
### `getProjectId()`
67
+
Returns a promise which is resolved with the project's ID.
68
+
66
69
### `getCameraState()`
67
70
Returns a promise which is resolved with an object containing the camera's position and quaternion.
68
71
@@ -85,8 +88,8 @@ Returns a promise which is resolved with an array of GUIDs of the spaces the use
85
88
### `getObjectInfo(guid)`
86
89
Returns a promise which is resolved with an object with various information about the object.
87
90
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.
90
93
91
94
### `highlightObject(guid)`
92
95
@@ -122,6 +125,9 @@ Resets the viewport and applies the state, which should be on the same form as r
122
125
123
126
Returns a promise which is resolved with a dataUrl of the 3D screenshot.
124
127
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
+
125
131
## Demo
126
132
Please take a look at the [demo](/demo/index.html) widget for a complete implementation example.
0 commit comments