Cannot create a body
- Dominant language
- JavaScript
- Stars
- 539
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
I downloaded the cp.min.js file, then tried to create a body. Then I get an error Uncaught TypeError: this.setMass is not a function. I use cp.js and the same error happens. I delete all other libraries that I'm using, and still it doesn't work. To reproduce:
```javascript
var space = new cp.Space();
var mass = 100;
var radius = 25;
var moment = cp.momentForCircle(mass, 20, radius, cp.vzero);
var body = cp.Body(mass, moment);
```

I am using Chrome.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided snippet in Chrome with both cp.js and cp.min.js, focusing on the cp.Body entry point and the reported setMass error. Check whether the same behavior occurs in both downloaded distributions, then verify that body creation completes without the TypeError and document or test the confirmed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100