refactor PlaneType
fix main method in html and ios part