$0.03968 0.61%
MANA · 20w

Developer Tutorial: Simulate Weather in Decentraland Using Real-World Data

Developer Tutorial: Simulate Weather in Decentraland Using Real-World Data Learn how to use external web APIs with the SDK to recreate simple weather in your Decentraland scenes

In this two-part tutorial, we’ll build a scene that checks an API for weather data from a specific location of your choice (from the real world) and uses that data to render simulate the weather in the metaverse! Part one will focus on how to leverage external JavaScript libraries and APIs in a Decentraland scene. Part two of this tutorial will show how to create raindrops and snowflakes as particle systems, which gets pretty interesting.

My name is Nico Earnshaw, and I take care of the Decentraland documentation. That means everything you can find in If you have any feedback about our docs, please make a pull request or create an issue in the GitHub repo!

In Decentraland scenes we use TypeScript, which is based on JavaScript. So if you’re already familiar with JavaScript, we want you to know that you can do pretty much anything you’re used to doing with JavaScript, including using any of the JavaScript libraries that you know and love.

That also means you can make REST API calls to all your favourite APIs, just as you could if you were developing a website.

If you’re looking for inspiration, check out ProgrammableWeb, they have a large curated archive of APIs of all kinds. You can find APIs that relate to IOT, AI services, finance, and all sorts of other cool things.

In this tutorial, we’re going to integrate our scene with the Weather Unlocked API, since it’s relatively simple to use and reasonably well documented.

You can follow along with this tutorial by forking the scene code in my GitHub repo here.You can also explore a finished version of this scene that’s running live on a server here.

Call the API from the browser

To use the Weather Unlocked API, you first need to register to get your own API ...

Continue on
Recent news
No posts found