将动画角度固定在椭圆上

时间:2019-02-12 08:55:34

标签: javascript animation rxjs spark-ar-studio

我用这个公式来计算椭圆的角度 Phi = atan(y*py/x*px),其中pypx是椭圆的参数。当动画越过-PI和PI时,它将通过PI rad改变其方向。

我使用RxJ,不知道如何在适当的时间进行交换。也许我需要订阅一些活动吗?

arrows showing the orientation of the object that I get, its moving in clockwise direction

1 个答案:

答案 0 :(得分:0)

使用Math.atan2代替atan。

相关问题