From 93ef743736a23153b676fbba3d81d03114477833 Mon Sep 17 00:00:00 2001 From: GitSquared Date: Sat, 11 Aug 2018 17:32:24 +0200 Subject: [PATCH] :sparkles: Reworked fog in encom_globe / mod_locationGlobe --- src/assets/vendor/encom-globe.js | 6 +++--- src/classes/locationGlobe.class.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assets/vendor/encom-globe.js b/src/assets/vendor/encom-globe.js index 956391ef..57b1fce4 100644 --- a/src/assets/vendor/encom-globe.js +++ b/src/assets/vendor/encom-globe.js @@ -42044,10 +42044,10 @@ function Globe(width, height, opts){ /* public globe functions */ -Globe.prototype.init = function(cb){ +Globe.prototype.init = function(fog_color, cb){ // create the camera - this.camera = new THREE.PerspectiveCamera( 50, this.width / this.height, 1, this.cameraDistance + 300 ); + this.camera = new THREE.PerspectiveCamera( 50, this.width / this.height, 1, this.cameraDistance + 900 ); this.camera.position.z = this.cameraDistance; this.cameraAngle=(Math.PI); @@ -42055,7 +42055,7 @@ Globe.prototype.init = function(cb){ // create the scene this.scene = new THREE.Scene(); - this.scene.fog = new THREE.Fog( 0x000000, this.cameraDistance, this.cameraDistance+300 ); + this.scene.fog = new THREE.Fog( new THREE.Color(fog_color || 0x000000), this.cameraDistance, this.cameraDistance+300 ); createIntroLines.call(this); diff --git a/src/classes/locationGlobe.class.js b/src/classes/locationGlobe.class.js index 0410e0f8..87e05383 100644 --- a/src/classes/locationGlobe.class.js +++ b/src/classes/locationGlobe.class.js @@ -58,7 +58,7 @@ class LocationGlobe { requestAnimationFrame(window.mods.globe._animate); } }; - this.globe.init(() => { + this.globe.init(window.theme.colors.light_black, () => { this._animate(); });