javascript - HTML5 Canvas - Making an animated background with falling gold flakes -


I am working on a website that demands an animated background I am trying to fall into pieces of gold . In the beginning we tried to use an animated GIF, but it is a very heavy and sluggish way.

This is my first time working with canvas, I definitely would love anyone with more experience to give some input on it.

I found some code as a starting point and repurposed it for my needs. This is where I am present:

To work : I would like to slow down the motion of the falling particles, and I will change my shape to see it through the right circle. If I could get it to appear more realistic like falling gold flex, then it would be ideal. I also need to focus on the performance. Are there any ways to adapt it to run more efficiently?

Is there any shortage of this approach in terms of reach / cross-browser compatibility? I have done some research and it seems that it is widely supported.

Your help will be greatly appreciated!

I do not know whether it has got a chance to complete before, but goes here ....

To change the speed of the falling particles, you will be able to change the size of your fork pen at line 57 and 58 and type the code @vx and @vy Want to edit, something like this:

  @ Vx = category (0,1) + 8 * xpos-5 @vy = 0.2*@r   

I found that there is something more 'reliable' by changing DOP (and Y value to compensate):

  @dop = 0.001 * Category (1,5) @ or = Category (-100, H- @ R2)   

Regarding creating more 'realistic' snowflakes, I personally like to see the shapes close to "circle" because the real flex is hard to see in real life itself. But if you are eager to work on your original idea, then I can tell you.

Is there a simple example that you are looking for something simple Pentaflake fractals If you really want to throw people's brains away, then I would suggest looking at the source code of this HTML canvas fractal app.

I hope this will be helpful :)

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -