Socket
Socket
Sign inDemoInstall

@arcade2d/utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcade2d/utils

Provides game-related utilities like random number generation, efficient lists structures, etc.


Version published
Maintainers
1
Created
Source

@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.

FAQs

Package last updated on 08 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc