You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if you'd be up for any of these, so I'll just throw the ideas here. If you're game for any of them, happy to PR:
standardize on the vec2 module from gl-matrix - this would mean vectors would be [ x, y ] rather than { x, y }.
it's nice in that it re-uses a popular vector module. I'm always a little saddened looking at various game/sim repos in javascript, and every one invents it's own vector/matrix libraries. :(
switch from Object-oriented to data-oriented design - rather than using classes to bundle code, the different primitives (sticks, dots etc.) essentially become structs, and the data structure gets passed in to all of the related functions
Will add more ideas as they come up., just wanted to throw these in as a starting point.
The text was updated successfully, but these errors were encountered:
avoid attaching things to window and rely on pure es imports/exports.
search the code for browser only APIs (I don't think we use many except for window) this would enable running the verlet logic on node/deno/bun if someone wanted to.
I don't know if you'd be up for any of these, so I'll just throw the ideas here. If you're game for any of them, happy to PR:
vec2
module fromgl-matrix
- this would mean vectors would be[ x, y ]
rather than{ x, y }
.it's nice in that it re-uses a popular vector module. I'm always a little saddened looking at various game/sim repos in javascript, and every one invents it's own vector/matrix libraries. :(
Will add more ideas as they come up., just wanted to throw these in as a starting point.
The text was updated successfully, but these errors were encountered: