summaryrefslogtreecommitdiff
path: root/src/webGLWorker.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-05 17:22:31 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-05 17:22:31 -0700
commit459cd6a71c0dd1bcb15eaa69e9ffcab18a69f8dc (patch)
tree7bdb4de93603db9148ae0f94064794f3b93ca8d3 /src/webGLWorker.js
parentbdd0a5c6e878aa85493775d4c0bee95a380e4468 (diff)
more preparations for prefetched parameters
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r--src/webGLWorker.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/webGLWorker.js b/src/webGLWorker.js
index 993d954d..a6b6b4d2 100644
--- a/src/webGLWorker.js
+++ b/src/webGLWorker.js
@@ -435,6 +435,22 @@ function WebGLWorker() {
//==========
var that = this;
+
+ // Helpers
+
+ this.onmessage = function(msg) {
+ dump('worker GL got ' + JSON.stringify(msg) + '\n');
+ switch(msg.op) {
+ case 'setPrefetchedParameters': {
+ that.prefetchedParameters = msg.data;
+ break;
+ }
+ default: throw 'weird gl onmessage ' + JSON.stringify(msg);
+ }
+ };
+
+ // GL
+
function revname(name) {
for (var x in that) if (that[x] === name) return x;
return null;