CN111338532A - Method and device for displaying shape special effect and computer readable storage medium - Google Patents

Method and device for displaying shape special effect and computer readable storage medium Download PDF

Info

Publication number
CN111338532A
CN111338532A CN202010127668.8A CN202010127668A CN111338532A CN 111338532 A CN111338532 A CN 111338532A CN 202010127668 A CN202010127668 A CN 202010127668A CN 111338532 A CN111338532 A CN 111338532A
Authority
CN
China
Prior art keywords
shape
information
display
particle
determining
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.)
Pending
Application number
CN202010127668.8A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN202010127668.8A priority Critical patent/CN111338532A/en
Publication of CN111338532A publication Critical patent/CN111338532A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the invention discloses a display method and a display device of a shape special effect and a computer readable storage medium, which are used for solving the problem of occupying excessive running memory of terminal equipment, wherein the method comprises the following steps: receiving a first display instruction for displaying a shape special effect, wherein the first display instruction carries shape parameter information; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a change mode of particles included in the shape according to the number and the position of the emitters; and displaying the shape according to the change mode of each particle in the shape. By implementing the embodiment of the invention, the operation and storage of the terminal equipment can be reduced while the vivid dynamic wallpaper effect is displayed.

Description

Method and device for displaying shape special effect and computer readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for displaying a shape special effect and a computer readable storage medium.
Background
With the development of electronic technology, terminal devices such as mobile phones and tablets are widely applied, a static wallpaper displayed by a background image gradually cannot meet aesthetic requirements of users, and in order to meet diversified requirements of users, the terminal devices support dynamic wallpaper. Dynamic desktop wallpaper refers to an image with animation. The current dynamic wallpaper adopts a pre-recorded video or dynamic image, and wallpaper animation is realized by a circular playing mode. If the pre-recorded video is set as the desktop wallpaper of the terminal, the terminal equipment needs to continuously call the video material to be played circularly. By adopting the method, the requirements on the memory and the performance of the terminal equipment are higher, so that the problem that how to reduce the occupation of the running memory of the terminal equipment becomes a problem which needs to be solved urgently under the condition of ensuring the display effect of the dynamic wallpaper.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for displaying a shape special effect and a computer readable storage medium, which are used for solving the problem of occupying excessive running memory of terminal equipment.
A first aspect discloses a method for displaying a shape effect, including:
receiving a first display instruction for displaying a shape special effect, wherein the first display instruction carries shape parameter information;
determining the number and the positions of the emitters in the particle system according to the parameter information;
generating a shape corresponding to the parameter information and a change mode of particles included in the shape according to the number and the position of the emitters;
and displaying the shape according to the change mode of each particle in the shape.
In one possible implementation, the parameter information includes inter-emitter distance information and shape information and size information of the shape;
determining the number and location of emitters in the particle system based on the parameter information, comprising:
acquiring the display size of a display area;
determining the display position of the shape in the display area according to the display size, the shape information and the size information of the shape;
determining the number and location of emitters in the particle system based on the display location and the distance information.
In one possible implementation, the determining the number and the position of the emitters in the particle system according to the display position and the distance information includes:
determining the number of the transmitters according to the display positions and the distance information;
determining the location of the transmitter from the number.
In one possible implementation, the determining the position of the transmitter according to the number includes:
establishing a coordinate system by taking the central point of the display area as an origin and two edges of the screen as coordinate axes;
and determining the coordinates of the transmitters in the coordinate system according to the display positions and the number to obtain the positions of the transmitters.
In a possible implementation manner, the generating a shape corresponding to the parameter information and a variation carried by each particle in the shape according to the number and the position of the emitters includes:
acquiring attribute information of the emitter, wherein the attribute information of the emitter comprises an emission direction of the emitter and information of emitted particles, and the information of the particles comprises the attribute information and motion information of the particles;
and determining the shape corresponding to the parameter information and the change mode of each particle in the shape according to the emission direction, the attribute information of the particle and the motion information of the particle.
In a possible implementation manner, after determining, according to the emission direction, the attribute information of the particle, and the motion information of the particle, a shape corresponding to the parameter information, and a variation manner of the particle included in the shape, the method further includes:
modifying the variation of the particle by a modifier in the particle system.
In one possible implementation, the method further includes:
receiving a second display instruction for displaying an image, wherein the second display instruction carries an identifier of the image;
acquiring an image corresponding to the identifier;
the displaying the shape according to the variation mode of each particle in the shape comprises the following steps:
displaying the image;
displaying the shape on the image according to the variation of each particle in the shape.
A second aspect discloses a shape effect display device, comprising:
the device comprises a first receiving unit, a second receiving unit and a display unit, wherein the first receiving unit is used for receiving a first display instruction for displaying a shape special effect, and the first display instruction carries shape parameter information;
a determining unit for determining the number and location of emitters in the particle system based on the parameter information;
the generating unit is used for generating the shape corresponding to the parameter information and the change mode of the particles included in the shape according to the number and the positions of the emitters;
and the display unit is used for displaying the shape according to the change mode of each particle in the shape.
In one possible implementation, the parameter information includes inter-emitter distance information and shape information and size information of the shape;
the determining unit is specifically configured to:
acquiring the display size of a display area;
determining the display position of the shape in the display area according to the display size, the shape information and the size information of the shape;
determining the number and location of emitters in the particle system based on the display location and the distance information.
In one possible implementation, the determining unit determining the number and the position of the emitters in the particle system according to the display position and the distance information includes:
determining the number of the transmitters according to the display positions and the distance information;
determining the location of the transmitter from the number.
In one possible implementation, the determining unit determining the position of the transmitter according to the number includes:
establishing a coordinate system by taking the central point of the display area as an origin and two edges of the screen as coordinate axes;
and determining the coordinates of the transmitters in the coordinate system according to the display positions and the number to obtain the positions of the transmitters.
In a possible implementation manner, the generating unit is specifically configured to:
acquiring attribute information of the emitter, wherein the attribute information of the emitter comprises an emission direction of the emitter and information of emitted particles, and the information of the particles comprises the attribute information and motion information of the particles;
and determining the shape corresponding to the parameter information and the change mode of each particle in the shape according to the emission direction, the attribute information of the particle and the motion information of the particle.
In a possible implementation manner, after determining, according to the emission direction, the attribute information of the particle, and the motion information of the particle, a shape corresponding to the parameter information, and a variation manner of the particle included in the shape, the apparatus further includes:
a modifying unit for modifying the variation of the particle by a modifier in the particle system.
In one possible implementation, the apparatus further includes:
the second receiving unit is used for receiving a second display instruction for displaying the image, wherein the second display instruction carries an identifier of the image;
the acquisition unit is used for acquiring an image corresponding to the identifier;
the display unit is specifically configured to:
displaying the image;
displaying the shape on the image according to the variation of each particle in the shape.
A third aspect discloses an electronic device comprising an output device, an input device, a processor, a memory, and a transceiver, the output device, the input device, the processor, the memory, and the transceiver being interconnected. The transceiver is used for receiving information from devices other than the device and outputting information to devices other than the device. The memory is configured to store a computer program that supports the terminal device to execute the method disclosed in the first aspect and/or any one of the possible implementation manners of the first aspect, where the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method disclosed in the first aspect and/or any one of the possible implementation manners of the first aspect.
A fourth aspect discloses a computer-readable storage medium storing a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method provided by the first aspect and/or any one of the possible implementations of the first aspect.
In the embodiment of the invention, a first display instruction for displaying a shape special effect is received, wherein the first display instruction carries shape parameter information; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a change mode of particles included in the shape according to the number and the position of the emitters; and displaying the shape according to the change mode of each particle in the shape. Therefore, the shape composed of the plurality of particles with the change mode is generated to display the shape special effect, so that the dynamic wallpaper containing the shape special effect is generated, the vivid dynamic wallpaper effect can be displayed, and the occupation of the terminal equipment in transportation and storage is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for displaying a special shape effect according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for displaying special shape effects according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating the calculation of emitter positions in a shape effect according to an embodiment of the present invention;
FIG. 4a is an interface schematic diagram of a desktop wallpaper with special shape effect according to an embodiment of the invention;
FIG. 4b is an interface schematic diagram of a desktop wallpaper with special shape effects according to an embodiment of the invention;
FIG. 4c is a schematic interface diagram of a desktop wallpaper with special shape effect according to an embodiment of the invention;
FIG. 5 is a schematic structural diagram of a display device with special shape effect according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a display method and a display device of a shape special effect and a computer readable storage medium, which are used for solving the problem of excessive memory occupation of terminal equipment. The following are detailed below.
Referring to fig. 1, a flow chart of a method for displaying a shape effect according to an embodiment of the present invention is shown, and as shown in fig. 1, the method may include:
101. receiving a first display instruction for displaying the parameter information carrying the shape of the shape special effect.
Specifically, the terminal device receives a first display instruction for displaying the shape special effect, the display instruction includes parameter information of the shape, the parameter information includes shape information that the shape special effect needs to display, size information of the shape may include an aspect ratio of the shape, a display scale of the shape in a display desktop of the terminal, and distance information between emitters arranged in the shape special effect, wherein each emitter includes emitted attribute information and emitted particle generation attribute information. In the particle system, the emitter is a "device" for generating particles, and particles with self-generated attribute information can be generated from the position of the emitter, and the particle-generated attribute information is motion information, pattern information, and the like of the particles, and can determine the motion trajectory of the particles and the appearance of the particles. Therefore, the invention provides a shape special effect display by deploying a plurality of emitters on a preset shape, wherein each emitter emits particles with an initial motion state and color, and the shape special effect is realized by the variation mode of the particles.
102. The number and location of emitters in the particle system are determined based on the parameter information.
In a possible implementation manner, the distance information between the plurality of emitters deployed on the shape, the shape information and the size information of the shape are obtained through the parameter information, and the display size of the display area of the current terminal device can be further obtained.
In one possible implementation manner, the number of emitters in the special effect of the current shape may be determined according to the display scale and the display position included in the size information of the current shape, and then the positions of the emitters may be determined according to the number of emitters. For example, when it is determined that the shape information is a rounded rectangle, and the shape information further includes an aspect ratio of the rounded rectangle and radius information of a rounded corner, the size information of the shape includes a display scale of the current rounded rectangle, and the preset shape parameters include preset screen display parameters, the display size of the current display area can be scaled to the display size of the current display area, and the size of the shape in the current display area is obtained. The parameter information further includes a display position of the shape, which may be displayed in the middle, displayed near the side, or displayed near four corners of the display area, or the display position of the shape may be adjusted by the user on the interface for previewing the special shape effect, which is not limited herein. Therefore, the position of each point on the shape within the display area can be obtained according to the display position and size of the shape.
Further, the number and the positions of the emitters can be obtained according to the distance information of the emitters, for example, the distance information of the emitters may be a random value of the distance between every two emitters, or a step setting of the distance between every two emitters, and the value of each step may be obtained by calculation, or may be placed at equal intervals to set the distance value.
Optionally, the parameter information may further include types of emitters, where the emitters are of multiple types, where the emitters of different types emit particles in different manners, and may be point emitters that emit particles outwards from a certain point, box emitters that emit particles outwards in a square similar to a box, or cylinders (cylinders) that emit particles outwards in a cylinder space; an ellipsoidal (ellipsoid) emitter which emits particles from within an ellipsoidal space, a hollow ellipsoidal (hollowellipsoid) emitter which is hollow, i.e. it emits particles only from the surface of an ellipsoid; ring emitters emit particles outwardly over a ring. The invention is not limited to the type of emitter.
103. And generating a shape corresponding to the parameter information and a change mode of the particles included in the shape according to the number and the positions of the emitters.
In one possible implementation, corresponding shapes may be generated according to the number and positions of the emitters, and the particles with varying patterns may be emitted by the emitters, where the varying patterns may include motion trajectories of the particles and may also include attribute information of the particles, and the attribute information may include color information, size information, and the like of the particles. That is, the shape in the shape effect may be composed after the change by the change of the particle, or the shape may be changed from the first shape to the second shape by the change of the particle.
Optionally, a modifier may be included for modifying a property of the particle during particle emission. For example, a force modifier (lineforce) may be used to generate a force on a particle in motion, thereby changing the motion trajectory of the particle; it is also possible that a color modifier (colorfader) may be used to change the color of the emitted particles; it may also be a positioning modifier (scaler) for changing the size of the emitted particles, etc. For example, a force modifier may be disposed at a position in the motion trajectory of the particle, and the motion trajectory of the particle may be modified by the force applied to the particle. The particles can be stressed in any direction of the rounded rectangle, and then acceleration is provided for the particles, for example, the particles can be stressed in the direction pointing to the center of the shape, so that the particles have acceleration in the direction pointing to the center of the shape, the special effect of trapping and gathering the particles can be realized, the particles can be stressed in the direction opposite to the direction pointing to the center of the shape, so that the particles have acceleration in the direction opposite to the direction pointing to the center of the shape, and the special effect of diffusion of the particle shape can be realized. In the round corner rectangle, an acting force pointing to the circle center or the opposite direction pointing to the circle center is given to the particles on the round corner, so that an acceleration can be given to the particles on the round corner, and the special effect of gathering or dispersing partial particles is realized. Furthermore, there may be multiple modifiers acting on the particle simultaneously, for example, the color modifier may modify the color or pattern of the particle, and the force modifier may modify the motion trajectory of the particle, so as to obtain a new variation of the particle.
104. The shape is displayed according to the variation of each particle in the shape.
In one possible implementation, the shape effect may be displayed after determining the variation pattern of the particles.
Further, a display instruction for displaying an image may be received, where the display instruction for displaying an image carries an identifier of the image, is used to obtain a corresponding image, and may be used to superimpose a layer generating a special shape effect on the image to be displayed as a dynamic wallpaper, or may be used to display the layer on a desktop in a floating manner to form a dynamic wallpaper, or may be used to combine two layers into one dynamic image to be displayed on the desktop, where this is not limited.
In the method for displaying a shape special effect described in fig. 1, a first display instruction for displaying the shape special effect is received, where the first display instruction carries parameter information of a shape; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a variation mode of particles included in the shape according to the number and the position of the emitters; the shape is displayed according to the variation of each particle in the shape. Therefore, the shape composed of the plurality of particles with the change mode is generated to display the shape special effect, so that the dynamic wallpaper containing the shape special effect is generated, the vivid dynamic wallpaper effect can be displayed, and the occupation of the terminal equipment in transportation and storage is reduced.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another method for displaying special shape effects according to an embodiment of the present invention. As shown in fig. 2, the method for displaying a shape effect may include the following steps.
201. The display size of the display area is acquired.
In one possible implementation manner, a display size that the user wants to display in the display area may be obtained, for example, when the user wants to set the dynamic wallpaper of the desktop, the layout of the current desktop may be obtained, and the display size of the display area displaying the dynamic wallpaper of the desktop is obtained.
202. And determining the display position of the shape in the display area according to the display size, the shape information and the size information of the shape.
In one possible implementation manner, the display position of the shape in the display area may be determined according to the information and the size of the shape, where the shape information is the shape of the current shape special effect, and may include the value of each side length or radius of the shape or a combination of the two, for example, may be a rounded rectangle. The size of the shape may be a fixed size or may be proportional information, and the ratio of the screen size to the actual display size is preset, so as to obtain the size of the shape. The size information of the shape also comprises shape position information which can be a central position, namely the center of the shape is superposed with the center of the display area, or the shape is displayed close to the side, the shape is displayed beside a certain side of the display area, or the distance between the center point of the shape and two adjacent sides of the preset screen can be displayed in the display area of the preset screen, the ratio of the size of the preset screen to the size of the display area is determined, the distance between the shape and two adjacent sides in the display area is determined, the center point of the shape is obtained, and then the position of each point on the shape is obtained according to the shape information of the shape.
Optionally, the position of the shape may be adjusted by the user on the preview interface, and the terminal device may receive an input instruction for adjusting the position of the shape input by the user, may also receive a zoom instruction of the shape input by the user, and may adjust the position and size of the shape.
203. And determining the number and the positions of the emitters in the particle system according to the display position and the distance information.
In one possible implementation, the distance information may be distance information of the transmitters, where the transmitters may be randomly spaced or may be spaced in steps, and the step size may be calculated or may be set at equal intervals. Therefore, a coordinate system can be established by taking the central point of the display area as an origin and two edges of the screen as coordinate axes; and determining the coordinates of the transmitter in the coordinate system according to the display position and the number to obtain the position of the transmitter.
Specifically, the invention explains the shape of the special shape as a rounded rectangle, and the rounded rectangle is divided into four parts which are respectively positioned in four quadrants by constructing a coordinate system. The perimeter of the entire shape can be expressed as:
total=mEdgeWidth*2+mEdgeHeight*2-mEdgeCorner*8+TWO_PI*mEdgeCorner
wherein, total represents the perimeter of the shape, mEdgeCorner represents the radius of the corner in the rounded rectangle, mEdgeWidth represents the width of the whole shape special effect, mEdgeHeight represents the height of the whole shape special effect, and PI represents an irrational number, and the value can be equal to about 3.14.
If the distance information between the transmitters is a random value, it can be expressed as: currentValue represents the calculated position coordinates of the current transmitter, and rangevalue (0, total) represents a random number from 0 to the total of the circumference.
Referring to fig. 3, fig. 3 is a schematic diagram of calculating the position of the transmitter in the shape special effect according to an embodiment of the present invention, as shown in fig. 3, a coordinate system is established with the center of the screen as an origin and TWO edges of the circular screen as coordinate axes, and fig. 3 is based on polar coordinates, where the radius of the corner in the rounded rectangle is ro, ro is twopi me polygon corner/4, the width of the corner in the rounded rectangle is rw, rw is me polygon width/2 me polygon corner, the length of the corner in the rounded rectangle is rh, and rh is me polygon height/2 me edge corner. With mX and mY as the output coordinates, the coordinates of the transmitter calculated in the four quadrant segments can be as shown in table 1.
Figure BDA0002394889810000101
Figure BDA0002394889810000111
Figure BDA0002394889810000121
TABLE 1
Wherein each quadrant is divided into three parts, the first part being the emitter arrangement on the rw edge, the second part being the emitter arrangement on the rh edge, and the third part being the emitter arrangement on the ro arc. Starting from the first quadrant, currentValue may be initialized to 0 or a predetermined value. Taking the first quadrant as an example, when the rh is marked on the edge, the position coordinate of the emitter can be obtained according to the currentValue value, when the radius is the arc of ro, the angle can be obtained according to the ratio of the currentValue-ro difference and the radius, so that the position coordinate of the emitter can be obtained according to the angle, and when the rw is marked on the edge, the coordinate of the emitter can be calculated according to the currentValue value. The coordinates of the emitter settings for the other quadrants are similar to the first quadrant calculation method and are not similar here.
Referring to fig. 4a, fig. 4b and fig. 4c together, fig. 4a, fig. 4b and fig. 4c are schematic diagrams of an interface of a desktop wallpaper with a special shape according to an embodiment of the present invention, as shown in fig. 4a, emitters are randomly arranged on a predetermined rounded rectangle frame to emit, which may be point emitters to emit particles, and may also give an upward force to the particles emitted by all emitters, so that all particles have an upward floating effect. As shown in fig. 4b, the emitters are arranged on the preset rounded rectangles in a stepping manner, or point emitters are arranged, and the emitting speed (the number of particles emitted per second) of the emitters is set, so that an effect that particles continuously emerge outwards can be generated. Further, the color and the motion state of the particles can be modified by a modifier.
In the method for displaying a shape special effect described in fig. 2, a first display instruction for displaying the shape special effect is received, where the first display instruction carries parameter information of a shape; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a variation mode of particles included in the shape according to the number and the position of the emitters; the shape is displayed according to the variation of each particle in the shape. Therefore, the shape composed of the plurality of particles with the change mode is generated to display the shape special effect, so that the dynamic wallpaper containing the shape special effect is generated, the vivid dynamic wallpaper effect can be displayed, and the occupation of the terminal equipment in transportation and storage is reduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a display device with special shape effect according to an embodiment of the disclosure. As shown in fig. 5, the shape effect display apparatus 5000 may include:
a first receiving unit 501, configured to receive a first display instruction for displaying a special shape effect, where the first display instruction carries shape parameter information;
a determining unit 502 for determining the number and location of emitters in the particle system based on the parameter information;
a generating unit 503 configured to generate a shape corresponding to the parameter information and a variation pattern of particles included in the shape according to the number and the position of the emitters;
a display unit 504 for displaying the shape according to the variation of each particle in the shape.
In one possible implementation, the parameter information includes information on a distance between transmitters and information on a shape and a size of the shape;
the determining unit 502 is specifically configured to:
acquiring the display size of a display area;
determining a display position of the shape in the display area based on the display size, shape information of the shape, and size information;
and determining the number and the positions of the emitters in the particle system according to the display position and the distance information.
In a possible implementation manner, the determining unit 502 determines the number and the positions of the emitters in the particle system according to the display position and the distance information includes:
determining the number of the transmitters according to the display position and the distance information;
and determining the position of the transmitter according to the number.
In a possible implementation manner, the determining unit 502 determines the position of the transmitter according to the number includes:
establishing a coordinate system by taking the central point of the display area as an origin and two edges of the screen as coordinate axes;
and determining the coordinates of the transmitter in the coordinate system according to the display position and the number to obtain the position of the transmitter.
In a possible implementation manner, the generating unit 503 is specifically configured to:
acquiring attribute information of the emitter, wherein the attribute information of the emitter comprises the emission direction of the emitter and information of emitted particles, and the information of the particles comprises the attribute information and motion information of the particles;
and determining the shape corresponding to the parameter information and the change mode of each particle in the shape according to the emission direction, the attribute information of the particle and the motion information of the particle.
In one possible implementation manner, after determining a shape corresponding to the parameter information and a variation manner of the particles included in the shape according to the emission direction, the attribute information of the particles, and the motion information of the particles, the apparatus 5000 further includes:
and the modifying unit is used for modifying the change mode of the particles through a modifier in the particle system.
In a possible implementation manner, the apparatus 5000 further includes:
a second receiving unit 505, configured to receive a second display instruction for displaying an image, where the second display instruction carries an identifier of the image;
an obtaining unit 506, configured to obtain an image corresponding to the identifier;
the display unit 504 is specifically configured to:
displaying the image;
displaying the shape on the image according to a variation of each particle in the shape.
The device provided by the embodiment of the invention receives a first display instruction for displaying the shape special effect, wherein the first display instruction carries shape parameter information; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a variation mode of particles included in the shape according to the number and the position of the emitters; the shape is displayed according to the variation of each particle in the shape. Therefore, the shape composed of the plurality of particles with the change mode is generated to display the shape special effect, so that the dynamic wallpaper containing the shape special effect is generated, the vivid dynamic wallpaper effect can be displayed, and the occupation of the terminal equipment in transportation and storage is reduced.
It can be understood that the functions of the first receiving unit 501, the determining unit 502, the generating unit 503, the displaying unit 504, the second receiving unit 505, and the obtaining unit 506 of the display device with special shape effect according to the embodiment of the method may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, and will not be described again here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 6, the electronic device 6000 may include:
one or more processors 601, input devices 602, output devices 603, memory 604, transceivers 605. The processor 601, the input device 602, the output device 603, the memory 604, and the transceiver 605 are connected via a bus. Wherein the input device 602 may include a touch screen, a keyboard, a microphone, etc., the output device 603 may include a display screen, a speaker, etc., and the transceiver 605 is used for receiving and transmitting data. The memory 604 is used for storing a computer program comprising program instructions, and the processor 601 is used for executing the program instructions stored in the memory 604, wherein the processor 601 is configured for calling the program instructions to execute the following steps:
receiving a first display instruction for displaying a shape special effect, wherein the first display instruction carries shape parameter information;
determining the number and the positions of the emitters in the particle system according to the parameter information;
generating a shape corresponding to the parameter information and a variation mode of particles included in the shape according to the number and the position of the emitters;
the shape is displayed according to the variation of each particle in the shape.
In one possible implementation, the parameter information includes information on a distance between transmitters and information on a shape and a size of the shape;
the determining the number and the position of the emitters in the particle system according to the parameter information comprises:
acquiring the display size of a display area;
determining a display position of the shape in the display area based on the display size, shape information of the shape, and size information;
and determining the number and the positions of the emitters in the particle system according to the display position and the distance information.
In one possible implementation, the determining the number and the position of the emitters in the particle system according to the display position and the distance information includes:
determining the number of the transmitters according to the display position and the distance information;
and determining the position of the transmitter according to the number.
In a possible implementation manner, the determining the position of the transmitter according to the number includes:
establishing a coordinate system by taking the central point of the display area as an origin and two edges of the screen as coordinate axes;
and determining the coordinates of the transmitter in the coordinate system according to the display position and the number to obtain the position of the transmitter.
In a possible implementation manner, the generating a shape corresponding to the parameter information and a variation carried by each particle in the shape according to the number and the position of the emitters includes:
acquiring attribute information of the emitter, wherein the attribute information of the emitter comprises the emission direction of the emitter and information of emitted particles, and the information of the particles comprises the attribute information and motion information of the particles;
and determining the shape corresponding to the parameter information and the change mode of each particle in the shape according to the emission direction, the attribute information of the particle and the motion information of the particle.
In a possible implementation manner, after determining the shape corresponding to the parameter information and the variation manner of the particles included in the shape according to the emission direction, the attribute information of the particles, and the motion information of the particles, the processor 601 is further configured to invoke a program instruction to perform the following steps:
the variation of the particles is modified by a modifier in the particle system.
In one possible implementation, the processor 601 is configured to call a program instruction to perform the following steps:
receiving a second display instruction for displaying an image, wherein the second display instruction carries an identifier of the image;
acquiring an image corresponding to the identifier;
the displaying the shape according to the variation mode of each particle in the shape comprises:
displaying the image;
displaying the shape on the image according to a variation of each particle in the shape.
The detailed description of the electronic device may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Wherein steps 101-104, and steps 201-203 may be performed by a processor 601 and a memory 602 in the electronic device.
The first receiving unit 501, the determining unit 502, the generating unit 503, the displaying unit 504, the second receiving unit 505, and the obtaining unit 506 may be implemented by a processor 601 and a memory 602 in the electronic device.
It should be understood that in some possible embodiments, the processor 601 may be a Central Processing Unit (CPU), and the processor 601 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 604 may include both read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory 604 may also include non-volatile random access memory.
In a specific implementation, the electronic device 6000 may execute the implementation manners disclosed in the steps in fig. 1 to fig. 4c through the built-in functional modules, which may specifically refer to the implementation manners disclosed in the steps, and no further details are described here.
The electronic equipment disclosed by the embodiment of the invention receives a first display instruction for displaying a shape special effect, wherein the first display instruction carries shape parameter information; determining the number and the positions of the emitters in the particle system according to the parameter information; generating a shape corresponding to the parameter information and a variation mode of particles included in the shape according to the number and the position of the emitters; the shape is displayed according to the variation of each particle in the shape. Therefore, the shape composed of the plurality of particles with the change mode is generated to display the shape special effect, so that the dynamic wallpaper containing the shape special effect is generated, the vivid dynamic wallpaper effect can be displayed, and the occupation of the terminal equipment in transportation and storage is reduced.
Further, here, it is to be noted that: the present invention further discloses a computer-readable storage medium, wherein a computer program executed by the aforementioned electronic device is stored in the computer-readable storage medium, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the method for displaying the shape special effect in the embodiment corresponding to fig. 1 to 4c can be performed, so that the description thereof will not be repeated herein. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present invention, reference is made to the description of the method embodiments of the present invention.
The terms "first", "second", and the like in the claims, in the description and in the drawings of the present invention are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method for displaying a shape effect, comprising:
receiving a first display instruction for displaying a shape special effect, wherein the first display instruction carries shape parameter information;
determining the number and the positions of the emitters in the particle system according to the parameter information;
generating a shape corresponding to the parameter information and a change mode of particles included in the shape according to the number and the position of the emitters;
and displaying the shape according to the change mode of each particle in the shape.
2. The method of claim 1, wherein the parameter information includes inter-emitter distance information and shape information and size information of the shape;
determining the number and location of emitters in the particle system based on the parameter information, comprising:
acquiring the display size of a display area;
determining the display position of the shape in the display area according to the display size, the shape information and the size information of the shape;
determining the number and location of emitters in the particle system based on the display location and the distance information.
3. The method of claim 2, wherein determining the number and location of emitters in the particle system based on the display location and the distance information comprises:
determining the number of the transmitters according to the display positions and the distance information;
determining the location of the transmitter from the number.
4. The method of claim 3, wherein said determining the location of the transmitter from the number comprises:
establishing a coordinate system by taking the central point of the display area as an origin and two edges of the screen as coordinate axes;
and determining the coordinates of the transmitters in the coordinate system according to the display positions and the number to obtain the positions of the transmitters.
5. The method according to claim 4, wherein the generating of the shape corresponding to the parameter information and the variation carried by each particle in the shape according to the number and the positions of the emitters comprises:
acquiring attribute information of the emitter, wherein the attribute information of the emitter comprises an emission direction of the emitter and information of emitted particles, and the information of the particles comprises the attribute information and motion information of the particles;
and determining the shape corresponding to the parameter information and the change mode of each particle in the shape according to the emission direction, the attribute information of the particle and the motion information of the particle.
6. The method according to claim 5, wherein after determining the shape corresponding to the parameter information and the variation pattern of the particles included in the shape according to the emission direction, the attribute information of the particles and the motion information of the particles, the method further comprises:
modifying the variation of the particle by a modifier in the particle system.
7. The method according to any one of claims 1-6, further comprising:
receiving a second display instruction for displaying an image, wherein the second display instruction carries an identifier of the image;
acquiring an image corresponding to the identifier;
the displaying the shape according to the variation mode of each particle in the shape comprises the following steps:
displaying the image;
displaying the shape on the image according to the variation of each particle in the shape.
8. A display device for displaying a shape effect, comprising:
the device comprises a first receiving unit, a second receiving unit and a display unit, wherein the first receiving unit is used for receiving a first display instruction for displaying a shape special effect, and the first display instruction carries shape parameter information;
a determining unit for determining the number and location of emitters in the particle system based on the parameter information;
the generating unit is used for generating the shape corresponding to the parameter information and the change mode of the particles included in the shape according to the number and the positions of the emitters;
and the display unit is used for displaying the shape according to the change mode of each particle in the shape.
9. An electronic device, comprising: a processor and a memory;
the processor is coupled to a memory, wherein the memory is configured to store program code and the processor is configured to invoke the program code to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any of claims 1-7.
CN202010127668.8A 2020-02-28 2020-02-28 Method and device for displaying shape special effect and computer readable storage medium Pending CN111338532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010127668.8A CN111338532A (en) 2020-02-28 2020-02-28 Method and device for displaying shape special effect and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010127668.8A CN111338532A (en) 2020-02-28 2020-02-28 Method and device for displaying shape special effect and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111338532A true CN111338532A (en) 2020-06-26

