 
     init: (scene, camera) ->
         @add_scene(scene)
+        @scene = scene
+        @camera = camera
         do_step_callback = (scene, frame_duration)=>
-            @do_step(scene, camera)
+            @do_step()
         scene.post_draw_callbacks.push do_step_callback
 
     add_scene: (scene) ->

            @ctx.putImageData(@imagedata, 0, 0)
        return
        
    create_debug_canvas: ->
        if @debug_canvas?
            @destroy_debug_canvas()

                            gl.frontFace(2305) # gl.CCW
        @step += 1

        # Extract pixels (some time after render is queued, to avoid stalls)
        if @step == @render_steps + @wait_steps
            # t = performance.now()
