Skip to content

Commit

Permalink
fix: Wearables max size limit (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox authored Sep 26, 2023
1 parent 7ace976 commit d157f01
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion content/creator/sdk7/projects/smart-wearables.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ To publish your smart wearable:
2. Run `npm run pack` on your project folder. This generates a `smart-wearable.zip` file in your project folder.

{{< hint warning >}}
**📔 Note**: The output of `npm run pack` will indicate the size of the uncompressed exported project, it must be under 2MB. If larger than that, it won’t be accepted by the builder.
**📔 Note**: The output of `npm run pack` will indicate the size of the uncompressed exported project, it must be under 3MB. If larger than that, it won’t be accepted by the builder.
{{< /hint >}}

3. Open the Builder, open the Collections tab, click + to upload a new wearable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ After generating your Smart Wearable using the [SDK7](/creator/development-guide

#### Uploading Your File

Remember that you need to create a collection before uploading your file. If you don’t know how to do that, check [Creating a Collection](creator/wearables-and-emotes/manage-collections/creating-collection/). To upload your Smart Wearable, drag and drop the file on the **_New Item_** window or browse your computer. It will automatically detect if the file is a Smart Wearable. **Remember that the collection max file size is 2MB**.
Remember that you need to create a collection before uploading your file. If you don’t know how to do that, check [Creating a Collection](creator/wearables-and-emotes/manage-collections/creating-collection/). To upload your Smart Wearable, drag and drop the file on the **_New Item_** window or browse your computer. It will automatically detect if the file is a Smart Wearable. **Remember that the collection max file size is 3MB**.

<img src="/images/wearables-and-emotes/uploading-smart-wearables/01_new_item.png" width="400" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Once you export your wearable, you’ll have to upload it to the builder. This d

#### Uploading Your File

Remember that you need to create a collection before you can upload your file. If you don’t know how to do that, check [Creating a Collection](/creator/wearables-and-emotes/manage-collections/creating-a-collection.md). To upload your wearable, just drag and drop the file on the **_New Item_** window or browse your computer. It will automatically detect if the file is an emote or wearable. **Remember that the collection max file size is 2MB**.
Remember that you need to create a collection before you can upload your file. If you don’t know how to do that, check [Creating a Collection](/creator/wearables-and-emotes/manage-collections/creating-a-collection.md). To upload your wearable, just drag and drop the file on the **_New Item_** window or browse your computer. It will automatically detect if the file is an emote or wearable. **Remember that the collection max file size is 3MB**.

<img src="/images/wearables-and-emotes/uploading-wearables/01_new_item.png" width="400" />

Expand Down Expand Up @@ -104,7 +104,6 @@ This is a brief statement describing your item that will be displayed in the mar

## **Overrides**


Overrides determine which Wearable categories or avatar body parts your item will hide. For instance, a hat with attached hair might need to hide the _Hair_ category. A deep-sea diver helmet may require hiding head accessories like earrings, eyewear, tiaras, etc., which wouldn’t be visible. Multiple options can be selected for each override.

- **Base Body**: This refers to core avatar parts like the _head_ and _hands_. For example, if you’re creating a **Handwear** item such as a robot mechanic hand, you’ll likely need to hide _hands_ to prevent overlap and clipping.
Expand Down
19 changes: 10 additions & 9 deletions content/creator/wearables-and-emotes/wearables/linked-wearables.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Common errors that must be avoided when uploading batched items:
- There's no `wearable.json` file in the zip.
- The ZIP file doesn't have in its root directory the `wearable.json` file.
- The `wearable.json` has an incorrect format or values.
- The file is bigger than 2MBs. Linked Wearables have the same limitation as regular wearables in terms of size as the standard ones.
- The file is bigger than 3MBs. Linked Wearables have the same limitation as regular wearables in terms of size as the standard ones.
- The custom optional thumbnail image is not a png file.

## Seeing the wearables in world
Expand Down Expand Up @@ -503,15 +503,14 @@ In order for Linked Wearables to work, the third parties need to provide an API

1. `@GET /registry/:registry-id/address/:address/assets` - Retrieves a list of assets associated with a given address
2. `@GET /registry/:registry-id/address/:address/assets/:id` - Validates if a DCL asset is owned by a user.
3. `@POST /registry/:registry-id/ownership`that receives an array of data and performs validations in batch.
3. `@POST /registry/:registry-id/ownership`that receives an array of data and performs validations in batch.

It's important to note that these endpoints are used to validate a user profile and what they are wearing, therefore there are performance SLA requirements to avoid harming the platform experience.

Considering that the client validates user profiles in batches so any delay in processing a single profile with LinkedWearables will impact the entire batch of users. This means that if the API performs slowly, it will negatively affect the overall performance of all users within that batch.

To avoid damaging the platform performance all these endpoints **must have an average response below the 500ms**. This benchmark is crucial to prevent any degradation in the platform's overall performance.


**Technical details and examples [here](https://adr.decentraland.org/adr/ADR-42).**

In the next sub-sections we'll provide an explanation on how to build the mentioned API by using an implementation example of the many possible ones.
Expand Down Expand Up @@ -619,11 +618,11 @@ The API can do the following:
}
```

## Endpoint `@POST /registry/:registry-id/ownership`
The client performs profile validations in batches, where multiple users' profiles are validated simultaneously. This endpoint is crucial to optimize performance and minimize the number of requests made to the resolver API. It enables parallel processing by sending a list of users and their corresponding items to be validated together. Its performance needs to be prioritized to prevent delays in rendering avatars within the virtual world.
## Endpoint `@POST /registry/:registry-id/ownership`

The client performs profile validations in batches, where multiple users' profiles are validated simultaneously. This endpoint is crucial to optimize performance and minimize the number of requests made to the resolver API. It enables parallel processing by sending a list of users and their corresponding items to be validated together. Its performance needs to be prioritized to prevent delays in rendering avatars within the virtual world.

Example **body** for the POST would be:
Example **body** for the POST would be:

```json
[
Expand All @@ -638,8 +637,10 @@ Example **body** for the POST would be:
...
]
```
and the expected response:
```json

and the expected response:

```json
[
{
"urn_decentraland": "urn:decentraland:matic:collections-thirdparty:cryptohats:0xc04528c14c8ffd84c7c1fb6719b4a89853035cdd:1",
Expand Down

0 comments on commit d157f01

Please sign in to comment.