Re:Show HN: Advanced Physics Library designed for Javascript...
by bhouston on Friday November 15, 2013 @03:43PM
(#6742030)
Nice. Two suggestions:
1. You could likely have auto-generated the callback stuff so you wouldn't have had to have it written out in each function.
2. You could have written the parameters and return values and equations in a Object for each function and auto-generated the inline docs and the i-prefixed functions. This would have gotten rid of more duplication that is present.
Re:Show HN: Advanced Physics Library designed for Javascript...
by abhia on Friday November 15, 2013 @03:47PM
(#6742056)
Thanks for the suggestions! I couldn't figure out a way to auto-generate the callbacks, but I'll keep that in mind next time! I'll definitely work on the second solution you proposed, I think that would actually reduce the duplications.
Re:Show HN: Advanced Physics Library designed for Javascript...
by abhia on Friday November 15, 2013 @03:49PM
(#6742071)
Thanks! We'll be working on fixing those things :) We've made it so it's easy to increase/decrease the accuracy, but the next thing we plan to do is to make the equations rearrangeable!
1. You could likely have auto-generated the callback stuff so you wouldn't have had to have it written out in each function.
2. You could have written the parameters and return values and equations in a Object for each function and auto-generated the inline docs and the i-prefixed functions. This would have gotten rid of more duplication that is present.