Buffers Class
Item Index
Methods
_getIndexData
-
latitudeBands
-
longitudeBands
A private method called by initSphericalBuffers, which calculates index data used by gl.ELEMENT_ARRAY_BUFFER.
Parameters:
-
latitudeBands
IntLatitude bands of the sphere
-
longitudeBands
IntLongitude bands of the sphere
Returns:
Index data.
drawCuboidalElements
-
obj
Called by drawElements(), this draws the elements that comprise cuboidal objects.
Parameters:
-
obj
AstronomicalObjectThe cuboidal object we're drawing
drawElements
-
obj
Draws the necessary elements of the object onto the canvas.
Parameters:
-
obj
AstronomicalObjectThe object which needs to be drawn.
drawSphericalElements
-
obj
Called by drawElements(), this draws the elements that comprise spherical objects.
Parameters:
-
obj
AstronomicalObjectThe spherical object we're drawing
initBuffers
-
obj
Initialises the buffers.
Parameters:
-
obj
AstronomicalObjectThe object for which we're initialising buffers.
initCuboidalBuffers
-
obj
Called by initBuffers(), this initialises the buffers for cuboidal objects, e.g. Saturn's rings
Parameters:
-
obj
AstronomicalObjectThe cuboidal object we're initialising buffers for.
initSphericalBuffers
-
obj
Called by initBuffers(), this initialises the buffers for spherical objects, e.g. planets, the moon, the Sun.
Parameters:
-
obj
AstronomicalObjectThe spherical object we're initialising buffers for.