UNPKG

detect-collisions

Version:

Points, Lines, Boxes, Polygons (also hollow), Ellipses, Circles. RayCasting, offsets, rotation, scaling, bounding box padding, flags for static and ghost/trigger bodies

127 lines (126 loc) 4.71 kB
{ "name": "detect-collisions", "version": "9.27.6", "description": "Points, Lines, Boxes, Polygons (also hollow), Ellipses, Circles. RayCasting, offsets, rotation, scaling, bounding box padding, flags for static and ghost/trigger bodies", "main": "./dist/index.js", "types": "./dist/index.d.ts", "module": "./esm/index.js", "exports": { ".": { "import": "./esm/index.js", "require": "./dist/index.js", "types": "./dist/index.d.ts" } }, "scripts": { "start": "chef-express dist/demo --debug", "test": "jest --silent --verbose --forceExit", "dev": "webpack serve --port 3000", "amend": "NO_BENCH=1 npm run precommit;git commit -a --am --no-edit", "use-latest-quickselect-macos": "sed -i '' -e \"s_'quickselect'_'./quickselect'_g\" src/external/rbush.js", "use-latest-quickselect-linux": "sed -i -r \"s_'quickselect'_'./quickselect'_g\" src/external/rbush.js", "use-latest-quickselect": "npm run use-latest-quickselect-macos || npm run use-latest-quickselect-linux", "copy-rbush": "cp node_modules/rbush/index.js src/external/rbush.js", "copy-quickselect": "cp node_modules/quickselect/index.js src/external/quickselect.js", "copy-npm-modules": "npm run copy-rbush && npm run copy-quickselect && npm run use-latest-quickselect", "prebuild": "npm run copy-npm-modules", "build": "npm run build:commonjs && npm run build:esm", "postbuild": "npm run test && npm run build:docs && npm run build:demo && [ -z \"$NO_BENCH\" ] && npm run benchmark", "prebuild:commonjs": "rm -rf dist", "build:commonjs": "tsc", "prebuild:esm": "rm -rf esm", "build:esm": "rollup -c", "build:docs": "typedoc --customCss typedoc.css", "postbuild:docs": "npm run docs-from-master || echo ok", "build:demo": "webpack", "postbuild:demo": "cp -r dist/demo docs", "prebuild:docs": "rm -rf docs", "docs": "npm run build:docs && chef-express docs --debug --port 3000", "docs-from-master-macos": "find docs -type f -name '*.html' -exec sed -i '' -r 's_/blob/[^/]+/_/blob/master/_g' {} +", "docs-from-master-linux": "find docs -type f -name '*.html' -exec sed -i -r 's_/blob/[^/]+/_/blob/master/_g' {} +", "docs-from-master": "npm run docs-from-master-macos || npm run docs-from-master-linux", "demo": "npm run build:demo && npm start", "precommit": "npm run lint && npm run format && npm run build", "lint": "eslint src --fix", "format": "prettier . --write", "benchmark": "./clean-dist.sh && npm run benchmark-insertion && npm run benchmark-stress", "benchmark-stress": "node -e 'import(\"./dist/benchmarks/index.js\").then(({ stressBenchmark }) => stressBenchmark());'", "benchmark-insertion": "node -e 'import(\"./dist/benchmarks/index.js\").then(({ insertionBenchmark }) => insertionBenchmark());'" }, "repository": "git://github.com/Prozi/detect-collisions.git", "files": [ "esm/index.js", "dist/*.*", "dist/bodies", "dist/external" ], "keywords": [ "javascript", "typescript", "library", "computational-geometry", "alghoritm", "computational-geometry-alghoritm", "collisions", "collision-checking", "concave", "rotation", "angle", "separating-axis-theorem", "bounding-volume-hierarchy", "Circle", "Polygon", "Box", "Ellipse", "Line", "Point" ], "author": "Jacek Pietal", "license": "MIT", "bugs": { "url": "https://github.com/Prozi/detect-collisions/issues" }, "homepage": "https://prozi.github.io/detect-collisions/", "dependencies": { "@types/sat": "^0.0.35", "poly-decomp-es": "^0.4.2", "sat": "^0.9.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.2", "@stylistic/eslint-plugin": "^4.2.0", "@types/node": "^22.15.13", "@types/rbush": "^4.0.0", "chef-express": "^3.2.3", "eslint": "^9.26.0", "eslint-plugin-json": "^4.0.1", "html-webpack-plugin": "^5.6.3", "husky": "^9.1.7", "jest": "^29.7.0", "prettier": "^3.5.3", "quickselect": "^3.0.0", "random-seed": "^0.3.0", "rbush": "^4.0.1", "rollup": "^4.40.2", "tinybench": "^4.0.1", "ts-jest": "^29.3.2", "ts-loader": "^9.5.2", "typedoc": "^0.28.4", "typescript": "^5", "webpack": "^5.99.8", "webpack-cli": "^6.0.1", "webpack-dev-server": "^5.2.1" }, "resolutions": { "@types/node": "^22.4.1", "canvas": "^2.11.2", "minimist": "^1.2.6", "terser": "^5.14.2", "json5": "^2.2.2", "semver": "^7.5.3", "escodegen": "^2.1.0", "express": "^4.19.2" } }