-
Notifications
You must be signed in to change notification settings - Fork 20
/
portfolio.html
107 lines (81 loc) · 3.46 KB
/
portfolio.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en"></html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>3D PORTFOLIO</title>
<link rel="stylesheet" type="text/css" href="uv/uv.css">
<link rel="stylesheet" type="text/css" href="portfolio.css">
<script type="text/javascript" src="https://unpkg.com/iiif-gallery/dist/iiifgallery.js"></script>
<script type="text/javascript" src="uv/lib/offline.js"></script>
<script type="text/javascript" src="uv/helpers.js"></script>
</head>
<body>
<nav>
<h1>3D PORTFOLIO</h1>
</nav>
<main>
<div id="uv" class="uv"></div>
<!-- <iiif-gallery manifest="https://sophiedixon.github.io/3d-portfolio/collection/index.json"></iiif-gallery> -->
</main>
<script type="text/javascript">
var uv, $uv, urlDataProvider, manifest;
window.addEventListener('uvLoaded', function (e) {
$uv = $('#uv');
urlDataProvider = new UV.URLDataProvider();
var data = {
root: './uv',
iiifResourceUri: 'https://sophiedixon.github.io/3d-portfolio/collection/animal_skull/index.json',
configUri: 'portfolio-config.json',
collectionIndex: Number(urlDataProvider.get('c', 0)),
manifestIndex: Number(urlDataProvider.get('m', 0)),
sequenceIndex: Number(urlDataProvider.get('s', 0)),
canvasIndex: Number(urlDataProvider.get('cv', 0)),
rotation: Number(urlDataProvider.get('r', 0)),
xywh: urlDataProvider.get('xywh', ''),
locales: [
{
name: 'en-GB'
}
]
};
uv = createUV('#uv', data, urlDataProvider);
// uv.set({
// root: './uv',
// iiifResourceUri: 'https://sophiedixon.github.io/3d-portfolio/collection/animal_skull/index.json',
// configUri: 'portfolio-config.json',
// collectionIndex: 0,
// manifestIndex: 0,
// sequenceIndex: 0,
// canvasIndex: 0,
// locales: [
// {
// name: 'en-GB'
// }
// ]
// });
// uv.on('created', function() {
// Utils.Urls.setHashParameter('manifest', manifest);
// });
// const iiifGallery = document.querySelector('iiif-gallery');
// iiifGallery.addEventListener('onSelectManifest', function (evt) {
// manifest = evt.detail.id;
// openManifest();
// });
// iiifGallery.addEventListener('onSelectCollection', function (evt) {
// manifest = evt.detail.id;
// openManifest();
// });
// are there uv hash parameters?
// manifest = Utils.Urls.getHashParameter('manifest');
// if (manifest) {
// openManifest();
// }
//manifest = 'https://sophiedixon.github.io/3d-portfolio/collection/animal_skull/index.json';
//openManifest();
}, false);
</script>
<script src="uv/uv.js"></script>
</body>
</html>