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

Validate imported GLTFs. #598

Merged
merged 1 commit into from
May 23, 2023
Merged

Validate imported GLTFs. #598

merged 1 commit into from
May 23, 2023

Conversation

AN-DCL
Copy link
Contributor

@AN-DCL AN-DCL commented May 23, 2023

After user clicks on red "Import" button, GLTF is validated by a function provided by Babylon.
File size check is included into validation procedure.
Red border around file name is displayed only when the name is incorrect.
The red cross button which removes an asset is deliberately made always visible.
Closes decentraland/sdk#765

@AN-DCL AN-DCL requested a review from nicoecheza May 23, 2023 17:54
@github-actions
Copy link
Contributor

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/gltf-validation-signed/dcl-sdk-7.1.16-5060506018.commit-b078534.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/gltf-validation-signed/dcl-sdk-commands-7.1.16-5060506018.commit-b078534.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/gltf-validation-signed/@dcl/inspector/dcl-inspector-7.1.16-5060506018.commit-b078534.tgz"
  • The /changerealm command to test test in-world

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

@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c718b1c) 72.02% compared to head (dd03666) 72.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #598   +/-   ##
=======================================
  Coverage   72.02%   72.02%           
=======================================
  Files         254      254           
  Lines        8648     8648           
  Branches     1113     1113           
=======================================
  Hits         6229     6229           
  Misses       2310     2310           
  Partials      109      109           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AN-DCL AN-DCL merged commit 1c3fdd9 into main May 23, 2023
@AN-DCL AN-DCL deleted the gltf-validation-signed branch May 23, 2023 18:08
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.

User should not be able to import invalid GLTF/GLB files
2 participants