Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dergunovd committed Jul 29, 2018
2 parents abfedf6 + 5145edf commit d714e37
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 15 deletions.
17 changes: 17 additions & 0 deletions dist/images/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions dist/images/door.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Panorama DEMO",
"short_name": "Panorama DEMO",
"short_name": "Panorama",
"orientation": "portrait",
"display": "standalone",
"start_url": ".",
Expand Down
8 changes: 6 additions & 2 deletions dist/panorama.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions dist/sw.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
var serviceWorkerOption = {
"assets": [
"/panorama.js",
"/images/room0/py.webp",
"/images/arrow.svg",
"/images/door.svg",
"/index.html",
"/images/room0/py.webp",
"/images/room2/py.webp",
"/images/room1/py.webp",
"/images/room1/pz.webp",
Expand All @@ -20,9 +22,9 @@ var serviceWorkerOption = {
"/images/room1/ny.webp",
"/images/room1/pz.jpg",
"/images/room0/nz.webp",
"/images/room2/pz.webp",
"/images/room0/ny.webp",
"/images/room1/nx.jpg",
"/images/room2/pz.webp",
"/images/room2/nx.webp",
"/images/room2/nz.jpg",
"/images/room2/px.jpg",
Expand Down
24 changes: 15 additions & 9 deletions src/panorama.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ body {
cursor: move;
}

.arrow {
width: 40px;
height: 40px;
background: #5b2c6f;
box-shadow: 5px 5px 20px #000;
border: 5px solid #fff;
border-radius: 50%;
.point {
width: 60px;
height: 60px;
position: relative;
cursor: pointer;
opacity: .7;
}

.arrow:hover,
.arrow:active {
.point.arrow {
background: url("/images/arrow.svg") center center no-repeat / cover;
}

.point.door {
background: url("/images/door.svg") center center no-repeat / cover;
}

.point:hover,
.point:active {
opacity: 1;
}
6 changes: 5 additions & 1 deletion src/panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const THREE = require('three/build/three.min'),
points = [
{
url: '#room0',
className: 'door',
position: [-496, -100, -300],
rotation: [0, Math.PI / 2, 0]
}
Expand All @@ -63,6 +64,7 @@ const THREE = require('three/build/three.min'),
points = [
{
url: '#room0',
className: 'arrow',
position: [496, -100, 496],
rotation: [0, Math.PI, 0]
}
Expand All @@ -73,11 +75,13 @@ const THREE = require('three/build/three.min'),
points = [
{
url: '#room1',
className: 'door',
position: [190, -100, -496],
rotation: [0, 0, 0]
},
{
url: '#room2',
className: 'arrow',
position: [496, -200, -250],
rotation: [0, -Math.PI / 2, 0]
}
Expand Down Expand Up @@ -512,7 +516,7 @@ function init() {
for (let i = points.length - 1; i > -1; i--) {
const point = points[i];
const element = document.createElement('a');
element.className = 'arrow';
element.className = `point ${point.className}`;
element.href = point.url;
const object = new THREE.CSS3DObject(element);
object.position.fromArray(point.position);
Expand Down
17 changes: 17 additions & 0 deletions src/public/images/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/public/images/door.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d714e37

Please sign in to comment.