nape-js API
    Preparing search index...

    Interface ConcaveBodyOptions

    Options for creating a body from concave polygon vertices.

    interface ConcaveBodyOptions {
        delaunay?: boolean;
        filter?: InteractionFilter;
        material?: Material;
        position?: Vec2;
        simplify?: number;
        type?: BodyType;
    }
    Index

    Properties

    delaunay?: boolean

    Use Delaunay refinement for higher-quality triangulation. Default false.

    Interaction filter applied to all decomposed shapes.

    material?: Material

    Material applied to all decomposed shapes.

    position?: Vec2

    Body position in world space — defaults to origin.

    simplify?: number

    Simplification tolerance (Ramer–Douglas–Peucker epsilon). When > 0, vertices are simplified before decomposition. Default 0 (no simplification).

    type?: BodyType

    Body type — defaults to BodyType.DYNAMIC.