modelViewUniform

vgl. modelViewUniform

new modelViewUniform(name, origin) → {vgl.modelViewUniform}

Description:
  • Create new instance of class modelViewOriginUniform.

Source:
Parameters:
Name Type Description
name string
origin Array.<number>

a triplet of floats.

Returns:
Type
vgl.modelViewUniform

Methods

setOrigin(origin)

Description:
  • Change the origin used by the uniform view matrix.

Source:
Parameters:
Name Type Description
origin Array.<number>

a triplet of floats.

update(renderState, program)

Description:
  • Update the uniform given a render state and shader program. This offsets the modelViewMatrix by the origin, and, if the model view should be aligned, aligns it appropriately. The alignment must be done after the origin offset to maintain precision.

Source:
Parameters:
Name Type Description
renderState vgl.renderState
program vgl.shaderProgram