{"id":302943,"date":"2020-05-03T15:00:26","date_gmt":"2020-05-03T15:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302943"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302943","title":{"rendered":"Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e Vue"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/497456\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u041c\u043d\u0435 \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u041d\u043e \u0434\u0435\u043b\u0430\u043b \u044f \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f React-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e react-spring, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0437\u043d\u0430\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. <\/p>\n<p>  \u041d\u043e \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043e\u043d\u043e \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e!<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u0435\u0437\u0434\u0435, \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442. \u0422\u0430\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e Spring \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JS \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e Vue \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 composition-api.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l9\/hy\/gn\/l9hygnaxaeynr_d1qniwquyeeti.gif\"><\/div>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h2>TL;DR<\/h2>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 JS: <a href=\"https:\/\/playcode.io\/590645\/\" rel=\"nofollow\">https:\/\/playcode.io\/590645\/<\/a><\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 Spring \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/popmotion.io\/api\/spring\/\" rel=\"nofollow\">Popmotion<\/a>.<\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0439 Vue-\u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 Spring \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Popmotion \u0438 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0435\u0431\u0435 \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 \u043d\u0438\u043c.<\/p>\n<h2> \u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u044b Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <\/h2>\n<p>  \u041e\u0431\u044b\u0447\u043d\u044b\u0435 css-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0432\u0435\u0431\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u0444\u0438\u0437\u0438\u043a\u0443 \u043f\u0440\u0443\u0436\u0438\u043d\u044b. <\/p>\n<p>  \u0414\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b: \u043c\u0430\u0441\u0441\u0443 \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u043d\u0430 \u0442\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u043e\u0442\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0435.<\/p>\n<p>  \u0412\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044f \u0432\u0438\u0436\u0443 \u0442\u0430\u043a\u0438\u0435 \u043f\u043b\u044e\u0441\u044b \u0443 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439:<\/p>\n<p>  1. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0432\u0430\u0439\u043f\u044b \u043f\u0430\u043b\u044c\u0446\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u044b\u0448\u043a\u043e\u0439, \u0442\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u0430\u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0432\u0430\u0439\u043f\u0430 \u0438\u043b\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u044b\u0448\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8y\/vp\/gx\/8yvpgxyzruyevt27xoplqduykhe.gif\"><br \/>  <font color=\"#999999\"><i>CSS-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u044b\u0448\u0438<\/i><\/font><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ip\/nd\/nj\/ipndnjyuk5rncqiv7cvonq1msj0.gif\"><br \/>  <font color=\"#999999\"><i>Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0443\u0436\u0438\u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043c\u044b\u0448\u0438<\/i><\/font><\/p>\n<p>  2. \u041c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043e \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438, \u0442\u043e CSS&#8217;\u043e\u043c \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0448\u044c \u2014 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043d\u043e\u0432\u0430, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u0434\u0435\u0440\u0433\u0430\u043d\u044c\u0435.<\/p>\n<p>  \u0421\u043e Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u0442 \u2014 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0442\u043e \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0438\u043b\u0438 \u0441\u0436\u0438\u043c\u0430\u0435\u043c \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0442\u0441\u0442\u0443\u043f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tc\/xe\/fm\/tcxefm9ddifq-xwnsvb75swdgbo.gif\"><br \/>  <font color=\"#999999\"><i>\u041f\u0440\u0438\u043c\u0435\u0440 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043a \u043a\u0443\u0440\u0441\u043e\u0440\u0443 \u043c\u044b\u0448\u0438; \u0441\u0432\u0435\u0440\u0445\u0443 \u2014 CSS-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f, \u0441\u043d\u0438\u0437\u0443 \u2014 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/i><\/font><\/p>\n<h2>\u0424\u0438\u0437\u0438\u043a\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u044b<\/h2>\n<p>  \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u0441 \u0433\u0440\u0443\u0437\u043e\u043c. \u041e\u043d\u0430 \u043f\u043e\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043e\u043a\u043e\u044f.<\/p>\n<p>  \u041f\u043e\u0442\u044f\u043d\u0435\u043c \u0435\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u0437. \u041d\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043b\u0430 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e80\/4b6\/d91\/e804b6d915ac2b16f9ccf95193d45eb7.svg\" alt=\"$\\vec{F_{\u0443\u043f}} = -k\\Delta X$\" data-tex=\"inline\"><\/math>), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0442\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0443\u0436\u0438\u043d\u0443, \u043e\u043d\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043a\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gc\/5e\/pi\/gc5epibe3dyanqlaal7oo9ozte8.gif\"><\/div>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0438\u043b\u0443 \u0442\u0440\u0435\u043d\u0438\u044f. \u041f\u0443\u0441\u043a\u0430\u0439 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u0443\u0436\u0438\u043d\u044b (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/279\/b2b\/242\/279b2b2421754bb4656b35f90b9827d1.svg\" alt=\"$\\vec{F_{\u0442\u0440}} = -\\alpha\\vec{V}$\" data-tex=\"inline\"><\/math>). \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0441\u0442\u0430\u043d\u0443\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u0442\u044c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aw\/fp\/vx\/awfpvxyfnw0hnhxuve1o5ygm2jc.gif\"><\/div>\n<p>  \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0438 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u043a\u043e\u043b\u0435\u0431\u043b\u0435\u0442\u0441\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u0430 \u043f\u0440\u0438 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441\u0438\u043b\u044b \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u0438 \u0441\u0438\u043b\u044b \u0442\u0440\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/h3>\n<p>  \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fd2\/a62\/3dc\/fd2a623dcaf451647459595ce8d77c61.svg\" alt=\"$\\vec{X_0}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u0434\u0430\u043d\u044b: \u043c\u0430\u0441\u0441\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e2e\/33f\/15a\/e2e33f15a96008ca33579599483c4531.svg\" alt=\"$m$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/4a5\/2ba\/7234a52ba041cdb09b9328a047048fb2.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"><\/math>, \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fd2\/a62\/3dc\/fd2a623dcaf451647459595ce8d77c61.svg\" alt=\"$\\vec{X_0}$\" data-tex=\"inline\"><\/math>, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ae8\/55c\/9e3\/ae855c9e32f252ce85d190f47a508eb8.svg\" alt=\"$\\vec{V_0}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u0447\u0435\u0442\u0430\u043c\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5dd\/fb5\/daa\/5ddfb5daab3075f1c978a44305505eba.svg\" alt=\"$\\vec{V_{\u043f\u0440}}$\" data-tex=\"inline\"><\/math> \u0438 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/26d\/61d\/e7826d61dae9fe987b16ca39cd5d80b1.svg\" alt=\"$\\vec{X_{\u043f\u0440}}$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0a6\/f63\/a60\/0a6f63a6089e95d4d0e69e2b5af3aa1d.svg\" alt=\"$\\vec{X_{\u043f\u0440}}=\\vec{X_0}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ee\/c77\/5d6\/0eec775d6fa8ebe033f54d7902d677dc.svg\" alt=\"$\\vec{V_{\u043f\u0440}}=\\vec{V_0}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430!<\/p>\n<p>  \u041f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u0430\u043a\u043e\u043d\u0443 \u041d\u044c\u044e\u0442\u043e\u043d\u0430, \u0441\u0443\u043c\u043c\u0430 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043b \u0440\u0430\u0432\u043d\u0430 \u043c\u0430\u0441\u0441\u0435 \u0442\u0435\u043b\u0430, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u043d\u0430 \u0435\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9e4\/6d4\/a5e\/9e46d4a5eae31e1afaaf23eecc328438.svg\" alt=\"$\\vec{F}=m\\vec{a}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0435 \u0441\u0438\u043b\u044b \u2014 \u0441\u0438\u043b\u0430 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u0438 \u0441\u0438\u043b\u0430 \u0442\u0440\u0435\u043d\u0438\u044f:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d2d\/5c9\/4fa\/d2d5c94fa39eb0d9319b077908c71f44.svg\" alt=\"$\\vec{F_{\u0443\u043f}} + \\vec{F_{\u0442\u0440}}=m\\vec{a}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0420\u0430\u0441\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441\u0438\u043b\u044b \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/22c\/ed3\/f2c\/22ced3f2c89118af6ea738904a9be4d1.svg\" alt=\"$-k\\vec{X_{\u043f\u0440}} - \\alpha\\vec{V_{\u043f\u0440}}=m\\vec{a}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d4\/71d\/cae\/1d471dcae721181ea4e5e39f97ec5213.svg\" alt=\"$\\vec{a} = \\dfrac{-k\\vec{X_{\u043f\u0440}} - \\alpha\\vec{V_{\u043f\u0440}}}{m}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u041e\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u0441\u0443\u043c\u043c\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044e, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c18\/1f6\/7cb\/c181f67cb68d8e4dd063bf9bcf820263.svg\" alt=\"$\\vec{V_{\u043d\u0432}}=\\vec{V_{\u043f\u0440}} + \\vec{a}*\\Delta t$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0417\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/83d\/99e\/ac0\/83d99eac0bc754d821a544d165659250.svg\" alt=\"$\\vec{X_{\u043d\u0432}}=\\vec{X_{\u043f\u0440}} + \\vec{V_{\u043d\u0432}}*\\Delta t$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e!<\/p>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/678\/e7d\/dfd\/678e7ddfd5493f7bfe572905f8067d1b.svg\" alt=\"$\\vec{X_{\u043f\u0440}}=\\vec{X_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bad\/54b\/6cb\/bad54b6cbff2a66c2cc3c48c0d9a5254.svg\" alt=\"$\\vec{V_{\u043f\u0440}}=\\vec{V_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0441\u0442\u043e\u0438\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f41\/5df\/383\/f415df3831cd6b330e00674f778653d3.svg\" alt=\"$\\|\\vec{X_{\u043d\u0432}}\\|$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e54\/522\/94e\/e5452294e422f271e97df994c56205ee.svg\" alt=\"$\\|\\vec{V_{\u043d\u0432}}\\|$\" data-tex=\"inline\"><\/math> \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438 \u2014 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u0438\u0434\u043d\u043e.<\/p>\n<h2>Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0430 JS<\/h2>\n<p>  \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"javascript\">class Spring {   constructor({ mass, tension, friction, initVelocity, from, to, onUpdate }) {     this.mass = mass;                 \/\/ \u041c\u0430\u0441\u0441\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u044b     this.tension = tension;           \/\/ \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438     this.friction = friction;         \/\/ \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f     this.initVelocity = initVelocity; \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c      this.from = from;                 \/\/ \u041e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c     this.to = to;                     \/\/ \u0414\u043e \u043a\u0430\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c     this.onUpdate = onUpdate;         \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f   }    startAnimation() {     const callDoAnimationTick = () =&gt; {       const isFinished = this.doAnimationTick();        if (isFinished) {         return;       }        this.nextTick = window.requestAnimationFrame(callDoAnimationTick);     };      callDoAnimationTick();   }    stopAnimation() {     const { nextTick } = this;      if (nextTick) {       window.cancelAnimationFrame(nextTick);     }      this.isFinished = true;   }    doAnimationTick() {     const {       mass, tension, friction, initVelocity, from, to,       previousTimestamp, prevVelocity, prevValue, onUpdate,     } = this;      \/\/ \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0394t     const currentTimestamp = performance.now();     const deltaT = (currentTimestamp - (previousTimestamp || currentTimestamp))       \/ 1000;     \/\/ \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0394t 46 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u043c\u0438     const normalizedDeltaT = Math.min(deltaT, 0.046);      let prevSafeVelocity = prevVelocity || initVelocity || 0;     let prevSafeValue = prevValue || from;      \/\/ \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0438\u043b\u0443 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438, \u0441\u0438\u043b\u0443 \u0442\u0440\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435     const springRestoringForce = -1 * tension * (prevSafeValue - to);     const dampingForce = -1 * prevSafeVelocity * friction;     const acceleration = (springRestoringForce + dampingForce) \/ mass;      \/\/ \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438     const newVelocity = prevSafeVelocity + acceleration * normalizedDeltaT;     const newValue  = prevSafeValue + newVelocity * normalizedDeltaT;      \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u043a\u043e\u043d\u0435\u0446     const precision = 0.001;     const isFinished = Math.abs(newVelocity) &lt; precision       &amp;&amp; Math.abs(newValue - to) &lt; precision;      onUpdate({ value: newValue, isFinished });      this.previousTimestamp = currentTimestamp;     this.prevValue = newValue;     this.prevVelocity = newVelocity;     this.isFinished = isFinished;      return isFinished;   } } <\/code><\/pre>\n<p>  \u041f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c Spring-\u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>  <a href=\"https:\/\/playcode.io\/590645\" rel=\"nofollow\">https:\/\/playcode.io\/590645<\/a><\/p>\n<h3>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/h3>\n<p>  \u0421 \u043d\u0430\u0448\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c Spring \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0440\u0430\u0437\u043d\u044b\u0439 \u043f\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. <\/p>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0438\u043a\u0435 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 46 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u043c, \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044e. \u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u2014 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f 16-17 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u043c.<\/p>\n<p>  \u041c\u0435\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e, \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0442\u0430\u043a: <\/p>\n<p>  \u0412\u043e\u0437\u044c\u043c\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u043a\u0430\u043a \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u043d\u043e\u0432\u043e\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0448\u043b\u043e \u0441 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0435\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math>. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/26d\/61d\/e7826d61dae9fe987b16ca39cd5d80b1.svg\" alt=\"$\\vec{X_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5dd\/fb5\/daa\/5ddfb5daab3075f1c978a44305505eba.svg\" alt=\"$\\vec{V_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math> \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/26d\/61d\/e7826d61dae9fe987b16ca39cd5d80b1.svg\" alt=\"$\\vec{X_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d49\/c4c\/9c5\/d49c4c9c5303c5344564c254eb1e0613.svg\" alt=\"$\\Delta t$\" data-tex=\"inline\"><\/math> \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043a\u0430\u043a 1 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430, \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0448\u043b\u044b\u043c \u0438 \u043d\u043e\u0432\u044b\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u043f\u0440\u043e\u0448\u043b\u043e 32 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>  \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b 32 \u0440\u0430\u0437\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0438\u0437\u0438\u043a\u0443, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/26d\/61d\/e7826d61dae9fe987b16ca39cd5d80b1.svg\" alt=\"$\\vec{X_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5dd\/fb5\/daa\/5ddfb5daab3075f1c978a44305505eba.svg\" alt=\"$\\vec{V_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math>; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e78\/26d\/61d\/e7826d61dae9fe987b16ca39cd5d80b1.svg\" alt=\"$\\vec{X_{\u043d\u0432}}$\" data-tex=\"inline\"><\/math> \u043d\u0430\u0434\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043c\u0435\u0442\u043e\u0434 doAnimationTick:<\/p>\n<pre><code class=\"javascript\">class Spring {   \/* ... *\/    doAnimationTick() {     const {       mass, tension, friction, initVelocity, from, to,       previousTimestamp, prevVelocity, prevValue, onUpdate,     } = this;      const currentTimestamp = performance.now();     const fractionalDiff = currentTimestamp - (previousTimestamp || currentTimestamp);     const naturalDiffPart = Math.floor(fractionalDiff);     const decimalDiffPart = fractionalDiff % 1;     const normalizedDiff = Math.min(naturalDiffPart, 46);      let safeVelocity = prevVelocity || initVelocity || 0;     let safeValue = prevValue || from;      \/\/ \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u0438\u0437\u0438\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e 1-\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430      for (let i = 0; i &lt; normalizedDiff; i++) {       const springRestoringForce = -1 * tension * (safeValue - to);       const dampingForce = -1 * safeVelocity * friction;       const acceleration = (springRestoringForce + dampingForce) \/ mass;        safeVelocity = safeVelocity + acceleration \/ 1000;       safeValue  = safeValue + safeVelocity \/ 1000;     }      const precision = 0.001;     const isFinished = Math.abs(safeVelocity) &lt; precision       &amp;&amp; Math.abs(safeValue - to) &lt; precision;      onUpdate({ value: safeValue, isFinished });      \/\/ \u041e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u043e\u0441\u0442\u0430\u0432\u0448\u0443\u044e\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438,     \/\/ \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0435\u0435 \u043d\u0435 \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438     this.previousTimestamp = currentTimestamp - decimalDiffPart;     this.prevValue = safeValue;     this.prevVelocity = safeVelocity;     this.isFinished = isFinished;      return isFinished;   } } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0444\u0438\u0437\u0438\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f react-spring, \u0432 <a href=\"https:\/\/gafferongames.com\/post\/fix_your_timestep\/\" rel=\"nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h3> \u041f\u0440\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 <\/h3>\n<p>  \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u043c\u0430\u0441\u0441\u0443 \u0433\u0440\u0443\u0437\u0430, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b \u2014 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u0430. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442 \u00ab\u043f\u0440\u0443\u0436\u0438\u043d\u0438\u0441\u0442\u043e\u0441\u0442\u044c\u00bb \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. <\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0444\u0438\u0437\u0438\u043a\u0435 \u0434\u043b\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u0441 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u0435\u043c \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u0440\u0438 \u0432\u0437\u0433\u043b\u044f\u0434\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0445 \u043d\u0430\u0439\u0442\u0438, \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043a\u043e\u043d\u0430 \u041d\u044c\u044e\u0442\u043e\u043d\u0430:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/22c\/ed3\/f2c\/22ced3f2c89118af6ea738904a9be4d1.svg\" alt=\"$-k\\vec{X_{\u043f\u0440}} - \\alpha\\vec{V_{\u043f\u0440}}=m\\vec{a}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/778\/3a2\/cf7\/7783a2cf7a46e46b8f1603236fabeb70.svg\" alt=\"$-kx - \\alpha\\frac{dx}{dt}=m\\frac{d^2x}{dt^2}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1a0\/e45\/d31\/1a0e45d31ceea70061647741da798e96.svg\" alt=\"$\\frac{d^2x}{dt^2} + 2\\zeta\\omega_{0}\\frac{dx}{dt} + \\omega_{0}^2x = 0,$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/263\/588\/9fe\/2635889fe261fbc19af9f32e97a6447b.svg\" alt=\"$\\omega_{0} = \\sqrt\\frac{k}{m}$\" data-tex=\"inline\"><\/math> \u2014 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0441\u0438\u043b\u044b \u0442\u0440\u0435\u043d\u0438\u044f, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/258\/98a\/927\/25898a9278f32f4317850922b8ecb31b.svg\" alt=\"$\\zeta = \\frac{\\alpha}{2\\sqrt{mk}}$\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/142\/85f\/bb1\/14285fbb11e17917c24c312786726245.svg\" alt=\"$x(t)$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u0443 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c, \u0432\u043e\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0432\u0438\u0434\u0435\u043e: <br \/>  <a href=\"https:\/\/www.youtube.com\/watch?v=uI2xt8nTOlQ\" rel=\"nofollow\">https:\/\/www.youtube.com\/watch?v=uI2xt8nTOlQ<\/a><\/p>\n<p>  \u041d\u0430\u043c \u0434\u0430\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/568\/722\/497\/568722497d6ef24fce8fd21bd81e4c2f.svg\" alt=\"$x'' + 2 \\zeta\\omega_0x' + \\omega_0^2x = 0, \\omega_0 &gt;0, \\zeta \\geq 0$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0414\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0434\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043d\u0442 \u0443 \u044d\u0442\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cf4\/0a2\/7f0\/cf40a27f0405c1582872553990515706.svg\" alt=\"$g^2 + 2 \\zeta\\omega_0g + \\omega_0^2 = 0$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7ab\/231\/b77\/7ab231b776e788827bd272689ab3efe3.svg\" alt=\"$D = (2\\zeta\\omega_0)^2 - 4\\omega_0^2 = 4\\omega_0^2(\\zeta^2 - 1)$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0423 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p>  1. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f1\/e5f\/2b0\/1f1e5f2b0268d3bee500d5b67503582d.svg\" alt=\"$D &gt; 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f1\/e5f\/2b0\/1f1e5f2b0268d3bee500d5b67503582d.svg\" alt=\"$D &gt; 0$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/631\/a72\/46f\/631a7246f07ddce41d089678f525345a.svg\" alt=\"$\\zeta &gt; 1$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041e\u0431\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f1\/e5f\/2b0\/1f1e5f2b0268d3bee500d5b67503582d.svg\" alt=\"$D &gt; 0$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b78\/4a9\/6ff\/b784a96ff2dc651312b9cf708309735c.svg\" alt=\"$x(t) = C_1e^{r_1t} + C_2e^{r_2t},$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3ca\/cf0\/a61\/3cacf0a61a4840d9d2517ef64b4140b6.svg\" alt=\"$r_{1,2} $\" data-tex=\"inline\"><\/math> \u2014 \u043a\u043e\u0440\u043d\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ba0\/d2e\/956\/ba0d2e9562e01fd6e5f91232fb60e56b.svg\" alt=\"$r_{1,2} = \\frac{-2\\zeta\\omega_0 \\pm \\sqrt{4\\omega_0^2(\\zeta^2 - 1)}}{2} = -\\omega_0(\\zeta \\pm \\sqrt{\\zeta^2 - 1})$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e94\/d2b\/adb\/e94d2badbbb5036112fff16c67c6cc4d.svg\" alt=\"$x(t) = C_1e^{-\\omega_0\\beta_1t} + C_2e^{-\\omega_0\\beta_2t},$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fa9\/905\/44c\/fa990544c0fa0bde77b814bee676c4bb.svg\" alt=\"$\\beta_{1, 2} = \\zeta \\pm \\sqrt{\\zeta_2 - 1}$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439, \u0441\u0442\u0440\u0435\u043c\u044f\u0449\u0430\u044f\u0441\u044f \u043a 0.<\/p>\n<p>  2. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f79\/491\/647\/f79491647052c76c15cf344bb187d463.svg\" alt=\"$D = 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f79\/491\/647\/f79491647052c76c15cf344bb187d463.svg\" alt=\"$D = 0$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/981\/360\/6fa\/9813606faf69e508c7ff557cf170435f.svg\" alt=\"$\\zeta = 1$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041e\u0431\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f79\/491\/647\/f79491647052c76c15cf344bb187d463.svg\" alt=\"$D = 0$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/88d\/1cc\/bbc\/88d1ccbbc4d096c223ae29a3d67b0090.svg\" alt=\"$x(t) = (C_1 + C_2t)e^{rt},$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/066\/939\/a33\/066939a33475dd671b845469b6526972.svg\" alt=\"$r$\" data-tex=\"inline\"><\/math> \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d7c\/ba1\/e7c\/d7cba1e7c2a6ad5bba2adc703c090bdc.svg\" alt=\"$r = - \\zeta\\omega_0$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a5c\/ad0\/c0b\/a5cad0c0b5871244d86aa2c65d3cb66e.svg\" alt=\"$x(t) = (C_1 + C_2t)e^{- \\zeta\\omega_0t}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439, \u0441\u0442\u0440\u0435\u043c\u044f\u0449\u0430\u044f\u0441\u044f \u043a 0. \u041e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u043b\u044e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f1\/e5f\/2b0\/1f1e5f2b0268d3bee500d5b67503582d.svg\" alt=\"$D &gt; 0$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a 0 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f1\/e5f\/2b0\/1f1e5f2b0268d3bee500d5b67503582d.svg\" alt=\"$D &gt; 0$\" data-tex=\"inline\"><\/math>. \u041c\u043e\u0436\u0435\u0442, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0443 \u0432\u0430\u0441 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445?<\/p>\n<p>  3. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b8d\/dc2\/fee\/b8ddc2fee38ff20949252642c96b8ac9.svg\" alt=\"$D &lt; 0$\" data-tex=\"inline\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b8d\/dc2\/fee\/b8ddc2fee38ff20949252642c96b8ac9.svg\" alt=\"$D &lt; 0$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/19f\/041\/778\/19f0417789d1356a86b0bbfe632c5226.svg\" alt=\"$\\zeta &lt; 1$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  \u041e\u0431\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b8d\/dc2\/fee\/b8ddc2fee38ff20949252642c96b8ac9.svg\" alt=\"$D &lt; 0$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/916\/d0c\/768\/916d0c76856880ba76a685965def87a0.svg\" alt=\"$x(t) = e^{\\alpha t}(C_1cos(\\beta t) + C_2 * sin(\\beta t))$\" data-tex=\"display\"><\/math><\/p>\n<p>  <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/4a5\/2ba\/7234a52ba041cdb09b9328a047048fb2.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7fd\/b73\/0d9\/7fdb730d916a98c0ad71826e0bc706bf.svg\" alt=\"$\\beta$\" data-tex=\"inline\"><\/math> \u2014 \u044d\u0442\u043e \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0438 \u043c\u043d\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12f\/8b4\/cdb\/12f8b4cdbeff9bd43f7a28d861f02e69.svg\" alt=\"$r{1,2} = \\alpha \\pm \\beta i = -\\omega_0\\zeta \\pm\\omega_0\\sqrt{\\zeta^2 - 1}) = -\\omega_0\\zeta \\pm \\omega_0\\sqrt{1 - \\zeta^2}i$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/758\/d80\/c04\/758d80c04f713f053dc81b8bfc725006.svg\" alt=\"$\\alpha = -\\omega_0\\zeta, \\beta = \\omega_0\\sqrt{1 - \\zeta^2}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ba\/b8e\/15f\/0bab8e15fbc3622472eaead43453efe5.svg\" alt=\"$x(t) = e^{-\\omega_0\\zeta t}(C_1cos(\\omega_0\\sqrt{1 - \\zeta^2} t) + C_2sin(\\omega_0\\sqrt{1 - \\zeta^2} t))$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u0442\u0443\u0445\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439, \u0441\u0442\u0440\u0435\u043c\u044f\u0449\u0438\u0445\u0441\u044f \u043a 0. <\/p>\n<p>  \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>, \u0442\u0435\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/a3e\/965\/629a3e965e8267051c657982b4cfa464.svg\" alt=\"$e^{-\\omega_0\\zeta t}$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043a 0, \u0442.\u0435. \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/50a\/fe0\/694\/50afe0694fd21e4fb656564df9d8e0d9.svg\" alt=\"$\\zeta = 0$\" data-tex=\"inline\"><\/math> \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.  <\/div>\n<\/p><\/div>\n<p>  \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/19f\/041\/778\/19f0417789d1356a86b0bbfe632c5226.svg\" alt=\"$\\zeta &lt; 1$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u044b. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>, \u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u0441\u0438\u043b\u0430 \u0442\u0440\u0435\u043d\u0438\u044f \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/981\/360\/6fa\/9813606faf69e508c7ff557cf170435f.svg\" alt=\"$\\zeta = 1$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0442\u0440\u0435\u043d\u0438\u0435\u043c, \u0442.\u0435. \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439, \u0441\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. <\/p>\n<p>  \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/631\/a72\/46f\/631a7246f07ddce41d089678f525345a.svg\" alt=\"$\\zeta &gt; 1$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/981\/360\/6fa\/9813606faf69e508c7ff557cf170435f.svg\" alt=\"$\\zeta = 1$\" data-tex=\"inline\"><\/math>; \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math> \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/84\/7f\/ae\/847faem7ezjmrfr2ai4xmxq12mc.gif\"><\/div>\n<p>  <font color=\"#999999\"><i>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0430 \u0432 4 \u0440\u0430\u0437\u0430<\/i><\/font><\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u2014 \u043f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0442\u0440\u0435\u043d\u0438\u044f:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/05e\/922\/398\/05e922398522facc789b01f525747724.svg\" alt=\"$T = 2\\pi\\sqrt{\\frac{m}{k}}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<p>  \u2192 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math> \u043e\u0442 0 \u0434\u043e 1. <\/p>\n<p>  \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math>, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443 \u043f\u0440\u0443\u0436\u0438\u043d\u044b. \u041f\u0440\u0438 0 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0438\u043b\u0443 \u0442\u0440\u0435\u043d\u0438\u044f, \u043f\u0440\u0443\u0436\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f; \u043f\u0440\u0438 1 \u043f\u0440\u0443\u0436\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. <\/p>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 1 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u2014 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u0430\u043a 1, \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0440\u044f \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0442 \u043d\u0430\u0448\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u2192 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043b\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f. <\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u0438\u043c\u0435\u0442\u044c \u0432 \u0432\u0438\u0434\u0443, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u043f\u0440\u0443\u0436\u0438\u043d\u044b \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0441\u0438\u043b\u044b \u0442\u0440\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043e\u0431 \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b, \u0437\u043d\u0430\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/611\/eaf\/f9f\/611eaff9f79818592a808fecea7db994.svg\" alt=\"$ m=1 $\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6b2\/84c\/1fd\/6b284c1fd3d5a4ea4bacf06c0520b2ac.svg\" alt=\"$\\zeta = \\frac{\\alpha}{2\\sqrt{mk}}, T = 2\\pi\\sqrt{\\frac{m}{k}}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ce3\/585\/5e9\/ce35855e97e3779f93628e6c061b3892.svg\" alt=\"$k = (\\frac{2\\pi}{T})^2, \\alpha = \\frac{4\\pi\\zeta}{T}$\" data-tex=\"display\"><\/math><\/p>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"javascript\">const getSpringValues = ({ dampingRatio, period }) =&gt; {   const mass = 1;   const tension = Math.pow(2 * Math.PI \/ period, 2);   const friction = 4 * Math.PI * dampingRatio \/ period;    return {     mass,     tension,     friction,   }; };  \/\/ \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f  new Spring({   ...getSpringValues({     dampingRatio: 0.3, \/\/ \u041f\u0440\u0443\u0436\u0438\u043d\u0430 \u043a\u043e\u043b\u0435\u0431\u043b\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u0440\u0430\u0437     period: 0.6, \/\/ \u041f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f 600 \u043c\u0441   }),   from: 0,   to: 20,   onUpdate: () =&gt; { \/* ... *\/ }, });  new Spring({   ...getSpringValues({     dampingRatio: 1, \/\/ \u041f\u0440\u0443\u0436\u0438\u043d\u0430 \u043d\u0435 \u043a\u043e\u043b\u0435\u0431\u043b\u0435\u0442\u0441\u044f     period: 0.2, \/\/ \u041f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f 200 \u043c\u0441   }),   from: 0,   to: 20,   onUpdate: () =&gt; { \/* ... *\/ }, }); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043c\u0435\u0442\u043e\u0434 getSpringValues, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bea\/545\/8ff\/bea5458ffde546c9cc535d7d8f5f59dc.svg\" alt=\"$\\zeta$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u0435\u0440\u0438\u043e\u0434 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0443 \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0442\u0440\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0435\u0441\u0442\u044c \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0438\u0436\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<br \/>  <a href=\"https:\/\/playcode.io\/590645\" rel=\"nofollow\">https:\/\/playcode.io\/590645<\/a><\/p>\n<h2>Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0430 Vue<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e Vue, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/vue-composition-api-rfc.netlify.app\/\" rel=\"nofollow\">composition-api<\/a>.<\/p>\n<h3>Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h3>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Spring-\u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"django\">&lt;template&gt;   &lt;div&gt;     &lt;SpringWrapper       :mass=&quot;1&quot;       :tension=&quot;170&quot;       :friction=&quot;14&quot;       :animationProps=&quot;{ x, y }&quot;        :animate=&quot;true&quot;        v-slot=&quot;{ x: newX, y: newY }&quot;     &gt;       &lt;div :style=&quot;{ transform: `translate(${newX}px, ${newY}px)` }&quot; \/&gt;     &lt;\/SpringWrapper&gt;   &lt;\/div&gt; &lt;\/template&gt;  &lt;script&gt; import SpringWrapper from 'path\/to\/SpringWrapper';  export default {   components: {     SpringWrapper,   },    data() {     return {       x: 0,       y: 0,     };   },    mounted() {     setTimeout(() =&gt; {       this.x = 100;       this.y = 100;     }, 1000);   }, }; &lt;\/script&gt; <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ul>\n<li> \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <\/li>\n<li> \u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 animationProps \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0435 \u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c <\/li>\n<li> \u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 animate \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u0434\u043e \u043b\u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c animationProps <\/li>\n<li> \u041f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u0432 animationProps \u043e\u043d\u0438 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u044c scoped-\u0441\u043b\u043e\u0442\u0430 <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0435\u0449\u0435 \u0443\u043c\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u043d\u043e \u043c\u044b \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">const SpringWrapper = {   props: {     friction: { type: Number, default: 10 },     tension: { type: Number, default: 270 },     mass: { type: Number, default: 1 },     animationProps: { type: Object, required: true },     animate: { type: Boolean, required: true },   },    data: () =&gt; ({     \/\/ \u041e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438     actualAnimationProps: null,   }),    created() {     this.actualAnimationProps = this.animationProps;     \/\/ \u041e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f Spring-\u043e\u0431\u044a\u0435\u043a\u0442\u044b     this._springs = {};   },    watch: {     animationProps: {       deep: true,        \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 animationProps       handler(animationProps) {         const {           friction, tension, mass,           animate, actualAnimationProps, _springs,         } = this;          \/\/ \u0415\u0441\u043b\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f, \u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u0445         if (!animate) {           this.actualAnimationProps = animationProps;            return;         }          \/\/ \u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438         Object.entries(animationProps).forEach((([key, value]) =&gt; {           const _spring = _springs[key];           const actualValue = actualAnimationProps[key];            \/\/ \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b Spring-\u043e\u0431\u044a\u0435\u043a\u0442,           \/\/ \u0442\u043e \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f           if (_spring &amp;&amp; !_spring.isFinished) {             _spring.to = value;              return;           }            const spring = new Spring({             friction,             tension,             mass,             initVelocity: 0,             from: actualValue,             to: value,             onUpdate: ({ value }) =&gt; {               actualAnimationProps[key] = value;             },           });            spring.startAnimation();            _springs[key] = spring;         }));       }     },      animate(val) {       const { _springs } = this;        \/\/ \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f,       \/\/ \u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u0441\u0435 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438       if (!val) {         Object.values(_springs).forEach((spring) =&gt; {           spring.stopAnimation();         })          this.actualAnimationProps = this.animationProps;       }     },   },    render() {     const { $scopedSlots, actualAnimationProps } = this;      \/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 scopedSlot     return $scopedSlots.default(actualAnimationProps)[0];   }, }; <\/code><\/pre>\n<p>  \u041f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>  <a href=\"https:\/\/playcode.io\/591686\/\" rel=\"nofollow\">https:\/\/playcode.io\/591686\/<\/a><\/p>\n<h3>Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 composition-api<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c composition-api, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043e Vue 3.0, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/vuejs\/composition-api\" rel=\"nofollow\">composition-api<\/a>.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0441\u0435\u0431\u0435:<\/p>\n<pre><code class=\"bash\">npm i @vue\/composition-api <\/code><\/pre>\n<pre><code class=\"javascript\">import Vue from 'vue' import VueCompositionApi from '@vue\/composition-api';  Vue.use(VueCompositionApi); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u043c \u0431\u044b \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"django\">&lt;template&gt;   &lt;div&gt;     &lt;div :style=&quot;{ transform: `translate(${x}px, ${y}px)` }&quot; \/&gt;   &lt;\/div&gt; &lt;\/template&gt;  &lt;script&gt; import useSpring from 'path\/to\/useSpring';  export default {   setup() {     const { x, y, animate } = useSpring({       mass: 1,        tension: 170,        friction: 10,       x: 0,       y: 0,     });      setTimeout(() =&gt; {       x.value = 100;       y.value = 100;     }, 1000);      return {       x,       y,       animate,     };   }, }; &lt;\/script&gt; <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ul>\n<li> \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0443\u0436\u0438\u043d\u044b <\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u043e\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c <\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0430 computed-\u043e\u0431\u0435\u0440\u0442\u043a\u0438. Setter&#8217;\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c; getter&#8217;\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0430 animate-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0442\u043e, \u043d\u0430\u0434\u043e \u043d\u0430\u043c \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u043d\u0435\u0442 <\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u0443\u0436\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">import { reactive, computed, ref, watch } from '@vue\/composition-api'; import { Spring } from '@cag-animate\/core';  const useSpring = (initialProps) =&gt; {   const {     mass, tension, friction,     animate: initialAnimate,     ...restInitialProps   } = initialProps;    \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f   const actualProps = reactive(restInitialProps);    const springs = {};   const mirrorProps = {};    Object.keys(initialProps).forEach(key =&gt; {     \/\/ \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u043c computed-\u043e\u0431\u0435\u0440\u0442\u043a\u0443     \/\/      \/\/ Getter \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 actualProps     \/\/ Setter \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e     mirrorProps[key] = computed({       get: () =&gt; actualProps[key],       set: val =&gt; {         const _spring = springs[key];         const actualValue = actualProps[key];          if (!mirrorProps.animate.value) {           actualProps[key] = val;            return         }          if (_spring &amp;&amp; !_spring.isFinished) {           _spring.to = val;            return;         }          const spring = new Spring({           friction,           tension,           mass,           initVelocity: 0,           from: actualValue,           to: val,           onUpdate: ({ value }) =&gt; {             actualProps[key] = value;           },         });          spring.startAnimation();          springs[key] = spring;       },     });   });    mirrorProps.animate = ref(initialAnimate || true);    watch(() =&gt; mirrorProps.animate.value, (val) =&gt; {     if (!val) {       Object.entries(springs).forEach(([key, spring]) =&gt; {         spring.stopAnimation();         actualProps[key] = spring.to;       });     }   });    return mirrorProps; };  export default useSpring; <\/code><\/pre>\n<p>  \u041f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430 \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c composition-api \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>  <a href=\"https:\/\/playcode.io\/591812\/\" rel=\"nofollow\">https:\/\/playcode.io\/591812\/<\/a><\/p>\n<h2>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043b\u043e\u0432\u043e<\/h2>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0438 \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0438 \u0438\u0445 \u0432\u043e Vue. \u041d\u043e \u0443 \u043d\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u2014 \u0432\u043e Vue-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u0443\u0436\u0438\u043d\u044b.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441\u0432\u043e\u0439 Spring \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e: \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/popmotion.io\/pure\/\" rel=\"nofollow\">Popmotion<\/a> \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/popmotion.io\/api\/spring\/\" rel=\"nofollow\">Spring<\/a>. \u0414\u043b\u044f Vue \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0435\u0440\u0442\u043a\u0443, \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430! <\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h3>\n<p>  <\/p>\n<ul>\n<li> <a href=\"https:\/\/github.com\/react-spring\/react-spring\" rel=\"nofollow\">react-spring<\/a> <\/li>\n<li> <a href=\"https:\/\/medium.com\/ios-os-x-development\/demystifying-uikit-spring-animations-2bb868446773\" rel=\"nofollow\">Demystifying UIKit Spring Animations<\/a> <\/li>\n<li> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Harmonic_oscillator\" rel=\"nofollow\">Harmonic oscillator<\/a> <\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/497456\/\"> https:\/\/habr.com\/ru\/post\/497456\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/497456\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u041c\u043d\u0435 \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u041d\u043e \u0434\u0435\u043b\u0430\u043b \u044f \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f React-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e react-spring, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0437\u043d\u0430\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. <\/p>\n<p>  \u041d\u043e \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043e\u043d\u043e \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e!<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u0435\u0437\u0434\u0435, \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442. \u0422\u0430\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e Spring \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JS \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Spring-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e Vue \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 composition-api.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l9\/hy\/gn\/l9hygnaxaeynr_d1qniwquyeeti.gif\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302943","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302943"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302943\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}