Skip to content

Commit

Permalink
Update for Sprint Release
Browse files Browse the repository at this point in the history
Removed files we dont use anymore. And commented out old way of displaying points on map. Maybe something will still be usefull for the future
  • Loading branch information
leonopulos committed Jun 2, 2021
1 parent 92e6fe7 commit 5552ef0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 126 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ The computer science department would like to use this viewer to display its 50
textual deliverables, i.e. documents (pdf, doc, etc.), or software deliverables


- **/assets**:
panaroma image dataset as an example to try the viewer software

- **/src**:
stands for source, and is the raw code before minification or concatenation or some other compilation - used to read/edit the code

Expand All @@ -75,7 +72,7 @@ It includes css(inside PanoViewer div),js,libs and index.html
includes the general viewer files

* **/src/libs**:
includes jQuery and Three.js Library files
includes jQuery, OpenLayers and Three.js Library files


## Folder Structure
Expand All @@ -96,6 +93,7 @@ Includes the js files and main.js

- [License | jQuery Foundation](https://jquery.org/license/): JavaScript library for simple HTML DOM manipulation

- [OpenLayers](https://openlayers.org): JavaScript library for displaying a dynamic map and markers on it



Expand Down
Binary file removed assets/0/0r3.jpg
Binary file not shown.
Binary file removed assets/0/1r3.jpg
Binary file not shown.
Binary file removed assets/0/2r3.jpg
Binary file not shown.
Binary file removed assets/map0.png
Binary file not shown.
108 changes: 0 additions & 108 deletions src/js/main.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/js/viewer/ViewerAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ViewerAPI {
constructor(baseURL) {
this.libs = libraryInfo(); // : [ViewerLibrary] // List of used third party libraries
this.version = new ViewerVersionAPI( // : ViewerVersionAPI // Version API
0.6, // Sprint 6
0.7, // Sprint 7
NaN,
"three.js 0.128.0 360 pano image viewer"
);
Expand Down
27 changes: 14 additions & 13 deletions src/js/viewer/ViewerMapAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class ViewerMapAPI {
this.spriteGroup = new THREE.Group(); //create an sprite group
this.mapScalingFactor = 0.2;

// const baseURL = "https://bora.bup-nbg.de/amos2floors/";
this.baseURL = viewerAPI.baseURL;

// create Map and Layers
Expand Down Expand Up @@ -61,26 +60,27 @@ export class ViewerMapAPI {

// Method : Schedule a redraw of the three.js scene overlayed over the map (2D) view.
redraw() {
/*
this.spriteGroup.clear();
//* remove comment to draw all points on map
let allImages = this.viewerFloorAPI.currentFloor.viewerImages;

allImages.forEach(image => {
this.addPoint("black", image.mapOffset);
});
//*/
// remove comment to draw all points on map
// let allImages = this.viewerFloorAPI.currentFloor.viewerImages;
// allImages.forEach(image => {
// this.addPoint("black", image.mapOffset);
// });
//
this.location = this.addPoint("red", this.viewerImageAPI.currentImage.mapOffset);
//this.addViewingDirection("yellow", this.viewerImageAPI.currentImage.mapOffset);

*/
var floorIndex = this.viewerFloorAPI.currentFloorId;
this.updateDisplayMap(floorIndex);

}


// draws a point in *color* on the map at *offset*, also returns the THREE.Sprite after it is drawn
/* draws a point in *color* on the map at *offset*, also returns the THREE.Sprite after it is drawn
addPoint(color, offset) {
const texture = new THREE.Texture(generateCircularSprite(color));
texture.needsUpdate = true;
Expand All @@ -103,15 +103,15 @@ export class ViewerMapAPI {
this.spriteGroup.add(pointSprite);
return pointSprite;
}
}*/

// Method
scale() {
//Get the scale used by the three.js scene overlayed over the map (2D) view.
return this.viewerFloorAPI.currentFloor.mapData.density; // (in meter / pixel)
}

addViewingDirection(color, position){
/*addViewingDirection(color, position){
const texture = new THREE.Texture(generateTriangleCanvas(color));
texture.needsUpdate = true;
var mat = new THREE.SpriteMaterial({
Expand All @@ -131,7 +131,7 @@ export class ViewerMapAPI {
triangleSprite.scale.set(10, 10, 1);
this.spriteGroup.add(triangleSprite);
}
}*/

initDisplayMap(){

Expand Down Expand Up @@ -188,6 +188,7 @@ export class ViewerMapAPI {

}

/*
function generateCircularSprite(color) {
var canvas = document.createElement('canvas');
canvas.height = 16;
Expand Down

0 comments on commit 5552ef0

Please sign in to comment.