@dcl/sdk 7.7.5-13413116060.commit-43029a2 → 7.7.5-13417607939.commit-3f07772
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -0
 - package/package.json +6 -6
 
    
        package/README.md
    ADDED
    
    | 
         @@ -0,0 +1,123 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # @dcl/sdk
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Main SDK package for building Decentraland scenes.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ## Overview
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            The Decentraland SDK provides a complete framework for creating interactive 3D scenes in the Decentraland metaverse. It includes:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - Entity Component System (ECS) for scene development
         
     | 
| 
      
 10 
     | 
    
         
            +
            - UI components and layout tools
         
     | 
| 
      
 11 
     | 
    
         
            +
            - Asset management utilities
         
     | 
| 
      
 12 
     | 
    
         
            +
            - Scene networking capabilities
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Input handling and interactions
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 18 
     | 
    
         
            +
            npm install @dcl/sdk
         
     | 
| 
      
 19 
     | 
    
         
            +
            ```
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ## Quick Start
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            1. Create a new scene:
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 26 
     | 
    
         
            +
            npx @dcl/sdk-commands init
         
     | 
| 
      
 27 
     | 
    
         
            +
            ```
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            2. Start the development server:
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 32 
     | 
    
         
            +
            npm start
         
     | 
| 
      
 33 
     | 
    
         
            +
            ```
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            ```typescript
         
     | 
| 
      
 38 
     | 
    
         
            +
            import { engine, Entity, Transform, GltfContainer } from '@dcl/sdk/ecs'
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            // Create an entity
         
     | 
| 
      
 41 
     | 
    
         
            +
            const entity = engine.addEntity()
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            // Add components
         
     | 
| 
      
 44 
     | 
    
         
            +
            Transform.create(entity, {
         
     | 
| 
      
 45 
     | 
    
         
            +
              position: { x: 8, y: 0, z: 8 },
         
     | 
| 
      
 46 
     | 
    
         
            +
              scale: { x: 1, y: 1, z: 1 }
         
     | 
| 
      
 47 
     | 
    
         
            +
            })
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            GltfContainer.create(entity, {
         
     | 
| 
      
 50 
     | 
    
         
            +
              src: 'models/myModel.glb'
         
     | 
| 
      
 51 
     | 
    
         
            +
            })
         
     | 
| 
      
 52 
     | 
    
         
            +
            ```
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            ## Features
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            ### Components
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            - Transform
         
     | 
| 
      
 59 
     | 
    
         
            +
            - GltfContainer
         
     | 
| 
      
 60 
     | 
    
         
            +
            - Material
         
     | 
| 
      
 61 
     | 
    
         
            +
            - UiTransform
         
     | 
| 
      
 62 
     | 
    
         
            +
            - AudioSource
         
     | 
| 
      
 63 
     | 
    
         
            +
            - And many more...
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            ### Systems
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            - Input handling
         
     | 
| 
      
 68 
     | 
    
         
            +
            - Physics
         
     | 
| 
      
 69 
     | 
    
         
            +
            - Animation
         
     | 
| 
      
 70 
     | 
    
         
            +
            - Networking
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            ### UI Framework
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            - Flexbox layout
         
     | 
| 
      
 75 
     | 
    
         
            +
            - React-like components
         
     | 
| 
      
 76 
     | 
    
         
            +
            - Event handling
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            ## Development
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            ### Building the Package
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 83 
     | 
    
         
            +
            make build
         
     | 
| 
      
 84 
     | 
    
         
            +
            ```
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
            ### Testing
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 89 
     | 
    
         
            +
            # Run all tests
         
     | 
| 
      
 90 
     | 
    
         
            +
            make test
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            # Run only ECS tests
         
     | 
| 
      
 93 
     | 
    
         
            +
            make test-ecs
         
     | 
