Giter Club home page Giter Club logo

Comments (4)

Lusito avatar Lusito commented on July 4, 2024

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.

Lusito avatar Lusito commented on July 4, 2024

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.

Lusito avatar Lusito commented on July 4, 2024

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.

ErikSom avatar ErikSom commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.