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head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Omni-Ruler: The God Simulation</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Basic Reset & Body Styling */
|
| 9 |
+
body {
|
| 10 |
+
margin: 0;
|
| 11 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 12 |
+
background-color: #1a1a2e;
|
| 13 |
+
color: #e0e0e0;
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: center;
|
| 16 |
+
align-items: center;
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
overflow: hidden;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
/* Main Application Container */
|
| 22 |
+
.god-app-container {
|
| 23 |
+
display: grid;
|
| 24 |
+
grid-template-columns: 3fr 1fr;
|
| 25 |
+
grid-template-rows: 1fr auto;
|
| 26 |
+
gap: 20px;
|
| 27 |
+
width: 95vw;
|
| 28 |
+
height: 90vh;
|
| 29 |
+
max-width: 1600px;
|
| 30 |
+
max-height: 900px;
|
| 31 |
+
background-color: #2a2a4a;
|
| 32 |
+
border-radius: 15px;
|
| 33 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
| 34 |
+
padding: 20px;
|
| 35 |
+
box-sizing: border-box;
|
| 36 |
+
border: 1px solid #4a4a7a;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* 3D World Viewport */
|
| 40 |
+
.world-viewport {
|
| 41 |
+
grid-column: 1 / 2;
|
| 42 |
+
grid-row: 1 / 2;
|
| 43 |
+
background: linear-gradient(to bottom, #3f51b5, #2196f3, #03a9f4);
|
| 44 |
+
border-radius: 10px;
|
| 45 |
+
overflow: hidden;
|
| 46 |
+
position: relative;
|
| 47 |
+
border: 2px solid #6a6a9a;
|
| 48 |
+
box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 191, 255, 0.4);
|
| 49 |
+
display: flex;
|
| 50 |
+
justify-content: center;
|
| 51 |
+
align-items: center;
|
| 52 |
+
/* Removed placeholder text styling as actual 3D will be rendered */
|
| 53 |
+
font-size: 1.8em;
|
| 54 |
+
font-weight: bold;
|
| 55 |
+
text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
|
| 56 |
+
perspective: 1000px; /* Added for 3D effect */
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Canvas styling to fill the viewport */
|
| 60 |
+
#three-canvas {
|
| 61 |
+
display: block;
|
| 62 |
+
width: 100%;
|
| 63 |
+
height: 100%;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
/* God Panel */
|
| 67 |
+
.god-panel {
|
| 68 |
+
grid-column: 2 / 3;
|
| 69 |
+
grid-row: 1 / 2;
|
| 70 |
+
background-color: #3a3a5a;
|
| 71 |
+
border-radius: 10px;
|
| 72 |
+
padding: 15px;
|
| 73 |
+
display: flex;
|
| 74 |
+
flex-direction: column;
|
| 75 |
+
gap: 15px;
|
| 76 |
+
overflow-y: auto;
|
| 77 |
+
border: 1px solid #5a5a8a;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.god-panel h2 {
|
| 81 |
+
color: #90ee90;
|
| 82 |
+
margin-top: 0;
|
| 83 |
+
margin-bottom: 10px;
|
| 84 |
+
text-align: center;
|
| 85 |
+
font-size: 1.4em;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.god-panel button {
|
| 89 |
+
background-color: #6a5acd;
|
| 90 |
+
color: white;
|
| 91 |
+
border: none;
|
| 92 |
+
padding: 12px 15px;
|
| 93 |
+
border-radius: 8px;
|
| 94 |
+
cursor: pointer;
|
| 95 |
+
font-size: 1em;
|
| 96 |
+
transition: background-color 0.3s ease, transform 0.1s ease;
|
| 97 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.god-panel button:hover {
|
| 101 |
+
background-color: #7b68ee;
|
| 102 |
+
transform: translateY(-2px);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.god-panel button:active {
|
| 106 |
+
background-color: #5a4acb;
|
| 107 |
+
transform: translateY(0);
|
| 108 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.god-panel .control-group {
|
| 112 |
+
margin-bottom: 15px;
|
| 113 |
+
padding-bottom: 10px;
|
| 114 |
+
border-bottom: 1px dashed #5a5a8a;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.god-panel .control-group:last-child {
|
| 118 |
+
border-bottom: none;
|
| 119 |
+
margin-bottom: 0;
|
| 120 |
+
padding-bottom: 0;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
/* AI Status & Event Log */
|
| 124 |
+
.ai-status-log {
|
| 125 |
+
grid-column: 1 / 3;
|
| 126 |
+
grid-row: 2 / 3;
|
| 127 |
+
background-color: #3a3a5a;
|
| 128 |
+
border-radius: 10px;
|
| 129 |
+
padding: 15px;
|
| 130 |
+
display: grid;
|
| 131 |
+
grid-template-columns: 1fr 1fr;
|
| 132 |
+
gap: 20px;
|
| 133 |
+
border: 1px solid #5a5a8a;
|
| 134 |
+
min-height: 150px;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.ai-status-log h3 {
|
| 138 |
+
color: #add8e6;
|
| 139 |
+
margin-top: 0;
|
| 140 |
+
margin-bottom: 10px;
|
| 141 |
+
font-size: 1.2em;
|
| 142 |
+
text-align: center;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.ai-status-log .section {
|
| 146 |
+
background-color: #2a2a4a;
|
| 147 |
+
border-radius: 8px;
|
| 148 |
+
padding: 10px;
|
| 149 |
+
overflow-y: auto;
|
| 150 |
+
border: 1px solid #4a4a7a;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.ai-status-log ul {
|
| 154 |
+
list-style: none;
|
| 155 |
+
padding: 0;
|
| 156 |
+
margin: 0;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.ai-status-log li {
|
| 160 |
+
padding: 5px 0;
|
| 161 |
+
border-bottom: 1px dotted #4a4a7a;
|
| 162 |
+
font-size: 0.9em;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.ai-status-log li:last-child {
|
| 166 |
+
border-bottom: none;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.ai-status-log .status-item span:first-child {
|
| 170 |
+
color: #90ee90;
|
| 171 |
+
font-weight: bold;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.ai-status-log .event-item {
|
| 175 |
+
color: #e0e0e0;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.ai-status-log .event-item.bless {
|
| 179 |
+
color: #90ee90;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.ai-status-log .event-item.smite {
|
| 183 |
+
color: #ff6347;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.ai-status-log .event-item.observe {
|
| 187 |
+
color: #ffd700;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
/* Scrollbar Styling */
|
| 191 |
+
::-webkit-scrollbar {
|
| 192 |
+
width: 8px;
|
| 193 |
+
height: 8px;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
::-webkit-scrollbar-track {
|
| 197 |
+
background: #2a2a4a;
|
| 198 |
+
border-radius: 10px;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
::-webkit-scrollbar-thumb {
|
| 202 |
+
background: #5a5a8a;
|
| 203 |
+
border-radius: 10px;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
::-webkit-scrollbar-thumb:hover {
|
| 207 |
+
background: #6a6a9a;
|
| 208 |
+
}
|
| 209 |
+
</style>
|
| 210 |
+
</head>
|
| 211 |
+
<body>
|
| 212 |
+
<div class="god-app-container">
|
| 213 |
+
<div class="world-viewport">
|
| 214 |
+
<!-- Three.js will render into this canvas -->
|
| 215 |
+
<canvas id="three-canvas"></canvas>
|
| 216 |
+
</div>
|
| 217 |
+
<div class="god-panel">
|
| 218 |
+
<h2>Divine Interventions</h2>
|
| 219 |
+
<div class="control-group">
|
| 220 |
+
<button>Bless Population</button>
|
| 221 |
+
<button>Smite a Region</button>
|
| 222 |
+
<button>Grant Knowledge</button>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="control-group">
|
| 225 |
+
<button>Observe Individual (AI)</button>
|
| 226 |
+
<button>Influence Weather</button>
|
| 227 |
+
<button>Trigger Event (Random)</button>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="control-group">
|
| 230 |
+
<button>Advance Time (Day/Night)</button>
|
| 231 |
+
<button>Reset World</button>
|
| 232 |
+
</div>
|
| 233 |
+
<p style="font-size: 0.8em; text-align: center; color: #b0b0b0;">
|
| 234 |
+
(JavaScript would handle interaction and AI simulation)
|
| 235 |
+
</p>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="ai-status-log">
|
| 238 |
+
<div class="section">
|
| 239 |
+
<h3>AI Population Status</h3>
|
| 240 |
+
<ul id="ai-status-list">
|
| 241 |
+
<li class="status-item"><span>Villager A:</span> Content, Building</li>
|
| 242 |
+
<li class="status-item"><span>Farmer B:</span> Working, Harvesting</li>
|
| 243 |
+
<li class="status-item"><span>Trader C:</span> Traveling, Bartering</li>
|
| 244 |
+
<li class="status-item"><span>Guard D:</span> Patrolling, Vigilant</li>
|
| 245 |
+
<li class="status-item"><span>Scholar E:</span> Studying, Researching</li>
|
| 246 |
+
<li class="status-item"><span>Child F:</span> Playing, Learning</li>
|
| 247 |
+
</ul>
|
| 248 |
+
</div>
|
| 249 |
+
<div class="section">
|
| 250 |
+
<h3>World Event Log</h3>
|
| 251 |
+
<ul id="event-log-list">
|
| 252 |
+
<li class="event-item">[08:00] Sun rises over the plains.</li>
|
| 253 |
+
<li class="event-item bless">[08:15] A gentle rain blesses the crops.</li>
|
| 254 |
+
<li class="event-item">[09:00] Villager A begins constructing a new home.</li>
|
| 255 |
+
<li class="event-item smite">[10:30] A minor tremor shakes the mountains.</li>
|
| 256 |
+
<li class="event-item observe">[11:00] Trader C successfully completes a trade.</li>
|
| 257 |
+
<li class="event-item">[12:00] Population count: 124 souls.</li>
|
| 258 |
+
</ul>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<!-- Include Three.js library -->
|
| 264 |
+
<script type="module">
|
| 265 |
+
import * as THREE from 'https://unpkg.com/three@0.165.0/build/three.module.js';
|
| 266 |
+
|
| 267 |
+
// Get the canvas element
|
| 268 |
+
const canvas = document.getElementById('three-canvas');
|
| 269 |
+
|
| 270 |
+
// Scene, Camera, Renderer setup
|
| 271 |
+
const scene = new THREE.Scene();
|
| 272 |
+
const camera = new THREE.PerspectiveCamera(75, canvas.clientWidth / canvas.clientHeight, 0.1, 1000);
|
| 273 |
+
const renderer = new THREE.WebGLRenderer({ canvas: canvas, antialias: true });
|
| 274 |
+
renderer.setSize(canvas.clientWidth, canvas.clientHeight);
|
| 275 |
+
renderer.setClearColor(0x000000, 0); // Transparent background to show CSS gradient
|
| 276 |
+
|
| 277 |
+
// Handle window resize
|
| 278 |
+
window.addEventListener('resize', () => {
|
| 279 |
+
const width = canvas.clientWidth;
|
| 280 |
+
const height = canvas.clientHeight;
|
| 281 |
+
renderer.setSize(width, height);
|
| 282 |
+
camera.aspect = width / height;
|
| 283 |
+
camera.updateProjectionMatrix();
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
+
// Add a simple 3D object (e.g., a cube)
|
| 287 |
+
const geometry = new THREE.BoxGeometry(1, 1, 1);
|
| 288 |
+
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00, wireframe: true });
|
| 289 |
+
const cube = new THREE.Mesh(geometry, material);
|
| 290 |
+
scene.add(cube);
|
| 291 |
+
|
| 292 |
+
// Position the camera
|
| 293 |
+
camera.position.z = 5;
|
| 294 |
+
|
| 295 |
+
// Animation loop
|
| 296 |
+
function animate() {
|
| 297 |
+
requestAnimationFrame(animate);
|
| 298 |
+
|
| 299 |
+
cube.rotation.x += 0.01;
|
| 300 |
+
cube.rotation.y += 0.01;
|
| 301 |
+
|
| 302 |
+
renderer.render(scene, camera);
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
animate();
|
| 306 |
+
</script>
|
| 307 |
+
</body>
|
| 308 |
+
</html>
|