Skip to content

Commit c6cfeda

Browse files
committed
Revert "Replace A-Frame AR with model-viewer for AR experience"
This reverts commit ebfb2cc.
1 parent ebfb2cc commit c6cfeda

File tree

6 files changed

+37
-171
lines changed

6 files changed

+37
-171
lines changed

astro.config.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@ import { defineConfig } from 'astro/config';
22

33
export default defineConfig({
44
site: 'https://newworkdesignlab.github.io',
5-
base: '/narrenhaeusel',
6-
server: {
7-
host: true,
8-
port: 4321
9-
}
5+
base: '/narrenhaeusel',
106
});

package-lock.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/models/house.glb

-3.5 MB
Binary file not shown.

src/pages/index.astro

Lines changed: 16 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,22 @@
11
---
22
import '../styles/style.css';
3-
4-
const config = {
5-
modelPath: '/narrenhaeusel/assets/models/house.glb',
6-
scale: 'fixed'
7-
};
83
---
94

10-
<html lang="en">
11-
<head>
5+
<html lang="de">
6+
<head>
127
<meta charset="utf-8" />
13-
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
8+
<meta name="viewport" content="width=device-width" />
9+
<link rel="icon" type="image/svg+xml" href="/narrenhaeusel/assets/favicon.png" />
10+
<meta name="generator" content={Astro.generator} />
1411
<title>Narrenhäusel AR</title>
15-
16-
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.4.0/model-viewer.min.js"></script>
17-
18-
<style>
19-
body { margin: 0; background-color: #111; font-family: sans-serif; height: 100vh; width: 100vw; overflow: hidden; }
20-
21-
model-viewer {
22-
width: 100%;
23-
height: 100%;
24-
background-color: #111;
25-
--poster-color: #111;
26-
}
27-
28-
.ar-button {
29-
background-color: white;
30-
border-radius: 4px;
31-
border: none;
32-
position: absolute;
33-
top: 50%; left: 50%;
34-
transform: translate(-50%, -50%);
35-
padding: 15px 30px;
36-
font-weight: bold;
37-
font-size: 18px;
38-
cursor: pointer;
39-
z-index: 100;
40-
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
41-
}
42-
43-
.guide-text {
44-
position: absolute; bottom: 30px; width: 100%; text-align: center;
45-
color: white; pointer-events: none; display: none;
46-
z-index: 10;
47-
text-shadow: 0 0 5px rgba(0,0,0,0.8);
48-
}
49-
50-
model-viewer[ar-status="session-started"] + .guide-text {
51-
display: block;
52-
}
53-
</style>
54-
</head>
55-
<body>
56-
57-
<model-viewer
58-
src={config.modelPath}
59-
alt="Narrenhäusel AR Model"
60-
ar
61-
ar-modes="webxr scene-viewer quick-look"
62-
camera-controls
63-
ar-placement="wall"
64-
ar-scale={config.scale}
65-
shadow-intensity="1">
66-
67-
<button slot="ar-button" class="ar-button">
68-
Start AR
69-
</button>
70-
71-
</model-viewer>
72-
73-
<div class="guide-text">Point camera at a wall to place the house</div>
74-
75-
</body>
76-
</html>
12+
</head>
13+
<body>
14+
<div class="background"></div>
15+
<main>
16+
<h1>
17+
<span>Coming</span>
18+
<span>soon...</span>
19+
</h1>
20+
</main>
21+
</body>
22+
</html>

src/scripts/ar.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/styles/style.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,22 @@ html, body {
3535
height: 100%;
3636
margin: 0;
3737
overflow: hidden;
38-
background: transparent;
38+
}
39+
40+
.background {
41+
position: fixed;
42+
top: 0;
43+
left: 0;
44+
width: 100%;
45+
height: 100%;
46+
z-index: -1;
47+
48+
background-image: url('/narrenhaeusel/assets/background.avif');
49+
background-size: cover;
50+
background-position: center;
51+
52+
filter: blur(12px);
53+
transform: scale(1.1);
3954
}
4055

4156
main {

0 commit comments

Comments
 (0)