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

Refactor glTFResource #1831

Merged
merged 8 commits into from
Oct 30, 2023
Merged

Conversation

GuoLei1990
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Improve the rationality and ease of use of glTFResource
  • Internally increase the reference counting mechanism of template resources and use it to release resources of glTFResource BUG

@GuoLei1990 GuoLei1990 marked this pull request as draft October 24, 2023 06:33
@GuoLei1990 GuoLei1990 added bug Something isn't working glTF labels Oct 24, 2023
@GuoLei1990 GuoLei1990 added this to the 1.2 milestone Oct 24, 2023
@GuoLei1990 GuoLei1990 self-assigned this Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

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

Comparison is base (e591a10) 65.09% compared to head (2e301e0) 65.16%.

❗ Current head 2e301e0 differs from pull request most recent head a56fa25. Consider uploading reports for the commit a56fa25 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev/1.2    #1831      +/-   ##
===========================================
+ Coverage    65.09%   65.16%   +0.06%     
===========================================
  Files          473      473              
  Lines        23750    23801      +51     
  Branches      3368     3381      +13     
===========================================
+ Hits         15461    15510      +49     
- Misses        7094     7101       +7     
+ Partials      1195     1190       -5     
Files Coverage Δ
packages/core/src/2d/sprite/SpriteMask.ts 87.27% <100.00%> (-0.12%) ⬇️
packages/core/src/2d/sprite/SpriteRenderer.ts 90.41% <100.00%> (ø)
packages/core/src/Component.ts 94.91% <100.00%> (+0.17%) ⬆️
packages/core/src/Entity.ts 85.41% <100.00%> (+1.10%) ⬆️
packages/core/src/asset/ResourceManager.ts 60.28% <100.00%> (+0.18%) ⬆️
packages/core/src/mesh/MeshRenderer.ts 90.36% <100.00%> (+1.20%) ⬆️
...ackages/loader/src/gltf/parser/GLTFEntityParser.ts 81.48% <100.00%> (+1.48%) ⬆️
...ckages/loader/src/gltf/parser/GLTFParserContext.ts 95.16% <ø> (ø)
packages/loader/src/gltf/parser/GLTFSceneParser.ts 57.34% <100.00%> (-0.59%) ⬇️
...ckages/loader/src/gltf/parser/GLTFTextureParser.ts 68.42% <100.00%> (+0.85%) ⬆️
... and 9 more

... and 3 files with indirect coverage changes

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

@GuoLei1990 GuoLei1990 marked this pull request as ready for review October 25, 2023 06:16
@GuoLei1990 GuoLei1990 added the enhancement New feature or request label Oct 25, 2023
@GuoLei1990 GuoLei1990 linked an issue Oct 25, 2023 that may be closed by this pull request
Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GuoLei1990 GuoLei1990 merged commit e524dd2 into galacean:dev/1.2 Oct 30, 2023
5 checks passed
zhuxudong added a commit to zhuxudong/engine that referenced this pull request Nov 7, 2023
* dev/1.2: (31 commits)
  Add sunSource (galacean#1823)
  Fix(ShaderLab): make `UsePass` directive compatible with all builtin shader names (galacean#1855)
  feat: ParticleGenerator support simulationSpeed (galacean#1854)
  fix: sprite destroy (galacean#1852)
  "v1.1.0-beta.18"
  Fix quaternion to euler bug (galacean#1851)
  Fix ColorOverLifetimeModule mode invalid bug (galacean#1850)
  fix: no autoplay when set animatorController after enable (galacean#1843)
  Refactor `glTFResource` (galacean#1831)
  Fix material destoroy bug (galacean#1847)
  Fix Sprite can't batch bug caused by material instance (galacean#1830)
  "v1.1.0-beta.17"
  fix: glTF animation parse bug (galacean#1845)
  fix: mesh decoder (galacean#1844)
  "v1.1.0-beta.16"
  Fix blendShape crossFade bug (galacean#1841)
  fix: ignore ambient in 2d template (galacean#1836)
  "v1.1.0-beta.15"
  Fix blendShapeAnimation crossFade bug (galacean#1840)
  fix: ignore case of asset url (galacean#1809)
  ...

# Conflicts:
#	packages/loader/src/gltf/parser/GLTFParserContext.ts
@GuoLei1990 GuoLei1990 deleted the pr/opt-gltf-resource branch November 8, 2023 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request glTF
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Improve GLTFResource
2 participants