piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.87k stars 236 forks source link

inconsistent Vec2 construction throughout examples #273

Open mreinstein opened 6 months ago

mreinstein commented 6 months ago

On this page, it uses a factory style init: (from https://piqnt.com/planck.js/docs/body)

Screenshot 2024-02-12 at 11 54 13 AM

This one uses traditional new constructor: (from https://piqnt.com/planck.js/docs/hello-world)

Screenshot 2024-02-12 at 12 04 34 PM

Which one is correct?