|
|
|
|
|
by natecavanaugh
2711 days ago
|
|
As far as logic goes, I totally agree, but personal preference nit pick, from a code writer and reader perspective, I think all subproperty access (`hero.acceleration.x`) could be cached to a variable, or just operate on plain variables and assign property access after mutations and only manipulate objects as needed.
It makes the code easier to write and read, IMHO, and I believe older engines had infinitesimal changes in performance with updating objects, so it's more of a habit and code clarity thing for me.
Of course, that's far less important than the fact that the logic is clear and concise, especially after learning JS in a week :) |
|