Skip to content

Interface: FixtureDef

A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture definitions safely.

Extends

Properties

density?

optional density: number

The density, usually in kg/m^2

Inherited from

FixtureOpt.density


filterCategoryBits?

optional filterCategoryBits: number

Collision category bit or bits that this fixture belongs to. If groupIndex is zero or not matching, then at least one bit in this fixture categoryBits should match other fixture maskBits and vice versa.

Inherited from

FixtureOpt.filterCategoryBits


filterGroupIndex?

optional filterGroupIndex: number

Zero, positive or negative collision group. Fixtures with same positive groupIndex always collide and fixtures with same negative groupIndex never collide.

Inherited from

FixtureOpt.filterGroupIndex


filterMaskBits?

optional filterMaskBits: number

Collision category bit or bits that this fixture accept for collision.

Inherited from

FixtureOpt.filterMaskBits


friction?

optional friction: number

The friction coefficient, usually in the range [0,1]

Inherited from

FixtureOpt.friction


isSensor?

optional isSensor: boolean

A sensor shape collects contact information but never generates a collision response.

Inherited from

FixtureOpt.isSensor


restitution?

optional restitution: number

The restitution (elasticity) usually in the range [0,1]

Inherited from

FixtureOpt.restitution


shape

shape: Shape


style?

optional style: Style

Styling for dev-tools.

Inherited from

FixtureOpt.style


userData?

optional userData: unknown

Inherited from

FixtureOpt.userData