development-guide

Modifier Areas

September 24, 2020
development-guide

Avatar Modifiers # Avatars behave and look consistently throughout Decentraland as they walk across scenes. However, you can add an AvatarModifierArea to a region of your scene to affect how player avatars behave when they enter that area. ❗Warning Please limit the amount of AvatarModifierAreas you use in your scene to just a couple. If you use too many of them, it may have a significant impact on performance. Placing Avatar Modifier Areas # Add an entity with an AvatarModifierArea component and position this entity by using a Transform component. ...

System based events

February 14, 2018
development-guide

If your scene has multiple similar entities that are all activated using the same logic, you can write a single system to iterates over all of them and describe that behavior only once. This is also the most performant and more data oriented approach. If all you want to do is click or push a button on a single entity to activate it, the easiest way is to use the Register a callback approach. ...

Display an NFT

February 7, 2018
development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . You can display a 2D NFT (Non-Fungible Token) that you own in your Decentraland scenes. The NTF’s image and other data is taken from an API, based on the token’s contract and id. Any NFTs that are supported on OpenSea can also be displayed in an NFT picture frame in Decentraland. ...

Display an NFT

February 7, 2018
development-guide

You can display a 2D NFT (Non-Fungible Token) that you own in your Decentraland scenes. The NTF’s image and other data is taken from an API, based on the token’s contract and id. Any NFTs that are supported on OpenSea can also be displayed in an NFT picture frame in Decentraland. The picture frame is displayed adjusting to the dimensions of the NFT image. If the image’s dimensions are 512 X 512 pixels, the frame keeps its original size. ...

Custom components

January 15, 2018
development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . Custom components # If you need to store information about an entity that isn’t handled by the default components of the SDK (see component reference ), then you can create a custom type of component on your scene. Tip: Custom components can be defined in your scene’s game. ...

Custom components

January 15, 2018
development-guide

Data about an entity is stored in its components . The Decentraland SDK provides a series of base components that manage different aspects about an entity, like its position, shape, material, etc. The engine knows how to interpret the information in these, and will change how the entity is rendered accordingly as soon as they change their values. If your scene’s logic requires storing information about an entity that isn’t handled by the default components of the SDK, then you can create a custom type of component on your scene. ...

3rd party servers

January 10, 2018
development-guide

Decentraland runs scenes locally in a player’s browser. By default, players are able to see each other and interact directly, but each one interacts with the environment independently. Changes in the environment aren’t shared between players by default. You need to implement this manually. Allowing all players to see a scene as having the same content in the same state is extremely important to for players to interact in more meaningful ways. ...

Materials via code

development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . Materials # Materials can be applied to entities that use primitive shapes (cube, sphere, plane, etc) by setting them as a component. You can either set a Material or a BasicMaterial component. Each entity can only have one of these. Both components have several fields that allow you to configure the properties of the material, add a texture and set the texture’s mapping. ...

Materials via code

development-guide

Materials # Materials can be applied to entities that use primitive shapes (cube, sphere, plane, etc) by adding a Material component. This component has several fields that allow you to configure the properties of the material, add a texture, etc. You can’t add material components to glTF models. glTF models include their own materials that are implicitly imported into a scene together with the model. When importing a 3D model with its own materials, keep in mind that not all shaders are supported by the Decentraland engine. ...