toya desk

toya desk

8thWall

8thWall)外部API(Web API)から取得したデータをパーティクルに連携させる例

Example of integrating data retrieved from an external API (Web API) with particles.

toya
Aug 18, 2025
∙ Paid

今回のコンポーネント用スクリプトはGrok4に作ってもらいました。
8th Wallのコンポーネント用スクリプトの作成は、現時点ではClaudeよりGrokやDevinのほうがいいかな、という印象です。


やりたいこと

例えば、以前UEのBPでHTTP Requestを作って、Web APIのエンドポイントにアクセスしてJSONデータを取ってくる、という記事を書きましたが、この例と似た感じで、

こちらのAPIエンドポイントにアクセスすると、

https://solpars.work/api/sessions/total

以下のようなJSONデータを取得でき、

{
  "data": {
    "timestamp": "2025-08-17T13:16:27.744303",
    "total_active": 7
  },
  "status": "success"
}

このうち「total_active」の値(7)を取得し、それをパーティクルの個数などに反映させたい、というシナリオ。

こちらの図が出来上がりのイメージ。
上述のエンドポイントから`total_advive`(この時点で「3」だった)をパーティクルの数に反映させています。ホタルみたいなパーティクルが漂ってるイメージ。


サンプルコード

<以下、課金壁:課金についてのご説明>

User's avatar

Continue reading this post for free, courtesy of toya.

Or purchase a paid subscription.
© 2026 toya · Publisher Privacy
Substack · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture