Skip to content

Commit 8fa2c9e

Browse files
gonpombo8cazalanicoechezacyaioxpravusjif
authored
Chore/update experimental main (#1087)
* chore: update readmes (#1054) * chore: update readmes * Update packages/@dcl/ecs/README.md Co-authored-by: Gon Pombo <[email protected]> Signed-off-by: Juan Cazala <[email protected]> --------- Signed-off-by: Juan Cazala <[email protected]> Co-authored-by: Gon Pombo <[email protected]> * add filters for asset explorer (#1056) * add filters for asset explorer * use decentraland/oddish-action * move 'Filter' to enum * move IAsset type determination to fn * fix several issues with import files (#1059) * fix race condition when validating models on import * add 'VALUE_NOT_IN_RANGE' to ignored model errors * fix import button on asset explorer styles * move feeded fs example model to Models/example/model.glb * reset the FileInput value so the same file can be selected again * fix import file size + extension validation (#1060) * change max file import size to 50mb * allow all extensions on FileInput to show errors on Error modal * fix: Load smart item asset path (#1062) * fix: Load smart items path * fix: Add a small retry when fetching the models to avoid race conditions * fix: Linter * fix: handle new categories without breaking (#1058) * fix Animator component initialization (#1061) * fix network entities for the editor (#1069) * fix network entities for the editor * fix tests & lint * fix tests * feat: Make createReactBasedUiSystem public (#1063) * feat: Make createReactBasedUiSystem public * fix: playground-assets.api.md * feat: Send PlayersHelpers to the initAssetPacks method * feat: Update BasicView Actions to handle TextArea fields (#1064) * Fix/dropdown input result callbacks (#1071) * fix uiDropdown not being updated * fix tests * fix test COVERAGE * remove unnecessary return * wip test * move 'spawn' ts checker to 'fork' (#1074) * fix several issues (#1072) * fix scroll on assets catalog * fix tooltip link on Action & Trigger components * deprecate alphaTexture on PBR & add it to unlit materials * replace 'ctrl' for '⌘' on shortcuts when necessary * add 'global' prop to AudioSource * feat: avatarTarget param addition in movePlayerTo() (#1073) * feat: Add AdminTools Smart Item (#1066) * WIP * feat: Export components Accordion and CheckboxGroup * fix: Update type of AddButton * feat: Add AdminTools Rewards Control Inspector * feat: Add AdminTools Video Control Inspector * feat: Add AdminTools Smart Items Control Inspector * feat: Remove unused code * chore: Use dev @dcl/asset-packs package * chore: Update dependencies * wip * wip * fix: Config * chore: Update @dcl/asset-packs dependency * feat: Update Pill padding styles * feat: Update VideoControl styles * feat: Move TextAnnouncementControl section to a new component * feat: Update SmartItemControl styles * feat: Update RewardsControl styles * feat: Move AdminAllowListControl section to a new component * feat: Refactor AdminToolkitView * chore: Update @dcl/asset-packs version * feat: Add border styles to the Accordion component * fix: AdminTools styles * refactor: RewardInspector component form to a new component * feat: Add RewardsBasicView component for Collectible Dispenser * feat: Add AdminToolsBasicView for AdminTools * fix: lint * fix: Rewards component visibility * feat: Add InfoTooltip for the AdminTools view * eat: Add InfoTooltip for the Rewards view * fix: Typo in Admin Text announcements control * fix: Prioritize Video Control over Text Announcements * fix: Rewards URL env * chore: Update @dcl/asset-packs version * chore: Update @dcl/asset-packs version * fix: Lint * feat: Add parentEntity, removeParent, getParent, getChildren methods to the initAssetPacks init * fix: Update asset-packs * fix: Bundle * fix: Update asset-packs * fix: Update asset-packs * fix: Update asset-packs * fix: Update asset-packs * fix: Remove link all screens and show author checkboxes * fix: Remove link all smart items handler * fix: Remove Airdrops section * fix: Show action Claim Airdrop only when the entity has the Rewards component * fix: Update asset-packs * fix: Update asset-packs * fix: Doesn't allow add rows * fix: AvailableActions Map * fox: Remove validation for dev * update asset-packs --------- Co-authored-by: Gonzalo DCL <[email protected]> * bump asset-packs 2.2.1 (#1077) * update left/right click button behaviour on renderer (#1078) * update left/right click button behaviour on renderer * remove gizmo right click button * fixed review comments * remove desktop client (OLD) option (#1083) * select "Scene" in tree on startup (#1082) * update left/right click button behaviour on renderer * select 'Scene' in tree on startup * add refresh button for Assets (#1085) * support border in uitransforms (#1084) * support border in uitransforms * fix build * change protocol to experimental * use main protocol * fix snapshots test * fix tests * fix coverage * update protocol --------- Signed-off-by: Juan Cazala <[email protected]> Co-authored-by: Juan Cazala <[email protected]> Co-authored-by: Nicolas Echezarreta <[email protected]> Co-authored-by: Gabriel Díaz <[email protected]> Co-authored-by: Pravus <[email protected]>
1 parent fb33ab1 commit 8fa2c9e

File tree

140 files changed

+3697
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3697
-427
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
run: make install
116116

117117
- name: update version of packages/@dcl/sdk/package.json, this version will be used for all packages
118-
uses: menduz/oddish-action@master
118+
uses: decentraland/oddish-action@master
119119
with:
120120
cwd: ./packages/@dcl/sdk
121121
deterministic-snapshot: true
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: publish @dcl/js-runtime package
138138
id: publish_dcl_js_runtime
139-
uses: menduz/oddish-action@master
139+
uses: decentraland/oddish-action@master
140140
with:
141141
registry-url: 'https://registry.npmjs.org'
142142
access: public
@@ -158,7 +158,7 @@ jobs:
158158
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }}
159159

