josephg / josephg/Chipmunk-js

Cannot create a body

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
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);
```
![image](https://user-images.githubusercontent.com/54078384/89637525-34c74e80-d8a2-11ea-9419-f09856a33fb8.png)
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.