Family

ID=71182016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010127668.8A Pending CN111338532A (en) 2020-02-28 2020-02-28 Method and device for displaying shape special effect and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111338532A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411470A (en) * 2011-07-20 2012-04-11 中兴通讯股份有限公司 Method and device for generating dynamic wallpaper
US20120250982A1 (en) * 2011-03-31 2012-10-04 Masato Ito Image processing apparatus, image processing method, program, and recording medium
CN103544730A (en) * 2013-10-18 2014-01-29 厦门美图网科技有限公司 Method for processing pictures on basis of particle system
CN104484096A (en) * 2014-12-30 2015-04-01 北京元心科技有限公司 Desktop interaction method and device
CN104850389A (en) * 2014-02-14 2015-08-19 腾讯科技(深圳)有限公司 Method and apparatus for implementing dynamic interface
CN108986227A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 The generation of particle effect program file packet and particle effect generation method and device
CN109669604A (en) * 2018-12-13 2019-04-23 惠州Tcl移动通信有限公司 Desktop wallpaper display methods, device, mobile terminal and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120250982A1 (en) * 2011-03-31 2012-10-04 Masato Ito Image processing apparatus, image processing method, program, and recording medium
CN102411470A (en) * 2011-07-20 2012-04-11 中兴通讯股份有限公司 Method and device for generating dynamic wallpaper
CN103544730A (en) * 2013-10-18 2014-01-29 厦门美图网科技有限公司 Method for processing pictures on basis of particle system
CN104850389A (en) * 2014-02-14 2015-08-19 腾讯科技(深圳)有限公司 Method and apparatus for implementing dynamic interface
CN104484096A (en) * 2014-12-30 2015-04-01 北京元心科技有限公司 Desktop interaction method and device
CN108986227A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 The generation of particle effect program file packet and particle effect generation method and device
CN109669604A (en) * 2018-12-13 2019-04-23 惠州Tcl移动通信有限公司 Desktop wallpaper display methods, device, mobile terminal and storage medium

