Package Exports
- jt-collision-detection
- jt-collision-detection/build/cjs/index.js
- jt-collision-detection/build/esm/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jt-collision-detection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-detectionuse 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
- 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
- Browsers should be able to import iife, or esm using https://unpkg.com/ cdn
- Types should be well defined
- Source maps should be well defined and high quality
- Must be able to leverage tree shaking
- Lightweight NO DEPENDENCIES