repo: janusweb
action: commit
revision: 
path_from: 
revision_from: b64340f6deb3746b41344b8b9ee651610035dd64:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit b64340f6deb3746b41344b8b9ee651610035dd64
Author: James Baicoianu 
Date:   Wed Jul 24 12:36:17 2019 -0700

    Optimization: bypassing proxy object for ambient color reduces per-frame cpu overhead

diff --git a/scripts/room.js b/scripts/room.js
index 4ea0df8561db0c3ec9941dbf622d8244189dac9a..
index ..6bb70e60c5a6799f4ddca53ed0887cad32e82938 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -141,7 +141,7 @@ elation.require([
     this.createLights = function() {
       this.roomlights = {
         ambient: this.spawn('light_ambient', this.id + '_ambient', {
-          color: this.properties.ambient
+          color: this.properties.ambient._target
         }),
         directional: this.spawn('light_directional', this.id + '_sun', {
           position: [-20,50,25],
@@ -158,7 +158,7 @@ elation.require([
         this.createLights();
       }
       if (!this.objects['3d']) return;
-      this.roomlights.ambient.lightobj.color = this.ambient;
+      this.roomlights.ambient.lightobj.color = this.ambient._target;
       if (this.defaultlights) {
         if (this.roomlights.directional.parent != this) {
           this.add(this.roomlights.directional);

-----END OF PAGE-----