其他提示

您需要交换粒子对象,而不是的x坐标的值。尝试:

 for (i = 1; i<length; i++) {
    value = particles[ i ];
    /* ... */
scroll top