{"id":4360,"date":"2015-07-06T13:42:17","date_gmt":"2015-07-06T04:42:17","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=4360"},"modified":"2015-07-10T15:18:36","modified_gmt":"2015-07-10T06:18:36","slug":"post-4360","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/d3-js\/4360","title":{"rendered":"\u3010D3.js\u3011\u30b5\u30fc\u30de\u30fc\u30a6\u30a9\u30fc\u30ba\u306e\u30ef\u30fc\u30eb\u30c9\u30af\u30ed\u30c3\u30af\u3092\u4f5c\u308b"},"content":{"rendered":"<p>\u30a2\u30ce\u6642\u8a08\u3063\u307d\u3044\u3082\u306e\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<a href=\"http:\/\/bl.ocks.org\/shimizu\/fde15aa8cf734f1219f8\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/07\/SummerWars-WorldClock.jpg\" alt=\"Summer Wars - WorldClock\" width=\"590\" height=\"307\" class=\"aligncenter size-full wp-image-4361 border\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/07\/SummerWars-WorldClock.jpg 590w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2015\/07\/SummerWars-WorldClock-288x150.jpg 288w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/bl.ocks.org\/shimizu\/fde15aa8cf734f1219f8\">example<\/a><\/p>\n<h2>\u89e3\u8aac<\/h2>\n<p>\u57fa\u672c\u7684\u306b\u306f\u4e0b\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u3092\u3061\u3087\u3053\u3061\u3087\u3053\u3063\u3068\u6539\u826f\u3057\u305f\u3060\u3051\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/gunmagisgeek.com\/blog\/d3-js\/2631\">\u3010D3.js\u3011 SVG\u3067\u5730\u7403\u5100\u3092\u63cf\u304f<\/a><br \/>\n<a href=\"https:\/\/gunmagisgeek.com\/blog\/d3-js\/4052\">\u5730\u8ef8\u3092\u50be\u3051\u306a\u304c\u3089SVG\u3067\u5730\u7403\u5100\u3092\u8868\u793a\u3059\u308b<\/a><\/p>\n<p>\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u306f\u5730\u5f62\u3092\u88cf\u7528(\u30b0\u30ec\u30fc)\u3068\u8868\u7528(\u30d4\u30f3\u30af)\u306b\uff12\u91cd\u306b\u63cf\u753b\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\nclipAngle\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u63cf\u753b\u3055\u308c\u308b\u7bc4\u56f2\u3092\u5909\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30fb\u88cf\u7528\u5730\u5f62\u63cf\u753b<\/p>\n<pre class=\"lang:js decode:true \" >var projection180 = d3.geo.orthographic() \r\n\t.scale(windowWidht\/4)\t\r\n\t.rotate([0,0,0])\t\r\n\t.translate([windowWidht \/ 2, windowHeight \/ 2])\r\n\t.clipAngle(180);\t\r\n\t\r\nvar backPath = d3.geo.path().projection(projection180);\r\n\r\n\/\/\u5730\u5f62(\u88cf)\r\nvar backMap = stage.append(\"svg:path\")\r\n\t.attr({\r\n\t\t\"d\":function(){ return backPath(geojson)},\r\n\t\t\"fill-opacity\":1,\r\n\t\t\"fill\":\"#EDE9F1\",\r\n\t\t\"stroke\":\"none\",\r\n\t});<\/pre>\n<p>\u30fb\u8868\u7528\u5730\u5f62\u63cf\u753b<\/p>\n<pre class=\"lang:js decode:true \" >var projection90 = d3.geo.orthographic() \r\n\t.scale(windowWidht\/4)\t\r\n\t.rotate([0,0,0])\t\r\n\t.translate([windowWidht \/ 2, windowHeight \/ 2])\r\n\t.clipAngle(90);\t\r\n\t\r\nvar frontPath = d3.geo.path().projection(projection90);\r\n\r\n\/\/\u5730\u5f62(\u8868)\r\nvar frontMap = stage.append(\"svg:path\")\r\n\t.attr({\r\n\t\"d\":function(){ return frontPath(geojson)},\r\n\t\t\"fill-opacity\":1,\r\n\t\t\"fill\":\"#FD81DB\",\r\n\t\t\"stroke\":\"none\",\r\n\t});<\/pre>\n<p>SVG\u3067\u306f\u5f8c\u304b\u3089\u8ffd\u52a0\u3055\u308c\u305f\u8981\u7d20\u306e\u65b9\u304c\u4e0a\u306b\u306a\u308b\u306e\u3067\u3001\u88cf\u2192\u8868\u306e\u9806\u756a\u3067\u63cf\u753b\u3057\u307e\u3059\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8(\u6642\u8a08)\u8868\u793a\u90e8\u5206\u306f\u30b5\u30a4\u30ba\u6c7a\u3081\u6253\u3061\u3067\u3060\u3044\u3076\u624b\u3092\u629c\u3044\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307b\u3093\u3068\u306f\u30a6\u30a4\u30f3\u30c9\u30b5\u30a4\u30ba\u306b\u5fdc\u3058\u3066\u81ea\u50cd\u8abf\u6574\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8\u7b49\u306fHTML\u306eDIV\u8981\u7d20\u306a\u3069\u3092\u4f7f\u3063\u305f\u65b9\u304c\u753b\u9762\u4e2d\u592e\u306b\u63c3\u3048\u308b\u306e\u304c\u7c21\u5358\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n<h2>\u7d9a\u304d<\/h2>\n<p><a href=\"https:\/\/gunmagisgeek.com\/blog\/fx0\/4372\">\u590f\u6226\u4e16\u754c\u6642\u8a08\u3092Fx0(FirefoxOS)\u306e\u5f85\u3061\u53d7\u3051\u30a2\u30d7\u30ea\u306b\u3057\u3066\u307f\u305f\u3002<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a2\u30ce\u6642\u8a08\u3063\u307d\u3044\u3082\u306e\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002 exampl&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4361,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-4360","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-d3-js","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/4360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=4360"}],"version-history":[{"count":0,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/4360\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/4361"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=4360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=4360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=4360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}