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

Added USDZLoader #24568

Merged
merged 4 commits into from
Aug 31, 2022
Merged

Added USDZLoader #24568

merged 4 commits into from
Aug 31, 2022

Conversation

mrdoob
Copy link
Owner

@mrdoob mrdoob commented Aug 31, 2022

Related issue: #5524 #14219

Description

I was curious to see how big would a basic loader for usdz(usda) be.

Screen Shot 2022-08-30 at 10 59 20 PM

@beeglebug
Copy link

What's the benefit of all the inner functions inside the parse function? My gut tells me they should be outside the class so they don't get redeclared every time the loader is used, but the perf benefits might be minimal.

There are a couple of stray console logs in there though which could do with removing.

@mrdoob
Copy link
Owner Author

mrdoob commented Aug 31, 2022

Seems like USD can have multiple indices per geometry (ie. one for vertices and one for uvs).

After converting these arrays to non-indexed we now have working uvs:

Screen Shot 2022-08-31 at 9 49 58 AM

@mrdoob mrdoob marked this pull request as ready for review August 31, 2022 17:05
@mrdoob mrdoob added this to the r144 milestone Aug 31, 2022
@mrdoob mrdoob merged commit 06391b6 into dev Aug 31, 2022
@mrdoob mrdoob deleted the usdz branch August 31, 2022 17:18
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* Added USDZLoader.

* Added example.

* USDZLoader: Flatten indexed data.

* Examples: Improved usdz example.
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
* Added USDZLoader.

* Added example.

* USDZLoader: Flatten indexed data.

* Examples: Improved usdz example.
@joshuaellis joshuaellis mentioned this pull request Sep 27, 2022
17 tasks
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.

2 participants