From 78159510738c53bad4f91cc1b89e27c862f9ef72 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 9 May 2014 15:22:23 -0700 Subject: [PATCH] Split out aether from vendor.js. Should help #826. --- .../javascripts/workers/aether_worker.js | 2 +- .../javascripts/workers/worker_world.js | 2 +- app/assets/main.html | 1 + config.coffee | 20 +++++++++++-------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/workers/aether_worker.js b/app/assets/javascripts/workers/aether_worker.js index 9fbad8155..65badb459 100644 --- a/app/assets/javascripts/workers/aether_worker.js +++ b/app/assets/javascripts/workers/aether_worker.js @@ -1,7 +1,7 @@ var window = self; var Global = self; -importScripts("/javascripts/tome_aether.js"); +importScripts("/javascripts/lodash.js", "/javascripts/aether.js"); console.log("imported scripts!"); var aethers = {}; diff --git a/app/assets/javascripts/workers/worker_world.js b/app/assets/javascripts/workers/worker_world.js index b5a156ca7..4b4589e49 100644 --- a/app/assets/javascripts/workers/worker_world.js +++ b/app/assets/javascripts/workers/worker_world.js @@ -60,7 +60,7 @@ var console = { console.error = console.info = console.log; self.console = console; -importScripts('/javascripts/world.js'); +importScripts('/javascripts/world.js', "/javascripts/lodash.js", "/javascripts/aether.js"); // We could do way more from this: http://stackoverflow.com/questions/10653809/making-webworkers-a-safe-environment Object.defineProperty(self, "XMLHttpRequest", { diff --git a/app/assets/main.html b/app/assets/main.html index 0521041b5..b0fac676c 100644 --- a/app/assets/main.html +++ b/app/assets/main.html @@ -34,6 +34,7 @@ +