mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 07:18:29 +08:00
23 lines
831 B
TypeScript
23 lines
831 B
TypeScript
import "./core/gui/index.css";
|
|
import Logger from "js-logger";
|
|
import "@fortawesome/fontawesome-free/js/fontawesome";
|
|
import "@fortawesome/fontawesome-free/js/solid";
|
|
import "@fortawesome/fontawesome-free/js/regular";
|
|
import "@fortawesome/fontawesome-free/js/brands";
|
|
import { initialize } from "./initialize";
|
|
import { FetchClient } from "./core/HttpClient";
|
|
import { WebGLRenderer } from "three";
|
|
import { DisposableThreeRenderer } from "./core/rendering/Renderer";
|
|
|
|
Logger.useDefaults({
|
|
defaultLevel: (Logger as any)[process.env["LOG_LEVEL"] ?? "INFO"],
|
|
});
|
|
|
|
function create_three_renderer(): DisposableThreeRenderer {
|
|
const renderer = new WebGLRenderer({ antialias: true, alpha: true });
|
|
renderer.setPixelRatio(window.devicePixelRatio);
|
|
return renderer;
|
|
}
|
|
|
|
initialize(new FetchClient(), create_three_renderer);
|