160160
- name: publish @dcl/ecs package
161-
uses: menduz/oddish-action@master
161+
uses: decentraland/oddish-action@master
162162
id: publish_ecs
163163
with:
164164
registry-url: 'https://registry.npmjs.org'
@@ -194,7 +194,7 @@ jobs:
194194

195195
- name: publish @dcl/react-ecs package
196196
id: publish_dcl_react_ecs
197-
uses: menduz/oddish-action@master
197+
uses: decentraland/oddish-action@master
198198
with:
199199
registry-url: 'https://registry.npmjs.org'
200200
access: public
@@ -216,7 +216,7 @@ jobs:
216216
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }}
217217

218218
- name: publish @dcl/inspector package
219-
uses: menduz/oddish-action@master
219+
uses: decentraland/oddish-action@master
220220
id: publish_decentraland_inspector
221221
with:
222222
registry-url: 'https://registry.npmjs.org'
@@ -253,7 +253,7 @@ jobs:
253253
INSPECTOR_URL: ${{ secrets.SDK_TEAM_S3_BASE_URL }}/${{ steps.publish_decentraland_inspector.outputs.s3-bucket-key }}
254254

255255
- name: publish @dcl/sdk-commands package
256-
uses: menduz/oddish-action@master
256+
uses: decentraland/oddish-action@master
257257
id: publish_decentraland_sdk_commands
258258
with:
259259
registry-url: 'https://registry.npmjs.org'
@@ -297,7 +297,7 @@ jobs:
297297
SDK_COMMANDS_S3_URL: ${{ secrets.SDK_TEAM_S3_BASE_URL }}/${{ steps.publish_decentraland_sdk_commands.outputs.s3-bucket-key }}
298298

299299
- name: publish @dcl/sdk package
300-
uses: menduz/oddish-action@master
300+
uses: decentraland/oddish-action@master
301301
id: publish_decentraland_sdk
302302
with:
303303
registry-url: 'https://registry.npmjs.org'
@@ -326,7 +326,7 @@ jobs:
326326
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }}
327327

328328
- name: publish @dcl/playground-assets package
329-
uses: menduz/oddish-action@master
329+
uses: decentraland/oddish-action@master
330330
id: publish_playground_assets
331331
with:
332332
registry-url: 'https://registry.npmjs.org'

README.md

Lines changed: 150 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,171 @@
1-
# Decentraland SDK 7
1+
# Decentraland SDK Toolchain
22

