@arcade2d/utils
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@arcade2d/utils

Coverage Latest Release

Repository · Website

Game related utilities.

Installation

$ yarn add @arcade2d/utils

Examples

Efficient Mapped Lists

const list = new MappedList<number, string>();

list.add(123, 'abc');
list.add(456, 'def');

for (const { key, value } of list) {
  console.log(key, value);
}

Random Value Generation

const random = new RandomValueProvider();

console.log(random.generate()); // Value between 0 and <1.
console.log(random.inRectangle(10, 20, 100, 150)); // [x, y] tuple between the specified rectangle.

Readme

Keywords

none

Package Sidebar

Install

npm i @arcade2d/utils

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

15.3 kB

Total Files

11

Last publish

Collaborators

  • martywallace