VmLayerGltf
The VmLayerGltf
component is a custom style layer with three.js to add 3D models to a map. see
Basic usage
API
Props
Name | Description | Type | Default |
---|---|---|---|
url | The url address of the gltf model. | string | - |
position | The position of the gltf model.. | array | - |
rotate | The rotation angle of the gltf model, in radians. | array | [Math.PI / 2, 0, 0] |
scale | The scale angle of the gltf model. | number | 1 |
Events
Name | Description | Type |
---|---|---|
beforeLoad | Triggers before the maplibreObject is loaded. | Function |
ready | Triggers when the maplibreObject is successfully loaded. | Function |
unready | Triggers when the maplibreObject loading failed. | Function |
destroyed | Triggers when the maplibreObject is destroyed. | Function |
Exposes
Name | Description | Type |
---|---|---|
load | Load the component manually. | Function |
unload | Destroy the loaded component manually. | Function |
reload | Load the component manually. | Function |
creatingPromise | Determine whether the component is created by this. | object |
maplibreObject | The maplibreObject created by component. | object |
getMaplibreObject | Get the maplibreObject created by component. | Function |