diff --git a/docs/classes/RBush.html b/docs/classes/RBush.html index 336d118e..501a045d 100644 --- a/docs/classes/RBush.html +++ b/docs/classes/RBush.html @@ -1,4 +1,4 @@ -RBush | Detect-Collisions

Constructors

constructor +RBush | Detect-Collisions

Constructors

Properties

Constructors

  • Parameters

    • maxEntries: number = 9

    Returns RBush

Properties

_maxEntries: number
_minEntries: number
data: any

Methods

  • Parameters

    • bbox: any
    • path: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • result: any

    Returns any

  • Parameters

    • node: any
    • m: any
    • M: any
    • compare: any

    Returns number

  • Parameters

    • items: any
    • left: any
    • right: any
    • height: any

    Returns {
        children: any;
        height: number;
        leaf: boolean;
        maxX: number;
        maxY: number;
        minX: number;
        minY: number;
    }

    • children: any
    • height: number
    • leaf: boolean
    • maxX: number
    • maxY: number
    • minX: number
    • minY: number
  • Parameters

    • node: any
    • m: any
    • M: any

    Returns void

  • Parameters

    • node: any
    • m: any
    • M: any

    Returns any

  • Parameters

    • bbox: any
    • node: any
    • level: any
    • path: any

    Returns any

  • Parameters

    • path: any

    Returns void

  • Parameters

    • item: any
    • level: any
    • isNode: any

    Returns void

  • Parameters

    • insertPath: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • newNode: any

    Returns void

  • Returns any

  • Returns RBush

  • Parameters

    • bbox: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns number

  • Parameters

    • data: any

    Returns RBush

  • Parameters

    • item: any

    Returns RBush

  • Parameters

    • data: any

    Returns RBush

  • Parameters

    • item: any
    • equalsFn: any

    Returns RBush

  • Parameters

    • bbox: any

    Returns any[]

  • Parameters

    • item: any

    Returns any

  • Returns any

+

Constructors

Properties

_maxEntries: number
_minEntries: number
data: any

Methods

  • Parameters

    • bbox: any
    • path: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • m: any
    • M: any
    • compare: any

    Returns number

  • Parameters

    • items: any
    • left: any
    • right: any
    • height: any

    Returns {
        children: any;
        height: number;
        leaf: boolean;
        maxX: number;
        maxY: number;
        minX: number;
        minY: number;
    }

    • children: any
    • height: number
    • leaf: boolean
    • maxX: number
    • maxY: number
    • minX: number
    • minY: number
  • Parameters

    • bbox: any
    • node: any
    • level: any
    • path: any

    Returns any

diff --git a/docs/classes/System.html b/docs/classes/System.html index 8eaeac28..7f65677f 100644 --- a/docs/classes/System.html +++ b/docs/classes/System.html @@ -47,13 +47,13 @@ traverse update updateBody -

Constructors

  • Type Parameters

    Parameters

    • maxEntries: number = 9

    Returns System<TBody>

Properties

_maxEntries: number
_minEntries: number
ray: Line

for raycasting

+

Constructors

Properties

_maxEntries: number
_minEntries: number
ray: Line

for raycasting

response: Response = ...

the last collision result

-

Methods

  • Parameters

    • bbox: any
    • path: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • result: any

    Returns any

  • Parameters

    • node: any
    • m: any
    • M: any
    • compare: any

    Returns number

  • Parameters

    • items: any
    • left: any
    • right: any
    • height: any

    Returns {
        children: any;
        height: number;
        leaf: boolean;
        maxX: number;
        maxY: number;
        minX: number;
        minY: number;
    }

    • children: any
    • height: number
    • leaf: boolean
    • maxX: number
    • maxY: number
    • minX: number
    • minY: number
  • Parameters

    • node: any
    • m: any
    • M: any

    Returns void

  • Parameters

    • node: any
    • m: any
    • M: any

    Returns any

  • Parameters

    • bbox: any
    • node: any
    • level: any
    • path: any

    Returns any

  • Parameters

    • path: any

    Returns void

  • Parameters

    • item: any
    • level: any
    • isNode: any

    Returns void

  • Parameters

    • insertPath: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • newNode: any

    Returns void

  • Returns any

  • check all bodies collisions with callback

    +

