Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

game-engine-util

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

game-engine-util

A library that offers a lot of useful functions for making games & game engines.

  • 1.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Game Engine Util

This is a simple library containing math functions and stuff you'd need for making nice game engines.

Documention

Everything in src/exports.js is well and self documented.
If you want to see the functions and how to use them, look in there.

Motivation

Making these functions yourself is a pain in the ass which is why I just made the ones I made available for everyone.

Getting started

const util = require("game-engine-util");

const vec = new util.Vector2d(10.32, 47.47);
const vec2 = new util.Vector2d(0.32, 21);

util.getDistance2d(vec.x, vec.y, vec2.x, vec2.y); // 28.295952007310163

const line = new util.Line(vec, vec2);
const square = new util.Square(5, 40, 100, 100);

util.GetLineAndPolyCollision(line, square); // { bool: true, intersections: Vector2d { x: 7.497937287495278, y: 40 } }

Keywords

FAQs

Package last updated on 10 Jul 2021

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