diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-05 17:22:31 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-05 17:22:31 -0700 |
commit | 459cd6a71c0dd1bcb15eaa69e9ffcab18a69f8dc (patch) | |
tree | 7bdb4de93603db9148ae0f94064794f3b93ca8d3 /src/webGLWorker.js | |
parent | bdd0a5c6e878aa85493775d4c0bee95a380e4468 (diff) |
more preparations for prefetched parameters
Diffstat (limited to 'src/webGLWorker.js')
-rw-r--r-- | src/webGLWorker.js | 16 |
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; |