box2d.ts icon indicating copy to clipboard operation
box2d.ts copied to clipboard

b2BodyType enum is not getting built by tsc

Open AlvinThorn008 opened this issue 5 years ago • 0 comments

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.

AlvinThorn008 avatar Sep 26 '20 16:09 AlvinThorn008