Comparing version 1.1.8 to 1.2.0
@@ -5,3 +5,3 @@ declare module "types/index" { | ||
declare module "utils/Utils" { | ||
export const ARRAY_TYPE: new (n: number) => Float32Array | number[]; | ||
export const ARRAY_TYPE: new (_n: number) => Float32Array | number[]; | ||
export const appendArray: (a: unknown[], b: unknown[]) => void; | ||
@@ -129,7 +129,9 @@ export const splice: (array: unknown[], index: number, howmany?: number) => void; | ||
declare module "events/EventEmitter" { | ||
export class EventEmitter<EventMap extends Record<string, any> = Record<string, any>> { | ||
export class EventEmitter<EventMap extends Record<string, { | ||
type: string; | ||
}>> { | ||
private listeners; | ||
on<E extends keyof EventMap>(type: E, listener: (e: EventMap[E]) => void, context?: any): EventEmitter<EventMap>; | ||
off<E extends keyof EventMap>(type: E, listener: Function): EventEmitter<EventMap>; | ||
has<E extends keyof EventMap>(type: E, listener?: Function): boolean; | ||
on<E extends keyof EventMap>(type: E, listener: (e: EventMap[E]) => void): EventEmitter<EventMap>; | ||
off<E extends keyof EventMap>(type: E, listener: (e: EventMap[E]) => void): EventEmitter<EventMap>; | ||
has<E extends keyof EventMap>(type: E, listener?: (e: EventMap[E]) => void): boolean; | ||
emit<E extends keyof EventMap>(event: EventMap[E]): EventEmitter<EventMap>; | ||
@@ -203,5 +205,5 @@ } | ||
import type { RaycastResult } from "collision/RaycastResult"; | ||
import type { Vec2 } from "types/index"; | ||
import type { SharedShapeOptions } from "shapes/Shape"; | ||
import { Shape } from "shapes/Shape"; | ||
import type { Vec2 } from "types/index"; | ||
export interface HeightfieldOptions extends SharedShapeOptions { | ||
@@ -208,0 +210,0 @@ heights?: number[]; |
{ | ||
"name": "p2-es", | ||
"version": "1.1.8", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -49,31 +49,29 @@ "description": "A JavaScript 2D physics engine.", | ||
"@babel/core": "^7.16.5", | ||
"@babel/preset-env": "^7.16.5", | ||
"@babel/preset-typescript": "^7.16.5", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.1.1", | ||
"@rollup/plugin-replace": "^3.0.0", | ||
"@types/jest": "^27.0.3", | ||
"@types/node": "^17.0.4", | ||
"@typescript-eslint/eslint-plugin": "^5.7.0", | ||
"@typescript-eslint/parser": "^5.7.0", | ||
"eslint": "^8.5.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"@babel/preset-env": "^7.22.20", | ||
"@babel/preset-typescript": "^7.22.15", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@types/jest": "^29.5.3", | ||
"@types/node": "^18.15.11", | ||
"@typescript-eslint/eslint-plugin": "^6.5.0", | ||
"@typescript-eslint/parser": "^6.2.1", | ||
"eslint": "^8.46.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-es": "^4.1.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint-plugin-typescript-enum": "^2.1.0", | ||
"jest": "^27.4.5", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"jest": "^29.6.2", | ||
"lint-staged": "^12.1.4", | ||
"prettier": "^2.5.1", | ||
"prettier": "^2.8.7", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.62.0", | ||
"rollup": "^3.28.1", | ||
"rollup-plugin-filesize": "^9.1.1", | ||
"ts-jest": "^27.1.2", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.4.0", | ||
"typedoc": "^0.22.10", | ||
"typedoc": "^0.24.8", | ||
"typescript": "^4.5.4" | ||
}, | ||
"dependencies": { | ||
"poly-decomp-es": "0.4.1" | ||
"poly-decomp-es": "0.4.2" | ||
}, | ||
@@ -80,0 +78,0 @@ "lint-staged": { |
# p2-es | ||
2D rigid body physics engine written in JavaScript. Includes collision detection, contacts, friction, restitution, motors, springs, advanced constraints and various shape types. | ||
p2-es is a 2D rigid body physics engine written in JavaScript. Features include collision detection, contacts, friction, restitution, motors, springs, advanced constraints and various shape types. | ||
@@ -27,8 +27,9 @@ [Demos](https://p2-es.pmnd.rs/#demos) | [Examples](https://p2-es.pmnd.rs/#examples) | [Documentation](https://p2-es.pmnd.rs/docs/) | ||
// import a specific version | ||
import * as p2 from 'https://www.unpkg.com/p2-es@1.1.6/dist/p2-es.js'; | ||
import * as p2 from 'https://www.unpkg.com/p2-es@1.1.6/dist/p2-es.js' | ||
// or import latest | ||
import * as p2 from 'https://www.unpkg.com/p2-es/dist/p2-es.js'; | ||
import * as p2 from 'https://www.unpkg.com/p2-es/dist/p2-es.js' | ||
</script> | ||
``` | ||
--- | ||
@@ -118,4 +119,4 @@ | ||
| | Circle | Plane | Box | Convex | Particle | Line | Capsule | Heightfield | Ray | | ||
| :------------------------------------------------------------------------: | :----: | :---: | :----: | :----: | :------: | :----: | :-----: | :---------: | :-: | | ||
| | Circle | Plane | Box | Convex | Particle | Line | Capsule | Heightfield | Ray | | ||
| :----------------------------------------------------------------: | :----: | :---: | :----: | :----: | :------: | :----: | :-----: | :---------: | :-: | | ||
| [Circle](https://p2-es.pmnd.rs/docs/classes/Circle.html) | Yes | - | - | - | - | - | - | - | - | | ||
@@ -122,0 +123,0 @@ | [Plane](https://p2-es.pmnd.rs/docs/classes/Plane.html) | Yes | - | - | - | - | - | - | - | - | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
675197
25
20503
143
+ Addedpoly-decomp-es@0.4.2(transitive)
- Removedpoly-decomp-es@0.4.1(transitive)
Updatedpoly-decomp-es@0.4.2