jt-collision-detection

1.0.0 • Public • Published

JT Collision Detection

Utility functions for detecting collisions between points, lines, circles, rectangles, and polygones

Code Copied (almost verbatim) from Jeffrey Thompsons Collision Detection work.

Installation

Node

install using npm

# npm
npm install jt-collision-detection
# yarn
yarn add jt-collision-detection
#pnpm
yarn add jt-collision-detection

use in file

import * as cd from 'jt-collision-detection'
cd.polyCircle(...)

Browser ESM

Use unpkg.com to import

import * as cd from 'https://unpkg.com/jt-collision-detection'
cd.polyCircle(...)

Browser Global

TBD

Deno

use unpkg.com to import

import * as cd from 'https://unpkg.com/jt-collision-detection'
cd.polyCircle(...)

Documentation

TBD

Project Goals

  1. Should be able to run in every possible context (Currently Tracked):
  • node cjs
  • node esm
  • deno
  • browser window
  • browser esm
  • web workers global
  • web workers esm
  • iife
  1. Browsers should be able to import iife, or esm using https://unpkg.com/ cdn
  2. Types should be well defined
  3. Source maps should be well defined and high quality
  4. Must be able to leverage tree shaking
  5. Lightweight NO DEPENDENCIES

Package Sidebar

Install

npm i jt-collision-detection

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

258 kB

Total Files

78

Last publish

Collaborators

  • sagea