| 
      
 94 
     | 
    
         
            +
            ```
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            ### Development Commands
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
            For local development, you can also use:
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 101 
     | 
    
         
            +
            # Clean all build artifacts and reinstall dependencies
         
     | 
| 
      
 102 
     | 
    
         
            +
            make clean && make install
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            # Format and fix linting issues
         
     | 
| 
      
 105 
     | 
    
         
            +
            make lint-fix
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
            # Update dependencies across packages
         
     | 
| 
      
 108 
     | 
    
         
            +
            make sync-deps
         
     | 
| 
      
 109 
     | 
    
         
            +
            ```
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
            ## Documentation
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
            - [SDK Documentation](https://docs.decentraland.org/creator/development-guide/sdk7/sdk-101/)
         
     | 
| 
      
 114 
     | 
    
         
            +
            - [Scene Examples](https://github.com/decentraland/sdk7-goerli-plaza)
         
     | 
| 
      
 115 
     | 
    
         
            +
            - [ECS](https://docs.decentraland.org/creator/development-guide/sdk7/entities-components/)
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            ## Architecture Decisions
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
            For a deeper understanding of the SDK architecture:
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
      
 121 
     | 
    
         
            +
            - [ADR-117: CRDT Protocol for Scenes](https://adr.decentraland.org/adr/ADR-117)
         
     | 
| 
      
 122 
     | 
    
         
            +
            - [ADR-123: Schema and Serialization](https://adr.decentraland.org/adr/ADR-123)
         
     | 
| 
      
 123 
     | 
    
         
            +
            - [ADR-165: Component Declaration](https://adr.decentraland.org/adr/ADR-165)
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@dcl/sdk",
         
     | 
| 
       3 
3 
     | 
    
         
             
              "description": "",
         
     | 
| 
       4 
     | 
    
         
            -
              "version": "7.7.5- 
     | 
| 
      
 4 
     | 
    
         
            +
              "version": "7.7.5-13417607939.commit-3f07772",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "author": "Decentraland",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       7 
     | 
    
         
            -
                "@dcl/ecs": "7.7.5- 
     | 
| 
      
 7 
     | 
    
         
            +
                "@dcl/ecs": "7.7.5-13417607939.commit-3f07772",
         
     | 
| 
       8 
8 
     | 
    
         
             
                "@dcl/ecs-math": "2.1.0",
         
     | 
| 
       9 
9 
     | 
    
         
             
                "@dcl/explorer": "1.0.164509-20240802172549.commit-fb95b9b",
         
     | 
| 
       10 
     | 
    
         
            -
                "@dcl/js-runtime": "7.7.5- 
     | 
| 
       11 
     | 
    
         
            -
                "@dcl/react-ecs": "7.7.5- 
     | 
| 
       12 
     | 
    
         
            -
                "@dcl/sdk-commands": "7.7.5- 
     | 
| 
      
 10 
     | 
    
         
            +
                "@dcl/js-runtime": "7.7.5-13417607939.commit-3f07772",
         
     | 
| 
      
 11 
     | 
    
         
            +
                "@dcl/react-ecs": "7.7.5-13417607939.commit-3f07772",
         
     | 
| 
      
 12 
     | 
    
         
            +
                "@dcl/sdk-commands": "7.7.5-13417607939.commit-3f07772",
         
     | 
| 
       13 
13 
     | 
    
         
             
                "text-encoding": "0.7.0"
         
     | 
| 
       14 
14 
     | 
    
         
             
              },
         
     | 
| 
       15 
15 
     | 
    
         
             
              "keywords": [],
         
     | 
| 
         @@ -35,5 +35,5 @@ 
     | 
|
| 
       35 
35 
     | 
    
         
             
              },
         
     | 
| 
       36 
36 
     | 
    
         
             
              "types": "./index.d.ts",
         
     | 
| 
       37 
37 
     | 
    
         
             
              "typings": "./index.d.ts",
         
     | 
| 
       38 
     | 
    
         
            -
              "commit": " 
     | 
| 
      
 38 
     | 
    
         
            +
              "commit": "3f077721374fc753f4e3db2d6c7232df9bc252ef"
         
     | 
| 
       39 
39 
     | 
    
         
             
            }
         
     |