Method and apparatus for processing rotation animation special effect, and readable storage medium
The present disclosure relates to a method and apparatus for processing a rotation animation special effect, and a readable storage medium. The method comprises: obtaining an object to be rotated; displaying a rotation parameter configuration window, and associating said object with the rotation parameter configuration window, the rotation parameter configuration window comprising a plurality of configuration items for generating a target rotation animation special effect; and generating a configuration file of the target rotation animation special effect according to configuration information of the plurality of configuration items, the target rotation animation special effect being an animation special effect of rotating said object with a rotation point as the center.
1 . A method for processing a surrounding animation effect, comprising:
acquiring a surrounding object;
displaying a surrounding parameter configuration window, and associating the surrounding object with the surrounding parameter configuration window; wherein the surrounding parameter configuration window comprises a plurality of configuration items for generating a surrounding animation effect;
generating a configuration file for the surrounding animation effect in accordance with configuration information of the plurality of configuration items; wherein the surrounding animation effect is an animation effect that the surrounding object surrounds a surrounded point on a two-dimensional plane with the surrounded point as a center; and
updating a frame of the surrounding animation effect in accordance with the configuration file for the surrounding animation effect,
wherein the plurality of configuration items comprise two or more of: a surrounded point configuration item, a first single-surrounding duration configuration item, a first revolve angle configuration item, a surrounding speed change mode configuration item, and a first surrounding number configuration item; wherein the first revolve angle is an angle at which the surrounding object revolves within the first single-surrounding duration, and the first surrounding number is a number of single surroundings that the surrounding object needs to complete.
2 . The method according to claim 1 , wherein the plurality of configuration items further comprise one or more of: a start surrounding configuration item, a pause surrounding configuration item, a continue surrounding configuration item, and a stop surrounding configuration item.
3 . The method according to claim 2 , further comprising: before generating the configuration file for the surrounding animation effect in accordance with the configuration information of the plurality of configuration items,
receiving a configuration operation for a first configuration item that is inputted by a user; and
acquiring configuration information corresponding to the first configuration item in accordance with the configuration operation for the first configuration item; wherein the configuration file further comprises the configuration information corresponding to the first configuration item,
wherein, the first configuration item comprises one or more of the start surrounding configuration item, the pause surrounding configuration item, the continue surrounding configuration item, and the stop surrounding configuration item.
4 . The method according to claim 1 , wherein the plurality of configuration items further comprise one or more of: a start-surrounding trigger configuration item, a pause-surrounding trigger configuration item, a continue-surrounding trigger configuration item, a stop-surrounding trigger configuration item, a position data output configuration item, and a revolve data output configuration item.
5 . The method according to claim 4 , further comprising: before generating the configuration file for the surrounding animation effect in accordance with the configuration information of the plurality of configuration items,
receiving a configuration operation for a second configuration item that is inputted by a user; and
acquiring configuration information corresponding to the second configuration item in accordance with the configuration operation for the second configuration item; wherein the configuration file further comprises the configuration information of the second configuration item;
wherein, the second configuration item comprises one or more of the start-surrounding trigger configuration item, the pause-surrounding trigger configuration item, the continue-surrounding trigger configuration item, and the stop-surrounding trigger configuration item.
6 . The method according to claim 1 , wherein updating the frame of the surrounding animation effect in accordance with the configuration file for the surrounding animation effect comprises:
acquiring, in accordance with the configuration file for the surrounding animation effect and a position of the surrounding object in a first frame of the surrounding animation effect, a position of the surrounding object in a second frame of the surrounding animation effect, wherein the first frame of the surrounding animation effect precedes the second frame of the surrounding animation effect.
7 . The method according to claim 6 , wherein acquiring, in accordance with the configuration file for the surrounding animation effect and the position of the surrounding object in the first frame of the surrounding animation effect, the position of the surrounding object in the second frame of the surrounding animation effect comprises:
step (a): acquiring an actual surrounding number of the surrounding object, and determining whether the actual surrounding number is equal to a first surrounding number configured by the first surrounding number configuration item;
step (b): if the actual surrounding number is less than the first surrounding number, acquiring, in accordance with the position of the surrounding object in the first frame of the surrounding animation effect, and the configuration information of the surrounded point configuration item, the first single-surrounding duration configuration item, the first revolve angle configuration item, and the surrounding speed change mode configuration item, the position of the surrounding object in the second frame of the surrounding animation effect,
wherein the first frame of the surrounding animation effect and the second frame of the surrounding animation effect are two adjacent frames of the surrounding animation effect; and an initial value of the position of the surrounding object in the first frame of the surrounding animation effect is a position of the surrounding object set when the surrounding object is acquired;
step (c): acquiring the second frame of the surrounding animation effect in accordance with the position of the surrounding object in the second frame of the surrounding animation effect; and
step (d): updating the second frame of the surrounding animation effect to the first frame of the surrounding animation effect;
wherein the steps (a) to (d) are repeatedly performed until the actual surrounding number is equal to the first surrounding number.
8 . The method according to claim 7 , further comprising: after updating the second frame of the surrounding animation effect to the first frame of the surrounding animation effect,
acquiring an actual single-surrounding duration of the surrounding object;
updating the actual surrounding number if the actual single-surrounding duration is equal to the first single-surrounding duration; and
not updating the actual surrounding number if the actual single surrounding duration is less than the first single-surrounding duration.
9 . The method according to claim 7 , wherein acquiring, in accordance with the position of the surrounding object in the first frame of the surrounding animation effect, and the configuration information of the surrounded point configuration item, the first single-surrounding duration configuration item, the first revolve angle configuration item, and the surrounding speed change mode configuration item, the position of the surrounding object in the second frame of the surrounding animation effect comprises:
acquiring a time difference between the first frame of the surrounding animation effect and the second frame of the surrounding animation effect;
acquiring a second revolve angle in accordance with the configuration information of the first single-surrounding duration configuration item, the configuration information of the first revolve angle configuration item, the configuration information of the surrounding speed change mode configuration item, and the time difference;
acquiring a coordinate transformation matrix in accordance with the position of the surrounding object in the first frame of the surrounding animation effect, the configuration information of the surrounded point configuration item, and the second revolve angle; and
acquiring the position of the surrounding object in the second frame of the surrounding animation effect in accordance with the coordinate transformation matrix and the position of the surrounding object in the first frame of the surrounding animation effect.
10 . The method according to claim 9 , wherein, if the configuration file comprises configuration information of a surrounding object rotation configuration item, and the configuration information of the rotation configuration item indicates the surrounding object to rotate, the method further comprises:
controlling the surrounding object to rotate in the second frame of the surrounding animation effect in accordance with the coordinate transformation matrix.
11 . The method according to claim 2 , wherein if the configuration file comprises configuration information of the pause surrounding configuration item, the method further comprises:
during the configuration file being run, when it is detected that the configuration information of the pause surrounding configuration item is satisfied, controlling the surrounding object to pause surrounding.
12 . The method according to claim 11 , wherein if the configuration file comprises configuration information of the continue surrounding configuration item, the method further comprises:
during the configuration file being run, when it is detected that the configuration information of the continue surrounding configuration item is satisfied, controlling the surrounding object to continue surrounding from a pause position; wherein the pause position is a position where the surrounding object is paused surrounding.
13 . The method according to claim 2 , wherein if the configuration file comprises configuration information of the stop surrounding configuration item, the method further comprises:
during the configuration file being run, when it is detected that the configuration information of the stop surrounding configuration item is satisfied, controlling the surrounding object to stop surrounding and restore to a position of the surrounding object set when the surrounding object is acquired.
14 . The method according to claim 5 , wherein if the configuration file comprises the configuration information of the second configuration item, the method further comprises:
during the configuration file being run, if it is detected that the configuration information of the second configuration item is satisfied, outputting a signal which corresponds to the second configuration item,
wherein if the second configuration item comprises the start-surrounding trigger configuration item, the signal comprises a signal which indicates that the surrounding object has started surrounding;
if the second configuration item comprises the pause-surrounding trigger configuration item, the signal comprises a signal which indicates that the surrounding object has paused surrounding;
if the second configuration item comprises the continue-surrounding trigger configuration item, the signal comprises a signal which indicates that the surrounding object has continued surrounding; or
if the second configuration item comprises the stop-surrounding trigger configuration item, the signal comprises a signal which indicates that the surrounding object has stopped surrounding.
15 . The method according to claim 6 , wherein if the configuration file comprises configuration information of a position data output configuration item, the method further comprises:
outputting position data of the surrounding object in accordance with the configuration information of the position data output configuration item, wherein the position data comprises the position of the surrounding object in the first frame of the surrounding animation effect.
16 . An electronic device, comprising: a memory and a processor,
wherein the memory is configured to store computer program instructions; and
the processor is configured to execute the computer program instructions to implement the method for processing the surrounding animation effect according to claim 1 .
17 . A non-transitory readable storage medium, comprising: computer program instructions,
wherein the computer program instructions, when executed by at least one processor of an electronic device, implement following operations for processing a surrounding animation effect:
acquiring a surrounding object;
displaying a surrounding parameter configuration window, and associating the surrounding object with the surrounding parameter configuration window; wherein the surrounding parameter configuration window comprises a plurality of configuration items for generating a surrounding animation effect;
generating a configuration file for the surrounding animation effect in accordance with configuration information of the plurality of configuration items; wherein the surrounding animation effect is an animation effect that the surrounding object surrounds a surrounded point on a two-dimensional plane with the surrounded point as a center; and
updating a frame of the surrounding animation effect in accordance with the configuration file for the surrounding animation effect,
wherein the plurality of configuration items comprise two or more of: a surrounded point configuration item, a first single-surrounding duration configuration item, a first revolve angle configuration item, a surrounding speed change mode configuration item, and a first surrounding number configuration item; wherein the first revolve angle is an angle at which the surrounding object revolves within the first single-surrounding duration, and the first surrounding number is a number of single surroundings that the surrounding object needs to complete.
18 . A method for processing a surrounding animation effect, comprising:
acquiring a surrounding object;
displaying a surrounding parameter configuration window, and associating the surrounding object with the surrounding parameter configuration window; wherein the surrounding parameter configuration window comprises a plurality of configuration items for generating a surrounding animation effect;
generating a configuration file for the surrounding animation effect in accordance with configuration information of the plurality of configuration items; wherein the surrounding animation effect is an animation effect that the surrounding object surrounds a surrounded point in a three-dimensional space with the surrounded point as a center; and
updating a frame of the surrounding animation effect in accordance with the configuration file for the surrounding animation effect,
wherein the plurality of configuration items comprise two or more of: a surrounded point configuration item, a first single-surrounding duration configuration item, a surrounding axis system configuration item, a first revolve angle configuration item, a surrounding speed change mode configuration item, and a first surrounding number configuration item; wherein the first revolve angle is an angle at which the surrounding object revolves within the first single-surrounding duration, and the first surrounding number is a number of single surroundings that the surrounding object needs to complete.
19 . The method according to claim 18 , wherein updating the frame of the surrounding animation effect in accordance with the configuration file for the surrounding animation effect comprises:
acquiring, in accordance with the configuration file for the surrounding animation effect and a position of the surrounding object in a first frame of the surrounding animation effect, a position of the surrounding object in a second frame of the surrounding animation effect, wherein the first frame of the surrounding animation effect precedes the second frame of the surrounding animation effect.
20 . The method according to claim 19 , wherein acquiring, in accordance with the configuration file for the surrounding animation effect and the position of the surrounding object in the first frame of the surrounding animation effect, the position of the surrounding object in the second frame of the surrounding animation effect comprises:
step (a): acquiring an actual surrounding number of the surrounding object, and determining whether the actual surrounding number is equal to a first surrounding number configured by the first surrounding number configuration item;
step (b): if the actual surrounding number is less than the first surrounding number, acquiring, in accordance with the position of the surrounding object in the first frame of the surrounding animation effect, and the configuration information of the surrounded point configuration item, the surrounding axis system configuration item, the first single-surrounding duration configuration item, the first revolve angle configuration item, and the surrounding speed change mode configuration item, the position of the surrounding object in the second frame of the surrounding animation effect,
wherein the first frame of the surrounding animation effect and the second frame of the surrounding animation effect are two adjacent frames of the surrounding animation effect; and an initial value of the position of the surrounding object in the first frame of the surrounding animation effect is a position of the surrounding object set when the surrounding object is acquired;
step (c): acquiring the second frame of the surrounding animation effect in accordance with the position of the surrounding object in the second frame of the surrounding animation effect; and
step (d): updating the second frame of the surrounding animation effect to the first frame of the surrounding animation effect;
wherein the steps (a) to (d) are repeatedly performed until the actual surrounding number is equal to the first surrounding number.