Class: GlRenderer

GlRenderer()

new GlRenderer()

Wraps around a Three.js GLRenderer and sets up the scene and shaders.

Source:
Example
<!-- a Canvas element with id: glcanvas is required! -->
   <canvas id="glcanvas"></canvas>


   <script>
     let renderer = new GlRenderer();

     var red = new SolidSource( renderer, { color: { r: 1.0, g: 0.0, b: 0.0 } } );
     let output = new Output( renderer, red )

     renderer.init();
     renderer.render();
   </script>

Members

fragmentShader

The fragment shader

Source:

nodes

All the nodes currently added to this renderer

Source:

scene

A reference to the threejs scene

Source:

vertexShader

The vertex shader

Source:

Methods

(static) init()

Source:

(static) render()

Source:

dispose()

Disposes the renderer

Source: