@antha/util
v0.4.3
Published
Utilities for the Antha game engine.
Readme
@antha/util
This package provides small game dev focused utilities that are made for use with the Antha game engine but are mostly useful even outside of it. This package includes (amongst other things), the following:
- stabilized, seeded random functions
- stabilized Math operations through rounding
Install
npm i @antha/utilUsage
import {createStableRandom, StableMath, stableRandomInteger} from '@antha/util';
const random = createStableRandom('game-seed');
const enemyType = stableRandomInteger({
random,
min: 1,
max: 3,
});
const angle = StableMath.degreesToRadians(90);