frankarendpoth/frankarendpoth.github.io

update and render inverted in the Engine

Closed this issue · 4 comments

I think update and render methods are inverted in the Engine constructor.
Shouldn't it be const Engine = function(time_step, render, update) {

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.

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.

I'm going to close this issue because the code is functional albeit inconsistent across different examples in the same project.