{"id":426581,"date":"2024-07-18T15:00:32","date_gmt":"2024-07-18T15:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=426581"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=426581","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043d\u0430 angular \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0412\u0438\u0442\u0430\u043b\u0438\u0439 \u0414\u0443\u0434\u0435\u043d\u043a\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043e\u0442\u0434\u0435\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u041f\u0435\u0440\u0432\u043e\u0439 \u0433\u0440\u0443\u0437\u043e\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u0437\u043e\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043a\u0430\u043c\u0438 \u043f\u043e \u0436\u0435\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u0435. \u0414\u043b\u044f \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043e\u043a \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u041b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u041b\u041a\u041a). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/pgk\/articles\/567704\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.\u00a0\u00a0<\/p>\n<p>\u041d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0434\u043b\u044f\u00a0\u0444\u043e\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0443\u0437\u043e\u0440\u043e\u043c. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u00a0\u0431\u044b\u043b\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f\u00a0\u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0448\u0435\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0434\u043e\u0447\u043a\u0438. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u00a0\u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0430\u00a0\u0432\u00a0\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u044f \u043d\u0435\u00a0\u0441\u0443\u043c\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u043b\u0438\u00a0\u043d\u0430\u043c\u0451\u043a\u043e\u0432 \u043a\u0430\u043a\u00a0\u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043b\u0435\u0435 \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c p5.js \u043d\u0430\u00a0angular.<\/p>\n<p>\u0411\u0435\u0441\u0448\u043e\u0432\u043d\u044b\u0439 \u0448\u0443\u043c\u00a0\u2014 \u044d\u0442\u043e \u0432\u0438\u0434 \u0448\u0443\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u043c\u0438 \u043f\u0440\u0438\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438\u00a0\u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043a\u0430. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u043e\u043c\u0443 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0443 \u0442\u0430\u043a\u043e\u0439 \u0448\u0443\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0438 \u0444\u043e\u043d\u044b.<\/p>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 p5.js \u0438 open\u2011simplex\u2011noise<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u00a0angular \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 p5.js, \u0434\u043b\u044f\u00a0\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 P5JSInvoker.<\/p>\n<p>\u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 p5 (preload, setup, draw) \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code class=\"typescript\">export abstract class P5JSInvoker {  abstract preload(p: P5.p5InstanceExtensions): void;  abstract setup(p: P5.p5InstanceExtensions): void;  abstract draw(p: P5.p5InstanceExtensions): void;      protected startP5JS(containerElement:HTMLElement):P5.p5InstanceExtensions {    return new P5(this.generate_sketch(), containerElement);  }    private generate_sketch(): any {    const that = this;      return ((p: P5) => {      p.preload = (): void => {        that.preload(p);      };        p.setup = (): void => {        that.setup(p);      };        p.draw = (): void => {        that.draw(p);      };    });  } } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u044e \u043a\u0430\u043d\u0432\u0430\u0441 \u0438 \u043a\u043b\u0430\u0441\u0441 NoiseGenerator. Dimensions \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0441\u0435\u0433\u043e \u043a\u0430\u043d\u0432\u0430\u0441\u0430, \u0430 x1,x2, y1, y2 \u044d\u0442\u043e \u0441\u043a\u0435\u0439\u043b\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443 \u043c\u0435\u043d\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 0, 10, 0, 10  <\/p>\n<pre><code class=\"typescript\">public setup(p5: p5InstanceExtensions): void {  this.p5.noSmooth();  this.p5.createCanvas(    this.dimensions.x,    this.dimensions.y,  );  this.generator = new NoiseGenerator();  this.generator.createNoise(this.dimensions.y, this.dimensions.x, this.x1, this.x2, this.y1, this.y2)    this.p5.noLoop();  this.container.nativeElement.onclick = () => this.p5.save(); } <\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435  <\/p>\n<pre><code class=\"typescript\">import {P5InstanceService} from \"..\/services\/p5-instance.service\"; import {SPACING} from \"..\/constants\/constants\"; import {Particle} from \".\/particle\"; import {makeNoise4D} from \"open-simplex-noise\"; import {Vector} from \"p5\";   export class NoiseGenerator {  private p5 = P5InstanceService.p5Instance;  private particles: Particle[][] = [];  private rows = 0;  private cols = 0;    public createNoise(    height: number,    width: number,    x1: number,    x2: number,    y1: number,    y2: number,  ): void {    this.p5.noiseSeed(20)    this.p5.strokeWeight(1);      this.rows = Math.floor(height \/ SPACING)    this.cols = Math.floor(width \/ SPACING)      this.seamlessNoise2D(this.cols, this.rows, x1, x2, y1, y2)  }    public seamlessNoise2D(bufferWidth: number,                         bufferHeight: number,                         x1: number,                         x2: number,                         y1: number,                         y2: number) {    const noise = makeNoise4D(10);      for (let x = 0; x &lt; bufferWidth; x++) {      this.particles[x] = [];        for (let y = 0; y &lt; bufferHeight; y++) {        const s = x \/ bufferWidth;        const t = y \/ bufferHeight;        const dx = x2 - x1;        const dy = y2 - y1;          const nx = x1 + Math.cos(s * 2 * Math.PI) * dx \/ (2 * Math.PI);        const ny = y1 + Math.cos(t * 2 * Math.PI) * dy \/ (2 * Math.PI);        const nz = x1 + Math.sin(s * 2 * Math.PI) * dx \/ (2 * Math.PI);        const nw = y1 + Math.sin(t * 2 * Math.PI) * dy \/ (2 * Math.PI);          this.particles[x][y] = new Particle(          new Vector(x * SPACING, y * SPACING),          this.p5.map(noise(nx, ny, nz, nw), -0.5, 0.5, 0, 255)        );      }    }  }    public showParticles(): void {    this.particles.forEach(p => p.forEach(p => p.show()))  } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0447\u0430\u0441\u0442\u0438\u0446 particles, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<\/p>\n<p>SPACING \u043d\u0443\u0436\u0435\u043d \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u0438\u0446\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c, \u0442\u043e \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 1.<\/p>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 makeNoise4D() \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f seed \u0448\u0443\u043c\u0430, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 Particle \u043c\u044b \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u0446\u0432\u0435\u0442. \u0426\u0432\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 p5.map, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0448\u0443\u043c\u0430 \u043e\u0442 -0.5 \u0434\u043e 0.5 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0446\u0432\u0435\u0442\u0430 \u043e\u0442 0 \u0434\u043e 255. \u041e\u0431\u044b\u0447\u043d\u043e \u0448\u0443\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 1, \u043e\u0434\u043d\u0430\u043a\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u0434\u0430\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 -0.5 \u0434\u043e 0.5. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u0447\u0451\u0440\u043d\u044b\u043c\u0438 \u0438 \u0431\u0435\u043b\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 show \u0443 \u0447\u0430\u0441\u0442\u0438\u0446\u044b.<\/p>\n<pre><code class=\"typescript\">export class Particle {    constructor(public position: Vector, public color: number) {  }    public show(): void {    this.p5.fill(this.color);    this.p5.noStroke()    this.p5.square(this.position.x, this.position.y, SPACING);  } } <\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/505\/d31\/d56\/505d31d566378344584fefd95894e947.jpg\" width=\"1600\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/505\/d31\/d56\/505d31d566378344584fefd95894e947.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0440\u0430\u0437, \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u043d\u043e \u0448\u0432\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0442\u0430\u0439\u043b\u044b.  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/f9a\/68c\/728\/f9a68c728453d735ee55a9c36f54e7e4.jpg\" width=\"401\" height=\"401\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9a\/68c\/728\/f9a68c728453d735ee55a9c36f54e7e4.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0448\u0443\u043c\u0430\u00a0\u2014 \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043e\u0431\u043b\u0430\u043a\u043e\u0432 \u0438\u043b\u0438 \u0432\u043e\u0434\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ee8\/463\/4c4\/ee84634c429a3be627c96c1da3369628.jpg\" width=\"1600\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ee8\/463\/4c4\/ee84634c429a3be627c96c1da3369628.jpg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/0ba\/26c\/204\/0ba26c2049e23569a87c29d2a32234e6.jpg\" width=\"799\" height=\"797\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ba\/26c\/204\/0ba26c2049e23569a87c29d2a32234e6.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u043e\u0434\u043d\u044f\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 spacing \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432 \u0441\u043a\u0435\u0439\u043b \u0448\u0443\u043c\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044c-\u0430\u0440\u0442\u0430.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0443\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043a\u0440\u0430\u043f\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0440\u0443\u0434\u044b \u0438\u043b\u0438 \u0442\u0440\u0430\u0432\u044b.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e28\/b45\/1aa\/e28b451aad1cb4c5f1e984308868fc90.jpg\" width=\"320\" height=\"319\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e28\/b45\/1aa\/e28b451aad1cb4c5f1e984308868fc90.jpg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d47\/423\/4bf\/d474234bf83fb6fec56a03f79317c65e.jpg\" width=\"320\" height=\"320\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d47\/423\/4bf\/d474234bf83fb6fec56a03f79317c65e.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0448\u0443\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0438\u0434\u0435 \u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 Particle, \u0430 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0435\u0439 FILL_AMOUNT \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"typescript\">  public show(): void {    if (this.noise2 > FILL_AMOUNT) {    const fill = this.p5.map(this.noise2, -0.5, 0.5, 10, 30, false)    this.p5.fill(70, 50, fill);  } else {    const fill = this.p5.map(this.noise, -0.5, 0.5, 25, 50, false)    this.p5.fill(30, 50, fill);  }    this.p5.noStroke()  this.p5.square(this.position.x, this.position.y, SPACING); }   <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0448\u0443\u043c\u0430 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f.  <\/p>\n<pre><code class=\"typescript\">const angle = noise * this.p5.TWO_PI * 4<\/code><\/pre>\n<pre><code class=\"typescript\">const vector = Vector.fromAngle(angle).normalize();<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0448\u0443\u043c\u0430 \u043f\u043e \u0432\u0441\u0435\u043c \u0447\u0435\u0442\u044b\u0440\u0451\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0442.\u043a. \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u044b.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/782\/297\/3e6\/7822973e6e26c2b8d52c77fec404bc21.jpg\" width=\"1600\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/782\/297\/3e6\/7822973e6e26c2b8d52c77fec404bc21.jpg\" data-blurred=\"true\"\/><\/figure>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0438 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043e\u043d\u00a0 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u043a\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/pgkdigital.ru\/\">\u0442\u0443\u0442<\/a>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0437\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/829678\/\"> https:\/\/habr.com\/ru\/articles\/829678\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0412\u0438\u0442\u0430\u043b\u0438\u0439 \u0414\u0443\u0434\u0435\u043d\u043a\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043e\u0442\u0434\u0435\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u041f\u0435\u0440\u0432\u043e\u0439 \u0433\u0440\u0443\u0437\u043e\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u0437\u043e\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043a\u0430\u043c\u0438 \u043f\u043e \u0436\u0435\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u0435. \u0414\u043b\u044f \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043e\u043a \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u041b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u041b\u041a\u041a). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0435\u043c \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/pgk\/articles\/567704\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.\u00a0\u00a0<\/p>\n<p>\u041d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0434\u043b\u044f\u00a0\u0444\u043e\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0443\u0437\u043e\u0440\u043e\u043c. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u00a0\u0431\u044b\u043b\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f\u00a0\u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0448\u0435\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0434\u043e\u0447\u043a\u0438. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u00a0\u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0430\u00a0\u0432\u00a0\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u044f \u043d\u0435\u00a0\u0441\u0443\u043c\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u043b\u0438\u00a0\u043d\u0430\u043c\u0451\u043a\u043e\u0432 \u043a\u0430\u043a\u00a0\u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043b\u0435\u0435 \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c p5.js \u043d\u0430\u00a0angular.<\/p>\n<p>\u0411\u0435\u0441\u0448\u043e\u0432\u043d\u044b\u0439 \u0448\u0443\u043c\u00a0\u2014 \u044d\u0442\u043e \u0432\u0438\u0434 \u0448\u0443\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u043c\u0438 \u043f\u0440\u0438\u00a0\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438\u00a0\u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043a\u0430. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u043e\u043c\u0443 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0443 \u0442\u0430\u043a\u043e\u0439 \u0448\u0443\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0438 \u0444\u043e\u043d\u044b.<\/p>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 p5.js \u0438 open\u2011simplex\u2011noise<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u00a0angular \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 p5.js, \u0434\u043b\u044f\u00a0\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 P5JSInvoker.<\/p>\n<p>\u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043b\u0431\u044d\u043a\u0438 p5 (preload, setup, draw) \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code class=\"typescript\">export abstract class P5JSInvoker {  abstract preload(p: P5.p5InstanceExtensions): void;  abstract setup(p: P5.p5InstanceExtensions): void;  abstract draw(p: P5.p5InstanceExtensions): void;      protected startP5JS(containerElement:HTMLElement):P5.p5InstanceExtensions {    return new P5(this.generate_sketch(), containerElement);  }    private generate_sketch(): any {    const that = this;      return ((p: P5) => {      p.preload = (): void => {        that.preload(p);      };        p.setup = (): void => {        that.setup(p);      };        p.draw = (): void => {        that.draw(p);      };    });  } } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u044e \u043a\u0430\u043d\u0432\u0430\u0441 \u0438 \u043a\u043b\u0430\u0441\u0441 NoiseGenerator. Dimensions \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0441\u0435\u0433\u043e \u043a\u0430\u043d\u0432\u0430\u0441\u0430, \u0430 x1,x2, y1, y2 \u044d\u0442\u043e \u0441\u043a\u0435\u0439\u043b\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443 \u043c\u0435\u043d\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 0, 10, 0, 10  <\/p>\n<pre><code class=\"typescript\">public setup(p5: p5InstanceExtensions): void {  this.p5.noSmooth();  this.p5.createCanvas(    this.dimensions.x,    this.dimensions.y,  );  this.generator = new NoiseGenerator();  this.generator.createNoise(this.dimensions.y, this.dimensions.x, this.x1, this.x2, this.y1, this.y2)    this.p5.noLoop();  this.container.nativeElement.onclick = () => this.p5.save(); } <\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435  <\/p>\n<pre><code class=\"typescript\">import {P5InstanceService} from \"..\/services\/p5-instance.service\"; import {SPACING} from \"..\/constants\/constants\"; import {Particle} from \".\/particle\"; import {makeNoise4D} from \"open-simplex-noise\"; import {Vector} from \"p5\";   export class NoiseGenerator {  private p5 = P5InstanceService.p5Instance;  private particles: Particle[][] = [];  private rows = 0;  private cols = 0;    public createNoise(    height: number,    width: number,    x1: number,    x2: number,    y1: number,    y2: number,  ): void {    this.p5.noiseSeed(20)    this.p5.strokeWeight(1);      this.rows = Math.floor(height \/ SPACING)    this.cols = Math.floor(width \/ SPACING)      this.seamlessNoise2D(this.cols, this.rows, x1, x2, y1, y2)  }    public seamlessNoise2D(bufferWidth: number,                         bufferHeight: number,                         x1: number,                         x2: number,                         y1: number,                         y2: number) {    const noise = makeNoise4D(10);      for (let x = 0; x &lt; bufferWidth; x++) {      this.particles[x] = [];        for (let y = 0; y &lt; bufferHeight; y++) {        const s = x \/ bufferWidth;        const t = y \/ bufferHeight;        const dx = x2 - x1;        const dy = y2 - y1;          const nx = x1 + Math.cos(s * 2 * Math.PI) * dx \/ (2 * Math.PI);        const ny = y1 + Math.cos(t * 2 * Math.PI) * dy \/ (2 * Math.PI);        const nz = x1 + Math.sin(s * 2 * Math.PI) * dx \/ (2 * Math.PI);        const nw = y1 + Math.sin(t * 2 * Math.PI) * dy \/ (2 * Math.PI);          this.particles[x][y] = new Particle(          new Vector(x * SPACING, y * SPACING),          this.p5.map(noise(nx, ny, nz, nw), -0.5, 0.5, 0, 255)        );      }    }  }    public showParticles(): void {    this.particles.forEach(p => p.forEach(p => p.show()))  } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0447\u0430\u0441\u0442\u0438\u0446 particles, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<\/p>\n<p>SPACING \u043d\u0443\u0436\u0435\u043d \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u0438\u0446\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c, \u0442\u043e \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 1.<\/p>\n<p>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 makeNoise4D() \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f seed \u0448\u0443\u043c\u0430, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u0432\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 Particle \u043c\u044b \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u0446\u0432\u0435\u0442. \u0426\u0432\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 p5.map, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0448\u0443\u043c\u0430 \u043e\u0442 -0.5 \u0434\u043e 0.5 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0446\u0432\u0435\u0442\u0430 \u043e\u0442 0 \u0434\u043e 255. \u041e\u0431\u044b\u0447\u043d\u043e \u0448\u0443\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 1, \u043e\u0434\u043d\u0430\u043a\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u0434\u0430\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 -0.5 \u0434\u043e 0.5. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u0447\u0451\u0440\u043d\u044b\u043c\u0438 \u0438 \u0431\u0435\u043b\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 show \u0443 \u0447\u0430\u0441\u0442\u0438\u0446\u044b.<\/p>\n<pre><code class=\"typescript\">export class Particle {    constructor(public position: Vector, public color: number) {  }    public show(): void {    this.p5.fill(this.color);    this.p5.noStroke()    this.p5.square(this.position.x, this.position.y, SPACING);  } } <\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0440\u0430\u0437, \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u043d\u043e \u0448\u0432\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0442\u0430\u0439\u043b\u044b.  <\/p>\n<figure class=\"\"><\/figure>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0448\u0443\u043c\u0430\u00a0\u2014 \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043e\u0431\u043b\u0430\u043a\u043e\u0432 \u0438\u043b\u0438 \u0432\u043e\u0434\u044b:<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0434\u043d\u044f\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 spacing \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432 \u0441\u043a\u0435\u0439\u043b \u0448\u0443\u043c\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043f\u0438\u043a\u0441\u0435\u043b\u044c-\u0430\u0440\u0442\u0430.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0443\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043a\u0440\u0430\u043f\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0440\u0443\u0434\u044b \u0438\u043b\u0438 \u0442\u0440\u0430\u0432\u044b.<\/p>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0448\u0443\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0438\u0434\u0435 \u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 Particle, \u0430 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0435\u0439 FILL_AMOUNT \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"typescript\">  public show(): void {    if (this.noise2 > FILL_AMOUNT) {    const fill = this.p5.map(this.noise2, -0.5, 0.5, 10, 30, false)    this.p5.fill(70, 50, fill);  } else {    const fill = this.p5.map(this.noise, -0.5, 0.5, 25, 50, false)    this.p5.fill(30, 50, fill);  }    this.p5.noStroke()  this.p5.square(this.position.x, this.position.y, SPACING); }   <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0448\u0443\u043c\u0430 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f.  <\/p>\n<pre><code class=\"typescript\">const angle = noise * this.p5.TWO_PI * 4<\/code><\/pre>\n<pre><code class=\"typescript\">const vector = Vector.fromAngle(angle).normalize();<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0448\u0443\u043c\u0430 \u043f\u043e \u0432\u0441\u0435\u043c \u0447\u0435\u0442\u044b\u0440\u0451\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0442.\u043a. \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u044b.  <\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0438 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043e\u043d\u00a0 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u043a\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/pgkdigital.ru\/\">\u0442\u0443\u0442<\/a>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0437\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/829678\/\"> https:\/\/habr.com\/ru\/articles\/829678\/<\/a><br \/><\/br><\/br><\/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-426581","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426581","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=426581"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426581\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}