Skip to content
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

add: GLTF screenshots #794

Merged
merged 2 commits into from
Oct 25, 2023
Merged

add: GLTF screenshots #794

merged 2 commits into from
Oct 25, 2023

Conversation

nicoecheza
Copy link
Contributor

@nicoecheza nicoecheza commented Oct 17, 2023

closes decentraland/sdk#718

Screen Shot 2023-10-17 at 15 40 02

🤖 Generated by Copilot at aee2af2

This pull request adds the feature of displaying and saving thumbnails for the asset files in the inspector. It introduces a new AssetPreview component that renders a 3D model or an image file and allows taking a screenshot of it. It also adds new RPC methods and messages to the data layer to handle the thumbnails. It modifies the ImportAsset and ProjectAssetExplorer components to use the new functionality and updates the CSS and types files accordingly. It fixes some issues with the GLTF validation and loading and improves the error handling and the image encoding in the data layer. It also adds a mock thumbnail file to the feeded-local-fs and an empty change to the input.ts file.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 17, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 35f2e2e
Status: ✅  Deploy successful!
Preview URL: https://06396271.js-sdk-toolchain.pages.dev
Branch Preview URL: https://add-gltf-ss.js-sdk-toolchain.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/add/gltf-ss/dcl-sdk-7.3.24-6630735915.commit-5dccbb9.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/add/gltf-ss/dcl-sdk-commands-7.3.24-6630735915.commit-5dccbb9.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/add/gltf-ss/@dcl/inspector/dcl-inspector-7.3.24-6630735915.commit-5dccbb9.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/add/gltf-ss-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=add/gltf-ss

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Attention: 102 lines in your changes are missing coverage. Please review.

Comparison is base (5c48a9f) 70.92% compared to head (35f2e2e) 70.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   70.92%   70.48%   -0.45%     
==========================================
  Files         394      399       +5     
  Lines       13074    13199     +125     
  Branches     1754     1758       +4     
==========================================
+ Hits         9273     9303      +30     
- Misses       3590     3682      +92     
- Partials      211      214       +3     
Files Coverage Δ
...ector/src/components/ProjectAssetExplorer/types.ts 0.00% <ø> (ø)
...ages/@dcl/inspector/src/lib/babylon/setup/input.ts 15.00% <100.00%> (+1.07%) ⬆️
...ector/src/lib/data-layer/client/feeded-local-fs.ts 100.00% <100.00%> (ø)
.../@dcl/inspector/src/lib/logic/storage/in-memory.ts 93.61% <100.00%> (+0.13%) ⬆️
...kages/@dcl/inspector/src/redux/data-layer/index.ts 96.96% <100.00%> (+0.19%) ⬆️
...@dcl/inspector/src/redux/data-layer/sagas/index.ts 100.00% <100.00%> (ø)
.../src/components/ProjectAssetExplorer/Tile/types.ts 0.00% <0.00%> (ø)
packages/@dcl/inspector/src/redux/app/index.ts 88.88% <88.88%> (-0.70%) ⬇️
.../inspector/src/redux/data-layer/sagas/connected.ts 36.36% <50.00%> (-3.64%) ⬇️
...dcl/inspector/src/components/AssetPreview/index.ts 0.00% <0.00%> (ø)
... and 7 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nicoecheza nicoecheza force-pushed the add/gltf-ss branch 2 times, most recently from cb6286d to 4b0c7db Compare October 18, 2023 14:18
@nicoecheza nicoecheza marked this pull request as ready for review October 18, 2023 14:52
@cazala
Copy link
Member

cazala commented Oct 19, 2023

Importing models external files does work fine 👍 but importing them from the Asset Packs tab does not create a thumbnail.. seems inconsistent, and considering that the models do have a thumbnail in one tab it shouldn't be a huge effort to copy them to the Local Assets, right?

@nicoecheza nicoecheza force-pushed the add/gltf-ss branch 2 times, most recently from cb4f4c9 to 64429a5 Compare October 23, 2023 14:14
@nicoecheza nicoecheza force-pushed the add/gltf-ss branch 14 times, most recently from a23a392 to 91bdea3 Compare October 23, 2023 18:33
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@nicoecheza nicoecheza force-pushed the add/gltf-ss branch 4 times, most recently from 966ce05 to 627305c Compare October 24, 2023 14:34
@nicoecheza nicoecheza merged commit 72d5c53 into main Oct 25, 2023
@nicoecheza nicoecheza deleted the add/gltf-ss branch October 25, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate thumbnails for imported GLTF / GLB assets
2 participants