3-
[![codecov](https://codecov.io/gh/decentraland/js-sdk-toolchain/branch/main/graph/badge.svg?token=F7J331CGP6)](https://codecov.io/gh/decentraland/js-sdk-toolchain)
3+
This monorepo contains the core packages for Decentraland's SDK and development tools.
44

5-
Use the Decentraland Software Development Kit v7 to create experiences for the Decentraland ecosystem.
5+
## Packages
66

7-
## Create a scene and preview it locally
7+
- **[@dcl/sdk](packages/@dcl/sdk/README.md)**: Main SDK package for building Decentraland scenes using TypeScript/JavaScript
8+
- **[@dcl/ecs](packages/@dcl/ecs/README.md)**: Core Entity Component System (ECS) implementation with CRDT-based networking support
9+
- **[@dcl/react-ecs](packages/@dcl/react-ecs/README.md)**: React bindings for the ECS, providing a declarative way to build UIs using React's component model and JSX syntax
10+
- **[@dcl/js-runtime](packages/@dcl/js-runtime/README.md)**: TypeScript definitions for the Decentraland scene runtime environment.
11+
- **[@dcl/inspector](packages/@dcl/inspector/README.md)**: Visual editor and development tool for building Decentraland scenes
12+
- **[@dcl/sdk-commands](packages/@dcl/sdk-commands/README.md)**: CLI tools and commands for scene development, testing, and deployment
13+
- **[@dcl/playground-assets](packages/@dcl/playground-assets/README.md)**: Contains the built assets required by the Decentraland Playground
814

9-
1. Run `npx @dcl/sdk-commands init` on an empty folder.
10-
2. Preview it with `npm run start`!
15+
## Quick Start
1116

12-
## Repository guide
17+
1. Clone the repository:
1318

14-
This repository consists of the following components, packaged for the `nodejs`/`npm` ecosystem (find them under the respective subfolder in `packages`):
19+
```bash
20+
git clone https://github.com/decentraland/js-sdk-toolchain.git
21+
cd js-sdk-toolchain
22+
```
1523

16-
* `@dcl/react-ecs`: a framework to create scenes using the [React](https://reactjs.org) framework
17-
* `@dcl/sdk`: contains all the packages that a scene needs to work.
18-
* `@dcl/ecs`: an engine used to render things on screen
19-
* `@dcl/sdk-commands`: contains the command line interface
20-
* `@dcl/inspector`: Editor interface.
24+
2. Install dependencies and build all packages:
2125

22-
And some internal or maybe useful packages if you're digging deeper into how the Decentraland runtime works:
26+
```bash
27+
make install
28+
make build
29+
```
2330

24-
* `@dcl/js-runtime`: the `js-runtime` contains the typings for the environment variables available in the sandboxed execution environment for scenes
25-
* `@dcl/playground-assets`: contains the files needed by the playground. <https://playground.decentraland.org/>
31+
## Development
2632

27-
### Versioning notes
33+
### Building
2834

29-
When `@dcl/sdk` is built, as it depends on new versions of `@dcl/ecs`, these are built first and `@dcl/sdk` includes the new versions.
35+
The project uses a Makefile to handle all build tasks:
3036

31-
### ECS 6 dev support
37+
```bash
38+
# Build everything (including protobuf)
39+
make build
3240

33-
The ECS 6 lives in the `6.x.x` branch, there will no longer be new features but it's available for fixes or patches.
34-
With a PR to `6.x.x`, you can test the build with the S3 publish, but it'll be necessary to create a release for propagating under `decentraland-ecs@latest`.
41+
# Clean build artifacts
42+
make clean
3543

36-
### Updating golden files (.crdt)
44+
# Clean everything (including node_modules) and rebuild
45+
make deep-clean && make install && make build
46+
```
3747

38-
We use golden files to create snapshots for a series of test scenes. Most changes to the codebase impose a change in the amount of opcodes executed in the actual scene. We use a QuickJS virtual machine to benchmark how many opcodes are required. Even though this is not representative of the reallity of optimized JIT virual machines, it is a good approximation of the impact that the change would imposes on scene developers.
48+
### Testing
3949

40-
To re-create these golden files, run `make build update-snapshots`. In some cases, this will generate some discrepancies with the clean environment used by the continuous integration we use (CircleCI). If you run into this issue, please run `make deep-clean-and-snapshot` to invalidate all cached calculations. **Be careful**: it will clean all local changes on your git [working tree](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefworkingtreeaworkingtree).
50+
```bash
51+
# Run all tests
52+
make test
4153

42-
### Release a new SDK Version
54+
# Run ECS tests
55+
make test-ecs
4356

44-
After merging a PR to the main branch, we should wait until the [actions](https://github.com/decentraland/js-sdk-toolchain/actions/workflows/ci.yml) finish the process.
57+
# Run Inspector tests
58+
make test-inspector
4559

46-
Once the actions completed successfuly, we have to create a new [Release](https://github.com/decentraland/js-sdk-toolchain/releases/new) from the main branch following this [version guideline](https://docs.decentraland.org/creator/releases/version-agreement/).
60+
# Run tests with coverage
61+
make test-coverage
4762

48-
## Copyright info
63+
# Update test snapshots
64+
make update-snapshots
65+
```
4966

50-
This repository is protected with a standard Apache 2 license. See the terms and conditions in the LICENSE file.
67+
### Protobuf
68+
69+
The project uses Protocol Buffers for type-safe communication. Protobuf files are automatically compiled during the build process.
70+
71+
To manually rebuild protobuf files:
72+
73+
```bash
74+
make proto
75+
```
76+
77+
## Release Process
78+
79+
1. Merge changes to the main branch
80+
2. Wait for CI workflow completion in GitHub Actions
81+
3. Create a new Release following the [version guidelines](https://docs.decentraland.org/creator/releases/version-agreement/)
82+
83+
## Testing Infrastructure
84+
85+
### Snapshot Testing
86+
87+
We use snapshot testing with golden files to track runtime performance impacts:
88+
89+
- Snapshots measure QuickJS opcode execution for test scenes
90+
- Run `make build update-snapshots` to update golden files
91+
- For clean environment matching CI, use `make deep-clean-and-snapshot`
92+
> Note: This cleans all local changes in your git working tree
93+
94+
### Running Tests
95+
96+
```bash
97+
# All tests
98+
make test
99+
100+
# Specific package
101+
make test-ecs
102+
make test-inspector
103+
```
104+
105+
## SDK Version Support
106+
107+
### SDK7
108+
109+
The main branch contains SDK7, the current version. All new features and improvements target SDK7.
110+
111+
### SDK6 Maintenance
112+
113+
SDK6 is maintained in the `6.x.x` branch for critical fixes:
114+
115+
- No new features are added
116+
- Only bug fixes and security patches
117+
- Create PRs against the `6.x.x` branch
118+
- Releases update the `decentraland-ecs` package
119+
120+
## Troubleshooting
121+
122+
If you encounter build issues:
123+
124+
1. Clean the project and reinstall dependencies:
125+
126+
```bash
127+
make clean && make install
128+
```
129+
130+
2. Rebuild everything and run tests:
131+
132+
```bash
133+
make build && make test
134+
```
135+
136+
Common issues:
137+
138+
- **Build failures**: Try `make clean && make install && make build`
139+
- **Test failures**: Run `make test` to see detailed errors
140+
- **Protobuf errors**: Run `make proto` to rebuild protocol buffers
141+
- **Package conflicts**: Delete `node_modules` and run `make install` again
142+
- **TypeScript errors**: Check package versions match in `package.json` files
143+
144+
## Contributing
145+
146+
1. Fork the repository
147+
2. Create your feature branch
148+
3. Commit your changes
149+
4. Push to the branch
150+
5. Create a Pull Request
151+
152+
## Architecture Decisions
153+
154+
For a deeper understanding of the architecture and design decisions:
155+
156+
- [ADR-117: CRDT Protocol for Scenes](https://adr.decentraland.org/adr/ADR-117) - Details the scene state synchronization
157+
- [ADR-123: Schema and Serialization](https://adr.decentraland.org/adr/ADR-123) - Explains component data handling
158+
- [ADR-124: Implementing Flexbox-based UI](https://adr.decentraland.org/adr/ADR-124) - Describes the UI layout system
159+
- [ADR-125: User Interface Components](https://adr.decentraland.org/adr/ADR-125) - Covers the UI system architecture
160+
- [ADR-133: Scene Runtime Definition](https://adr.decentraland.org/adr/ADR-133) - Details how scenes are executed
161+
- [ADR-153: Transform SDK Component](https://adr.decentraland.org/adr/ADR-153) - Explains the core Transform component
162+
- [ADR-165: Component Declaration](https://adr.decentraland.org/adr/ADR-165) - Describes the ECS component system design
163+
- [ADR-237: SDK 7 Custom UI Components](https://adr.decentraland.org/adr/ADR-237) - Details the UI component system
164+
- [ADR-281: Items in Decentraland tooling](https://adr.decentraland.org/adr/ADR-281) - Explains the Items abstraction used across tools
165+
- [ADR-282: Decentraland Inspector](https://adr.decentraland.org/adr/ADR-282) - Details the Inspector's architecture and integration approaches
166+
167+
For more ADRs, visit our [ADR repository](https://adr.decentraland.org/).
168+
169+
## License
170+
171+
Apache 2.0

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
77
"dependencies": {
88
"@actions/core": "^1.10.0",
9-
"@dcl/protocol": "1.0.0-13923489786.commit-1f4cb5e",
9+
"@dcl/protocol": "1.0.0-14033250574.commit-0daf6ca",
1010
"@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1",
1111
"@dcl/ts-proto": "1.153.0",
1212
"@types/fs-extra": "^9.0.12",

0 commit comments

Comments
 (0)