phantasmal-world/src/index.ts

23 lines
913 B
TypeScript
Raw Normal View History

2020-01-04 23:23:25 +08:00
// Import polyfills before anything else.
import "core-js/stable";
import "./core/gui/index.css";
import "@fortawesome/fontawesome-free/js/fontawesome";
import "@fortawesome/fontawesome-free/js/solid";
import "@fortawesome/fontawesome-free/js/regular";
2019-09-14 03:20:26 +08:00
import "@fortawesome/fontawesome-free/js/brands";
import { initialize_application } from "./application";
import { FetchClient } from "./core/HttpClient";
import { WebGLRenderer } from "three";
2020-01-20 00:16:28 +08:00
import { DisposableThreeRenderer } from "./core/rendering/ThreeRenderer";
import { Random } from "./core/Random";
import { DateClock } from "./core/Clock";
2019-08-20 04:56:40 +08:00
function create_three_renderer(): DisposableThreeRenderer {
const renderer = new WebGLRenderer({ antialias: true, alpha: true });
renderer.setPixelRatio(window.devicePixelRatio);
return renderer;
}
initialize_application(new FetchClient(), new Random(), new DateClock(), create_three_renderer);