Skip to content

b2BodyType enum is not getting built by tsc #72

@AlvinThorn008

Description

@AlvinThorn008

While bundling this package with rollup, I discovered that b2BodyType was not exported because the enum b2BodyType is not defined correctly.

In FILE: \packages\box2d\src\dynamics\b2Body.ts Line 32 - 40

export const enum b2BodyType {
    b2_unknown = -1,
    b2_staticBody = 0,
    b2_kinematicBody = 1,
    b2_dynamicBody = 2,

    // TODO_ERIN
    // b2_bulletBody = 3
}

I made this correction(I removed const) and it compiled correctly.

export enum b2BodyType {
    b2_unknown = -1,
    b2_staticBody = 0,
    b2_kinematicBody = 1,
    b2_dynamicBody = 2,

    // TODO_ERIN
    // b2_bulletBody = 3
}

Please make this correction, I'm kind of illiterate when it comes to git and Github.
If someone knows how, also try to make a pull request please

Thanks and I hope this issue can be resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions