Viewport Constructor (WebGL)

Constructor of the WebGL viewport object.

Signatures

  •   Paramate.ViewportWebGL( object options )

Details

The function sets up the viewport inside a given HTML element that is required on rendering with WebGL.

The constructor is mostly similar to the default viewport constructor but contains some additional options.

The WebGL viewport must be registered inside a configurator element.

Example

 [...]
 <body>
   <div id="viewPort"></div>
   <script type="text/javascript">
     configurator = new Paramate.Configurator({...});
     viewPort = new Paramate.ViewportWebGL({
       configurator: configurator,
       viewportElement: document.getElementById("viewport")
     });
     configurator.viewPort = viewPort;
     configurator.initialize();
   </script>
 [...]
 

Throw

error

Throws an error if the initalization failed.

Parameters

postProcessAA

Boolean flag to enable/disable post-processing anti-aliasing.

postProcessAAMinFPS

Sets a minimally required number of frames per second (fps) for the post-processing anti-aliasing. If the actual fps count falls below this number, the post-processing anti-aliasing is switched off. This may be useful for devices with a lower performance.

webGLAA

Boolean flag to enable/disable anti-aliasing as available via WebGL.

...

See viewport constructor.