Docs for Version: 1.0a
Show:
Module: utils

ZBufferCube class

Constructor

ZBuffer

()

Item Index

Methods

bind

()

Bind framebuffer before drawing

bind

()

Bind framebuffer before drawing

bindCube

(
  • cubeFace
)

Bind cube framebuffer before drawing

Parameters:

  • cubeFace Object

    Face of the cube ENUM

draw

(
  • drawFunction(uniforms)
)

Draw Scene into framebuffer cube texture

Parameters:

  • drawFunction(uniforms) Object

    drawFunction to pass uniforms to

Example:

 var cube = new ZBufferCube()
                                             cube.draw(function(uniforms){
                                                 world.draw();
                                             })
 var cube = new ZBufferCube()
                                             var shaderOverride = basicShader({color:[1.0,0.0,0.0]})
                                             cube.draw(function(uniforms){
                                                 world.drawOverride(shaderOverride,uniforms);
                                             })

unbind

()

Unbind framebuffer

unbind

()

Unbind framebuffer