diff --git a/img/visualize/cloudy/back.png b/img/visualize/skybox/back.png similarity index 100% rename from img/visualize/cloudy/back.png rename to img/visualize/skybox/back.png diff --git a/img/visualize/cloudy/down.png b/img/visualize/skybox/down.png similarity index 100% rename from img/visualize/cloudy/down.png rename to img/visualize/skybox/down.png diff --git a/img/visualize/cloudy/front.png b/img/visualize/skybox/front.png similarity index 100% rename from img/visualize/cloudy/front.png rename to img/visualize/skybox/front.png diff --git a/img/visualize/cloudy/left.png b/img/visualize/skybox/left.png similarity index 100% rename from img/visualize/cloudy/left.png rename to img/visualize/skybox/left.png diff --git a/img/visualize/cloudy/right.png b/img/visualize/skybox/right.png similarity index 100% rename from img/visualize/cloudy/right.png rename to img/visualize/skybox/right.png diff --git a/img/visualize/cloudy/up.png b/img/visualize/skybox/up.png similarity index 100% rename from img/visualize/cloudy/up.png rename to img/visualize/skybox/up.png diff --git a/img/visualize/stripe.png b/img/visualize/stripe.png new file mode 100644 index 0000000..bf2d165 Binary files /dev/null and b/img/visualize/stripe.png differ diff --git a/js/component/scene.js b/js/component/scene.js index 36ccbbf..fc4e313 100644 --- a/js/component/scene.js +++ b/js/component/scene.js @@ -302,9 +302,8 @@ beestat.component.scene.prototype.update_raycaster_ = function() { * @link http://alexcpeterson.com/spacescape/ */ beestat.component.scene.prototype.add_skybox_ = function() { - const skybox_name = 'cloudy'; const loader = new THREE.CubeTextureLoader(); - loader.setPath('img/visualize/' + skybox_name + '/'); + loader.setPath('img/visualize/skybox/'); const texture = loader.load([ 'front.png', 'back.png', @@ -532,9 +531,6 @@ beestat.component.scene.prototype.add_room_ = function(layer, group, room) { // Just the floor plan const extrude_height = 6; - - - // Create a shape using the points of the room. const shape = new THREE.Shape(); const first_point = clipper_hole[0].shift(); @@ -553,9 +549,23 @@ beestat.component.scene.prototype.add_room_ = function(layer, group, room) { shape, extrude_settings ); - const material = new THREE.MeshPhongMaterial({ - 'color': color - }); + + let material; + if (room.sensor_id === undefined) { + const texture = new THREE.TextureLoader().load('img/visualize/stripe.png'); + texture.wrapS = THREE.RepeatWrapping; + texture.wrapT = THREE.RepeatWrapping; + texture.repeat.set(0.005, 0.005); + + material = new THREE.MeshPhongMaterial({ + 'map': texture + }); + } else { + material = new THREE.MeshPhongMaterial({ + 'color': color + }); + } + const mesh = new THREE.Mesh(geometry, material); mesh.position.z = -extrude_height - (room.elevation || group.elevation);