Class Material

Defines a physics material.

Constructors

  • Parameters

    • Optional options: string | {
          friction?: number;
          restitution?: number;
      }

    Returns Material

Properties

friction: number

Friction for this material. If non-negative, it will be used instead of the friction given by ContactMaterials. If there's no matching ContactMaterial, the value from defaultContactMaterial in the World will be used.

id: number

Material id.

name: string

Material name. If options is a string, name will be set to that string.

Todo

Deprecate this

restitution: number

Restitution for this material. If non-negative, it will be used instead of the restitution given by ContactMaterials. If there's no matching ContactMaterial, the value from defaultContactMaterial in the World will be used.

idCounter: number