Main SDK package for building Decentraland scenes.
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
npm install @dcl/sdk
- Create a new scene:
npx @dcl/sdk-commands init
- Start the development server:
npm start
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'
})
- Transform
- GltfContainer
- Material
- UiTransform
- AudioSource
- And many more...
- Input handling
- Physics
- Animation
- Networking
- Flexbox layout
- React-like components
- Event handling
make build
# Run all tests
make test
# Run only ECS tests
make test-ecs
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
For a deeper understanding of the SDK architecture: