{"id":314464,"date":"2020-12-07T15:01:34","date_gmt":"2020-12-07T15:01:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=314464"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=314464","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b Armory. Traits"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/61d\/611\/30c\/61d61130c23c942502ebe677617108f2.png\" width=\"383\" height=\"292\"><figcaption><\/figcaption><\/figure>\n<p><strong>Traits<\/strong>, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432 &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Armory. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u0434\u0432\u0438\u0436\u043a\u043e\u043c&nbsp; Source \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0440\u043e\u0437\u043e\u0432\u044b\u0435 \u043a\u0443\u0431\u0438\u043a\u0438 &#8212; \u0442\u0430\u043c \u043e\u043d\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438\u0441\u044c Entities. \u0422\u0430\u043a \u0438 \u0443 \u043d\u0430\u0441, \u0441\u0443\u0442\u044c \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 traits \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <em>Outliner,<\/em> \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 <em>Orphan Data<\/em> \u0432 <em>Collections<\/em>. \u042d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0441\u0446\u0435\u043d\u0435.<\/p>\n<h3>\u0422\u0438\u043f\u044b traits<\/h3>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bc\/b66\/54c\/1bcb6654c78863363da4ea4dfe4631f2.png\" width=\"301\" height=\"131\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>Traits \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><em>Haxe<\/em> &#8212; \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 Haxe.<\/p>\n<\/li>\n<li>\n<p><em>Wasm<\/em> &#8212; \u0441\u043c. <a href=\"https:\/\/github.com\/armory3d\/armory\/wiki\/wasm\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>.<\/p>\n<\/li>\n<li>\n<p><em>UI<\/em> &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><em>Bundled<\/em> &#8212; \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \/ \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 Haxe.<\/p>\n<\/li>\n<li>\n<p><em>Nodes <\/em>&#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Logic Editor (\u043a\u0430\u043a \u0432 blueprints UE4).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438 (\u0431\u0443\u0434\u0443\u0442!) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<h3>Fake User<\/h3>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f0\/7c7\/e6a\/4f07c7e6aab097993762e3ab0b859d5e.jpg\" width=\"369\" height=\"160\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0432 Logic Editor traits \u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043b\u0438 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 &#8212; \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 \u0438\u0433\u0440\u044b \u043e\u043d\u0430 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0430\u0436\u0443 \u0446\u0435\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u0438\u0442\u0440\u043e\u0443\u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432 Blender \u0435\u0441\u0442\u044c&nbsp; \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0430\u044f&nbsp; \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u043e\u043a \u0449\u0438\u0442\u0430 \u0440\u044f\u0434\u043e\u043c \u0441 \u0432\u0430\u0448\u0435\u0439 trait \u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u043e\u0434\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u0438\u043c\u0435\u043d\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h3>Traits Events<\/h3>\n<p>Trait \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0432\u0435\u043d\u0442\u044b \u0441 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c:<\/p>\n<ul>\n<li>\n<p><em>Trait.notifyOnAdd()<\/em> &#8212; \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d trait.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnInit()<\/em> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u0446\u0435\u043d\u0443.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRemove()<\/em> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0446\u0435\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnUpdate()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0433\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRender()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRender2D()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440 2D.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0446\u0435\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0442.\u0435 \u0435\u0441\u043b\u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435 \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0442\u043e <em>onInit <\/em>\u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0415\u0441\u043b\u0438 \u0432 \u0441\u0446\u0435\u043d\u0435 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c trait \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>Scene.active.notifyOnInit() &#8212; <\/em>\u044d\u0442\u043e\u0442 \u0438\u0432\u0435\u043d\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0441\u0446\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<h3>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 traits<\/h3>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Blender. \u041f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em> <\/em>\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u0443\u044e <em>@prop<\/em>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>var \u043f<\/em>\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. <em>Final <\/em>\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 trait \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/api.haxe.org\/Reflect.html\" rel=\"noopener noreferrer nofollow\"><u>Haxe Reflection API<\/u><\/a>, \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0433\u0440\u044b.<\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445:&nbsp;<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p><em>Int<\/em><\/p>\n<\/li>\n<li>\n<p><em>Float<\/em><\/p>\n<\/li>\n<li>\n<p><em>Boolean<\/em><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><em>String<\/em><\/p>\n<\/li>\n<li>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/Object.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.Object<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/CameraObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.CameraObject<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/LightObject.html\" rel=\"noopener noreferrer nofollow\"><em><u>iron.object.LightObject<\/u><\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/MeshObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.MeshObject<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/SpeakerObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.SpeakerObject<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec2.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec2<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec3.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec3<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec4.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec4<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code> package arm;    \/\/ See below (\"Object data types\") import iron.object.CameraObject;   import iron.math.Vec2; import iron.math.Vec3; import iron.math.Vec4;   class MyTrait extends iron.Trait { \t\/\/ Primitive data types \t@prop \tvar intValue: Int = 40; \/\/ Type annotation possible, but not required \t@prop \tvar floatValue = 3.14; \t@prop \tvar stringValue = \"Hello world!\"; \t@prop \tvar booleanValue = true;   \t\/\/ Object data types \t@prop \tvar objValue: iron.object.Object; \/\/ Needs type annotation to be recognized \t@prop \tvar camObjValue: CameraObject; \/\/ Type can be imported (see above)... \t@prop \tvar lightObjValue: iron.object.LightObject; \/\/ .. or not, both will work \t@prop \tvar meshObjValue: iron.object.MeshObject; \t@prop \tvar speakerObjValue: iron.object.SpeakerObject;   \t\/\/ Vector data types \t@prop \tvar vector2DValue: Vec2 = new Vec2(0.2, 0.5); \/\/ Initialization possible... \t@prop \tvar vector3DValue: Vec3; \/\/... but not required \t@prop \tvar vector4DValue = new Vec4(1, 2, 3, 4);   \t\/\/ Not visible in Blender, `@prop` is missing \tvar notVisibleValue = 0.0;   \t\/\/ ... }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0442 \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d03\/3bc\/936\/d033bc936dcfc91a9bac05cefd747bb1.png\" width=\"409\" height=\"629\"><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u043e\u0448\u0438\u0431\u043a\u0438<\/h3>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c \u043e \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0445 <em>@prop:<\/em><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f09\/a83\/5d3\/f09a835d3b59fbbe52bcbed650845d7d.png\" width=\"415\" height=\"292\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 @prop \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c. <\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0432\u0441\u0435 traits \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <em>sources\/ arm<\/em>. \u0421\u0432\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u043a\u0443\u0447\u0443 &#8212; \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u0443\u043c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0430\u043c \u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u0442\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0440\u0435\u0434\u0438 \u0441\u043e\u0442\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u0445 &#8212; \u0442\u043e \u0435\u0449\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043f\u043a\u0430\u0445 \u0438 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0430\u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0446\u0435\u043d\u044b.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <em>Haxe package syntax <\/em>\u043f\u0440\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c<em> traits. <\/em>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c trait \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>general.BoxBehavior &#8212; <\/em>\u043e\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Sources\/arm\/general <\/em>\u0441 \u0438\u043c\u0435\u043d\u0435\u043c<em> \u00abBoxBehavior.hx\u00bb<\/em><\/p>\n<p>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0438\u043c\u044f traits \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443: &nbsp;<em>\u00abgeneral.terrain.TerrainCollider\u00bb <\/em>\u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00ab<em>TerrainCollider.hx<\/em>\u00bb \u043f\u043e \u043f\u0443\u0442\u0438 <em>\u00abSources\/arm\/ general\/terrain<\/em>\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u0440\u0443\u0433\u0443\u044e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0443, \u0442\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 <em>Class <\/em>\u043f\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0438\u043c\u044f.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/529784\/\" rel=\"noopener noreferrer nofollow\"><em>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/530484\/\" rel=\"noopener noreferrer nofollow\"><em>C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u0432 armory<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/531670\/\"> https:\/\/habr.com\/ru\/post\/531670\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<p><strong>Traits<\/strong>, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432 &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Armory. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u0434\u0432\u0438\u0436\u043a\u043e\u043c&nbsp; Source \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0440\u043e\u0437\u043e\u0432\u044b\u0435 \u043a\u0443\u0431\u0438\u043a\u0438 &#8212; \u0442\u0430\u043c \u043e\u043d\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438\u0441\u044c Entities. \u0422\u0430\u043a \u0438 \u0443 \u043d\u0430\u0441, \u0441\u0443\u0442\u044c \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 traits \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <em>Outliner,<\/em> \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 <em>Orphan Data<\/em> \u0432 <em>Collections<\/em>. \u042d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0441\u0446\u0435\u043d\u0435.<\/p>\n<h3>\u0422\u0438\u043f\u044b traits<\/h3>\n<figure class=\"float\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>Traits \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><em>Haxe<\/em> &#8212; \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441 \u043d\u0443\u043b\u044f \u043d\u0430 Haxe.<\/p>\n<\/li>\n<li>\n<p><em>Wasm<\/em> &#8212; \u0441\u043c. <a href=\"https:\/\/github.com\/armory3d\/armory\/wiki\/wasm\" rel=\"noopener noreferrer nofollow\">WebAssembly<\/a>.<\/p>\n<\/li>\n<li>\n<p><em>UI<\/em> &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><em>Bundled<\/em> &#8212; \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \/ \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 Haxe.<\/p>\n<\/li>\n<li>\n<p><em>Nodes <\/em>&#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 Logic Editor (\u043a\u0430\u043a \u0432 blueprints UE4).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438 (\u0431\u0443\u0434\u0443\u0442!) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<h3>Fake User<\/h3>\n<figure class=\"float\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0432 Logic Editor traits \u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043b\u0438 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 &#8212; \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 \u0438\u0433\u0440\u044b \u043e\u043d\u0430 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0430\u0436\u0443 \u0446\u0435\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u0438\u0442\u0440\u043e\u0443\u043c\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432 Blender \u0435\u0441\u0442\u044c&nbsp; \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0430\u044f&nbsp; \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u043e\u043a \u0449\u0438\u0442\u0430 \u0440\u044f\u0434\u043e\u043c \u0441 \u0432\u0430\u0448\u0435\u0439 trait \u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043d\u043e\u0434\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u0438\u043c\u0435\u043d\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h3>Traits Events<\/h3>\n<p>Trait \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0432\u0435\u043d\u0442\u044b \u0441 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c:<\/p>\n<ul>\n<li>\n<p><em>Trait.notifyOnAdd()<\/em> &#8212; \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d trait.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnInit()<\/em> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u0446\u0435\u043d\u0443.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRemove()<\/em> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0446\u0435\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnUpdate()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0433\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRender()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433.<\/p>\n<\/li>\n<li>\n<p><em>Trait.notifyOnRender2D()<\/em> &#8212; \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440 2D.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0446\u0435\u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0442.\u0435 \u0435\u0441\u043b\u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435 \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0442\u043e <em>onInit <\/em>\u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0415\u0441\u043b\u0438 \u0432 \u0441\u0446\u0435\u043d\u0435 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c trait \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>Scene.active.notifyOnInit() &#8212; <\/em>\u044d\u0442\u043e\u0442 \u0438\u0432\u0435\u043d\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0441\u0446\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<h3>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 traits<\/h3>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Blender. \u041f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em> <\/em>\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u0443\u044e <em>@prop<\/em>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>var \u043f<\/em>\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. <em>Final <\/em>\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 trait \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/api.haxe.org\/Reflect.html\" rel=\"noopener noreferrer nofollow\"><u>Haxe Reflection API<\/u><\/a>, \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0433\u0440\u044b.<\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445:&nbsp;<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p><em>Int<\/em><\/p>\n<\/li>\n<li>\n<p><em>Float<\/em><\/p>\n<\/li>\n<li>\n<p><em>Boolean<\/em><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><em>String<\/em><\/p>\n<\/li>\n<li>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/Object.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.Object<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/CameraObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.CameraObject<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/LightObject.html\" rel=\"noopener noreferrer nofollow\"><em><u>iron.object.LightObject<\/u><\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/MeshObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.MeshObject<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/object\/SpeakerObject.html\" rel=\"noopener noreferrer nofollow\"><em>iron.object.SpeakerObject<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec2.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec2<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec3.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec3<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/armory3d.org\/api\/iron\/math\/Vec4.html\" rel=\"noopener noreferrer nofollow\"><em>iron.math.Vec4<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code> package arm;    \/\/ See below (\"Object data types\") import iron.object.CameraObject;   import iron.math.Vec2; import iron.math.Vec3; import iron.math.Vec4;   class MyTrait extends iron.Trait { \t\/\/ Primitive data types \t@prop \tvar intValue: Int = 40; \/\/ Type annotation possible, but not required \t@prop \tvar floatValue = 3.14; \t@prop \tvar stringValue = \"Hello world!\"; \t@prop \tvar booleanValue = true;   \t\/\/ Object data types \t@prop \tvar objValue: iron.object.Object; \/\/ Needs type annotation to be recognized \t@prop \tvar camObjValue: CameraObject; \/\/ Type can be imported (see above)... \t@prop \tvar lightObjValue: iron.object.LightObject; \/\/ .. or not, both will work \t@prop \tvar meshObjValue: iron.object.MeshObject; \t@prop \tvar speakerObjValue: iron.object.SpeakerObject;   \t\/\/ Vector data types \t@prop \tvar vector2DValue: Vec2 = new Vec2(0.2, 0.5); \/\/ Initialization possible... \t@prop \tvar vector3DValue: Vec3; \/\/... but not required \t@prop \tvar vector4DValue = new Vec4(1, 2, 3, 4);   \t\/\/ Not visible in Blender, `@prop` is missing \tvar notVisibleValue = 0.0;   \t\/\/ ... }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0442 \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a:<\/p>\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u043e\u0448\u0438\u0431\u043a\u0438<\/h3>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0442\u044c \u043e \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0445 <em>@prop:<\/em><\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 @prop \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c. <\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0432\u0441\u0435 traits \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <em>sources\/ arm<\/em>. \u0421\u0432\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u043a\u0443\u0447\u0443 &#8212; \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u0443\u043c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0430\u043c \u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u0442\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0440\u0435\u0434\u0438 \u0441\u043e\u0442\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u0445 &#8212; \u0442\u043e \u0435\u0449\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043f\u043a\u0430\u0445 \u0438 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0430\u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0446\u0435\u043d\u044b.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <em>Haxe package syntax <\/em>\u043f\u0440\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c<em> traits. <\/em>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c trait \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <em>general.BoxBehavior &#8212; <\/em>\u043e\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <em>Sources\/arm\/general <\/em>\u0441 \u0438\u043c\u0435\u043d\u0435\u043c<em> \u00abBoxBehavior.hx\u00bb<\/em><\/p>\n<p>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0438\u043c\u044f traits \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443: &nbsp;<em>\u00abgeneral.terrain.TerrainCollider\u00bb <\/em>\u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00ab<em>TerrainCollider.hx<\/em>\u00bb \u043f\u043e \u043f\u0443\u0442\u0438 <em>\u00abSources\/arm\/ general\/terrain<\/em>\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0434\u0440\u0443\u0433\u0443\u044e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0443, \u0442\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 <em>Class <\/em>\u043f\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0438\u043c\u044f.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/529784\/\" rel=\"noopener noreferrer nofollow\"><em>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/em><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/530484\/\" rel=\"noopener noreferrer nofollow\"><em>C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u0432 armory<\/em><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/531670\/\"> https:\/\/habr.com\/ru\/post\/531670\/<\/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-314464","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314464","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=314464"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314464\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}