Data Build Models Render Interact DB Python JSON / Binary XHR2 Workers / TypedArrays WebGL / 2D Canvas DOM Events / HTML Forms Extraer Transformar Servir Cargar Datos Crear Modelos Renderear Interactuar Datos / Servidor / Cliente Viz / Cliente
{ //send data to GPU program.setUniform('size', sizeValue); program.setBuffer('histogram', { value: new Float32Array(createColorArray(movie)), size: 1 }); //rotate histogram a little bit theta += 0.007; histogramModel.rotation.set(-Math.PI / 4, theta, 0.3); histogramModel.update(); //clear the screen gl.clearColor(color, color, color, 1); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); //render the scene scene.render(); //request next frame for loop Fx.requestAnimationFrame(loop); }
var typedArray = new Uint16Array(arraybuffer); //do stuff like with a regular array for (var i = 0, l = typedArray.length; i < l; ++i) { typedArray[i] += 2; } } ArrayBuffer Uint8Array Float32Array Int16Array etc.
var slider = document.getElementById('time'); slider.addEventListener('change', function(e) { var value = slider.valueAsNumer; }, false); Otros tipos: color, date, datetime, email, month, number, range, search, tel, time, url, week, etc.