Spaces:
Running
Running
Update index.html
Browse files- index.html +53 -93
index.html
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>
|
7 |
<style>
|
8 |
body {
|
9 |
font-family: 'Courier New', monospace;
|
10 |
-
background-color: #1a1a1a;
|
11 |
-
color: #e0e0e0;
|
12 |
margin: 0;
|
13 |
padding: 0;
|
14 |
overflow: hidden;
|
@@ -26,116 +26,77 @@
|
|
26 |
#scene-container {
|
27 |
flex-grow: 3;
|
28 |
position: relative;
|
29 |
-
border-right: 2px solid #444;
|
30 |
-
background-color: #000;
|
|
|
31 |
}
|
32 |
|
33 |
#ui-container {
|
34 |
-
flex-grow:
|
35 |
-
padding:
|
36 |
overflow-y: auto;
|
37 |
-
background-color: #2a2a2a;
|
38 |
display: flex;
|
39 |
flex-direction: column;
|
40 |
border-left: 1px solid #444;
|
|
|
41 |
}
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
margin-top: 0;
|
46 |
-
border-bottom: 1px solid #555;
|
47 |
padding-bottom: 10px;
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
#story-content {
|
52 |
-
margin-bottom: 20px;
|
53 |
-
line-height: 1.6;
|
54 |
-
flex-grow: 1; /* Allow story to take up space */
|
55 |
}
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
margin-top: 10px; /* Reduced margin */
|
60 |
-
padding-top: 15px;
|
61 |
-
border-top: 1px solid #555;
|
62 |
}
|
63 |
|
64 |
-
|
65 |
-
margin
|
66 |
-
margin-bottom: 10px;
|
67 |
color: #aaa;
|
68 |
-
font-size:
|
69 |
text-transform: uppercase;
|
70 |
letter-spacing: 1px;
|
71 |
}
|
72 |
|
73 |
-
|
74 |
-
display: block;
|
75 |
-
width: calc(100% - 22px); /* Account for padding/border */
|
76 |
-
padding: 12px 10px; /* Slightly more padding */
|
77 |
-
margin-bottom: 10px;
|
78 |
-
background-color: #444; /* Darker buttons */
|
79 |
-
color: #e0e0e0;
|
80 |
-
border: 1px solid #666;
|
81 |
-
border-radius: 5px;
|
82 |
-
cursor: pointer;
|
83 |
-
text-align: left;
|
84 |
-
font-family: 'Courier New', monospace;
|
85 |
-
font-size: 1em;
|
86 |
-
transition: background-color 0.2s, color 0.2s;
|
87 |
-
}
|
88 |
-
|
89 |
-
.choice-button:hover:not(:disabled) {
|
90 |
-
background-color: #ffd700; /* Gold hover */
|
91 |
-
color: #1a1a1a;
|
92 |
-
border-color: #fff;
|
93 |
-
}
|
94 |
-
.choice-button:disabled {
|
95 |
-
background-color: #333; /* Darker disabled */
|
96 |
-
color: #777;
|
97 |
-
cursor: not-allowed;
|
98 |
-
border-color: #555;
|
99 |
-
opacity: 0.7;
|
100 |
-
}
|
101 |
-
.choice-button[title]:disabled {
|
102 |
-
text-decoration: line-through; /* Indicate locked */
|
103 |
-
}
|
104 |
-
|
105 |
-
#stats-inventory-container {
|
106 |
-
margin-top: 20px;
|
107 |
-
padding: 15px 0;
|
108 |
-
border-top: 1px solid #555;
|
109 |
-
font-size: 0.9em;
|
110 |
-
}
|
111 |
-
#stats-inventory-container h4 {
|
112 |
-
margin: 0 0 8px 0;
|
113 |
-
color: #aaa;
|
114 |
font-size: 0.9em;
|
115 |
-
|
116 |
-
letter-spacing: 1px;
|
117 |
}
|
118 |
-
#
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
123 |
display: inline-block;
|
124 |
background-color: #3a3a3a;
|
125 |
padding: 3px 10px;
|
126 |
border-radius: 15px;
|
127 |
margin-right: 8px;
|
128 |
-
margin-bottom: 6px;
|
129 |
border: 1px solid #555;
|
130 |
-
white-space: nowrap;
|
131 |
}
|
132 |
-
#inventory-display span { cursor: help; }
|
|
|
133 |
#inventory-display .item-quest { background-color: #666030; border-color: #999048;}
|
134 |
#inventory-display .item-weapon { background-color: #663030; border-color: #994848;}
|
135 |
#inventory-display .item-armor { background-color: #306630; border-color: #489948;}
|
136 |
#inventory-display .item-spell { background-color: #303066; border-color: #484899;}
|
|
|
137 |
#inventory-display .item-unknown { background-color: #555; border-color: #777;}
|
138 |
|
|
|
139 |
canvas { display: block; }
|
140 |
</style>
|
141 |
</head>
|
@@ -145,21 +106,19 @@
|
|
145 |
<div id="scene-container"></div>
|
146 |
|
147 |
<div id="ui-container">
|
148 |
-
<
|
149 |
-
|
150 |
-
<
|
151 |
</div>
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
<div id="stats-display"></div>
|
156 |
-
<h4>Inventory</h4>
|
157 |
-
<div id="inventory-display"></div>
|
158 |
</div>
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
163 |
</div>
|
164 |
</div>
|
165 |
</div>
|
@@ -168,7 +127,8 @@
|
|
168 |
{
|
169 |
"imports": {
|
170 |
"three": "https://unpkg.com/[email protected]/build/three.module.js",
|
171 |
-
"three/addons/": "https://unpkg.com/[email protected]/examples/jsm/"
|
|
|
172 |
}
|
173 |
}
|
174 |
</script>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>3D Dungeon Explorer</title>
|
7 |
<style>
|
8 |
body {
|
9 |
font-family: 'Courier New', monospace;
|
10 |
+
background-color: #1a1a1a;
|
11 |
+
color: #e0e0e0;
|
12 |
margin: 0;
|
13 |
padding: 0;
|
14 |
overflow: hidden;
|
|
|
26 |
#scene-container {
|
27 |
flex-grow: 3;
|
28 |
position: relative;
|
29 |
+
border-right: 2px solid #444;
|
30 |
+
background-color: #000;
|
31 |
+
cursor: crosshair; /* Indicate interaction area */
|
32 |
}
|
33 |
|
34 |
#ui-container {
|
35 |
+
flex-grow: 1; /* Smaller UI panel */
|
36 |
+
padding: 15px;
|
37 |
overflow-y: auto;
|
38 |
+
background-color: #2a2a2a;
|
39 |
display: flex;
|
40 |
flex-direction: column;
|
41 |
border-left: 1px solid #444;
|
42 |
+
min-width: 250px; /* Ensure UI doesn't get too small */
|
43 |
}
|
44 |
|
45 |
+
.ui-section {
|
46 |
+
margin-bottom: 15px;
|
|
|
|
|
47 |
padding-bottom: 10px;
|
48 |
+
border-bottom: 1px solid #444;
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
+
.ui-section:last-child {
|
51 |
+
border-bottom: none;
|
52 |
+
margin-bottom: 0;
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
+
.ui-section h4 {
|
56 |
+
margin: 0 0 8px 0;
|
|
|
57 |
color: #aaa;
|
58 |
+
font-size: 0.9em;
|
59 |
text-transform: uppercase;
|
60 |
letter-spacing: 1px;
|
61 |
}
|
62 |
|
63 |
+
#stats-display, #inventory-display, #log-display {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
font-size: 0.9em;
|
65 |
+
line-height: 1.6;
|
|
|
66 |
}
|
67 |
+
#log-display {
|
68 |
+
flex-grow: 1; /* Allow log to fill space */
|
69 |
+
background-color: #1f1f1f;
|
70 |
+
padding: 10px;
|
71 |
+
border-radius: 3px;
|
72 |
+
overflow-y: auto; /* Scroll log messages */
|
73 |
+
max-height: 300px; /* Limit log height */
|
74 |
}
|
75 |
+
#log-display p { margin: 0 0 5px 0; font-size: 0.9em; }
|
76 |
+
#log-display .pickup { color: #ffd700; } /* Gold for pickup */
|
77 |
+
#log-display .combat { color: #ff6b6b; } /* Red for combat */
|
78 |
+
#log-display .info { color: #aaaaaa; } /* Grey for info */
|
79 |
+
|
80 |
+
#stats-display span, #inventory-display span {
|
81 |
display: inline-block;
|
82 |
background-color: #3a3a3a;
|
83 |
padding: 3px 10px;
|
84 |
border-radius: 15px;
|
85 |
margin-right: 8px;
|
86 |
+
margin-bottom: 6px;
|
87 |
border: 1px solid #555;
|
88 |
+
white-space: nowrap;
|
89 |
}
|
90 |
+
#inventory-display span { cursor: help; }
|
91 |
+
/* Item type colors from previous version */
|
92 |
#inventory-display .item-quest { background-color: #666030; border-color: #999048;}
|
93 |
#inventory-display .item-weapon { background-color: #663030; border-color: #994848;}
|
94 |
#inventory-display .item-armor { background-color: #306630; border-color: #489948;}
|
95 |
#inventory-display .item-spell { background-color: #303066; border-color: #484899;}
|
96 |
+
#inventory-display .item-consumable { background-color: #543066; border-color: #7d4899;}
|
97 |
#inventory-display .item-unknown { background-color: #555; border-color: #777;}
|
98 |
|
99 |
+
|
100 |
canvas { display: block; }
|
101 |
</style>
|
102 |
</head>
|
|
|
106 |
<div id="scene-container"></div>
|
107 |
|
108 |
<div id="ui-container">
|
109 |
+
<div class="ui-section">
|
110 |
+
<h4>Status</h4>
|
111 |
+
<div id="stats-display">HP: 30/30 Str: 7</div>
|
112 |
</div>
|
113 |
+
<div class="ui-section">
|
114 |
+
<h4>Inventory</h4>
|
115 |
+
<div id="inventory-display"><em>Empty</em></div>
|
|
|
|
|
|
|
116 |
</div>
|
117 |
+
<div class="ui-section" style="flex-grow: 1; display: flex; flex-direction: column;"> <h4>Log</h4>
|
118 |
+
<div id="log-display">
|
119 |
+
<p class="info">Welcome! Use WASD or Arrows to move.</p>
|
120 |
+
<p class="info">Spacebar to interact/attack.</p>
|
121 |
+
</div>
|
122 |
</div>
|
123 |
</div>
|
124 |
</div>
|
|
|
127 |
{
|
128 |
"imports": {
|
129 |
"three": "https://unpkg.com/[email protected]/build/three.module.js",
|
130 |
+
"three/addons/": "https://unpkg.com/[email protected]/examples/jsm/",
|
131 |
+
"cannon-es": "https://unpkg.com/[email protected]/dist/cannon-es.js"
|
132 |
}
|
133 |
}
|
134 |
</script>
|