-
Notifications
You must be signed in to change notification settings - Fork 1
Viewport
A viewport ties a display area to what is actually supposed to be seen there an how. To operate, the viewport needs to know what to render, where to render it to and which camera to use. There can be multiple viewports being used at the same time. Several viewports might render the same graph from different perspectives, or each rendering a completely different graph, they might render their results to different canvases or onto different areas of the same canvas (see Framing)
The Framing cascade of the viewport also makes it possible to transform display-locations into locations in the various renderbuffers or the threedimensional world.
To display continuous movement, a viewport must be rendered periodically. To do so, add an event listener to your applications Loop that invokes a handler function calling the viewports draw
-method
While the viewport routes the contents of a graph to an output to stimulate the users visual sensory system, it can also route the users pointer input into the graph to stimulate activities there. Given a pointer event, the viewport can dispatch it to all nodes with a pick component attached that were hit by the event. The event may travel up the graph.