aboutsummaryrefslogtreecommitdiff
path: root/src/webGLWorker.js
diff options
context:
space:
mode:
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;