Complete 3D metaverse platform with: - Three.js 3D rendering - Cannon.js physics engine - Pointer lock controls - Procedural cityscape - Floating islands - Portal system - Particle effects - WebXR/VR support ready - Multiplayer ready (Socket.io) Features: - First-person controls (WASD + mouse) - Jump and run mechanics - Chat system - Real-time HUD - Loading screen - Responsive design Built with Vite for fast builds and hot reload. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
643 B
JavaScript
25 lines
643 B
JavaScript
const context = (() => {
|
|
if (typeof globalThis !== "undefined") {
|
|
return globalThis;
|
|
} else if (typeof self !== "undefined") {
|
|
return self;
|
|
} else if (typeof window !== "undefined") {
|
|
return window;
|
|
} else {
|
|
return Function("return this")();
|
|
}
|
|
})();
|
|
const defines = __DEFINES__;
|
|
Object.keys(defines).forEach((key) => {
|
|
const segments = key.split(".");
|
|
let target = context;
|
|
for (let i = 0; i < segments.length; i++) {
|
|
const segment = segments[i];
|
|
if (i === segments.length - 1) {
|
|
target[segment] = defines[key];
|
|
} else {
|
|
target = target[segment] || (target[segment] = {});
|
|
}
|
|
}
|
|
});
|