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

Feat add loader for gltf subasset #1071 #1075

Merged
merged 12 commits into from
Oct 17, 2022

Conversation

zhuxudong
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, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

@zhuxudong zhuxudong requested a review from gz65555 September 23, 2022 04:04
@zhuxudong zhuxudong self-assigned this Sep 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2022

Codecov Report

Base: 44.24% // Head: 41.89% // Decreases project coverage by -2.34% ⚠️

Coverage data is based on head (f316914) compared to base (e3e5b71).
Patch coverage: 4.60% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           dev/0.9    #1075      +/-   ##
===========================================
- Coverage    44.24%   41.89%   -2.35%     
===========================================
  Files          342      343       +1     
  Lines        17837    17947     +110     
  Branches      2459     2491      +32     
===========================================
- Hits          7892     7519     -373     
- Misses        9295     9825     +530     
+ Partials       650      603      -47     
Impacted Files Coverage Δ
packages/loader/src/GLTFLoader.ts 8.10% <0.00%> (-16.90%) ⬇️
packages/loader/src/MaterialLoader.ts 4.65% <0.00%> (-0.23%) ⬇️
packages/loader/src/gltf/GLTFParser.ts 33.33% <0.00%> (ø)
packages/loader/src/gltf/GLTFResource.ts 6.66% <ø> (ø)
packages/loader/src/gltf/parser/AnimationParser.ts 2.40% <0.00%> (-0.17%) ⬇️
packages/loader/src/gltf/parser/BufferParser.ts 17.64% <0.00%> (-1.11%) ⬇️
packages/loader/src/gltf/parser/MaterialParser.ts 3.19% <0.00%> (-0.47%) ⬇️
packages/loader/src/gltf/parser/MeshParser.ts 2.91% <0.00%> (-0.21%) ⬇️
packages/loader/src/gltf/parser/Parser.ts 40.74% <ø> (ø)
packages/loader/src/gltf/parser/ParserContext.ts 11.11% <0.00%> (-22.23%) ⬇️
... and 45 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@gz65555
Copy link
Collaborator

gz65555 commented Sep 26, 2022

Sub asset parser should use sub asset loader. You use the cache of parser result if you have loaded the sub asset. Such as:

for(let i = 0;i < textures.length: i++) {
  contex.textures[i] = resourceManager.load(context.url + `q=textures[${i}]`);
}

@zhuxudong zhuxudong changed the base branch from main to dev/0.9 October 17, 2022 09:59
# Conflicts:
#	packages/core/src/shadow/Extension.ts
#	packages/core/src/shadow/ShadowFeature.ts
#	packages/loader/src/GLTFLoader.ts
#	packages/loader/src/gltf/GLTFParser.ts
#	packages/loader/src/gltf/GLTFResource.ts
#	packages/loader/src/gltf/parser/AnimationParser.ts
#	packages/loader/src/gltf/parser/MaterialParser.ts
#	packages/loader/src/gltf/parser/MeshParser.ts
#	packages/loader/src/gltf/parser/Parser.ts
#	packages/loader/src/gltf/parser/SceneParser.ts
#	packages/loader/src/gltf/parser/TextureParser.ts
@GuoLei1990 GuoLei1990 added the enhancement New feature or request label Oct 17, 2022
@GuoLei1990 GuoLei1990 changed the title feat: add loader for gltf subasset #1071 Feat add loader for gltf subasset #1071 Oct 17, 2022
@GuoLei1990 GuoLei1990 merged commit 34c4561 into galacean:dev/0.9 Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants