Stereo Music Visualization using Manifold Harmonics
1.0
|
Namespaces | |
init | |
Functions | |
function | throwOnGLError (err, funcName, args) |
function | logGLCall (functionName, args) |
function | validateNoneOfTheArgsAreUndefined (functionName, args) |
function | logAndValidate (functionName, args) |
function | init () |
function | webgl (callback) |
function | shaders (callback) |
function | setControls () |
function | setCamera (x, y, z) |
function | setLight () |
function | animate () |
function | parseMHB (mhb_txt, callback) |
function | readMHB (mhb_txt_data, callback) |
function | model (callback) |
function | initArray (arr, size, fill) |
function | mhb (mhb_data) |
function | setMaterial () |
function | nearest_pow2 (n) |
function | getNewTexture (buffer, size, rgb, debug_tex) |
function animate | ( | ) |
ANIMATION LOOP
function getNewTexture | ( | buffer, | |
size, | |||
rgb, | |||
debug_tex | |||
) |
GENERATES AND RETURNS A NEW TEXTURE WITH: BUFFER = TEXTURE DATA RGB = GL.RGB | GL.RGBA SIZE = (WIDTH == HEIGHT)
function init | ( | ) |
INIT FUNCTION
function initArray | ( | arr, | |
size, | |||
fill | |||
) |
INITIALIZE ARRAYS
function mhb | ( | mhb_data | ) |
DO THE MHB PROCESSING:
function model | ( | callback | ) |
LOADS MODEL See python script: https://github.com/mrdoob/three.js/blob/master/utils/converters/obj/convert_obj_three.py
function nearest_pow2 | ( | n | ) |
COMPUTES THE NEAREST POWER OF 2 NOTE: WEBGL TEXTURES LIKE TO BE A POWER OF 2
function parseMHB | ( | mhb_txt, | |
callback | |||
) |
PARSES THE MHB TEXT FILE INTO FLOAT32ARRAY
function readMHB | ( | mhb_txt_data, | |
callback | |||
) |
LOADS AND SAVES MHB TEXT FILE DATA
function setCamera | ( | x, | |
y, | |||
z | |||
) |
SET CAMERA POSITION
function setControls | ( | ) |
SET CONTROLS – MOUSE
function setLight | ( | ) |
SET THE LIGHTS
function setMaterial | ( | ) |
SETS SHADER UNIFORMS AND ATTRIBUTES
function shaders | ( | callback | ) |
SET SHADERS
function throwOnGLError | ( | err, | |
funcName, | |||
args | |||
) |
DEBUG FUNCTIONS
function webgl | ( | callback | ) |
INITIALIZE WEBGL & SCENE