Methods

  • Parameters

    • bbox: any
    • path: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • result: any

    Returns any

  • Parameters

    • node: any
    • m: any
    • M: any
    • compare: any

    Returns number

  • Parameters

    • items: any
    • left: any
    • right: any
    • height: any

    Returns {
        children: any;
        height: number;
        leaf: boolean;
        maxX: number;
        maxY: number;
        minX: number;
        minY: number;
    }

    • children: any
    • height: number
    • leaf: boolean
    • maxX: number
    • maxY: number
    • minX: number
    • minY: number
  • Parameters

    • node: any
    • m: any
    • M: any

    Returns void

  • Parameters

    • node: any
    • m: any
    • M: any

    Returns any

  • Parameters

    • bbox: any
    • node: any
    • level: any
    • path: any

    Returns any

  • Parameters

    • item: any
    • level: any
    • isNode: any

    Returns void

  • Parameters

    • insertPath: any
    • level: any

    Returns void

  • Parameters

    • node: any
    • newNode: any

    Returns void

  • check do 2 objects collide

    Parameters

    Returns boolean

  • Returns System<TBody>

  • Parameters

    • bbox: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns number

  • Parameters

    • bbox: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns number

  • create box at position with options and add to system

    Parameters

    Returns Box

  • create ellipse at position with options and add to system

    Parameters

    Returns Ellipse

  • draw exact bodies colliders outline

    Parameters

    • context: CanvasRenderingContext2D

    Returns void

  • draw bounding boxes hierarchy outline

    -

    Parameters

    • context: CanvasRenderingContext2D

    Returns void

  • Parameters

    • data: any

    Returns System<TBody>

  • get object potential colliders

    +

    Parameters

    • context: CanvasRenderingContext2D

    Returns void

  • get object potential colliders

    Parameters

    Returns TBody[]

    because it's slower to use than checkOne() or checkAll()

  • re-insert body into collision tree and update its bbox every body can be part of only one system

    -

    Parameters

    Returns this

  • Parameters

    • data: any

    Returns System<TBody>

  • raycast to get collider of ray from start to end

    +

    Parameters

    Returns this

  • remove body aabb from collision tree

    -

    Parameters

    Returns this

  • Parameters

    • bbox: any

    Returns any[]

  • separate (move away) bodies

    Returns void

  • separate (move away) 1 body

    -

    Parameters

    Returns void

  • Parameters

    • item: any

    Returns any

  • Returns any

  • used to find body deep inside data with finder function returning boolean found or not

    +

    Parameters

    Returns void

  • used to find body deep inside data with finder function returning boolean found or not

    Parameters

    Returns undefined | TBody

  • update all bodies aabb

    Returns void

  • updates body in collision tree

    Parameters

    Returns void

diff --git a/package.json b/package.json index 975bdb9b..451df763 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "detect-collisions", - "version": "9.9.1", + "version": "9.9.2", "description": "detecting collisions between bodies: Points, Lines, Boxes, Polygons, Ellipses, Circles. RayCasting. Bodies have offset, rotation, scale, bbox padding, be static (non moving), be trigger bodies (non colliding).", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -33,12 +33,13 @@ "format": "prettier --write {src,docs,*.*}", "benchmark": "npm run benchmark-insertion && npm run benchmark-stress", "benchmark-stress": "node -r pixi-shim -e 'import(\"./dist/benchmarks/index.js\").then(({ stressBenchmark }) => stressBenchmark());'", - "benchmark-insertion": "node -r pixi-shim -e 'import(\"./dist/benchmarks/index.js\").then(({ insertionBenchmark }) => insertionBenchmark());'" + "benchmark-insertion": "node -e 'import(\"./dist/benchmarks/index.js\").then(({ insertionBenchmark }) => insertionBenchmark());'" }, "repository": "git://github.com/Prozi/detect-collisions.git", "files": [ "dist/*.*", - "dist/bodies/*.*" + "dist/bodies/*.*", + "dist/external/*.*" ], "keywords": [ "javascript",