To get you up and running, and to illustrate what kind of experiences you can build using the SDK, we’ve put together some code and scene examples.
Some of these scenes feature a link to a version of the scene that's deployed on a remote server. There you can interact with it just as if you were running dcl start
locally.
A completely static scene. It's built entirely using XML, which makes it easier to write and edit, but doesn't support any changes over time or interactions with the user.
This simple scene features a couple of wheels that you can spin by clicking them.
- rotate an entity
- glTF models
- click events
- textures
- custom components
- component groups
This simple scene shows how to add animations to a GLTFComponent
and handle click events.
- glTF models
- animations
- click events
A simple interactive scene with a door that can be opened and closed.
Slerp()
function for rotation- click events
- materials
- parent entities
- custom components
- component groups
A simple interactive scene with a two-sided door that can be opened by clicking.
Lerp()
function for moving- click events
- materials
- parent entities
- custom components
- component groups
A scene where you can play different songs by pressing buttons on a jukebox.
- audio
- glTF models
Lerp()
function for moving- click events
- materials
- parent entities
- custom components
- component groups
A scene with animations, sound, and tiles on the floor that randomly change color to the beat.
- audio
- glTF models
- animations
- materials
- custom components
- component groups
A Simon Says game, with click interactions and sequenced actions. The game generates a random sequence of colors and you must click buttons to match those.
- glTF models
- materials
- click events
- custom components
- component groups
A scene where hummingbirds spawn when you click a tree. Each bird moves on its own to random positions.
A scene that shows a character walking along a fixed path, using lerp over each segment of the path. If you approach it, it will switch to yelling at you.
A scene that checks a weather API for the weather in a location and displays that weather condition, showing rain, thunder or snowflakes Use real weather data from different locations by changing the coordinates, or change the value of the “fakeWeather” variable to see different weather conditions manifest.
- Call external REST API
A scene that uses a server and a REST API to sync a scene state amongst multiple users. It’s built around the basic “open the door” example.
- Create a REST server
- Call REST API
A scene that uses a server and a REST API to sync a scene state amongst multiple users. You can paint pixels in a mural that other users can see. The colors of each pixel are stored in a remote server.
- Create a REST server
- Call REST API
A scene with a simple AI character. It randomly chooses what action to take: follow you, sit or remain idle. You can also tell it to sit or stand up by clicking it, or tell it to drink water by clicking its bowl.
A fully-fledged game where a random 2d path is generated along which enemies walk, and where traps are randomly placed. You need to activate the traps as the enemies advance along the path to kill them. It’s all about timing.
A fully fledged game, based on the popular game 2048, where the values are represented by a series of gems of increasing values. Click and drag to displace the gems on the board and merge them into greater values till you reach 2048.