-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: composite #1042
refactor: composite #1042
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1042 +/- ##
==========================================
- Coverage 64.03% 63.58% -0.46%
==========================================
Files 579 580 +1
Lines 18049 18314 +265
Branches 2288 2301 +13
==========================================
+ Hits 11558 11645 +87
- Misses 6082 6259 +177
- Partials 409 410 +1 ☔ View full report in Codecov by Sentry. |
Deploying js-sdk-toolchain with Cloudflare Pages
|
Test this pull request
|
|
||
export enum DropTypesEnum { | ||
ProjectAsset = 'project-asset', | ||
BuilderAsset = 'builder-asset' | ||
ProjectAsset = 'local-asset', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be here?
ProjectAsset = 'local-asset', | |
LocalAsset = 'local-asset', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Updated ✅
This PR refactor the
addAsset
operation to work with the new@dcl/asset-packs
asset format, which uses composites instead of the custom format.It also adds support for multiple entities per item, since the composite supports multiple entities. When multiple entities are present, a main entity will be created (this one will have the Transform in the position the user selected) and the item's entities will be added as children of that main entity. When a single entity is used and it's id is 0, then those components will be added to the main entities (to avoid having the main entity with a single child when only 1 entity is needed. which is the case of the current smart items).
Finally, it refactors the ProjectAssets and BuilderAssets into LocalAssets and CatalogAssets, which match better the current nomenclatures.