phantasmal-world/src/core/Severity.ts
Daan Vanden Bosch c9891410d9 Improved WebGPU renderer:
- The renderer now uses buffer memory mapping instead of the deprecated setSubData
- It can now render models without texture
- It can now use S3TC textures
2020-04-26 22:19:26 +02:00

21 lines
536 B
TypeScript

// Severities in order of importance.
import { enum_values } from "./enums";
import { assert } from "./util";
export enum Severity {
Trace,
Debug,
Info,
Warning,
Error,
Off,
}
export const Severities: readonly Severity[] = enum_values(Severity);
export function severity_from_string(str: string): Severity {
const severity = (Severity as any)[str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase()];
assert(severity != undefined, () => `"${str}" is not a valid severity.`);
return severity;
}