well got it working if anyone is have the same trouble, here is a solution it not perfect yet but it may help someone with the same problem
y_offset = Math.round(state.camera_y / state.tile_height);
height_offset = Math.round((self.setup.height / state.tile_height) + y_offset) + 1;
x_offset = Math.round(state.camera_x / state.tile_width);
width_offset = Math.round((self.setup.width / state.tile_width) + x_offset) + 1;
if(height_offset > state.map_height)
height_offset = state.map_height
if(width_offset > state.map_width)
width_offset = state.map_width
for (var y = y_offset; y < height_offset; y++) {
col = state.map_data[y];
for (var x = x_offset; x < width_offset; x++) {
color = (state.map_data[y][x]==1)?'#fff':'#000';
self._draw({
type:'rec',
x: x * state.tile_width - state.camera_x,
y: y * state.tile_height - state.camera_y,
width: state.tile_width,
height: state.tile_height,
fill: color,
visible: true
},self.ctx);
};
};

Find content
Not Telling