add planar/3-dimensional toggle function