{"id":5669,"date":"2015-12-04T20:30:05","date_gmt":"2015-12-04T11:30:05","guid":{"rendered":"https:\/\/nxpg.net\/blog\/?p=5669"},"modified":"2019-07-18T10:41:38","modified_gmt":"2019-07-18T01:41:38","slug":"pixi-js%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e9%9b%aa%e3%82%92%e9%99%8d%e3%82%89%e3%81%9b%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/nxpg.net\/blog\/tech\/?p=5669","title":{"rendered":"pixi.js\u3092\u4f7f\u3063\u3066\u96ea\u3092\u964d\u3089\u305b\u3066\u307f\u305f\u3002"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-5677\" src=\"https:\/\/nxpg.net\/blog\/wp-content\/uploads\/2015\/11\/andre_151130_img01.png\" alt=\"andre_151130_img01\" width=\"720\" height=\"480\"><\/p>\n<p>\u3053\u3093\u306b\u3061\u306f\u3002\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3001\uff08\u5f7c\u5973\u306e\u5ea7\uff09\u7a7a\u3044\u3066\u307e\u3059\u3088\u3002\u30a2\u30f3\u30c9\u30ec\u3067\u3059\u3002<\/p>\n<p>\u3044\u3088\u3044\u3088\u5bd2\u304f\u306a\u3063\u3066\u304d\u305f\u4eca\u65e5\u3053\u306e\u9803\u3002\u3082\u3046\u51ac\u3067\u3059\u306d\u3002<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u5148\u65e5\u4f7f\u3063\u305fpixi.js\u3067\u4eca\u5ea6\u306f\u96ea\u3063\u307d\u3044\u3082\u306e\u3092\u964d\u3089\u305b\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p class=\"codepen\" data-height=\"300\" data-theme-id=\"21128\" data-slug-hash=\"wKVpeq\" data-default-tab=\"result\" data-user=\"NP-okada\">See the Pen <a href=\"http:\/\/codepen.io\/NP-okada\/pen\/wKVpeq\/\">wKVpeq<\/a> by Takamasa Okada (<a href=\"http:\/\/codepen.io\/NP-okada\">@NP-okada<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p>\u7c21\u5358\u306b\u30b3\u30fc\u30c9\u89e3\u8aac\u3059\u308b\u3068\u3001<\/p>\n<pre><code>snows.push(new PIXI.Graphics().beginFill(0xFFFFFF,0.7).drawCircle(0,0,7).endFill());\n<\/code><\/pre>\n<p>\u3067\u3001\u534a\u5f847\u304b\u3064\u767d\u8272\u306e\u5186\u3092\u751f\u6210\uff08\uff1d\u96ea\u3068\u3057\u3066\uff09\u3057\u3064\u3064\u914d\u5217\u306b\u8ffd\u52a0\u3057\u3001\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u60c5\u5831\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002\u6b21\u306b<\/p>\n<pre><code>snows[i].position.x = Math.random() * WIDTH;\nsnows[i].position.y = Math.random() * HEIGHT;\n<\/code><\/pre>\n<p>\u3067\u5148\u307b\u3069\u8ffd\u52a0\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u96ea\uff09\u306e\u3001x,y\u4f4d\u7f6e\u3092\u63cf\u753b\u9818\u57df\u5185\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u4f4d\u7f6e\u306b\u5909\u66f4\u3001<\/p>\n<pre><code>snows[i].scale.x = scale;\nsnows[i].scale.y = scale;\n<\/code><\/pre>\n<p>\u3067\u57fa\u672c\u30b5\u30a4\u30ba\u306b\u5bfe\u3057\u30660.5\u301c1.0\u500d\u306b\u30b5\u30a4\u30ba\u3092\u8abf\u6574\u3057\u3001<br \/>\n\u6700\u5f8c\u306b\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u3066\u4fdd\u6301\u3059\u308b\u305f\u3081\u306e\uff09\u30b3\u30f3\u30c6\u30ca\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u308b\u5f8c\u306b\u3001animate\u95a2\u6570\u5185\u306e\u30eb\u30fc\u30d7<\/p>\n<pre><code>for (var i = 0; i  HEIGHT) {\n\t\tsnows[i].position.y = -10;\n\t}\n}\n<\/code><\/pre>\n<p>\u3067\uff11\u3064\u305a\u3064\u96ea\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u308a\u51fa\u3057\u3001\u305d\u306e\u30b5\u30a4\u30ba\u6bd4\u7387\u3092\u57fa\u306b\u52d5\u304d\u3092\u3064\u3051\uff08\u5c0f\u3055\u306a\u96ea\u306f\u79fb\u52d5\u91cf\u304c\u5c0f\u3055\u304f\u306a\u308b\uff1d\u5965\u306b\u3042\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u2026\u3068\u3044\u3044\u306a\uff09\u3001\u4e0b\u65b9\u5411\u306b\u898b\u5207\u308c\u305f\u969b\u306b\u306f\u63cf\u753b\u9818\u57df\u3088\u308a10px\u4e0a\u306b\u623b\u3057\u3066\u3044\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u305d\u306e\u307e\u307e\u3060\u3068\u8f2a\u90ed\u304c\u30cf\u30c3\u30ad\u30ea\u3057\u3059\u304e\u3066\u96ea\u3063\u307d\u304f\u306a\u3044\u306e\u3067\u3001<\/p>\n<pre><code>var bFilter = new PIXI.filters.BlurFilter();\nbFilter.blur = 2;\nstage.filters = [bFilter];\n<\/code><\/pre>\n<p>\u3067\u96ea\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30f3\u30c6\u30ca\u5168\u4f53\u306b\u30d6\u30e9\u30fc\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u304b\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3060\u3051\u3060\u3068\u5bc2\u3057\u3044\u306e\u3067\u80cc\u666f\u3092\u3064\u3051\u3066\u307f\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u3002<\/p>\n<p class=\"codepen\" data-height=\"300\" data-theme-id=\"21128\" data-slug-hash=\"WrNoQM\" data-default-tab=\"result\" data-user=\"NP-okada\">See the Pen <a href=\"http:\/\/codepen.io\/NP-okada\/pen\/WrNoQM\/\">WrNoQM<\/a> by Takamasa Okada (<a href=\"http:\/\/codepen.io\/NP-okada\">@NP-okada<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p>\u305d\u306e\u307e\u307e\u80cc\u666f\u3092\u3064\u3051\u308b\u3060\u3051\u3060\u3068\u80cc\u666f\u307e\u3067\u30dc\u30e4\u3051\u308b\u306e\u3067\u3001<\/p>\n<pre><code>var snow_container = new PIXI.Container();\nvar bFilter = new PIXI.filters.BlurFilter();\nbFilter.blur = 2;\nsnow_container.filters = [bFilter];\nsnow_container.setParent(stage);\n<\/code><\/pre>\n<p>\u3067\u3001\u96ea\u306f\u96ea\u7528\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u3063\u3066\u305d\u308c\u306b\u5bfe\u3057\u3066\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u304b\u3051\u3001setParent\u3067\u89aa\u5b50\u95a2\u4fc2\u3092\u4f5c\u3063\u3066\u96ea\u304c\u524d\u9762\u306b\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\uff08\u3068\u3053\u308d\u3067\u3001Math.random()\u3063\u3066\u3001\u300c\u73fe\u5728\u6642\u523b\u3092\u30b7\u30fc\u30c9\u3068\u3057\u3066\u4e71\u6570\u3092\u751f\u6210\u300d\u3059\u308b\u305f\u3081\u3001\u3046\u307e\u304f\u30ba\u30e9\u3057\u3066\u53d6\u5f97\u3057\u306a\u3044\u3068\u5909\u306a\u504f\u308a\u65b9\u3059\u308b\u3093\u3067\u3059\u306d\u3002\u52c9\u5f37\u306b\u306a\u308a\u307e\u3057\u305f\u3002\uff09<\/p>\n<p>\u6700\u5f8c\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u7686\u69d8\u304c\u7d20\u6575\u306a\u30af\u30ea\u30b9\u30de\u30b9\u3092\u904e\u3054\u3055\u308c\u308b\u3053\u3068\u3092\u304a\u7948\u308a\u7533\u3057\u4e0a\u3052\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><script src=\"\/\/assets.codepen.io\/assets\/embed\/ei.js\" async=\"\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3001\uff08\u5f7c\u5973\u306e\u5ea7\uff09\u7a7a\u3044\u3066\u307e\u3059\u3088\u3002\u30a2\u30f3\u30c9\u30ec\u3067\u3059\u3002 \u3044\u3088\u3044\u3088\u5bd2\u304f\u306a\u3063\u3066\u304d\u305f\u4eca\u65e5\u3053\u306e\u9803\u3002\u3082\u3046\u51ac\u3067\u3059\u306d\u3002 \u3068\u3044\u3046\u3053\u3068\u3067\u3001\u5148\u65e5\u4f7f\u3063\u305fpixi.js\u3067\u4eca\u5ea6\u306f\u96ea\u3063\u307d\u3044\u3082\u306e\u3092\u964d\u3089\u305b\u3066\u307f\u307e\u3057\u305f\u3002 See the P [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":13155,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[6],"tags":[7],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/5669"}],"collection":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5669"}],"version-history":[{"count":3,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/5669\/revisions"}],"predecessor-version":[{"id":13489,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/posts\/5669\/revisions\/13489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=\/wp\/v2\/media\/13155"}],"wp:attachment":[{"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nxpg.net\/blog\/tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}