added modelviewer and css
This commit is contained in:
parent
1326d54083
commit
ad7d092728
5 changed files with 113 additions and 144 deletions
|
|
@ -8,15 +8,9 @@
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<model-viewer src="{{file if file else 'model.glb'}}" field-of-view="{{fieldofview if fieldofview else 'auto'}}" ar xr-environment camera-controls shadow-intensity=1>
|
||||||
<model-viewer src="{{file}}" ar camera-controls shadow-intensity=1><button class="Hotspot" slot="hotspot-3" data-position="0.034086908507172255m 0.035633058045035026m 0.0008323315838707837m" data-normal="0.11076220205426575m 0.9733893287613071m 0.2006114384817127m" data-visibility-attribute="visible">
|
{{content | safe}}
|
||||||
<div class="HotspotAnnotation">The Beak</div>
|
</model-viewer>
|
||||||
</button><button class="Hotspot" slot="hotspot-4" data-position="-0.0077982119614389955m -0.008128374324366697m -0.034137767670381604m" data-normal="-0.2165819895695754m 0.2073173991125989m -0.9539977661500428m" data-visibility-attribute="visible">
|
|
||||||
<div class="HotspotAnnotation">A Wing</div>
|
|
||||||
</button><button class="Hotspot" slot="hotspot-5" data-position="-0.04329843722003483m 0.011786457618276569m 0.0029983665888340706m" data-normal="-0.7752145503176167m 0.6212154023517756m 0.11460290073456728m" data-visibility-attribute="visible">
|
|
||||||
<div class="HotspotAnnotation">The Tail</div>
|
|
||||||
</button></model-viewer>
|
|
||||||
</main>
|
|
||||||
<script type="module" src="/assets/model-viewer.min.js"></script>
|
<script type="module" src="/assets/model-viewer.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
html,
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
width: 100vw;
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
model-viewer {
|
model-viewer {
|
||||||
height: 100vh;
|
width: 100%;
|
||||||
width: 100%
|
height: 90%;
|
||||||
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
:not(:defined) > * {
|
:not(:defined) > * {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.Hotspot {
|
.Hotspot {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
|
|
@ -76,7 +75,6 @@ model-viewer {
|
||||||
transition: transform 0.3s, opacity 0.3s;
|
transition: transform 0.3s, opacity 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
display: block;
|
display: block;
|
||||||
width: 33%;
|
width: 33%;
|
||||||
|
|
@ -87,7 +85,8 @@ model-viewer {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate3d(-50%, -50%, 0);
|
transform: translate3d(-50%, -50%, 0);
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.5), 0px 0px 5px 1px rgba(0, 0, 0, 0.6);
|
box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.5),
|
||||||
|
0px 0px 5px 1px rgba(0, 0, 0, 0.6);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.9);
|
border: 1px solid rgba(255, 255, 255, 0.9);
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
@ -106,39 +105,6 @@ model-viewer {
|
||||||
transition: width 0.3s;
|
transition: width 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ar-button {
|
|
||||||
background-image: url(ar_icon.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 20px 20px;
|
|
||||||
background-position: 12px 50%;
|
|
||||||
background-color: #fff;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
white-space: nowrap;
|
|
||||||
bottom: 16px;
|
|
||||||
padding: 0px 16px 0px 40px;
|
|
||||||
font-family: Roboto Regular, Helvetica Neue, sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #4285f4;
|
|
||||||
height: 36px;
|
|
||||||
line-height: 36px;
|
|
||||||
border-radius: 18px;
|
|
||||||
border: 1px solid #DADCE0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ar-button:active {
|
|
||||||
background-color: #E8EAED;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ar-button:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ar-button:focus-visible {
|
|
||||||
outline: 1px solid #4285f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes circle {
|
@keyframes circle {
|
||||||
from {
|
from {
|
||||||
transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);
|
transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);
|
||||||
|
|
|
||||||
5
src/models/stadttheater-bremerhaven/index.md
Normal file
5
src/models/stadttheater-bremerhaven/index.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Stadttheater Bremerhaven
|
||||||
|
alt: Ein 3D-Modell des Stadttheaters in Bremerhaven
|
||||||
|
fieldofview: 45deg
|
||||||
|
---
|
||||||
BIN
src/models/stadttheater-bremerhaven/model.glb
Normal file
BIN
src/models/stadttheater-bremerhaven/model.glb
Normal file
Binary file not shown.
|
|
@ -6,8 +6,12 @@ file: model.glb
|
||||||
|
|
||||||
<button class="Hotspot" slot="hotspot-3" data-position="0.034086908507172255m 0.035633058045035026m 0.0008323315838707837m" data-normal="0.11076220205426575m 0.9733893287613071m 0.2006114384817127m" data-visibility-attribute="visible">
|
<button class="Hotspot" slot="hotspot-3" data-position="0.034086908507172255m 0.035633058045035026m 0.0008323315838707837m" data-normal="0.11076220205426575m 0.9733893287613071m 0.2006114384817127m" data-visibility-attribute="visible">
|
||||||
<div class="HotspotAnnotation">The Beak</div>
|
<div class="HotspotAnnotation">The Beak</div>
|
||||||
</button><button class="Hotspot" slot="hotspot-4" data-position="-0.0077982119614389955m -0.008128374324366697m -0.034137767670381604m" data-normal="-0.2165819895695754m 0.2073173991125989m -0.9539977661500428m" data-visibility-attribute="visible">
|
</button>
|
||||||
|
|
||||||
|
<button class="Hotspot" slot="hotspot-4" data-position="-0.0077982119614389955m -0.008128374324366697m -0.034137767670381604m" data-normal="-0.2165819895695754m 0.2073173991125989m -0.9539977661500428m" data-visibility-attribute="visible">
|
||||||
<div class="HotspotAnnotation">A Wing</div>
|
<div class="HotspotAnnotation">A Wing</div>
|
||||||
</button><button class="Hotspot" slot="hotspot-5" data-position="-0.04329843722003483m 0.011786457618276569m 0.0029983665888340706m" data-normal="-0.7752145503176167m 0.6212154023517756m 0.11460290073456728m" data-visibility-attribute="visible">
|
</button>
|
||||||
|
|
||||||
|
<button class="Hotspot" slot="hotspot-5" data-position="-0.04329843722003483m 0.011786457618276569m 0.0029983665888340706m" data-normal="-0.7752145503176167m 0.6212154023517756m 0.11460290073456728m" data-visibility-attribute="visible">
|
||||||
<div class="HotspotAnnotation">The Tail</div>
|
<div class="HotspotAnnotation">The Tail</div>
|
||||||
</button>
|
</button>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue