repo: janusweb action: commit revision: path_from: revision_from: b64340f6deb3746b41344b8b9ee651610035dd64: path_to: revision_to:
commit b64340f6deb3746b41344b8b9ee651610035dd64 Author: James BaicoianuDate: 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
--- 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-----