e {
				return f;
			}
		}

		if (frames[left] && (frames[left].left - x) * px < 0.5) return frames[left];
		if (frames[right] && (x - (frames[right].left + frames[right].width)) * px < 0.5) return frames[right];

		return null;
	}

	function removeStack(left, width) {
		for (let h = 0; h < levels.length; h++) {
			const frames = levels[h], newFrames = [];
			for (let i = 0; i < frames.length; i++) {
				const f = frames[i];
				if (f.left >= left + width) {
					f.left -= width;
				} else if (f.left + f.w