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

fix: load gltf has no material #408

Merged
merged 2 commits into from
Jul 30, 2021
Merged

Conversation

czizzy
Copy link
Member

@czizzy czizzy commented Jul 29, 2021

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:

@czizzy czizzy requested a review from singlecoder July 29, 2021 09:35
Copy link
Member

@singlecoder singlecoder left a comment

Choose a reason for hiding this comment

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

+1

@czizzy czizzy requested a review from GuoLei1990 July 29, 2021 09:41
const material = materials[i];
let materialResource = null;
let type = "";
if (materials && materials.length) {
Copy link
Member

Choose a reason for hiding this comment

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

Tip: use typescript's feature. materials?.length

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2021

Codecov Report

Merging #408 (6ef6d0d) into main (8585af9) will increase coverage by 0.17%.
The diff coverage is 0.00%.

❗ Current head 6ef6d0d differs from pull request most recent head 10ca95b. Consider uploading reports for the commit 10ca95b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
+ Coverage   44.68%   44.85%   +0.17%     
==========================================
  Files         314      314              
  Lines       17496    17426      -70     
  Branches     2343     2328      -15     
==========================================
- Hits         7818     7817       -1     
+ Misses       9678     9609      -69     
Impacted Files Coverage Δ
.../loader/src/scene-loader/resources/GLTFResource.ts 0.00% <0.00%> (ø)
...ader/src/scene-loader/resources/TextureResource.ts 0.00% <ø> (ø)
packages/draco/src/decoder.ts 0.00% <0.00%> (-0.92%) ⬇️
packages/loader/src/scene-loader/Oasis.ts 0.00% <0.00%> (ø)
...ackages/loader/src/scene-loader/ResourceManager.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8585af9...10ca95b. Read the comment docs.

@GuoLei1990 GuoLei1990 requested a review from zhuxudong July 30, 2021 03:05
Copy link
Member

@zhuxudong zhuxudong left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Collaborator

@gz65555 gz65555 left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Member

@GuoLei1990 GuoLei1990 left a comment

Choose a reason for hiding this comment

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

+1

@@ -38,9 +38,6 @@ export class TextureResource extends SchemaResource {
setMeta() {
if (this.resource) {
this._meta.name = this.resource.name;
if (this.resource.image) {
this._meta.url = this.resource.image.src;
}
Copy link
Member

Choose a reason for hiding this comment

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

This resource is any, we should fix this later. @gz65555

@GuoLei1990 GuoLei1990 merged commit 731a74d into galacean:main Jul 30, 2021
luzhuang pushed a commit to luzhuang/engine that referenced this pull request Sep 6, 2022
* fix: load gltf has no material
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.

7 participants