{"id":394303,"date":"2024-06-29T11:32:00","date_gmt":"2024-06-29T11:32:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394303"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394303","title":{"rendered":"<span>Skia \u2014 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f 2D \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u043b\u044f React Native<\/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\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Flutter \u043d\u0435 \u043f\u043e\u043d\u0430\u0441\u043b\u044b\u0448\u043a\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a <a href=\"https:\/\/skia.org\/\" rel=\"noopener noreferrer nofollow\">Skia<\/a>. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 Flutter. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043b\u044e\u0431\u044b\u0435 2D \u0441\u0446\u0435\u043d\u044b \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438 \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 Shopify \u0438 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 <a href=\"https:\/\/shopify.github.io\/react-native-skia\/\" rel=\"noopener noreferrer nofollow\">React Native Skia <\/a>&#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Skia \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435 React Native.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 Skia \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Shopify\/react-native-skia\/tree\/main\/example\" rel=\"noopener noreferrer nofollow\">example<\/a> \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1fa\/47e\/51c\/1fa47e51cde3dcf4c904eadb19fc1839.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e React Native Skia\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e React Native Skia\" width=\"1000\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1fa\/47e\/51c\/1fa47e51cde3dcf4c904eadb19fc1839.png\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e React Native Skia<\/figcaption><\/figure>\n<h2>\u0413\u0440\u0430\u0444\u0438\u043a\u0430<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<pre><code class=\"javascript\">import React from 'react'; import { Group, Rect, RoundedRect, DiffRect, Canvas, rrect } from '@shopify\/react-native-skia'; import { StatusBar, useWindowDimensions } from 'react-native';  const PADDING = 16;  export const Declarative = () => {   const { width } = useWindowDimensions();   const SIZE = width \/ 4;   const style = useMemo(() => ({ width, height: SIZE + 32 }), [SIZE, width]);   const outer = useMemo(     () => rrect(rect(2 * SIZE + 3 * 16, PADDING, SIZE, SIZE), 25, 25),     [SIZE]   );   const inner = useMemo(     () =>       rrect(         rect(2 * SIZE + 4 * PADDING, 2 * PADDING, SIZE - 32, SIZE - 32),         0,         0       ),     [SIZE]   );   return (     &lt;>       &lt;Canvas style={style}>         &lt;Group color=\"#61DAFB\">           &lt;Rect rect={{ x: PADDING, y: PADDING, width: 100, height: 100 }} \/>           &lt;RoundedRect             x={SIZE + 2 * PADDING}             y={PADDING}             width={SIZE}             height={SIZE}             r={25}           \/>           &lt;DiffRect outer={outer} inner={inner} \/>         &lt;\/Group>       &lt;\/Canvas>     &lt;\/>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0f3\/85a\/192\/0f385a192893dbcc887c170ed31686e4.png\" width=\"230\" height=\"450\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f3\/85a\/192\/0f385a192893dbcc887c170ed31686e4.png\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>Canvas<\/strong> &#8212; \u044d\u0442\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Skia. \u041a Canvas \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438 \u043a\u0430\u043a \u0438 \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 View \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 style. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Canvas \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f touch \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e onTouch.<\/p>\n<pre><code class=\"javascript\">const MyComponent = () => {   const cx = useValue(100);   const cy = useValue(100);     const touchHandler = useTouchHandler({     onActive: ({ x, y }) => {       cx.current = x;       cy.current = y;     },   });     return (     &lt;Canvas onTouch={touchHandler}>       &lt;Circle cx={cx} cy={cy} r={10} color=\"red\" \/>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <strong>React<\/strong>, <strong>RoundedRect<\/strong>, <strong>Circle<\/strong>, <strong>DiffRect<\/strong>, <strong>Line<\/strong>, <strong>Point<\/strong> \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0438\u0433\u0443\u0440. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430  \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Skia \u0442\u0430\u043a\u0438\u0435, \u043a\u0430\u043a color, blendMode, style \u0438 \u0442.\u0434. \u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 Group \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c.<\/p>\n<pre><code class=\"javascript\">export const PaintDemo = () => {   const r = 128;   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Circle cx={r} cy={r} r={r} color=\"#51AFED\" \/>       &lt;Group color=\"lightblue\" style=\"stroke\" strokeWidth={10}>         &lt;Circle cx={r} cy={r} r={r \/ 2} \/>         &lt;Circle cx={r} cy={r} r={r \/ 3} color=\"white\" \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/756\/dd8\/ca6\/756dd8ca64764a745c15718e783f4d3e.png\" width=\"256\" height=\"256\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/756\/dd8\/ca6\/756dd8ca64764a745c15718e783f4d3e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0442\u0435\u043c\u0443 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f &#8212; \u043a\u043e \u0432\u0441\u0435\u043c \u0444\u0438\u0433\u0443\u0440\u0430\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0430\u0441\u043a\u0438, \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 BlurMask<\/p>\n<pre><code class=\"javascript\">const MaskFilterDemo = () => {   return (     &lt;Canvas style={{ flex: 1}}>       &lt;Circle c={vec(128)} r={128} color=\"lightblue\">         &lt;BlurMask blur={20} style=\"normal\" \/>       &lt;\/Circle>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3db\/b7d\/482\/3dbb7d482127092254cc302c745646c6.png\" width=\"256\" height=\"256\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3db\/b7d\/482\/3dbb7d482127092254cc302c745646c6.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"javascript\">const SimpleTransform = () => {   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Fill color=\"#e8f4f8\" \/>       &lt;Group         color=\"lightblue\"         origin={{ x: 128, y: 128 }}         transform={[{ skewX: Math.PI \/ 6 }]}       >         &lt;RoundedRect x={64} y={64} width={128} height={128} r={10} \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9db\/9e3\/e0a\/9db9e3e0add65df6f0e72c8508f0b8dc.png\" width=\"256\" height=\"256\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9db\/9e3\/e0a\/9db9e3e0add65df6f0e72c8508f0b8dc.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f Skia \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 SVG. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b.<\/p>\n<pre><code class=\"javascript\">const Clip = () => {   const image = useImage(require(\".\/assets\/oslo.jpg\"));   const star = Skia.Path.MakeFromSVGString(     \"M 128 0 L 168 80 L 256 93 L 192 155 L 207 244 L 128 202 L 49 244 L 64 155 L 0 93 L 88 80 L 128 0 Z\"   )!;   if (!image) {     return null;   }   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Group clip={star}>         &lt;Image           image={image}           x={0}           y={0}           width={256}           height={256}           fit=\"cover\"         \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/57b\/551\/bb0\/57b551bb0475ea5e5fa2e6677480c537.png\" width=\"250\" height=\"250\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/57b\/551\/bb0\/57b551bb0475ea5e5fa2e6677480c537.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0448\u0435\u0439\u0434\u043e\u0440\u0432. \u0412 Skia \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u0432\u043e\u0439 <a href=\"https:\/\/skia.org\/docs\/user\/sksl\/\" rel=\"noopener noreferrer nofollow\">\u044f\u0437\u044b\u043a<\/a> \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 GLSL. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">import {Skia, Canvas, Shader, Fill} from \"@shopify\/react-native-skia\";   const source = Skia.RuntimeEffect.Make(` vec4 main(vec2 pos) {   \/\/ normalized x,y values go from 0 to 1, the canvas is 256x256   vec2 normalized = pos\/vec2(256);   return vec4(normalized.x, normalized.y, 0.5, 1); }`)!;   const SimpleShader = () => {   return (     &lt;Canvas style={{ width: 256, height: 256 }}>       &lt;Fill>         &lt;Shader source={source} \/>       &lt;\/Fill>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fa4\/e30\/5ae\/fa4e305ae7f792957c59f34f26940897.png\" width=\"256\" height=\"256\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fa4\/e30\/5ae\/fa4e305ae7f792957c59f34f26940897.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 Skia Values. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Value \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u043d\u0430 Canvas \u0438 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u043d. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b.<\/p>\n<pre><code class=\"javascript\">const MyComponent = () => {   const position = useValue(0);   const updateValue = useCallback(     () => (position.current = position.current + 10),     [position]   );     return (     &lt;>       &lt;Canvas style={{ flex: 1 }}>         &lt;Rect x={position} y={100} width={10} height={10} color={\"red\"} \/>       &lt;\/Canvas>       &lt;Button title=\"Move it\" onPress={updateValue} \/>     &lt;\/>   ); };<\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0445\u0443\u043a\u0430 <strong>useComputedValue <\/strong>\u043c\u043e\u0436\u043d\u043e<strong> <\/strong>\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 values, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>useValueEffect<\/strong> \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f values. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e Selector \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 value \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 Canvas. <\/p>\n<pre><code class=\"javascript\">const Heights = new Array(10).fill(0).map((_, i) => i * 0.1);   export const Demo = () => {   const loop = useLoop();   const heights = useComputedValue(     () => Heights.map((_, i) => loop.current * i * 10),     [loop]   );     return (     &lt;Canvas style={{ flex: 1, marginTop: 50 }}>       {Heights.map((_, i) => (         &lt;Rect           key={i}           x={i * 20}           y={0}           width={16}           height={Selector(heights, (v) => v[i])}           color=\"red\"         \/>       ))}     &lt;\/Canvas>   ); };<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 values \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0445\u0443\u043a\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <strong>useTiming<\/strong>, <strong>useLoop<\/strong>, <strong>useSpring<\/strong> \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>interpolate<\/strong>, <strong>interpolatePaths<\/strong>, <strong>interpolateColors<\/strong>, <strong>runDecay<\/strong> \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0443\u043a\u043e\u0432<\/p>\n<pre><code class=\"javascript\">export const AnimationExample = () => {   const [toggled, setToggled] = useState(false);   const position = useSpring(toggled ? 100 : 0);   return (     &lt;>       &lt;Canvas style={{ flex: 1 }}>         &lt;Rect x={position} y={100} width={10} height={10} color={\"red\"} \/>       &lt;\/Canvas>       &lt;Button title=\"Toggle\" onPress={() => setToggled((p) => !p)} \/>     &lt;\/>   ); };<\/code><\/pre>\n<h2>Skia API<\/h2>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a API Skia \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 React Native \u043f\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c (JSI). \u042d\u0442\u043e API \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 100% \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e \u0441 Flutter API. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"javascript\">import {Skia, SkiaView, useDrawCallback} from \"@shopify\/react-native-skia\";   export const HelloWorld = () => {   const r = 128;   const onDraw = useDrawCallback((canvas) => {     const paint = Skia.Paint();     paint.setAntiAlias(true);     cyan.setColor(Skia.Color(\"cyan\"));     canvas.drawCircle(r, r, r, paint);   });   return (     &lt;SkiaView style={{ flex: 1 }} onDraw={onDraw} \/>   ); };<\/code><\/pre>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Skia \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 JSI \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418\u0437 \u043f\u043b\u044e\u0441\u043e\u0432 \u043e\u0442\u043c\u0435\u0447\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442 Shopify, \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f. <\/p>\n<p>\u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u043d\u0435\u043f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 API Skia \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 Alpha \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, API \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a \u0432\u0435\u0440\u0441\u0438\u0438, \u0430 \u0447\u0430\u0441\u0442\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0431\u0430\u0433\u0438 \u0438 \u043b\u043e\u043c\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 React Native Skia \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/shopify.github.io\/react-native-skia\/\" rel=\"noopener noreferrer nofollow\">https:\/\/shopify.github.io\/react-native-skia\/<\/a> \u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 <a href=\"https:\/\/www.youtube.com\/c\/wcandillon\" rel=\"noopener noreferrer nofollow\">William Candillon<\/a><\/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\/685524\/\"> https:\/\/habr.com\/ru\/articles\/685524\/<\/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\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Flutter \u043d\u0435 \u043f\u043e\u043d\u0430\u0441\u043b\u044b\u0448\u043a\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a <a href=\"https:\/\/skia.org\/\" rel=\"noopener noreferrer nofollow\">Skia<\/a>. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0438\u0436\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 Flutter. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043b\u044e\u0431\u044b\u0435 2D \u0441\u0446\u0435\u043d\u044b \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438 \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 Shopify \u0438 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 <a href=\"https:\/\/shopify.github.io\/react-native-skia\/\" rel=\"noopener noreferrer nofollow\">React Native Skia <\/a>&#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Skia \u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435 React Native.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 Skia \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Shopify\/react-native-skia\/tree\/main\/example\" rel=\"noopener noreferrer nofollow\">example<\/a> \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e React Native Skia<\/figcaption><\/figure>\n<h2>\u0413\u0440\u0430\u0444\u0438\u043a\u0430<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<pre><code class=\"javascript\">import React from 'react'; import { Group, Rect, RoundedRect, DiffRect, Canvas, rrect } from '@shopify\/react-native-skia'; import { StatusBar, useWindowDimensions } from 'react-native';  const PADDING = 16;  export const Declarative = () => {   const { width } = useWindowDimensions();   const SIZE = width \/ 4;   const style = useMemo(() => ({ width, height: SIZE + 32 }), [SIZE, width]);   const outer = useMemo(     () => rrect(rect(2 * SIZE + 3 * 16, PADDING, SIZE, SIZE), 25, 25),     [SIZE]   );   const inner = useMemo(     () =>       rrect(         rect(2 * SIZE + 4 * PADDING, 2 * PADDING, SIZE - 32, SIZE - 32),         0,         0       ),     [SIZE]   );   return (     &lt;>       &lt;Canvas style={style}>         &lt;Group color=\"#61DAFB\">           &lt;Rect rect={{ x: PADDING, y: PADDING, width: 100, height: 100 }} \/>           &lt;RoundedRect             x={SIZE + 2 * PADDING}             y={PADDING}             width={SIZE}             height={SIZE}             r={25}           \/>           &lt;DiffRect outer={outer} inner={inner} \/>         &lt;\/Group>       &lt;\/Canvas>     &lt;\/>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p><strong>Canvas<\/strong> &#8212; \u044d\u0442\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Skia. \u041a Canvas \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438 \u043a\u0430\u043a \u0438 \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 View \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 style. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Canvas \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f touch \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e onTouch.<\/p>\n<pre><code class=\"javascript\">const MyComponent = () => {   const cx = useValue(100);   const cy = useValue(100);     const touchHandler = useTouchHandler({     onActive: ({ x, y }) => {       cx.current = x;       cy.current = y;     },   });     return (     &lt;Canvas onTouch={touchHandler}>       &lt;Circle cx={cx} cy={cy} r={10} color=\"red\" \/>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <strong>React<\/strong>, <strong>RoundedRect<\/strong>, <strong>Circle<\/strong>, <strong>DiffRect<\/strong>, <strong>Line<\/strong>, <strong>Point<\/strong> \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0438\u0433\u0443\u0440. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430  \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Skia \u0442\u0430\u043a\u0438\u0435, \u043a\u0430\u043a color, blendMode, style \u0438 \u0442.\u0434. \u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 Group \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c.<\/p>\n<pre><code class=\"javascript\">export const PaintDemo = () => {   const r = 128;   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Circle cx={r} cy={r} r={r} color=\"#51AFED\" \/>       &lt;Group color=\"lightblue\" style=\"stroke\" strokeWidth={10}>         &lt;Circle cx={r} cy={r} r={r \/ 2} \/>         &lt;Circle cx={r} cy={r} r={r \/ 3} color=\"white\" \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0442\u0435\u043c\u0443 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f &#8212; \u043a\u043e \u0432\u0441\u0435\u043c \u0444\u0438\u0433\u0443\u0440\u0430\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0430\u0441\u043a\u0438, \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 BlurMask<\/p>\n<pre><code class=\"javascript\">const MaskFilterDemo = () => {   return (     &lt;Canvas style={{ flex: 1}}>       &lt;Circle c={vec(128)} r={128} color=\"lightblue\">         &lt;BlurMask blur={20} style=\"normal\" \/>       &lt;\/Circle>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"javascript\">const SimpleTransform = () => {   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Fill color=\"#e8f4f8\" \/>       &lt;Group         color=\"lightblue\"         origin={{ x: 128, y: 128 }}         transform={[{ skewX: Math.PI \/ 6 }]}       >         &lt;RoundedRect x={64} y={64} width={128} height={128} r={10} \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f Skia \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 SVG. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b.<\/p>\n<pre><code class=\"javascript\">const Clip = () => {   const image = useImage(require(\".\/assets\/oslo.jpg\"));   const star = Skia.Path.MakeFromSVGString(     \"M 128 0 L 168 80 L 256 93 L 192 155 L 207 244 L 128 202 L 49 244 L 64 155 L 0 93 L 88 80 L 128 0 Z\"   )!;   if (!image) {     return null;   }   return (     &lt;Canvas style={{ flex: 1 }}>       &lt;Group clip={star}>         &lt;Image           image={image}           x={0}           y={0}           width={256}           height={256}           fit=\"cover\"         \/>       &lt;\/Group>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0448\u0435\u0439\u0434\u043e\u0440\u0432. \u0412 Skia \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u0432\u043e\u0439 <a href=\"https:\/\/skia.org\/docs\/user\/sksl\/\" rel=\"noopener noreferrer nofollow\">\u044f\u0437\u044b\u043a<\/a> \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 GLSL. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">import {Skia, Canvas, Shader, Fill} from \"@shopify\/react-native-skia\";   const source = Skia.RuntimeEffect.Make(` vec4 main(vec2 pos) {   \/\/ normalized x,y values go from 0 to 1, the canvas is 256x256   vec2 normalized = pos\/vec2(256);   return vec4(normalized.x, normalized.y, 0.5, 1); }`)!;   const SimpleShader = () => {   return (     &lt;Canvas style={{ width: 256, height: 256 }}>       &lt;Fill>         &lt;Shader source={source} \/>       &lt;\/Fill>     &lt;\/Canvas>   ); };<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 Skia Values. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Value \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u043d\u0430 Canvas \u0438 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u043d. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b.<\/p>\n<pre><code class=\"javascript\">const MyComponent = () => {   const position = useValue(0);   const updateValue = useCallback(     () => (position.current = position.current + 10),     [position]   );     return (     &lt;>       &lt;Canvas style={{ flex: 1 }}>         &lt;Rect x={position} y={100} width={10} height={10} color={\"red\"} \/>       &lt;\/Canvas>       &lt;Button title=\"Move it\" onPress={updateValue} \/>     &lt;\/>   ); };<\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0445\u0443\u043a\u0430 <strong>useComputedValue <\/strong>\u043c\u043e\u0436\u043d\u043e<strong> <\/strong>\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 values, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>useValueEffect<\/strong> \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f values. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e Selector \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0432\u0445\u043e\u0434 value \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 Canvas. <\/p>\n<pre><code class=\"javascript\">const Heights = new Array(10).fill(0).map((_, i) => i * 0.1);   export const Demo = () => {   const loop = useLoop();   const heights = useComputedValue(     () => Heights.map((_, i) => loop.current * i * 10),     [loop]   );     return (     &lt;Canvas style={{ flex: 1, marginTop: 50 }}>       {Heights.map((_, i) => (         &lt;Rect           key={i}           x={i * 20}           y={0}           width={16}           height={Selector(heights, (v) => v[i])}           color=\"red\"         \/>       ))}     &lt;\/Canvas>   ); };<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 values \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0445\u0443\u043a\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <strong>useTiming<\/strong>, <strong>useLoop<\/strong>, <strong>useSpring<\/strong> \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>interpolate<\/strong>, <strong>interpolatePaths<\/strong>, <strong>interpolateColors<\/strong>, <strong>runDecay<\/strong> \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0443\u043a\u043e\u0432<\/p>\n<pre><code class=\"javascript\">export const AnimationExample = () => {   const [toggled, setToggled] = useState(false);   const position = useSpring(toggled ? 100 : 0);   return (     &lt;>       &lt;Canvas style={{ flex: 1 }}>         &lt;Rect x={position} y={100} width={10} height={10} color={\"red\"} \/>       &lt;\/Canvas>       &lt;Button title=\"Toggle\" onPress={() => setToggled((p) => !p)} \/>     &lt;\/>   ); };<\/code><\/pre>\n<h2>Skia API<\/h2>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a API Skia \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 React Native \u043f\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c (JSI). \u042d\u0442\u043e API \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 100% \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e \u0441 Flutter API. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"javascript\">import {Skia, SkiaView, useDrawCallback} from \"@shopify\/react-native-skia\";   export const HelloWorld = () => {   const r = 128;   const onDraw = useDrawCallback((canvas) => {     const paint = Skia.Paint();     paint.setAntiAlias(true);     cyan.setColor(Skia.Color(\"cyan\"));     canvas.drawCircle(r, r, r, paint);   });   return (     &lt;SkiaView style={{ flex: 1 }} onDraw={onDraw} \/>   ); };<\/code><\/pre>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Skia \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 JSI \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418\u0437 \u043f\u043b\u044e\u0441\u043e\u0432 \u043e\u0442\u043c\u0435\u0447\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442 Shopify, \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u0440\u043e\u0448\u0435\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f. <\/p>\n<p>\u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u043d\u0435\u043f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 API Skia \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 Alpha \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, API \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a \u0432\u0435\u0440\u0441\u0438\u0438, \u0430 \u0447\u0430\u0441\u0442\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0431\u0430\u0433\u0438 \u0438 \u043b\u043e\u043c\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 React Native Skia \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/shopify.github.io\/react-native-skia\/\" rel=\"noopener noreferrer nofollow\">https:\/\/shopify.github.io\/react-native-skia\/<\/a> \u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 <a href=\"https:\/\/www.youtube.com\/c\/wcandillon\" rel=\"noopener noreferrer nofollow\">William Candillon<\/a><\/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\/685524\/\"> https:\/\/habr.com\/ru\/articles\/685524\/<\/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-394303","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394303","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=394303"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394303\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}