{"id":7671,"date":"2021-12-22T09:51:00","date_gmt":"2021-12-22T00:51:00","guid":{"rendered":"https:\/\/gunmagisgeek.com\/blog\/?p=7671"},"modified":"2021-12-22T09:51:02","modified_gmt":"2021-12-22T00:51:02","slug":"deck-gl%e3%81%a7%e3%83%9d%e3%82%a4%e3%83%b3%e3%83%88%e3%82%92%e5%85%89%e3%82%89%e3%81%9b%e3%82%8b","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/deck-gl\/7671","title":{"rendered":"deck.gl\u3067\u30dd\u30a4\u30f3\u30c8\u3092\u5149\u3089\u305b\u308b"},"content":{"rendered":"\n<p>\u3053\u306e\u8a18\u4e8b\u306f<a href=\"https:\/\/qiita.com\/advent-calendar\/2021\/deckgl\">deck.gl Advent Calendar 2021\u00a0<\/a>\u53c2\u52a0\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6982\u8981<\/h2>\n\n\n\n<p>WebGL\u306e\u30d6\u30ec\u30f3\u30c9\u30e2\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u3001\u91cd\u306a\u308a\u5408\u3063\u305f\u30ab\u30e9\u30fc\u304c\u52a0\u7b97\u3055\u308c\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u5bc6\u5ea6\u306e\u9ad8\u3044(\u91cd\u306a\u308a\u5408\u3044\u304c\u591a\u3044)\u5730\u57df\u307b\u3069\u5149\u3063\u3066\u898b\u3048\u308b\u3088\u3046\u306a\u6f14\u51fa\u3092\u52a0\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<iframe src=\"https:\/\/codesandbox.io\/embed\/deck-gl-burendomodowobian-geng-suru-3ywbm?fontsize=14&amp;hidenavigation=1&amp;module=%2Fsrc%2FRenderLayers.js&amp;theme=dark&amp;view=split\" style=\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\" title=\"deck.gl - \u30d6\u30ec\u30f3\u30c9\u30e2\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u8aac<\/h2>\n\n\n\n<p>\u30ec\u30a4\u30e4\u30fc\u306eparameters\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3046\u3068\u3001\u5404\u30d5\u30ec\u30fc\u30e0\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308b\u524d\u306bluma.gl\u306esetParameters\u95a2\u6570\u3092\u901a\u3057\u3066WebGL\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001\u30d6\u30ec\u30f3\u30c9\u30e2\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u3001\u30ab\u30e9\u30fc\u304c\u52a0\u7b97\u3055\u308c\u308b\u3088\u3046\u306b\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>WebGL\u306e\u7d44\u307f\u8fbc\u307f\u5b9a\u6570\u3092\u3059\u308b\u305f\u3081\u306b@luma.gl\/constants\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">&gt; npm install @luma.gl\/constants<\/pre><\/div>\n\n\n\n<p>parameters\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066ScatterplotLayer\u306e\u30d6\u30ec\u30f3\u30c9\u30e2\u30fc\u30c9\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js decode:true \">  const scatterLayer = new ScatterplotLayer({\n    id: \"scatter-layer\",\n    data: data,\n    filled: true,\n    radiusScale: 1,\n    radiusMinPixels: 4,\n    radiusMaxPixels: 300,\n    getPosition: (d) =&gt; {\n      return [d.lng, d.lat];\n    },\n    getRadius: 20,\n    getFillColor: (d) =&gt; [60, 100, 200, 120],\n    parameters: {\n      \/\/ \u52a0\u7b97\u51e6\u7406\u306b\u3088\u308b\u8ca0\u8377\u3092\u8efd\u6e1b\u3059\u308b\u305f\u3081\u6df1\u5ea6\u30c6\u30b9\u30c8\u3092\u7121\u52b9\u5316\u3059\u308b\n      [GL.DEPTH_TEST]: false,\n\n      \/\/ https:\/\/luma.gl\/modules\/gltools\/docs\/api-reference\/parameter-setting#blending\n      [GL.BLEND]: checkBtn, \/\/\u30d6\u30ec\u30f3\u30c9\u30e2\u30fc\u30c9\u3092\u6709\u52b9\u5316\/\u7121\u52b9\u5316\u3059\u308b\n      [GL.BLEND_SRC_RGB]: GL.ONE,\n      [GL.BLEND_DST_RGB]: GL.ONE,\n      [GL.BLEND_EQUATION]: GL.FUNC_ADD \/\/\u30ab\u30e9\u30fc\u3092\u52a0\u7b97\u3059\u308b\u3002\u3000\u6e1b\u7b97\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001FUNC_SUBTRACT or FUNC_REVERSE_SUBTRACT\u3092\u4f7f\u3046\n    }\n  });\n<\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306fdeck.gl Advent Calen&hellip;<\/p>\n","protected":false},"author":1,"featured_media":7673,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"class_list":["post-7671","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-deck-gl","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7671","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=7671"}],"version-history":[{"count":7,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7671\/revisions"}],"predecessor-version":[{"id":7867,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7671\/revisions\/7867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/7673"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=7671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=7671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=7671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}