Class SAGE2_BlockStreamingApp
Class defined in:public/src/SAGE2_BlockStreamingApp.js:21
Base class for block streaming applications
draw
( date
)
public/src/SAGE2_BlockStreamingApp.js:720
Draw function, draws each blocks
Parameters:-
date
<Date>current time from the server
event
( eventType, position, user_id, data, date
)
public/src/SAGE2_BlockStreamingApp.js:952
Handles event processing for the app
Parameters:firstLoad
(
)
public/src/SAGE2_BlockStreamingApp.js:706
Loads the app from a previous state and initializes the buffers and textures
getShaders
( vertFile, fragFile, callback
)
public/src/SAGE2_BlockStreamingApp.js:256
Loads the shaders files from the server and creates the shaders
Parameters:init
( data
)
public/src/SAGE2_BlockStreamingApp.js:28
Init method, creates an 'canvas' tag in the DOM and setups up WebGL
Parameters:-
data
<Object>contains initialization values (id, width, height, ...)
initBuffers
(
)
public/src/SAGE2_BlockStreamingApp.js:323
Initializes the GL buffers for the blocks of pixel
initShaders
( callback
)
public/src/SAGE2_BlockStreamingApp.js:130
Loads the yuv2rgb shaders
Parameters:-
callback
<Function>to be executed when shaders are loaded
initTextures
(
)
public/src/SAGE2_BlockStreamingApp.js:402
Initializes the GL textures for the blocks of pixel
move
( date
)
public/src/SAGE2_BlockStreamingApp.js:918
After move, show the canvas and update the coordinate system (resizeCanvas)
Parameters:-
date
<Date>current time from the server
resize
( date
)
public/src/SAGE2_BlockStreamingApp.js:940
After resize, show the canvas and update the coordinate system (resizeCanvas)
Parameters:-
date
<Date>current time from the server
resizeCanvas
(
)
public/src/SAGE2_BlockStreamingApp.js:852
Resize the canvas in local (client) coordinates, never bigger than the local screen
startMove
( date
)
public/src/SAGE2_BlockStreamingApp.js:908
When a move starts, hide the canvas
Parameters:-
date
<Date>current time from the server
startResize
( date
)
public/src/SAGE2_BlockStreamingApp.js:930
When a resize starts, hide the canvas
Parameters:-
date
<Date>current time from the server
textureData
( blockIdx, yuvBuffer
)
public/src/SAGE2_BlockStreamingApp.js:539
Sets a block of pixels into a buffer
Parameters:updateTextures
(
)
public/src/SAGE2_BlockStreamingApp.js:621
Update the textures with the new pixel data