@dcl/asset-packs 2.1.2 → 2.1.3-20250120214922.commit-0896586
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 +33 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
# Asset Packs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The asset-packs repository is a fundamental component of the Decentraland ecosystem that serves as the central storage and distribution system for default items and assets. It manages and distributes:
|
|
6
|
+
|
|
7
|
+
- **Asset Packs**: Curated collections of 3D assets organized by themes (cyberpunk, steampunk, genesis city)
|
|
8
|
+
- **Static Items**: Basic 3D models with textures and materials
|
|
9
|
+
- **Smart Items**: Interactive items with programmable behaviors and configurations
|
|
10
|
+
|
|
11
|
+
When deployed, all assets are hashed and uploaded to an S3 bucket under `contents/:hash`. An npm package `@dcl/asset-packs` is published containing:
|
|
12
|
+
|
|
13
|
+
- A `catalog.json` with all asset packs data and content hashes
|
|
14
|
+
- A `bin/index.js` runtime required for Smart Items functionality
|
|
15
|
+
|
|
16
|
+
The assets are accessible through `builder-items.decentraland.*` via Cloudflare.
|
|
17
|
+
|
|
18
|
+
## Distribution
|
|
4
19
|
|
|
5
20
|
### Production
|
|
6
21
|
|
|
7
22
|
- npm: `@dcl/asset-packs@latest`
|
|
8
|
-
|
|
9
23
|
- cdn: `https://builder-items.decentraland.org/contents/:hash`
|
|
10
24
|
|
|
11
25
|
### Development
|
|
12
26
|
|
|
13
27
|
- npm: `@dcl/asset-packs@next`
|
|
14
|
-
|
|
15
28
|
- cdn: `https://builder-items.decentraland.zone/contents/:hash`
|
|
16
29
|
|
|
17
30
|
### Deployment
|
|
18
31
|
|
|
19
|
-
Every push to the `main` branch will be deployed to the development
|
|
32
|
+
Every push to the `main` branch will be deployed to the development environment.
|
|
20
33
|
|
|
21
34
|
Every [release](https://github.com/decentraland/asset-packs/releases) will be deployed to the production environment.
|
|
22
35
|
|
|
@@ -25,13 +38,15 @@ Every [release](https://github.com/decentraland/asset-packs/releases) will be de
|
|
|
25
38
|
You can develop this repo locally and test it within the Web Editor by doing the following:
|
|
26
39
|
|
|
27
40
|
Go to this repo in your machine and do this:
|
|
41
|
+
|
|
28
42
|
1. Run `npm run start` to watch for changes and start the SDK7 dev server (on port `8000` by default).
|
|
29
43
|
2. On a new terminal, run `docker-compose up` to start the local content server on `http://localhost:9000/asset-packs`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
3. On a new terminal, run `npm run upload` to upload all assets to your local content server (copy the `.env.example` into `.env` if you haven't done that before).
|
|
45
|
+
4. Run `npm link` to allow other projects to symlink to this one.
|
|
46
|
+
5. Copy the path to the `bin/index.js` in this repo (something like `/Users/my-user/path/to/asset-packs/bin/index.js`).
|
|
33
47
|
|
|
34
48
|
Go the `js-sdk-toolchain` repo in your machine and do this:
|
|
49
|
+
|
|
35
50
|
1. Run `cd packages/@dcl/inspector`.
|
|
36
51
|
2. Run `npm link @dcl/asset-packs` to symlink to your local repository
|
|
37
52
|
3. Run `npm start` to start a local dev server. It should start by default on port `8000` but since we are already using it for the SDK7 dev server, it will start on port `8001`.
|
|
@@ -49,12 +64,19 @@ Now you are all set, you can start developing the SDK7 scene in this repo, use i
|
|
|
49
64
|
### Troubleshooting
|
|
50
65
|
|
|
51
66
|
#### Missing `@dcl/ecs` dependency
|
|
67
|
+
|
|
52
68
|
This package has a dependency on `@dcl/ecs` for several types. This is package is not added as a dependency even though it should be, because this causes an issue when installing `@dcl/sdk@next` on a scene. The problem is the following dependency chains:
|
|
53
69
|
|
|
54
|
-
1
|
|
55
|
-
2
|
|
70
|
+
1. `@dcl/sdk` -> `@dcl/ecs`
|
|
71
|
+
2. `@dcl/sdk` -> `@dcl/sdk-commands` -> `@dcl/inspector` -> `@dcl/asset-packs` -> `@dcl/ecs`
|
|
56
72
|
|
|
57
73
|
When a user installs `@dcl/sdk@next` on as scene, that updates `@dcl/ecs` from 1) but not the one from 2) and due to the clash npm stores the `@latest` version on the top level of node_modules and the `@next` version only whithin the `@dcl/sdk/node_modules`. This can cause runtime issues.
|
|
58
74
|
|
|
59
|
-
So we decisded to remove the explicit dependency of `@dcl/ecs` from the `@dcl/asset-packs` package, and that allows users to install `@dcl/sdk@next` or upgrade versions without problems.
|
|
75
|
+
So we decisded to remove the explicit dependency of `@dcl/ecs` from the `@dcl/asset-packs` package, and that allows users to install `@dcl/sdk@next` or upgrade versions without problems.
|
|
60
76
|
The downside is that if this package is used in some project where `@dcl/ecs` is not available, it's going to break. This package is not meant to be used outside of a Decentraland scene anyway so that shouldn't be a problem.
|
|
77
|
+
|
|
78
|
+
## Related Architecture Decisions
|
|
79
|
+
|
|
80
|
+
For a deeper understanding of the architecture and design decisions:
|
|
81
|
+
|
|
82
|
+
- [ADR-281: Items in Decentraland tooling](https://adr.decentraland.org/adr/ADR-281) - Describes the Items abstraction, types of items (Static, Smart, Custom), and technical implementation details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/asset-packs",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3-20250120214922.commit-0896586",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/definitions.js",
|
|
6
6
|
"typings": "dist/definitions.d.ts",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"semi": false,
|
|
65
65
|
"printWidth": 80
|
|
66
66
|
},
|
|
67
|
-
"commit": "
|
|
67
|
+
"commit": "0896586301f7005325f718bad9a62eea8a9f5205"
|
|
68
68
|
}
|