Giter Site home page Giter Site logo

block-foundation / decentraland-assets Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 33 KB

Decentraland Asset Template

Home Page: https://www.blockfoundation.io

License: Creative Commons Attribution Share Alike 4.0 International

TypeScript 96.76% Dockerfile 3.24%
architecture assets blender block-foundation blockchain blockfoundation decentraland decentraland-parcel metaverse smart-contracts mana

decentraland-assets's Introduction

GitHub License devContainer


Block Foundation Logo

Decentraland Assets

Block Foundation Metaverse Resources


Block Foundation Brand

Contents



Report a Bug Request a Feature Ask a Question Make a Suggestion Start a Discussion

Introduction

Decentraland is a virtual reality platform powered by the Ethereum blockchain, allowing users to create, experience, and monetize content and applications. You can create "assets" for Decentraland in the form of wearables, virtual real estate, and scenes or experiences. Here's a general process to create a 3D asset or scene for Decentraland using the Decentraland's SDK:

Before you begin:

  1. You need to have basic knowledge of 3D modeling software like Blender, 3D Studio Max, etc.
  2. You need to have a basic understanding of coding, specifically in Typescript or Javascript.
  3. Install Node.js on your computer if you haven't already.
  4. Install the Decentraland CLI (Command Line Interface) using the following command in your terminal or command prompt: npm install -g decentraland.

Steps to create a 3D asset:

  1. Design your 3D Model Create your 3D model using a 3D modeling software such as Blender or 3D Studio Max. Remember that Decentraland has specific performance constraints for 3D models, so keep your model simple and the polygon count low. Export your model as a .glb or .gltf file.

  2. Setting Up Your Environment Create a new directory in your terminal for your project, navigate into it, and initialize a new Decentraland scene with the following commands:

    mkdir my-scene
    cd my-scene
    dcl init
  3. Modify the Scene Your project directory should now contain a src directory, which contains a game.ts file and a scene.json file. The game.ts file is where you'll code the logic of your scene, and the scene.json file describes the scene's properties.

    • Add your 3D model to your project's directory. You might create an assets folder to keep things organized.

    • In the game.ts file, you'll import your 3D model and add it to your scene. Here's a simple example:

      import { Entity, engine, Transform, GLTFShape } from 'decentraland-ecs'
      
      // Create entity
      const entity = new Entity()
      
      // Create transform component to define position and rotation
      const transform = new Transform({
          position: new Vector3(8, 0, 8),
          rotation: Quaternion.Euler(0, 180, 0)
      })
      
      // Create shape component and attach 3D model
      const shape = new GLTFShape("models/Your3DModel.glb")
      
      // Assign components to entity
      entity.addComponent(transform)
      entity.addComponent(shape)
      
      // Add entity to engine
      engine.addEntity(entity)
  4. Preview Your Scene In your terminal, while in your project's directory, run dcl start to preview your scene. This command opens up a new tab in your default web browser where you can see your asset in action.

  5. Deploy Your Scene Once you're satisfied with your scene, you can deploy it to Decentraland. You'll need to own or rent some LAND in Decentraland to do this.

Remember that this is a very basic introduction to creating an asset for Decentraland. Depending on what you want to create, you might need to learn more about Decentraland's scripting language, including how to animate your models, respond to user inputs, or interact with Ethereum smart contracts.

Resources


Colophon

Authors

This is an open-source project by the Block Foundation.

The Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.

website: www.blockfoundation.io

Development Resources

Contributing

We'd love for you to contribute and to make this project even better than it is today! Please refer to the contribution guidelines for information.

Legal Information

Copyright

Copyright © 2023 Stichting Block Foundation. All Rights Reserved.

License

Except as otherwise noted, the content in this repository is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License, and code samples are licensed under the Apache 2.0 License.

Also see LICENSE and LICENSE-CODE.

Disclaimer

THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.