API Docs for: 0.1.0
Show:

Buffers Class

Module: Buffers

Methods

_getIndexData

(
  • latitudeBands
  • longitudeBands
)
Array

A private method called by initSphericalBuffers, which calculates index data used by gl.ELEMENT_ARRAY_BUFFER.

Parameters:

  • latitudeBands Int

    Latitude bands of the sphere

  • longitudeBands Int

    Longitude bands of the sphere

Returns:

Array:

Index data.

drawCuboidalElements

(
  • obj
)

Called by drawElements(), this draws the elements that comprise cuboidal objects.

Parameters:

drawElements

(
  • obj
)

Draws the necessary elements of the object onto the canvas.

Parameters:

drawSphericalElements

(
  • obj
)

Called by drawElements(), this draws the elements that comprise spherical objects.

Parameters:

initBuffers

(
  • obj
)

Initialises the buffers.

Parameters:

initCuboidalBuffers

(
  • obj
)

Called by initBuffers(), this initialises the buffers for cuboidal objects, e.g. Saturn's rings

Parameters:

initSphericalBuffers

(
  • obj
)

Called by initBuffers(), this initialises the buffers for spherical objects, e.g. planets, the moon, the Sun.

Parameters: