Comments (4)
flyover seems to do something similar in his current master branch, removing the b2 prefixes.
I see your points, but that will also make the learning curve steeper and create more work when porting existing code.
Still undecided on both of these, but leaning towards a yes.
from box2d.ts.
I've created a new branch naming-convention, where I'm trying out these naming changes. Feel free to take a look and make suggestions.
What I've done so far:
- Removed b2 prefix from classes
- Renamed b2_ prefixed constants to UPPER_CASE (without b2_ prefix)
- Removed redundant prefixes and suffixes from enumerations
- Added Test suffix to the Testbed test classes, since they would otherwise have lots of conflicts
I've focused mainly on the core project, so there are some leftovers in the other libs, where I haven't done the above yet.
It's in a branch, as I'm not entirely sure yet if this should be done. While this does look a lot nicer to work with, it will ultimately create lots of work on the documentation part, since we can't just reference the original documentation and say "This is the original documentation, check this page for differences".
Next up:
- Renaming methods to lowerCamelCase
- Removing m_ prefix from props? (might cause conflicts, so I might delay this a bit)
from box2d.ts.
Renamed methods to lowerCamelCase. That was a huge change and looking at how much work it was to port the testbed, I'm afraid this will prevent people from migrating from another js/ts box2d to this one, as it involves a lot of work.
from box2d.ts.
My personal recommendation would be to keep it as close as possible to the original Box2D API, especially because the documentation is great and has been out their for a really long time. As a long time Box2D user it would be tedious to rethink casing and prefixing all the time.
from box2d.ts.
Related Issues (20)
- Active development HOT 1
- Potential Project Dependant - How to install and Good Fit? HOT 1
- Create API Docs HOT 1
- As a project developer, I want to be able to render the world to a canvas using a function HOT 7
- wasm builds of box2d and liquidfun HOT 2
- [Solved] Constructor of class 'b2World' is private and only accessible within the class declaration HOT 2
- [Solved] b2_island.d.ts:3:10 - error TS2305: Module '"./b2_contact_solver"' has no exported member 'b2ContactVelocityConstraint'. HOT 6
- Hasn't the DebugDraw() method been implemented? HOT 2
- [Solved] Where can I find the demo source code for the official @box2d/core examples? HOT 2
- Hello World example HOT 2
- Testbed a little too fast
- Hacktoberfest
- Plz make little note in guide HOT 1
- Feature Request: Implementation of b2Draw, SetDebugDraw and DebugDraw HOT 19
- [Solved] The requested module '@box2d/core' does not provide an export named 'b2Draw' HOT 2
- [Solved] `DrawSolidPolygon` gets wrong collider position HOT 6
- Rotation problem with box2d-core and WebGL HOT 11
- Feature Request: Add the ESM button to jsDelivr HOT 2
- Feature Request: Add an information to jsDelivr that @box2d/core is JavaScript port too HOT 1
- box2d-core on the server side HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box2d.ts.