Skip to main content

Interface: MapIndexedCollider

Defined in: src/sdk/components/map/colliders/MapIndexedCollider.ts:8

A map element that supports collision detection against simple shapes and can be spatially indexed.

Extends​

Properties​

boundingBox​

readonly boundingBox: Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>>

Defined in: src/sdk/components/map/colliders/MapIndexedCollider.ts:15

This collider's axis-aligned bounding box, as [minX, minY, maxX, maxY] in pixels.


isMapCollider​

readonly isMapCollider: true

Defined in: src/sdk/components/map/colliders/MapCollider.ts:8

Flags this object as a MapCollider.

Inherited from​

MapCollider.isMapCollider


isMapIndexedCollider​

readonly isMapIndexedCollider: true

Defined in: src/sdk/components/map/colliders/MapIndexedCollider.ts:10

Flags this object as a MapIndexedCollider.

Methods​

destroy()​

destroy(): void

Defined in: src/sdk/components/map/colliders/MapCollider.ts:40

Destroys this collider.

Returns​

void

Inherited from​

MapCollider.destroy


getPriority()​

getPriority(): number

Defined in: src/sdk/components/map/colliders/MapCollider.ts:14

Gets this collider's priority.

Returns​

number

This collider's priority.

Inherited from​

MapCollider.getPriority


intersectsBox()​

intersectsBox(cx, cy, axisX, axisY, halfWidth, halfHeight, mapProjection): boolean

Defined in: src/sdk/components/map/colliders/MapCollider.ts:26

Tests whether this collider intersects an oriented rectangular box.

Parameters​

ParameterTypeDescription
cxnumberThe x coordinate of the center of the box.
cynumberThe y coordinate of the center of the box.
axisXnumberThe x component of the unit vector parallel to the axis that defines the box's width.
axisYnumberThe y component of the unit vector parallel to the axis that defines the box's width.
halfWidthnumberThe half width of the box.
halfHeightnumberThe half height of the box.
mapProjectionMapProjection-

Returns​

boolean

Whether this collider intersects the specified oriented rectangular box.

Inherited from​

MapCollider.intersectsBox


intersectsCircle()​

intersectsCircle(cx, cy, radius, mapProjection): boolean

Defined in: src/sdk/components/map/colliders/MapCollider.ts:35

Tests whether this collider intersects a circle.

Parameters​

ParameterTypeDescription
cxnumberThe x coordinate of the center of the circle.
cynumberThe y coordinate of the center of the circle.
radiusnumberThe radius of the circle.
mapProjectionMapProjection-

Returns​

boolean

Whether this collider intersects the specified circle.

Inherited from​

MapCollider.intersectsCircle