add some 3d features and bugs fix