D
D
DertyPR2016-11-22 20:20:48
JavaScript
DertyPR, 2016-11-22 20:20:48

How to implement object deformation?

Hello. Come up with an idea how to implement the deformation of the ball on the canvas, for example, it jumps and when it is hit it must somehow deform (flatten for example). Thanks in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kovalsky, 2016-11-22
@DertyPR

The whole tutorial is htt ps: / /develo per .mozilla. org /en-US/docs/Games/Tutorials/2D _Breakout_game_pure_JavaScript/Bounce_off_t he_walls Wrong lesson
indeed. Well, then you can still take physics from the lesson , supplement it with the calculation of deformation depending on the impact force , and for drawing, for example, use canvas.getContext('2d').ellipse() .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question