Method: VoxelammingGem::BuildBox#remove_box

Defined in:
lib/voxelamming_gem.rb

#remove_box(x, y, z) ⇒ Object



166
167
168
169
170
171
172
173
174
# File 'lib/voxelamming_gem.rb', line 166

def remove_box(x, y, z)
  x, y, z = round_numbers([x, y, z])

  if @is_framing
    @frames.reject! { |frame| frame[0] == x && frame[1] == y && frame[2] == z && frame[8] == @frame_id }
  else
    @boxes.reject! { |box| box[0] == x && box[1] == y && box[2] == z }
  end
end