         # Extract pixels (some time after render is queued, to avoid stalls)
         if @step == @render_steps + @wait_steps
             # t = performance.now()
-            gl.readPixels(0, 0, @w, @h, gl.RGBA, gl.UNSIGNED_BYTE, @pixels)
+            gl.readPixels(0, 0, @width, @height, gl.RGBA, gl.UNSIGNED_BYTE, @pixels)
             # console.log((performance.now() - t).toFixed(2) + ' ms')
             @step = 0
             @rounds += 1

                        @mesh_by_id[id] = alt

    debug_xy: (x, y) ->
        x = (x*@w)|0
        y = ((1-y)*@h)|0
        @debug_x = x
        @debug_y = y


            @imagedata.data.set(@pixels)
            d = @imagedata.data
            i = 3
            for y in [0...@height]
                for x in [0...@width]
                    d[i] = if x == @debug_x or y == @debug_y
                        0
                    else
