Skip to content

Commit 6a0f1b2

Browse files
committed
555
1 parent c2236ba commit 6a0f1b2

File tree

4 files changed

+235
-3
lines changed

4 files changed

+235
-3
lines changed

public/bundle.js

+126
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/cf7d1273ecbe3b1aac8f.js

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>3D Game Scene</title>
7+
<style>
8+
body { margin: 0; overflow: hidden; }
9+
canvas { display: block; }
10+
#menu {
11+
display: block; /* Show menu by default */
12+
position: fixed;
13+
top: 0;
14+
left: 0;
15+
width: 100%;
16+
height: 100%;
17+
background-color: rgba(0, 0, 0, 0.8);
18+
text-align: center;
19+
font-family: 'Arial', sans-serif;
20+
}
21+
#menu h1 {
22+
color: #fff;
23+
margin-top: 5%;
24+
font-size: 3rem;
25+
}
26+
#menu button {
27+
display: block;
28+
margin: 20px auto;
29+
padding: 10px 20px;
30+
font-size: 1.5rem;
31+
color: #fff;
32+
background-color: #007bff;
33+
border: none;
34+
cursor: pointer;
35+
border-radius: 5px;
36+
transition: background-color 0.3s;
37+
}
38+
#menu button:hover {
39+
background-color: #0056b3;
40+
}
41+
#menu p {
42+
color: #fff;
43+
font-size: 1.2rem;
44+
max-width: 600px;
45+
margin: 20px auto;
46+
text-align: left;
47+
line-height: 1.5;
48+
}
49+
#clues {
50+
background-color: rgba(0, 0, 0, 0.6);
51+
padding: 20px;
52+
border-radius: 10px;
53+
margin-top: 5%;
54+
}
55+
</style>
56+
<script defer src="/bundle.js"></script></head>
57+
<body>
58+
<div id="menu">
59+
<h1>Game Menu</h1>
60+
<button id="mainButton">Start Game</button>
61+
62+
<div id="clues">
63+
<h2 style="color: #fff;">Clues:</h2>
64+
<p><strong>Move:</strong> W, A, S, D</p>
65+
<p><strong>Jump:</strong> Spacebar</p>
66+
<p><strong>Sprint:</strong> Hold Left Control</p>
67+
<p><strong>Pick up object:</strong> Press E when near an object</p>
68+
<p><strong>Throw object:</strong> Press F while holding an object</p>
69+
</div>
70+
</div>
71+
72+
<script src="/cf7d1273ecbe3b1aac8f.js" defer></script>
73+
</body>
74+
</html>

webpack.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ const __filename = fileURLToPath(import.meta.url);
66
const __dirname = path.dirname(__filename);
77

88
export default {
9-
mode: 'development',
9+
mode: process.env.NODE_ENV || 'development', // Support both development and production
1010
entry: './src/index.js',
1111
output: {
1212
filename: 'bundle.js',
13-
path: path.resolve(__dirname, 'dist'),
13+
path: path.resolve(__dirname, 'public'), // Output to "public" for Vercel
1414
publicPath: '/',
1515
},
1616
devServer: {
1717
static: {
18-
directory: path.join(__dirname, 'dist'),
18+
directory: path.join(__dirname, 'public'),
1919
},
2020
port: 8080,
2121
open: true,

0 commit comments

Comments
 (0)