new UIBasic(viewer [, options])
Creates a new UIBasic instance
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
viewer |
Viewer | OpenLIME viewer instance |
|
options |
UIBasic~Options |
<optional> |
Configuration options |
- Source:
Fires:
- UIBasic#event:lightdirection
Example
```javascript const ui = new UIBasic(viewer, { // Enable specific actions actions: { light: { display: true }, zoomin: { display: true }, layers: { display: true } }, // Add measurement support pixelSize: 0.1, // Add attribution attribution: "© Example Source" }); ```
Methods
-
setLayer(layer_on)
-
Sets active layer and updates UI
Parameters:
Name Type Description layer_on
Layer | string Layer or layer ID to activate
- Source:
-
showOverlayMessage(msg [, duration])
-
Shows overlay message
Parameters:
Name Type Argument Default Description msg
string Message to display
duration
number <optional>
2000 Display duration in ms
- Source: