Skip to content

five-on-it / packages/shared/src

packages/shared/src ​

Small helpers shared by every workspace: fixed-timestep constants, the seeded PRNG that replaces Math.random inside the simulation, a state hash for the determinism test, pose math, the room clock (the time of day as a function of the tick) and its weather (a function of the clock's minutes). Isomorphic: no Node, DOM or rendering imports (ESLint and the empty types list in tsconfig.base.json enforce it).

References ​

canonicalJson ​

Re-exports canonicalJson


clamp ​

Re-exports clamp


CLEAR_WEATHER ​

Re-exports CLEAR_WEATHER


Climate ​

Re-exports Climate


climateOf ​

Re-exports climateOf


CLIMATES ​

Re-exports CLIMATES


clockAt ​

Re-exports clockAt


compareReleases ​

Re-exports compareReleases


compassBearing ​

Re-exports compassBearing


createPrng ​

Re-exports createPrng


DAY ​

Re-exports DAY


DAY_MINUTES ​

Re-exports DAY_MINUTES


daylightAt ​

Re-exports daylightAt


DT ​

Re-exports DT


fnv1a32 ​

Re-exports fnv1a32


formatTime ​

Re-exports formatTime


gameMinutesAt ​

Re-exports gameMinutesAt


lerp ​

Re-exports lerp


migrate ​

Re-exports migrate


MigrationStep ​

Re-exports MigrationStep


nlerpQuat ​

Re-exports nlerpQuat


NOON_CLOCK ​

Re-exports NOON_CLOCK


parseTime ​

Re-exports parseTime


passedTime ​

Re-exports passedTime


PROTOCOL_VERSION ​

Re-exports PROTOCOL_VERSION


quatFromYaw ​

Re-exports quatFromYaw


RELEASE_VERSION ​

Re-exports RELEASE_VERSION


RoomClock ​

Re-exports RoomClock


RoomWeather ​

Re-exports RoomWeather


SchemaTooNewError ​

Re-exports SchemaTooNewError


schemaVersionOf ​

Re-exports schemaVersionOf


scriptWeather ​

Re-exports scriptWeather


setClockPace ​

Re-exports setClockPace


setClockTime ​

Re-exports setClockTime


skipTime ​

Re-exports skipTime


SNAPSHOT_EVERY_TICKS ​

Re-exports SNAPSHOT_EVERY_TICKS


TICK_RATE ​

Re-exports TICK_RATE


TIME_PATTERN ​

Re-exports TIME_PATTERN


turnQuat ​

Re-exports turnQuat


WEATHER ​

Re-exports WEATHER


WEATHER_KINDS ​

Re-exports WEATHER_KINDS


weatherAt ​

Re-exports weatherAt


WeatherKind ​

Re-exports WeatherKind


WeatherNow ​

Re-exports WeatherNow


WeatherScript ​

Re-exports WeatherScript


withinHours ​

Re-exports withinHours


wrapMinutes ​

Re-exports wrapMinutes


yawFromQuat ​

Re-exports yawFromQuat