CN108989898B - Method, storage medium, equipment and system for displaying gift continuous-click animation - Google Patents

Method, storage medium, equipment and system for displaying gift continuous-click animation Download PDF

Info

Publication number
CN108989898B
CN108989898B CN201710400983.1A CN201710400983A CN108989898B CN 108989898 B CN108989898 B CN 108989898B CN 201710400983 A CN201710400983 A CN 201710400983A CN 108989898 B CN108989898 B CN 108989898B
Authority
CN
China
Prior art keywords
animation
continuous
gift
hit
click
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710400983.1A
Other languages
Chinese (zh)
Other versions
CN108989898A (en
Inventor
汪刚
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710400983.1A priority Critical patent/CN108989898B/en
Publication of CN108989898A publication Critical patent/CN108989898A/en
Application granted granted Critical
Publication of CN108989898B publication Critical patent/CN108989898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/475End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Abstract

The invention discloses a method, a storage medium, equipment and a system for displaying gift continuous-click animation, and relates to the technical field of live broadcast application development. The method comprises the following steps: when a user continuously clicks to present a gift, generating a gift continuous-click number image according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number; calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and a preset animation expansion multiple; adding an expanded animation effect to the gift continuous-hit image; executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; and displaying the gift continuous-click animation according to the calculated display width. According to the invention, the feedback of interestingness and ornamental value is added to the continuous shooting of the gifts in a manner of displaying continuous shooting animations of the gifts, the user experience is improved, the enthusiasm of the user in continuous shooting gift presentation is improved, and the liveness in the live broadcast room is high.

Description

Method, storage medium, equipment and system for displaying gift continuous-click animation
Technical Field
The invention relates to the technical field of live broadcast application development, in particular to a method, a storage medium, equipment and a system for displaying gift continuous-click animation.
Background
The online live video broadcast refers to live video broadcast service performed by using internet network resources, and is synchronously released to a network through live video shooting, so that a user can see real-time live conditions on the network at the same time.
With the rapid development of mobile terminals, the live broadcast industry is more and more popular, and many users like watching live broadcasts. In the process of watching live broadcast, users often give gifts to favorite anchor broadcasts, and some users particularly like giving gifts in a continuous click mode. The continuous hit means that a plurality of gifts are given to a favorite anchor in a short time. However, at present, after gifting gifts, the user usually gets feedback that the number of gifted gifts is simply displayed in a static manner on the live interface. The effect of simply showing the presented gift number lacks interest and appreciation, and user experience is not good, so that the interest of the user in presenting the gift is reduced, the payment will not be high, meanwhile, the activity of a live broadcast room is also reduced, and the live broadcast quality is influenced.
Disclosure of Invention
The invention aims to overcome the defects of the background technology and provides a method, a storage medium, equipment and a system for displaying a gift continuous-click animation.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows: a method of presenting a gift-holding animation is provided, the method comprising the steps of:
s1, when a user continuously clicks to give a gift, generating a gift continuous-click number image required by realizing the gift continuous-click animation according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number;
s2, calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and the preset animation expansion multiple;
s3, adding an expanded animation effect to the gift continuous-hit image;
s4, executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; and displaying the gift continuous-click animation according to the calculated display width.
On the basis of the above technical solution, step S1 specifically includes the following steps:
s101, defining a variable array for storing a digital picture corresponding to each digit of the continuous hit number; defining an integer continuous impact number variable for representing the current continuous impact number, wherein the initial value of the continuous impact number variable is the continuous impact number of the user;
s102, judging whether the current continuous impact quantity variable is larger than zero, if so, turning to a step S103, and if not, turning to a step S105;
s103, obtaining a remainder R after a current continuous striking number variable is modulo 10, wherein the remainder R is an integer of 0-9; converting the remainder R into a corresponding digital picture, and adding the obtained digital picture into the variable array;
s104, dividing the current continuous hit number variable by 10, assigning the value obtained after the division to the continuous hit number variable again, returning to the step S102, and continuously acquiring the digital picture corresponding to the next digit of the continuous hit number until the digital picture corresponding to each digit of the continuous hit number is acquired and stored in the variable array;
and step S105, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
On the basis of the above technical solution, when the method is applied to an IOS system, step S3 specifically includes the following steps:
s301, obtaining a point location value of a point location attribute in a layer of the gift continuous hit number image; creating an insertion animation according to the acquired point position value;
s302, creating an expanded animation, and setting the maximum value of the amplification of the expanded animation as a preset animation expansion multiple;
s303, creating a group of animations, and setting the execution time of the group of animations as the preset group animation duration;
s304, setting the filling mode of the group animation to be a postnatal filling mode, and packaging the created inserting animation and expanding animation into the group animation;
s305, adding the group animation into a layer of the gift continuous-hit number image;
s306, creating a timer, and setting the time interval of the timer to be the same as the execution time of the group animation;
s307, creating a basic displacement animation, setting the end point value of the basic displacement animation as the point position value of the point position attribute in the layer of the gift continuous hit number image, setting the start point value of the basic displacement animation as half of the point position value, setting the starting execution time of the basic displacement animation to be the same as the time interval of the timer, and setting the animation execution time of the basic displacement animation as the preset displacement animation duration;
and S308, adding the basic displacement animation into the layer of the digital picture.
The present invention also provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method of presenting a gift-continuous-click animation.
The invention also provides equipment for displaying the gift continuous-click animation, which comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the method for displaying the gift continuous-click animation when executing the computer program.
The invention also provides a system for displaying the gift continuous-click animation, which comprises a continuous-click number image generation module, an animation display width calculation module, an animation effect insertion module and an animation generation and display module;
the hit-number image generation module is configured to: when a user continuously clicks to present a gift, generating a gift continuous-click number image required by realizing the gift continuous-click animation according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number;
the animation display width calculation module is used for: calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and a preset animation expansion multiple;
the animation effect insertion module is used for: adding an expanded animation effect to the gift continuous-hit image;
the animation generation and display module is used for: executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; and displaying the gift continuous-click animation according to the calculated display width.
On the basis of the technical scheme, the continuous attack number image generation module comprises an initial definition sub-module, a continuous attack number variable judgment sub-module, a digital image acquisition sub-module, a continuous attack number variable re-assignment sub-module and a generation processing sub-module;
the initial definition submodule is configured to: defining a variable array for storing digital pictures corresponding to each digit of the continuous hit number; defining an integer continuous impact number variable for representing the current continuous impact number, wherein the initial value of the continuous impact number variable is the continuous impact number of the user; sending a judgment signal to the continuous attack number variable judgment submodule;
the continuous impact number variable judgment submodule is used for: after receiving the judgment signal, judging whether the current continuous impact number variable is larger than zero, if so, sending an acquisition signal to the digital picture acquisition submodule, and if not, sending a generation signal to the generation processing submodule;
the digital picture acquisition sub-module is used for: after receiving the acquisition signal, performing modulo 10 on a current continuous striking number variable to obtain a remainder R, wherein the remainder R is an integer of 0-9; converting the remainder R into a corresponding digital picture, and adding the obtained digital picture into the variable array; sending an assignment signal to the continuous impact variable reassignment submodule;
the continuous hit number variable reassignment submodule is used for: after receiving the assignment signal, dividing the current continuous impact number variable by 10, assigning the value obtained after the integration to the continuous impact number variable again, and sending a judgment signal to a continuous impact number variable judgment submodule;
the generation processing submodule is used for: and after receiving the generation signal, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
On the basis of the technical scheme, the animation effect inserting module comprises an inserting animation creating sub-module, an expanding animation creating sub-module, a group animation packaging sub-module, a group animation adding sub-module, a timer creating sub-module, a basic displacement animation creating sub-module and a basic displacement animation adding sub-module;
the insertion animation creation submodule is used for: acquiring a point location value of a point location attribute in a layer of the gift continuous hit number image; creating an insertion animation according to the acquired point position value;
the augmented animation creation submodule is configured to: creating an expanded animation, and setting the maximum value of the amplification of the expanded animation as a preset animation expansion multiple;
the group animation creation sub-module is configured to: creating a group of animations, and setting the execution time of the group of animations as the preset group animation duration;
the group animation packaging submodule is used for: setting the filling mode of the group animation as a postnatal filling mode, and packaging the created inserting animation and expanding animation into the group animation;
the group animation adding submodule is used for: adding the group animation into the layer of the gift continuous hit number image;
the timer creating submodule is used for: creating a timer, and setting the time interval of the timer to be the same as the execution time of the group animation;
the basic displacement animation creating submodule is used for: creating a basic displacement animation, setting an end point value of the basic displacement animation as a point position value of a point position attribute in a layer of a gift continuous hit number image, setting a start point value of the basic displacement animation as a half of the point position value, setting the starting execution time of the basic displacement animation to be the same as the time interval of a timer, and setting the animation execution time of the basic displacement animation as the preset displacement animation duration;
the basic displacement animation adding submodule is used for: and adding the basic displacement animation into the layer of the digital picture.
On the basis of the technical scheme, the specific process of calculating the display width of the gift continuous-click animation by the animation display width calculation module comprises the following steps: calculating to obtain the display width of the gift continuous-hit animation according to the preset animation expansion multiple multiplied by the width of the reserved width + the width of the gift continuous-hit number image; the width of the gift continuous-hit number image is equal to the width of the digital picture multiplied by the number of the digital pictures.
On the basis of the technical scheme, the preset expansion multiple of the animation is 1.5 times.
The invention has the beneficial effects that:
(1) in the invention, a manner of adding an expanded animation effect to the image of the gift continuous-hit number is adopted to generate a gift continuous-hit animation, and the gift continuous-hit animation is displayed to the user. Compared with a common static display mode, the mode of displaying the gift continuous-hit animation to the user has stronger interestingness and enjoyment, and the user experience is good, so that the enthusiasm of the user for continuously hitting the gift for presentation is improved, and the liveness in a live broadcast room is high.
(2) In the invention, when each digit of the continuous hit number is obtained in a circulating way, the digits are obtained in sequence by adopting a mode of firstly modulo 10 to obtain the remainder and then dividing by 10 to obtain the whole number, and the whole operation is accurate and efficient; and the corresponding digital picture acquired each time is added into a variable array, so that the storage is convenient and the subsequent animation execution is convenient.
(3) In the present invention, group animation is used when adding an enlarged animation effect to the gift continuous-hit image. The group animation provides basic single-frame animation, and is executed in the layer, so that the animation is relatively high in execution efficiency and relatively small in occupied memory.
(4) In the invention, the expansion multiple of the animation is a preset value, the preset expansion multiple of the animation can be automatically set and adjusted by developers according to specific needs, and the artificial controllability and the flexibility are high.
Drawings
FIG. 1 is a flow chart of a method for presenting a gift-continuous-click animation in an embodiment of the invention;
FIG. 2 is a flowchart illustrating the step S1 according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for displaying a gift-continuous-click animation according to an embodiment of the present invention;
FIG. 4 is a block diagram of a system for presenting a gift-continuous-click animation in an embodiment of the present invention;
FIG. 5 is a block diagram of a specific structure of a consecutive hit number image generation module according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating a specific structure of an animation effect insertion module according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the embodiments.
The design idea of the invention is that when a user continuously clicks and presents gifts, a gift continuous-click animation is generated by adding an expanded animation effect to the image of the number of continuous-click gifts, and the gift continuous-click animation is displayed to the user. The animation effect of enlarging the continuous hit number of the static gifts can be improved, the interest and the ornamental value of displaying the continuous hit number can be enhanced, the user experience is good, the enthusiasm of the user in continuous hit gift giving is improved, and the liveness in the live broadcast room is high.
Based on the above design thought, referring to fig. 1, an embodiment of the present invention provides a method for displaying a gift continuous-click animation, including the following steps:
step S1, generation of a gift continuous hit number image: when a user continuously clicks to give a gift, a gift continuous-click number image required by realizing gift continuous-click animation is generated according to the continuous-click number of the user and stored, the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number, for example, the connection number of the user is 15, and the gift connection number image is composed of a digital picture 5 corresponding to one digit and a digital picture 1 corresponding to one ten digit.
Referring to fig. 2, in an embodiment, step S1 specifically includes the following steps:
step S101, defining a variable array (such as imgArray) for storing a digital picture corresponding to each digit of the continuous hit number; an integer continuous hit number variable (e.g., Combo) is defined to indicate the current number of continuous hits, and the initial value of the continuous hit number variable is the user's continuous hit number.
Step S102, judging whether the current continuous impact number variable is larger than zero, if so, turning to step S103, and if not, turning to step S105.
Step S103, obtaining a remainder R after a current continuous striking number variable is modulo 10, wherein the remainder R is an integer of 0-9; converting R into a corresponding digital picture by a function of digitally transforming the image, for example: if the remainder R is 5, the converted digital picture is the picture of the number 5; the resulting digital picture is added to the variable array (e.g., imgArray).
In actual operation, the function of the digital transformation image may be a function, such as an imageWithNumber function, which is written by a developer in advance to implement the function of the digital transformation image. In addition, when the obtained digital picture is added to the variable array (such as imgArray), a customized element insertion function for implementing an element insertion function, such as an insertObject function, can also be used for implementation. Through the operation of step S103, the digital picture corresponding to one digit in the continuous hit number can be successfully acquired.
And step S104, dividing the current continuous hit number variable by 10, assigning the value obtained after the integer is taken to the continuous hit number variable again, returning to the step S102, and continuously acquiring the digital picture corresponding to the next digit of the continuous hit number until the digital picture corresponding to each digit of the continuous hit number is acquired and stored in the variable array (such as imgArray).
And step S105, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
It can be understood that, since the process of generating the image of the gift continuous hit number is essentially a process of acquiring a digital picture corresponding to each digit of the continuous hit number in a loop, in terms of implementation of the code, a while loop statement may be used. while loops are characterized in that the loop body is not executed until the condition is not satisfied, therefore, the execution condition of the while loop can be set to have a running hit number variable greater than zero, e.g., Combo > 0; the loop body of the while loop may be set to execute the above steps S103 to S104.
Step S2, calculation of animation display width: and calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and a preset animation expansion multiple. The preset animation expansion factor can be set by a developer according to specific needs, and generally speaking, the animation expansion factor is set to be 1.5 times.
Specifically, the specific process of calculating the display width of the gift continuous-click animation comprises the following steps: calculating to obtain the display width of the gift continuous-hit animation according to the preset animation expansion multiple multiplied by the width of the reserved width + the width of the gift continuous-hit number image; the width of the gift continuous hit number image is equal to the width of the digital picture multiplied by the number of digital pictures stored in the variable array (i.e., the number of bits of the continuous hit number, which is also the number of digital pictures). It is understood that the width is reserved to have enough width for the digital picture of the gift continuous hit number image to realize a certain displacement after the animation is added. The number in the variable array is the number of continuous hits of the corresponding user, and for example, if the number of continuous hits of the user is two-digit 15, the number in the variable array is 2.
Step S3, insertion of animation effect: and adding an expanded animation effect to the gift continuous-hit image.
Taking the IOS system as an example, in one embodiment, the specific process of step S3 may be:
step S301, acquiring a point value of a point attribute position in a layer of the gift continuous hit number image; and according to the acquired point value, creating an insertion animation, such as insertAnimation, by using the transparency animation creation function animationWithKeyPath function existing in the IOS.
Step S302, an augmented animation for realizing the augmented effect is created by using the existing transparency animation creation function animationWithKeyPath function of the IOS, such as bigAnimation; and sets the maximum value of the enlargement of the enlarged animation to a preset animation enlargement multiple, such as 1.5 times.
Step S303, creating a group animation such as insermationaminogroup by creating an object of a group animation class CAanimationgroup; and sets the execution time of the set of animations to a preset set animation duration (e.g., instant duration). The preset group animation duration (insertDuration) may be set by a developer according to specific needs, and is generally set to 0.3 seconds.
Step S304, the filling mode of the group animation is set to the acquired filling mode, and the insertion animation (e.g., insertAnimation) created in step S301 and the augmentation animation (e.g., bigAnimation) created in step S302 are packaged into the group animation. When the packaging is realized specifically, the insertion animation and the expansion animation are packaged into an array, and then the array is set as the animation attributes animation of the group animation.
Step S305, adding the group animation to the layer of the gift continuous-hit number image by using an existing animation adding function addAnimation of the IOS.
In step S306, a timer (e.g., addTimer) is created by creating an object of the timer class CFTimeInterval, and the time interval of the timer is set to be the same as the execution time of the group animation. That is, the time interval of the timer is set to a preset group animation duration (instant duration).
Step S307, creating a basic displacement animation (such as posionanimation) by using a basic animation class CABASICANimation; setting the end value of the basic displacement animation as the point value of the point attribute position in the layer of the gift continuous-hit number image; setting the starting point value of the basic displacement animation as a half of the point value of the point attribute position in the layer of the gift continuous-hit number image; setting the starting execution time of the basic displacement animation to be the same as the time interval of the timer (namely, the starting execution time of the basic displacement animation and the time interval of the timer are both preset group animation duration, which is equivalent to executing the basic displacement animation once every interval of the group animation duration); the animation execution time of the basic displacement animation is set to a preset displacement animation duration (e.g., posDuration), which can be set by a developer according to specific needs, and generally speaking, the preset displacement animation duration (posDuration) is half of the preset group animation duration (insertDuration), that is, 0.15 seconds.
Step S308, adding the basic displacement animation into the layer of the digital picture by using an existing animation adding function addAnimation of the IOS.
Through the operation of the steps, the method can successfully complete the addition of the expanded animation effect to the gift continuous-hit number image.
It should be noted that the above-mentioned specific operation of implementing step S3 in the IOS system is only an example, and in other systems (such as an android system), the specific implementation flow of step S3, and a developer can perform specific design and adjustment according to the actual functions, codes, interfaces, and the like of the android system, and is not limited herein.
Step S4, generation and display of gift continuous-click animation: executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; and displaying the gift continuous-click animation according to the display width calculated in the step S2.
It is understood that, in step S4, when the gift-hitching number image to which the enlarged animation effect is added is executed to obtain the gift-hitching animation, the timer (e.g., addTimer) created in step S306 periodically (according to the time interval of the timer) acquires all the digital pictures stored in the variable array, so as to execute the gift-hitching number image to which the enlarged animation effect is added, thereby obtaining the gift-hitching animation.
In response to the method for displaying a gift-continuous-click animation described above, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the steps of the method for displaying a gift-continuous-click animation described above in the embodiments. The storage medium includes various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk.
In addition, referring to fig. 3, in response to the method for displaying a gift-continuous-click animation described above, an embodiment of the present invention further provides an apparatus for displaying a gift-continuous-click animation, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for displaying a gift-continuous-click animation in the embodiments described above.
Referring to fig. 4, an embodiment of the present invention further provides a system for displaying a gift continuous-click animation, where the system includes a continuous-click number image generation module, an animation display width calculation module, an animation effect insertion module, and an animation generation and display module.
Wherein the continuous hit number image generation module is configured to: when a user continuously clicks to present a gift, generating a gift continuous-click number image required by realizing the gift continuous-click animation according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number;
the animation display width calculation module is used for: calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and a preset animation expansion multiple;
the animation effect insertion module is used for: adding an expanded animation effect to the gift continuous-hit image;
the animation generation and display module is used for: executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; and displaying the gift continuous-click animation according to the calculated display width.
Further, as shown in fig. 5, the continuous hit number image generation module specifically includes an initial definition sub-module, a continuous hit number variable determination sub-module, a digital image acquisition sub-module, a continuous hit number variable re-assignment sub-module, and a generation processing sub-module.
Wherein the initial definition sub-module is configured to: defining a variable array for storing digital pictures corresponding to each digit of the continuous hit number; defining an integer continuous impact number variable for representing the current continuous impact number, wherein the initial value of the continuous impact number variable is the continuous impact number of the user; sending a judgment signal to the continuous attack number variable judgment submodule;
the continuous impact number variable judgment submodule is used for: after receiving the judgment signal, judging whether the current continuous impact number variable is larger than zero, if so, sending an acquisition signal to the digital picture acquisition submodule, and if not, sending a generation signal to the generation processing submodule;
the digital picture acquisition sub-module is used for: after receiving the acquisition signal, performing modulo 10 on a current continuous striking number variable to obtain a remainder R, wherein the remainder R is an integer of 0-9; converting the remainder R into a corresponding digital picture, and adding the obtained digital picture into the variable array; sending an assignment signal to the continuous impact variable reassignment submodule;
the continuous hit number variable reassignment submodule is used for: after receiving the assignment signal, dividing the current continuous impact number variable by 10, assigning the value obtained after the integration to the continuous impact number variable again, and sending a judgment signal to a continuous impact number variable judgment submodule;
the generation processing submodule is used for: and after receiving the generation signal, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
Further, referring to fig. 6, the animation effect insertion module specifically includes an insertion animation creation sub-module, an enlargement animation creation sub-module, a group animation encapsulation sub-module, a group animation addition sub-module, a timer creation sub-module, a basic displacement animation creation sub-module, and a basic displacement animation addition sub-module.
Wherein the insertion animation creation submodule is configured to: acquiring a point location value of a point location attribute in a layer of the gift continuous hit number image; creating an insertion animation according to the acquired point position value;
the augmented animation creation submodule is used for: creating an expanded animation, and setting the maximum value of the amplification of the expanded animation as a preset animation expansion multiple;
the group animation creation sub-module is used for: creating a group of animations, and setting the execution time of the group of animations as the preset group animation duration;
the group animation packaging submodule is used for: setting the filling mode of the group animation as a postnatal filling mode, and packaging the created inserting animation and expanding animation into the group animation;
the group animation adding submodule is used for: adding the group animation into the layer of the gift continuous hit number image;
the timer creating submodule is used for: creating a timer, and setting the time interval of the timer to be the same as the execution time of the group animation;
the basic displacement animation creation submodule is used for: creating a basic displacement animation, setting an end point value of the basic displacement animation as a point position value of a point position attribute in a layer of a gift continuous hit number image, setting a start point value of the basic displacement animation as a half of the point position value, setting the starting execution time of the basic displacement animation to be the same as the time interval of a timer, and setting the animation execution time of the basic displacement animation as the preset displacement animation duration;
the basic displacement animation adding submodule is used for: and adding the basic displacement animation into the layer of the digital picture.
It should be noted that: in the system provided by the above embodiment, when the display of the gift continuous-click animation is realized, only the division of the above functional modules is taken as an example, and in practical application, the above function distribution can be completed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules to complete all or part of the above described functions.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention.
Those not described in detail in this specification are within the skill of the art.

Claims (8)

1. A method of displaying a gift-continuous-click animation, the method comprising the steps of:
s1, when a user continuously clicks to give a gift, generating a gift continuous-click number image required by realizing the gift continuous-click animation according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number;
s2, calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and the preset animation expansion multiple;
s3, adding an expanded animation effect to the gift continuous-hit image;
s4, executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; displaying the gift continuous-click animation according to the calculated display width;
wherein, step S1 specifically includes the following steps:
s101, defining a variable array for storing a digital picture corresponding to each digit of the continuous hit number; defining an integer continuous impact number variable for representing the current continuous impact number, wherein the initial value of the continuous impact number variable is the continuous impact number of the user;
s102, judging whether the current continuous impact quantity variable is larger than zero, if so, turning to a step S103, and if not, turning to a step S105;
s103, obtaining a remainder R after a current continuous striking number variable is modulo 10, wherein the remainder R is an integer of 0-9; converting the remainder R into a corresponding digital picture, and adding the obtained digital picture into the variable array; converting R into a corresponding digital picture through a function of a digital conversion image, wherein the function of the digital conversion image is an imageWithnumber function for realizing the function of the digital conversion image, and adding the obtained digital picture into the variable array through an element insertion function for realizing the element insertion function, wherein the element insertion function is an insertObject function;
s104, dividing the current continuous hit number variable by 10, assigning the value obtained after the division to the continuous hit number variable again, returning to the step S102, and continuously acquiring the digital picture corresponding to the next digit of the continuous hit number until the digital picture corresponding to each digit of the continuous hit number is acquired and stored in the variable array;
and step S105, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
2. The method of displaying a gift-continuous-click animation of claim 1, wherein: when the method is applied to an IOS system, step S3 specifically includes the following steps:
s301, obtaining a point location value of a point location attribute in a layer of the gift continuous hit number image; creating an insertion animation according to the acquired point position value;
s302, creating an expanded animation, and setting the maximum value of the amplification of the expanded animation as a preset animation expansion multiple;
s303, creating a group of animations, and setting the execution time of the group of animations as the preset group animation duration;
s304, setting the filling mode of the group animation to be a postnatal filling mode, and packaging the created inserting animation and expanding animation into the group animation;
s305, adding the group animation into a layer of the gift continuous-hit number image;
s306, creating a timer, and setting the time interval of the timer to be the same as the execution time of the group animation;
s307, creating a basic displacement animation, setting the end point value of the basic displacement animation as the point position value of the point position attribute in the layer of the gift continuous hit number image, setting the start point value of the basic displacement animation as half of the point position value, setting the starting execution time of the basic displacement animation to be the same as the time interval of the timer, and setting the animation execution time of the basic displacement animation as the preset displacement animation duration;
and S308, adding the basic displacement animation into the layer of the digital picture.
3. A storage medium having a computer program stored thereon, characterized in that: which computer program, when being executed by a processor, carries out the steps of the method of any one of the preceding claims 1 and 2.
4. An apparatus for displaying a gift-holding animation comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein: the processor, when executing the computer program, realizes the steps of the method of any of the above claims 1 and 2.
5. A system for displaying a gift continuous-click animation is characterized in that: the system comprises a continuous hit number image generation module, an animation display width calculation module, an animation effect insertion module and an animation generation and display module;
the hit-number image generation module is configured to: when a user continuously clicks to present a gift, generating a gift continuous-click number image required by realizing the gift continuous-click animation according to the continuous-click number of the user, wherein the gift continuous-click number image corresponds to the continuous-click number of the user and comprises a digital picture corresponding to each digit of the continuous-click number;
the animation display width calculation module is used for: calculating the display width of the gift continuous-hit animation according to the width of the generated gift continuous-hit number image and a preset animation expansion multiple;
the animation effect insertion module is used for: adding an expanded animation effect to the gift continuous-hit image;
the animation generation and display module is used for: executing the gift continuous-hit number image added with the expanded animation effect to obtain a gift continuous-hit animation; displaying the gift continuous-click animation according to the calculated display width;
the continuous impact number image generation module comprises an initial definition sub-module, a continuous impact number variable judgment sub-module, a digital picture acquisition sub-module, a continuous impact number variable re-assignment sub-module and a generation processing sub-module;
the initial definition submodule is configured to: defining a variable array for storing digital pictures corresponding to each digit of the continuous hit number; defining an integer continuous impact number variable for representing the current continuous impact number, wherein the initial value of the continuous impact number variable is the continuous impact number of the user; sending a judgment signal to the continuous attack number variable judgment submodule;
the continuous impact number variable judgment submodule is used for: after receiving the judgment signal, judging whether the current continuous impact number variable is larger than zero, if so, sending an acquisition signal to the digital picture acquisition submodule, and if not, sending a generation signal to the generation processing submodule;
the digital picture acquisition sub-module is used for: after receiving the acquisition signal, performing modulo 10 on a current continuous striking number variable to obtain a remainder R, wherein the remainder R is an integer of 0-9; converting the remainder R into a corresponding digital picture, and adding the obtained digital picture into the variable array; sending an assignment signal to the continuous impact variable reassignment submodule; converting R into a corresponding digital picture through a function of a digital conversion image, wherein the function of the digital conversion image is an imageWithnumber function for realizing the function of the digital conversion image, and adding the obtained digital picture into the variable array through an element insertion function for realizing the element insertion function, wherein the element insertion function is an insertObject function;
the continuous hit number variable reassignment submodule is used for: after receiving the assignment signal, dividing the current continuous impact number variable by 10, assigning the value obtained after the integration to the continuous impact number variable again, and sending a judgment signal to a continuous impact number variable judgment submodule;
the generation processing submodule is used for: and after receiving the generation signal, generating a gift continuous-hit number image required by realizing the gift continuous-hit animation according to all digital pictures stored in the current variable array.
6. The system for displaying a gift-holding animation of claim 5, wherein: the animation effect insertion module comprises an insertion animation creating sub-module, an expansion animation creating sub-module, a group animation packaging sub-module, a group animation adding sub-module, a timer creating sub-module, a basic displacement animation creating sub-module and a basic displacement animation adding sub-module;
the insertion animation creation submodule is used for: acquiring a point location value of a point location attribute in a layer of the gift continuous hit number image; creating an insertion animation according to the acquired point position value;
the augmented animation creation submodule is configured to: creating an expanded animation, and setting the maximum value of the amplification of the expanded animation as a preset animation expansion multiple;
the group animation creation sub-module is configured to: creating a group of animations, and setting the execution time of the group of animations as the preset group animation duration;
the group animation packaging submodule is used for: setting the filling mode of the group animation as a postnatal filling mode, and packaging the created inserting animation and expanding animation into the group animation;
the group animation adding submodule is used for: adding the group animation into the layer of the gift continuous hit number image;
the timer creating submodule is used for: creating a timer, and setting the time interval of the timer to be the same as the execution time of the group animation;
the basic displacement animation creating submodule is used for: creating a basic displacement animation, setting an end point value of the basic displacement animation as a point position value of a point position attribute in a layer of a gift continuous hit number image, setting a start point value of the basic displacement animation as a half of the point position value, setting the starting execution time of the basic displacement animation to be the same as the time interval of a timer, and setting the animation execution time of the basic displacement animation as the preset displacement animation duration;
the basic displacement animation adding submodule is used for: and adding the basic displacement animation into the layer of the digital picture.
7. The system for displaying a gift-continuous-click animation according to claim 5, wherein the specific process of the animation display width calculation module calculating the display width of the gift-continuous-click animation is as follows: calculating to obtain the display width of the gift continuous-hit animation according to the preset animation expansion multiple multiplied by the width of the reserved width + the width of the gift continuous-hit number image; the width of the gift continuous-hit number image is equal to the width of the digital picture multiplied by the number of the digital pictures.
8. The system for displaying a gift-continuous-click animation of any one of claims 5 to 7, wherein: the preset animation expansion multiple is 1.5 times.
CN201710400983.1A 2017-05-31 2017-05-31 Method, storage medium, equipment and system for displaying gift continuous-click animation Active CN108989898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710400983.1A CN108989898B (en) 2017-05-31 2017-05-31 Method, storage medium, equipment and system for displaying gift continuous-click animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710400983.1A CN108989898B (en) 2017-05-31 2017-05-31 Method, storage medium, equipment and system for displaying gift continuous-click animation

Publications (2)

Publication Number Publication Date
CN108989898A CN108989898A (en) 2018-12-11
CN108989898B true CN108989898B (en) 2021-05-28

Family

ID=64500923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710400983.1A Active CN108989898B (en) 2017-05-31 2017-05-31 Method, storage medium, equipment and system for displaying gift continuous-click animation

Country Status (1)

Country Link
CN (1) CN108989898B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111757135B (en) * 2020-06-24 2022-08-23 北京字节跳动网络技术有限公司 Live broadcast interaction method and device, readable medium and electronic equipment
CN115866352A (en) * 2021-09-24 2023-03-28 北京字跳网络技术有限公司 Interaction method, interaction device, electronic equipment, readable storage medium and program product
CN113778365B (en) * 2021-09-29 2023-05-26 腾讯科技(深圳)有限公司 Element display method, element selection method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000125191A (en) * 1998-10-12 2000-04-28 Nippon Telegr & Teleph Corp <Ntt> Special effect display device
CN103810909A (en) * 2012-11-13 2014-05-21 腾讯科技(深圳)有限公司 Reading history display method and electronic reading device
CN104184731A (en) * 2014-08-22 2014-12-03 广州华多网络科技有限公司 Information display method, device and system
CN104994421A (en) * 2015-06-30 2015-10-21 广州华多网络科技有限公司 Interaction method, device and system of virtual goods in live channel
CN106060676A (en) * 2016-05-17 2016-10-26 腾讯科技(深圳)有限公司 Online interaction method and apparatus based on live streaming
CN106504057A (en) * 2016-10-19 2017-03-15 天脉聚源(北京)传媒科技有限公司 A kind of display methods of electronic gift and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000125191A (en) * 1998-10-12 2000-04-28 Nippon Telegr & Teleph Corp <Ntt> Special effect display device
CN103810909A (en) * 2012-11-13 2014-05-21 腾讯科技(深圳)有限公司 Reading history display method and electronic reading device
CN104184731A (en) * 2014-08-22 2014-12-03 广州华多网络科技有限公司 Information display method, device and system
CN104994421A (en) * 2015-06-30 2015-10-21 广州华多网络科技有限公司 Interaction method, device and system of virtual goods in live channel
CN106060676A (en) * 2016-05-17 2016-10-26 腾讯科技(深圳)有限公司 Online interaction method and apparatus based on live streaming
CN106504057A (en) * 2016-10-19 2017-03-15 天脉聚源(北京)传媒科技有限公司 A kind of display methods of electronic gift and device

Also Published As

Publication number Publication date
CN108989898A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
CN106658145B (en) Live broadcast data processing method and device
CN106502554B (en) Display control method and device
CN108989898B (en) Method, storage medium, equipment and system for displaying gift continuous-click animation
CN110798696B (en) Live broadcast interaction method and device, electronic equipment and readable storage medium
CN105450642A (en) Data processing method based on on-line live broadcast, correlation apparatus and system
CN105183477B (en) Application program virtual item Information Acquisition System and acquisition methods
CN110496391B (en) Information synchronization method and device
CN110599396A (en) Information processing method and device
CN109756766B (en) Virtual gift display method, storage medium, electronic device and system of live broadcast platform
CN106713968B (en) Live data display method and device
CN114095744B (en) Video live broadcast method and device, electronic equipment and readable storage medium
CN107358457A (en) A kind of advertisement broadcast method, apparatus and system
CN108304762A (en) A kind of human body attitude matching process and its equipment, storage medium, terminal
CN111225287A (en) Bullet screen processing method and device, electronic equipment and storage medium
CN110099284A (en) A kind of generation method fast made a speech, device and server
US20230325989A1 (en) Image processing method, apparatus, and device, storage medium, and computer program product
CN109195025A (en) A kind of game advertisement production method and platform, storage medium
CN112689168A (en) Dynamic effect processing method, dynamic effect display method and dynamic effect processing device
CN113573090A (en) Content display method, device and system in game live broadcast and storage medium
CN114339069B (en) Video processing method, video processing device, electronic equipment and computer storage medium
CN111901619A (en) Message pushing method and device
CN113034658B (en) Method and device for generating model map
CN109656463A (en) The generation method of individual character expression, apparatus and system
CN108966034B (en) Virtual article display method, device and storage medium
CN109640148A (en) A kind of method and device by text box text exhibition content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant