-
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)
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 input into the graph to stimulate activities there. Events describing mouse interactions, touches, drag & drop operations, keypresses and so on travel into the 3 dimensional graph to hit their targets there and to be handled as usual.
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