nape-js API
    Preparing search index...

    Class Interactor

    Base class for all interactable physics objects (Body, Shape, Compound).

    Cannot be instantiated directly — only via Body, Shape, or Compound. Provides shared properties: id, userData, group, cbTypes, and type casting methods (castBody, castShape, castCompound).

    Fully modernized — all methods use ZPP_Interactor fields directly via zpp_inner_i (no compiled prototype delegation).

    Hierarchy (View Summary)

    Index

    Accessors

    • get castBody(): any

      Cast to Body — returns the Body wrapper if this is a Body, else null.

      Returns any

    • get castCompound(): any

      Cast to Compound — returns the Compound wrapper if this is a Compound, else null.

      Returns any

    • get castShape(): any

      Cast to Shape — returns the Shape wrapper if this is a Shape, else null.

      Returns any

    • get userData(): Record<string, unknown>

      User-defined data storage object.

      Returns Record<string, unknown>

    Methods