This commit is contained in:
2021-09-17 14:39:13 +03:00
parent 104837cb08
commit d122f06140
4 changed files with 36 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
function Физика()
{
this.создать = function()
{
this.движок = Matter.Engine.create({
enableSleeping: true,
gravity: {
y: 2,
},
});
};
this.обновить = function() {
Matter.Engine.update(this.движок);
};
// Конструктор.
this.создать();
}