Following events allows you to manage 3D map zoom.
zoomIn
Zoom in the camera with a step passed in parameter.
Parameters
| Name | type | description |
|---|---|---|
| zoomValue | number | step to increment current zoom |
Result
No result
Example
FnoMapManager.sendEvent('zoomIn', {zoomValue: 0.1});zoomOut
Zoom out the camera with a step passed in parameter
Parameters
| Name | type | description |
|---|---|---|
| zoomValue | number | step to decrement current zoom |
Result
No result
Example
FnoMapManager.sendEvent('zoomOut', {zoomValue: 0.1});zoomReset
Reset current zoom to initial value
Parameters
No parameter
Result
No result
Example
FnoMapManager.sendEvent('zoomReset');getZoom
Get current zoom value
Parameters
No parameter
Result
No result
| Name | type | description |
|---|---|---|
| zoomValue | number | the current camera zoom |
Example
FnoMapManager.sendEvent('getZoom', null, (data) => { console.log("zoom value:", data.zoomValue)});setZoom
Allow you to define a zoom for the camera
Parameters
| Name | type | description |
|---|---|---|
| zoomValue | number | the camera zoom to set (value between 0 and 1, 0 is the maximum zoom) |
Result
No result
Example
FnoMapManager.sendEvent('setZoom', {zoomValue: 0.5})zoomOnContainer
Move camera to a container and zoom on it
Parameters
| Name | type | description |
|---|---|---|
| containerId | number | Container id to zoom on |
Result
No result
Example
FnoMapManager.sendEvent('zoomOnContainer', {containerId: 999})setCameraView
Change camera mode
Parameters
| Name | type | description |
|---|---|---|
| cameraView | string | View type to use, see above for all values availables |
View types are:
- 2d: 2D (Orthographic)
- fps: First Person
- 3d: default (Perspective camera)
- 3dItinerary: Itinerary mode (follow the Player object in the scene)
- 2dItinerary: 2D itinerary mode (follow the Player object in the scene)
Result
No result
Example
FnoMapManager.sendEvent('setCameraView', {cameraView: '3d'})blockZoom
Block camera zoom
Parameters
| Name | type | description |
|---|---|---|
| state | boolean | true for block zoom |
Result
No result
Example
FnoMapManager.sendEvent('blockZoom', {state: true})blockCameraRotation
Block camera rotation
Parameters
| Name | type | description |
|---|---|---|
| state | boolean | true for block rotation |
Result
No result
Example
FnoMapManager.sendEvent('blockCameraRotation', {state: true})forceFixedCameraRotation
Block camera rotation to specific angle
Parameters
| Name | type | description |
|---|---|---|
| angle | number | View type to use, see above for all values availables |
Result
No result
FnoMapManager.sendEvent('forceFixedCameraRotation', {angle: 100})followUser
Allow you to move the camera in order to follow the blue dot of the event setUserPosition. Just call it once, if you move on the map with the cursor or the finger, the tracking of the user by the camera is disabled and the value will be set à false.
Parameters
| Name | type | description |
|---|---|---|
| follow | boolean | Allow "true" or disallow "false" the tracking of the user by the camera |
FnoMapManager.sendEvent('followUser', {follow: true})