Added striped texture to visualize rooms without sensors
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
BIN
img/visualize/stripe.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
@ -302,9 +302,8 @@ beestat.component.scene.prototype.update_raycaster_ = function() {
|
|||||||
* @link http://alexcpeterson.com/spacescape/
|
* @link http://alexcpeterson.com/spacescape/
|
||||||
*/
|
*/
|
||||||
beestat.component.scene.prototype.add_skybox_ = function() {
|
beestat.component.scene.prototype.add_skybox_ = function() {
|
||||||
const skybox_name = 'cloudy';
|
|
||||||
const loader = new THREE.CubeTextureLoader();
|
const loader = new THREE.CubeTextureLoader();
|
||||||
loader.setPath('img/visualize/' + skybox_name + '/');
|
loader.setPath('img/visualize/skybox/');
|
||||||
const texture = loader.load([
|
const texture = loader.load([
|
||||||
'front.png',
|
'front.png',
|
||||||
'back.png',
|
'back.png',
|
||||||
@ -532,9 +531,6 @@ beestat.component.scene.prototype.add_room_ = function(layer, group, room) {
|
|||||||
// Just the floor plan
|
// Just the floor plan
|
||||||
const extrude_height = 6;
|
const extrude_height = 6;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create a shape using the points of the room.
|
// Create a shape using the points of the room.
|
||||||
const shape = new THREE.Shape();
|
const shape = new THREE.Shape();
|
||||||
const first_point = clipper_hole[0].shift();
|
const first_point = clipper_hole[0].shift();
|
||||||
@ -553,9 +549,23 @@ beestat.component.scene.prototype.add_room_ = function(layer, group, room) {
|
|||||||
shape,
|
shape,
|
||||||
extrude_settings
|
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);
|
const mesh = new THREE.Mesh(geometry, material);
|
||||||
mesh.position.z = -extrude_height - (room.elevation || group.elevation);
|
mesh.position.z = -extrude_height - (room.elevation || group.elevation);
|
||||||
|
|
||||||
|