Handles the canvas interaction such as zooming, panning and clicking.
- Source:
Methods
(inner) raycast(mousePos)
spawns a ray and checks for intersections
in detailLOD: checks for intersections with nodes and edges
in lowDetailLOD: checks for intersections with supernodes
if an intersection occurs the further processing is forwarded to the render logic and the GUI
Parameters:
Name | Type | Description |
---|---|---|
mousePos |
vec2 | where the click occured, both coordinates in range [-1,1] |
- Source:
(inner) setupCamera()
sets the camera to its initial position and defines all the interaction events
- Source:
(inner) updateCamera(size, zoom, centerOriginFlag)
updates the camera based on the specified parameters
Parameters:
Name | Type | Description |
---|---|---|
size |
float | of the camera frustum |
zoom |
float | level of the camera (1 = default) |
centerOriginFlag |
boolean | sets the camera back to the 0 origin if true |
- Source: