https://blog.csdn.net/qinyuanpei/article/details/52765356
https://blog.csdn.net/chongzi_daima/article/details/100857125
https://blog.csdn.net/qq_15267341/article/details/76011321
cocos creater实现:
https://blog.csdn.net/weixin_41922691/article/details/100769762