64
edits
Line 8: | Line 8: | ||
The first step: a vector, assuming that the fixed point and the point where the mouse is located constitute a vector, and find the functional relationship of the vector: y = (a * x) + b; | The first step: a vector, assuming that the fixed point and the point where the mouse is located constitute a vector, and find the functional relationship of the vector: y = (a * x) + b; | ||
At the same time, a certain number of point number (5) are set on the line. | At the same time, a certain number of point number (5) are set on the line. | ||
the gif effect: | the gif effect: | ||
[[File:AssumedSkeleton1.gif|400px]] | [[File:AssumedSkeleton1.gif|400px]] | ||
The second step: two vectors, adding a random moving particle system. The distance between each point on the fixed vector, the number of points on the two vectors is represented by a variable, that is, the total length of the vector divided by the radius of the circle,which can be write in code like this: ellipseNum = distOfLine / ellipseSize; in this case, the particles can be guaranteed to be repelled in the entire line. The state of the repel, and the number of points changes as the length of the vector changes. The final effect of this step is very close to being expressed by the skeleton. | The second step: two vectors, adding a random moving particle system. The distance between each point on the fixed vector, the number of points on the two vectors is represented by a variable, that is, the total length of the vector divided by the radius of the circle,which can be write in code like this: ellipseNum = distOfLine / ellipseSize; in this case, the particles can be guaranteed to be repelled in the entire line. The state of the repel, and the number of points changes as the length of the vector changes. The final effect of this step is very close to being expressed by the skeleton. | ||
the gif effect: | the gif effect: | ||
edits