You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
392B

  1. function Физика()
  2. {
  3. this.создать = function()
  4. {
  5. this.движок = Matter.Engine.create({
  6. enableSleeping: true,
  7. gravity: {
  8. y: 2,
  9. },
  10. });
  11. };
  12. this.обновить = function() {
  13. Matter.Engine.update(this.движок);
  14. };
  15. // Конструктор.
  16. this.создать();
  17. }