update and render inverted in the Engine
Closed this issue · 4 comments
jerome649 commented
I think update and render methods are inverted in the Engine constructor.
Shouldn't it be const Engine = function(time_step, render, update) {
frankarendpoth commented
You mean the parameters are in the wrong order? I don't think it matters what order the parameters are in so long as they get used the right way.
jerome649 commented
Yes but in the rabbit trap source code the main files always contain
var engine = new Engine(1000/30, render, update);
So I think either render and update should be switch in engine constructor or each main files should be updated.
frankarendpoth commented
I see what you mean. It is inconsistent. Unfortunately the videos are
already made and once the video is out I can't update the source code
because it wouldn't be consistent with the video. That was something I
decided going in. The lesser of two evils is to let whatever mistakes and
inconsistencies be as they are and take solace in the fact that the example
works, is logically sound, and matches the video. If the mistake is bad
enough I make another project and another video to correct it. I've even
removed entire projects. This doesn't seem quite that bad, however. Thanks
for catching that, though. Keen eye.
…On Fri, Nov 30, 2018, 9:30 PM jerome649 ***@***.*** wrote:
Yes but in the rabbit trap source code the main files always contain
var engine = new Engine(1000/30, render, update);
So I think either render and update should be switch in engine constructor
or each main files should be updated.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APcmwrYECqEcuD4OidR5RJePFehEbxVUks5u0emogaJpZM4Y8m5x>
.
frankarendpoth commented
I'm going to close this issue because the code is functional albeit inconsistent across different examples in the same project.