{"id":315934,"date":"2021-01-03T21:00:34","date_gmt":"2021-01-03T21:00:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=315934"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=315934","title":{"rendered":"\u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0432\u043e\u0439 minecraft \u043d\u0430 JavaScript"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<h2>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0430\u043c\u0443\u044e \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0430 \u044f \u0443\u043c\u0435\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435&#8230;<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d7\/ed\/hn\/d7edhnwj5dcjib6ozxraueymb_c.png\" alt=\"image\"><\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u0435\u043c\u043a\u0443 minecraft \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f JS \u0438 three.js.<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0441\u0442\u0435\u0439. \u042f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0435\u0442\u0438\u044f. \u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043c\u043e\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0447\u0438\u0442\u0430\u0442\u044c(\u0442\u0430\u043c \u0442\u043e\u0442 \u0436\u0435 \u0441\u043c\u044b\u0441\u043b, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438). <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u0435\u043e\u0432\u0435\u0440\u0441\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<div class=\"oembed\"><iframe id=\"5ff1bced3b295d140fdb3962\" src=\"https:\/\/embedd.srv.habr.com\/iframe\/5ff1bced3b295d140fdb3962\"><\/iframe><\/div>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u043e\u0434\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u0435. \u041e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0442\u043e\u0433, \u0442\u043e \u0432\u043e\u0442 <a href=\"https:\/\/epiclegend.ru\/\" rel=\"nofollow\">\u0434\u0435\u043c\u043a\u0430 \u0438\u0433\u0440\u044b<\/a>.<\/p>\n<p>  \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<ol>\n<li>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0433\u0440\u044b<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u044b<\/li>\n<li>\u041a\u0430\u043c\u0435\u0440\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/li>\n<\/ol>\n<p>  <\/p>\n<h2>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ox\/q0\/_q\/oxq0_qhdoicn5aifo7keruaubms.png\" alt=\"image\"><\/p>\n<p>  index.html \u2014 \u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0432\u0430\u0441\u0430, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439, \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<br \/>  style.css \u2014 \u0421\u0442\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430. \u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u044d\u0442\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u043e\u0440 \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<p>  texture \u2014 \u0417\u0434\u0435\u0441\u044c \u043b\u0435\u0436\u0430\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0438 \u0431\u043b\u043e\u043a\u0430 \u0437\u0435\u043c\u043b\u0438 \u0434\u043b\u044f \u0438\u0433\u0440\u044b.<br \/>  core.js \u2014 \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  perlin.js \u2014 \u042d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430.<br \/>  PointerLockControls.js \u2014 \u041a\u0430\u043c\u0435\u0440\u0430 \u043e\u0442 three.js.<br \/>  controls.js \u2014 \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u0438 \u0438\u0433\u0440\u043e\u043a\u043e\u043c.<br \/>  generationMap.js \u2014 \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u0438\u0440\u0430.<br \/>  three.module.js \u2014 \u0421\u0430\u043c three.js \u0432 \u0432\u0438\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044f.<br \/>  settings.js \u2014 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <b>index.html<\/b><\/p>\n<pre><code class=\"xml\">&lt;html lang=&quot;en&quot;&gt; &lt;head&gt; \t&lt;meta charset=&quot;UTF-8&quot;&gt; \t&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt; \t&lt;link rel=&quot;stylesheet&quot; href=&quot;style\/style.css&quot;&gt; \t&lt;title&gt;Minecraft clone&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; \t&lt;canvas id=&quot;game&quot; tabindex=&quot;1&quot;&gt;&lt;\/canvas&gt; \t&lt;div class=&quot;game-info&quot;&gt; \t\t&lt;div&gt; \t\t\t&lt;span&gt;&lt;b&gt;WASD: &lt;\/b&gt;\u041f\u0435\u0440\u0435\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435&lt;\/span&gt; \t\t\t&lt;span&gt;&lt;b&gt;\u041b\u041a\u041c: &lt;\/b&gt; \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a&lt;\/span&gt; \t\t\t&lt;span&gt;&lt;b&gt;\u041f\u041a\u041c: &lt;\/b&gt; \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0431\u043b\u043e\u043a&lt;\/span&gt; \t\t&lt;\/div&gt; \t\t&lt;hr&gt; \t\t&lt;div id=&quot;debug&quot;&gt; \t\t\t&lt;span&gt;&lt;b&gt;&lt;\/b&gt;&lt;\/span&gt; \t\t&lt;\/div&gt; \t&lt;\/div&gt; \t&lt;div id=&quot;cursor&quot;&gt;&lt;\/div&gt;  \t&lt;script src=&quot;scripts\/perlin.js&quot;&gt;&lt;\/script&gt; \t&lt;script src=&quot;scripts\/core.js&quot; type=&quot;module&quot;&gt;&lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  <b>style.css<\/b>  <\/p>\n<pre><code class=\"css\">body { \tmargin: 0px; \twidth: 100vw; \theight: 100vh; } #game { \twidth: 100%; \theight: 100%; \tdisplay: block; } #game:focus {     outline: none; } .game-info { \tposition: absolute; \tleft: 1em; \ttop: 1em; \tpadding: 1em; \tbackground: rgba(0, 0, 0, 0.9); \tcolor: white; \tfont-family: monospace; \tpointer-events: none; } .game-info span { \tdisplay: block; } .game-info span b { \tfont-size: 18px; } #cursor { \twidth: 16px; \theight: 16px; \tposition: fixed; \ttop: 50%; \tleft: 50%; \ttransform: translate(-50%, -50%); \tbackground-image: url(&quot;..\/texture\/cursor.png&quot;); \tbackground-repeat: no-repeat; \tbackground-size: 100%;  \tfilter: brightness(100); } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/h2>\n<p>  \u0412 core.js \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e three.js, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0442 \u0438\u0433\u0440\u044b + \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u2026 \u043d\u0443 \u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412 \u0443\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435, \u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0438\u0445 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e map (\u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0446\u0435\u043d\u0443 \u0438\u0433\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u043e\u0432) \u0438 contorls \u0442.\u043a. \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u043e \u043a\u0430\u043c\u0435\u0440\u0430 \u043e\u0442 three.js, \u0441\u0446\u0435\u043d\u0443 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u043a\u0430\u0440\u0442\u0443 \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0435\u0439. update \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043c\u0435\u0440\u044b, GameLoop \u2014 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b, render- \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043e\u0442 three.js \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0434\u0440\u0430, \u0441\u043e\u0431\u044b\u0442\u0438\u0435 resize \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u043d\u0432\u0430\u0441\u043e\u043c (\u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u0430).<\/p>\n<p>  <b>core.js<\/b><\/p>\n<pre><code class=\"javascript\">import * as THREE from '.\/components\/three.module.js'; import { PointerLockControls } from '.\/components\/PointerLockControls.js';  import { Map } from &quot;.\/components\/generationMap.js&quot;; import { Controls } from &quot;.\/components\/controls.js&quot;;  \/\/ \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 three.js const canvas\t\t\t\t= document.querySelector(&quot;#game&quot;); const scene \t\t\t\t= new THREE.Scene(); scene.background \t\t\t= new THREE.Color(0x00ffff); scene.fog \t\t\t\t\t= new THREE.Fog(0x00ffff, 10, 650); const renderer \t\t\t\t= new THREE.WebGLRenderer({canvas}); renderer.setSize(window.innerWidth, window.innerHeight); const camera \t\t\t\t= new THREE.PerspectiveCamera(75, window.innerWidth \/ window.innerHeight, 0.1, 1000); camera.position.set(50, 40, 50);  \/\/ \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b let mapWorld = new Map(); mapWorld.generation(scene);  let controls = new Controls( new PointerLockControls(camera, document.body),  scene, mapWorld );  renderer.domElement.addEventListener( &quot;keydown&quot;, (e)=&gt;{ controls.inputKeydown(e); } ); renderer.domElement.addEventListener( &quot;keyup&quot;, (e)=&gt;{ controls.inputKeyup(e); } ); document.body.addEventListener( &quot;click&quot;, (e) =&gt; { controls.onClick(e); }, false );  function update(){ \t\/\/ \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\/\u043a\u0430\u043c\u0435\u0440\u0430 \tcontrols.update(); };  GameLoop();  \/\/ \u0418\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b function GameLoop() { \tupdate(); \trender(); \trequestAnimationFrame(GameLoop); }  \/\/ \u0420\u0435\u043d\u0434\u0435\u0440 \u0441\u0446\u0435\u043d\u044b(1 \u043a\u0430\u0434\u0440\u0430) function render(){ \trenderer.render(scene, camera); }  \/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u0433\u0440\u044b window.addEventListener(&quot;resize&quot;, function() { \tcamera.aspect = window.innerWidth \/ window.innerHeight; \tcamera.updateProjectionMatrix(); \trenderer.setSize(window.innerWidth, window.innerHeight); }); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h2>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 three.js, \u043d\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0431\u0435\u0437 \u043d\u0438\u0445 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u043e\u0432.<\/p>\n<p>  <b>settings.js<\/b><\/p>\n<pre><code class=\"javascript\">export class Settings { \tconstructor() { \t\t\/\/ \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0431\u043b\u043e\u043a\u0430 \t\tthis.blockSquare \t\t= 5; \t\t\/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0447\u0430\u043d\u043a\u0430 \t\tthis.chunkSize \t\t\t= 16; \t\tthis.chunkSquare \t\t= this.chunkSize * this.chunkSize; \t} } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u044b<\/h2>\n<p>  \u0412 \u043a\u043b\u0430\u0441\u0441\u0435 Map \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u043a\u0435\u0448 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 generation \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e \u0438 \u043c\u0435\u0448. noise.seed \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0437\u0435\u0440\u043d\u043e \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u044b. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u043d\u0434\u043e\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0440\u0442\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f. \u0412 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e X \u0438 Z \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0443\u0431\u044b. Y \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 pretlin.js. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0443\u0431 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0447\u0435\u0440\u0435\u0437 scene.add( cube );<\/p>\n<p>  <b>generationMap.js<\/b><\/p>\n<pre><code class=\"javascript\">import * as THREE from '.\/three.module.js'; import { Settings } from &quot;.\/settings.js&quot;;  export class Map {     constructor(){ \t\tthis.materialArray; \t\t \t\tthis.xoff = 0; \t\tthis.zoff = 0; \t\tthis.inc = 0.05; \t\tthis.amplitude = 30 + (Math.random() * 70);     }     generation(scene) { \t\tconst settings = new Settings();  \t\tconst loader = new THREE.TextureLoader(); \t\tconst materialArray = [ \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load(&quot;..\/texture\/dirt-side.jpg&quot;) } ), \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load('..\/texture\/dirt-side.jpg') } ), \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load('..\/texture\/dirt-top.jpg') } ), \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load('..\/texture\/dirt-bottom.jpg') } ), \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load('..\/texture\/dirt-side.jpg') } ), \t\t\tnew THREE.MeshBasicMaterial( { map: loader.load('..\/texture\/dirt-side.jpg') } ) \t\t];  \t\tthis.materialArray = materialArray;  \t\tconst geometry = new THREE.BoxGeometry( settings.blockSquare, settings.blockSquare, settings.blockSquare);  \t\tnoise.seed(Math.random()); \t\t \t\tfor(let x = 0; x &lt; settings.chunkSize; x++) { \t\t\tfor(let z = 0; z &lt; settings.chunkSize; z++) {  \t\t\t\tlet cube = new THREE.Mesh(geometry, materialArray);  \t\t\t\tthis.xoff = this.inc * x; \t\t\t\tthis.zoff = this.inc * z; \t\t\t\tlet y = Math.round(noise.perlin2(this.xoff, this.zoff) * this.amplitude \/ 5) * 5;  \t\t\t\tcube.position.set(x * settings.blockSquare, y, z * settings.blockSquare); \t\t\t\tscene.add( cube ); \t\t\t\t \t\t\t} \t\t} \t} } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u0430\u043c\u0435\u0440\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u042f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e controls \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u043c\u0435\u0440\u044b, \u0441\u0446\u0435\u043d\u044b \u0438 \u043a\u0430\u0440\u0442\u044b. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 keys \u0434\u043b\u044f \u043a\u043b\u0430\u0432\u0438\u0448 \u0438 movingSpeed \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u043c\u044b\u0448\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 3 \u043c\u0435\u0442\u043e\u0434\u0430. onClick \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430, \u0430 onRightClick \u0438 onLeftClick \u0443\u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a(\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 raycast \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435\u0442, \u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u0435\u043d\u0442. \u041b\u0435\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0441\u0445\u043e\u0436\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u043b\u043e\u043a. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0440\u0435\u0439\u043a\u0430\u0441\u0442 \u0438 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0431\u043b\u043e\u043a \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0441\u0435\u043a \u043b\u0443\u0447, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u043a\u043b\u0438\u043a. \u041c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0443\u0431\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u043b\u043e\u043a. \u0433\u0440\u0430\u0434\u0430\u0446\u0438\u044f \u0432 5 \u0435\u0434\u0438\u043d\u0438\u0446 \u0442.\u043a. \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430(\u0434\u0430 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u0437 settings).<\/p>\n<p>  \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043c\u0435\u0440\u043e\u0439?! \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 inputKeydown, inputKeyup \u0438 update. \u0412 inputKeydown \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 keys. inputKeyup \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u043a\u043d\u043e\u043f\u043e\u043a \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0436\u0430\u043b\u0438. \u0412 update \u0438\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 keys \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f moveForward \u0443 \u043a\u0430\u043c\u0435\u0440\u044b, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/p>\n<p>  <b>controls.js<\/b><\/p>\n<pre><code class=\"javascript\">import * as THREE from &quot;.\/three.module.js&quot;; import { Settings } from &quot;.\/settings.js&quot;;  export class Controls { \tconstructor(controls, scene, mapWorld){ \t\tthis.controls = controls; \t\tthis.keys = []; \t\tthis.movingSpeed = 1.5; \t\tthis.scene = scene; \t\tthis.mapWorld = mapWorld; \t} \t\/\/ \u043a\u043b\u0438\u043a \tonClick(e) { \t\te.stopPropagation(); \t\te.preventDefault();  \t\tthis.controls.lock();  \t\tif (e.button == 0) { \t\t\tthis.onLeftClick(e); \t\t} else if (e.button == 2) {\t\t\t \t\t\tthis.onRightClick(e); \t\t} \t} \tonRightClick(e){ \t\t\/\/ \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u043a\u043b\u0438\u043a\u0443  \t\tconst raycaster = new THREE.Raycaster(); \t\t \t\traycaster.setFromCamera( new THREE.Vector2(), this.controls.getObject() ); \t\tlet intersects = raycaster.intersectObjects( this.scene.children ); \t\t \t\tif (intersects.length &lt; 1) \t\t\treturn; \t\tthis.scene.remove( intersects[0].object ); \t} \tonLeftClick(e) {  \t\tconst raycaster = new THREE.Raycaster(); \t\tconst settings = new Settings();  \t\t\/\/ \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \t\tconst geometry = new THREE.BoxGeometry(settings.blockSquare, settings.blockSquare, settings.blockSquare); \t\tconst cube = new THREE.Mesh(geometry, this.mapWorld.materialArray); \t\t \t\traycaster.setFromCamera( new THREE.Vector2(), this.controls.getObject() ); \t\tconst intersects = raycaster.intersectObjects( this.scene.children ); \t\tif (intersects.length &lt; 1) \t\t\treturn; \t\tconst psn = intersects[0].object.position; \t\tswitch(intersects[0].face.materialIndex) { \t\t\tcase 0: \t\t\t\tcube.position.set(psn.x + 5, psn.y, psn.z);  \t\t\t\tbreak; \t\t\tcase 1:  \t\t\t\tcube.position.set(psn.x - 5, psn.y, psn.z);  \t\t\t\tbreak; \t\t\tcase 2: \t\t\t\tcube.position.set(psn.x, psn.y + 5, psn.z);  \t\t\t\tbreak; \t\t\tcase 3: \t\t\t\tcube.position.set(psn.x, psn.y - 5, psn.z);  \t\t\t\tbreak; \t\t\tcase 4: \t\t\t\tcube.position.set(psn.x, psn.y, psn.z + 5);  \t\t\t\tbreak; \t\t\tcase 5:  \t\t\t\tcube.position.set(psn.x, psn.y, psn.z - 5);  \t\t\t\tbreak; \t\t}  \t\tthis.scene.add(cube); \t} \t\/\/ \u043d\u0430\u0436\u0430\u043b\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \tinputKeydown(e) { \t\tthis.keys.push(e.key); \t} \t\/\/ \u043e\u0442\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \tinputKeyup(e) { \t\tlet newArr = []; \t\tfor(let i = 0; i &lt; this.keys.length; i++){ \t\t\tif(this.keys[i] != e.key){ \t\t\t\tnewArr.push(this.keys[i]); \t\t\t} \t\t} \t\tthis.keys = newArr; \t} \tupdate() { \t\t\/\/ \u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u043c\u0435\u0440\u044b \t\tif ( this.keys.includes(&quot;w&quot;) || this.keys.includes(&quot;\u0446&quot;) ) { \t\t\tthis.controls.moveForward(this.movingSpeed); \t\t} \t\tif ( this.keys.includes(&quot;a&quot;) || this.keys.includes(&quot;\u0444&quot;) ) { \t\t\tthis.controls.moveRight(-1 * this.movingSpeed); \t\t} \t\tif ( this.keys.includes(&quot;s&quot;) || this.keys.includes(&quot;\u044b&quot;) ) { \t\t\tthis.controls.moveForward(-1 * this.movingSpeed); \t\t} \t\tif ( this.keys.includes(&quot;d&quot;) || this.keys.includes(&quot;\u0432&quot;) ) { \t\t\tthis.controls.moveRight(this.movingSpeed); \t\t} \t} } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  \u041a\u0430\u043a \u0438 \u043e\u0431\u0435\u0449\u0430\u043b. \u0412\u0435\u0441\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435, \u0442\u043e \u043d\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431.<\/p>\n<p>  <a href=\"https:\/\/github.com\/josephg\/noisejs\" rel=\"nofollow\">perlin.js<\/a><br \/>  <a href=\"https:\/\/threejs.org\/\" rel=\"nofollow\">three.js<\/a><br \/>  <a href=\"https:\/\/github.com\/EpicLegend\/minecraft\" rel=\"nofollow\">GitHub<\/a><\/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\/535992\/\"> https:\/\/habr.com\/ru\/post\/535992\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<h2>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0430\u043c\u0443\u044e \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0430 \u044f \u0443\u043c\u0435\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435&#8230;<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d7\/ed\/hn\/d7edhnwj5dcjib6ozxraueymb_c.png\" alt=\"image\"><\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u0435\u043c\u043a\u0443 minecraft \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f JS \u0438 three.js.<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0441\u0442\u0435\u0439. \u042f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0435\u0442\u0438\u044f. \u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043c\u043e\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u043e\u043c\u0443 \u043b\u0435\u043d\u044c \u0447\u0438\u0442\u0430\u0442\u044c(\u0442\u0430\u043c \u0442\u043e\u0442 \u0436\u0435 \u0441\u043c\u044b\u0441\u043b, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438).   <\/p>\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-315934","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315934","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=315934"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315934\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}