Skip to content

Latest commit

 

History

History
123 lines (84 loc) · 2.13 KB

README.md

File metadata and controls

123 lines (84 loc) · 2.13 KB

@dcl/sdk

Main SDK package for building Decentraland scenes.

Overview

The Decentraland SDK provides a complete framework for creating interactive 3D scenes in the Decentraland metaverse. It includes:

  • Entity Component System (ECS) for scene development
  • UI components and layout tools
  • Asset management utilities
  • Scene networking capabilities
  • Input handling and interactions

Installation

npm install @dcl/sdk

Quick Start

  1. Create a new scene:
npx @dcl/sdk-commands init
  1. Start the development server:
npm start

Usage

import { engine, Entity, Transform, GltfContainer } from '@dcl/sdk/ecs'

// Create an entity
const entity = engine.addEntity()

// Add components
Transform.create(entity, {
  position: { x: 8, y: 0, z: 8 },
  scale: { x: 1, y: 1, z: 1 }
})

GltfContainer.create(entity, {
  src: 'models/myModel.glb'
})

Features

Components

  • Transform
  • GltfContainer
  • Material
  • UiTransform
  • AudioSource
  • And many more...

Systems

  • Input handling
  • Physics
  • Animation
  • Networking

UI Framework

  • Flexbox layout
  • React-like components
  • Event handling

Development

Building the Package

make build

Testing

# Run all tests
make test

# Run only ECS tests
make test-ecs

Development Commands

For local development, you can also use:

# Clean all build artifacts and reinstall dependencies
make clean && make install

# Format and fix linting issues
make lint-fix

# Update dependencies across packages
make sync-deps

Documentation

Architecture Decisions

For a deeper understanding of the SDK architecture: