@virtualdisplay.io/client 4.0.0-alpha.19 → 4.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -22
- package/dist/index.d.ts +453 -543
- package/dist/virtualdisplay.client.cjs.js +12 -12
- package/dist/virtualdisplay.client.es.js +1988 -2007
- package/dist/virtualdisplay.client.umd.js +21 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -223,8 +223,7 @@ console.log(client.cameraPosition.zoom);
|
|
|
223
223
|
|
|
224
224
|
Annotations are interactive markers placed on the 3D model. They are
|
|
225
225
|
configured and saved in the Virtualdisplay portal. The client library
|
|
226
|
-
exposes
|
|
227
|
-
editors.
|
|
226
|
+
exposes an API to toggle their visibility.
|
|
228
227
|
|
|
229
228
|
### Toggling annotations
|
|
230
229
|
|
|
@@ -235,26 +234,6 @@ client.annotations.setEnabled(true); // Show them again
|
|
|
235
234
|
|
|
236
235
|
Visibility can also be controlled via `viewerSettings.annotations` (see below).
|
|
237
236
|
|
|
238
|
-
### Placing annotations
|
|
239
|
-
|
|
240
|
-
For building a custom annotation editor, the client supports click-to-place
|
|
241
|
-
mode. Enter the mode, listen for the placed position, then exit.
|
|
242
|
-
|
|
243
|
-
```typescript
|
|
244
|
-
client.annotations.onPlaced((position) => {
|
|
245
|
-
// position has x, y, z coordinates on the model surface
|
|
246
|
-
console.log(position);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
// Enter placement mode. The next click on the model fires onPlaced.
|
|
250
|
-
client.annotations.startPlacing();
|
|
251
|
-
|
|
252
|
-
// Cancel placement mode without recording a click.
|
|
253
|
-
client.annotations.stopPlacing();
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
The position type is `AnnotationPosition`, exported from the package.
|
|
257
|
-
|
|
258
237
|
## Standard interface
|
|
259
238
|
|
|
260
239
|
The client renders a complete viewer UI automatically: loading indicator,
|