Similar Documents

Publication Publication Date Title
CN108595239B (en) Picture processing method, device, terminal and computer readable storage medium
CN110047152B (en) Object construction method and device based on virtual environment and readable storage medium
WO2021121253A1 (en) Image processing method and electronic device
KR102003383B1 (en) Method and apparatus for shooting image in an electronic device
CN112138386A (en) Volume rendering method and device, storage medium and computer equipment
CN104506921A (en) Dynamic image displaying method and device
CN111367605A (en) Raindrop special effect display method and device and computer readable storage medium
US20230082928A1 (en) Virtual aiming control
JP2011054095A (en) Electronic apparatus and information processing program
JP2014186392A (en) Image processing device and program
CN111338532A (en) Method and device for displaying shape special effect and computer readable storage medium
JP2008310269A (en) Image processing apparatus, image processing method, and program
CN112750190A (en) Three-dimensional thermodynamic diagram generation method, device, equipment and storage medium
CN113553368A (en) Tag information processing method and device of multilayer pie chart and terminal
CN111026481A (en) Desktop layout method, terminal and computer storage medium
CN106960460B (en) Animation processing method, device and equipment
CN114942737A (en) Display method, display device, head-mounted device and storage medium
CA2390390C (en) Graphics stack system and method
CN114168240A (en) Window display method, device, equipment and storage medium
RU2706182C1 (en) Tactile correlated graphic effects
KR101911947B1 (en) Screen design method and screen design system for improving information readability and harmonizing background image
CN111290822A (en) Desktop wallpaper display method and device and computer-readable storage medium
US10204397B2 (en) Bowtie view representing a 360-degree image
JP6082148B1 (en) Display method, program, and recording medium
CN113362348B (en) Image processing method, image processing device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626