Class b2FixtureDef

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

Index

Constructor methods

Properties

Constructor methods

constructor(): b2FixtureDef

The constructor sets the default fixture definition values.

Returns

b2FixtureDef

Properties

public density: number

The density, usually in kg/m^2.

public filter: b2FilterData

Contact filtering data.

public friction: number

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

public isSensor: boolean

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

public restitution: number

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

public shape: b2Shape

The shape, this must be set. The shape will be cloned, so you can create the shape on the stack.

public userData: any

Use this to store application specific fixture data.