UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

30 lines (28 loc) 994 B
import { METER } from "./si/METER.js"; import { KILOGRAM } from "./si/KILOGRAM.js"; import { SECOND } from "./si/SECOND.js"; import { AMPERE } from "./si/AMPERE.js"; import { KELVIN } from "./si/KELVIN.js"; import { MOLE } from "./si/MOLE.js"; import { CANDELA } from "./si/CANDELA.js"; /** * Canonical mapping from each {@link UnitDimension} index to the {@link NamedUnit} that * represents it in SI: `[METER, KILOGRAM, SECOND, AMPERE, KELVIN, MOLE, CANDELA]`. * * Acts as the single source of truth for per-dimension display symbols when rendering a * {@link UnitMatrix} via {@link unit_matrix_to_string} or {@link format_quantity}. Callers * that want different symbols (e.g. imperial units, localisation) can pass a replacement * `NamedUnit[]` to those functions; the entries' `.symbol` fields are read in dimension * order. * * @type {NamedUnit[]} */ export const UNIT_DIMENSION_MAPPING = [ METER, KILOGRAM, SECOND, AMPERE, KELVIN, MOLE, CANDELA ];