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

Upgrade To THREE 0.166.0, upgrade to Expo SDK 51 #301

Merged
merged 39 commits into from
Jul 28, 2024
Merged

Conversation

markrickert
Copy link
Contributor

@markrickert markrickert commented Mar 22, 2024

This PR is the culmination of a few weeks of work and experimentation around the expo-three and three.js ecosystems. @Jpoliachik and I were able to get many more examples running in the example app and lots of upgrades to bring this library back into line with the latest expo standards and SDK.

Here are the updates in no particular order:

  1. The example app is set up to use the source code of expo-three instead of the build directory, making developing on the example app much easier without the build service running.
  2. Updated example app to Expo SDK 51 and added section in readme for how to run the example app.
  3. Updated expo-three to use the latest expo-module-scripts
  4. Updated to the latest version of THREE (0.166.0) and fixed incompatibilities and deprecations in the examples. There was a global lighting system update in r155 so some work had to be done to get the lighting system to get the examples working again.
  5. Added a rudimentary stats panel to the example
  6. Fixed the rudimentary file extension matching (it was just looking at the end of the url) with a more robust url matcher that takes parameters in the url into account. With tests.
  7. Added orbit controls demo with expo-three-orbit-controls (had to patch because it still relies on an old version of THREE).
  8. Added lots more demos

The example app works on android and web, but I haven't tested on iOS because the simulator doesn't support web-gl.

iOS Android Web
🤷‍♂️

All tests pass (including the new ones!)
Linter passes

Please let me know what else needs to be done to get this merged!

This PR will Close: #164, #199, #212, #238, #270, #287, #297, #298, & #299

Thanks to @Jpoliachik for his help in getting this branch working and for porting over some THREE web examples over from the web examples.

@andrija29
Copy link

Great work guys! Let's get this merged please @keith-kurak

@joekendal
Copy link

thanks

@adavidson21
Copy link

This is great stuff! Would love to see it merged.

@sebastian-nowak
Copy link

Any updates on this? This really needs to be merged, expo-three is too far behind the current three version

@Benmidi
Copy link

Benmidi commented May 28, 2024

Ooof, I really need this too.

@markrickert markrickert changed the title Upgrade To THREE 0.162.0, upgrade to Expo SDK 50 Upgrade To THREE 0.165.0, upgrade to Expo SDK 50 Jun 12, 2024
@markrickert
Copy link
Contributor Author

I've resolved all the merge conflicts and upgraded ThreeJS to the latest 0.165.0.

I also added an example of using the GCodeLoader 🚢

Screenshot 2024-06-12 at 5 50 56 PM

@davidlumley
Copy link

Any updates on what is required for this to be merged?

@joekendal
Copy link

joekendal commented Jul 2, 2024

@markrickert I have tested your PR to address #297

package.json

"expo-three": "github:markrickert/expo-three.git#dev",

It does not seem to resolve the error: Failed to getSize of file:///var/mobile/Containers/Data/Application/...

I can confirm that downgrading to Expo 49 fixes the issue

@markrickert markrickert changed the title Upgrade To THREE 0.165.0, upgrade to Expo SDK 50 Upgrade To THREE 0.166.0, upgrade to Expo SDK 51 Jul 2, 2024
@Josema
Copy link

Josema commented Jul 3, 2024

I am having some problems installing the dev branch.

Unable to resolve "expo-three" from "src/components/App.js"

"expo": "~51.0.17",
"expo-three": "markrickert/expo-three#dev",
"three": "^0.166.0"

It seems like the build folder is missing. Which is how the module is imported from node_modules/expo-three/package.json. Is there a way to install it correctly?

image

Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

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

Hey there!
First of all, I'm sorry that this PR has been left alone 😅 I think this happened mostly due to a large scope of changes, including ones that are probably unnecessary and/or could be split into smaller pieces so it's easier for us to review it.

I did the first pass of review, mostly just questions so I can better understand the motivation behind those changes.

I really appreciate the time and effort you guys took to make this!

package.json Outdated Show resolved Hide resolved
example/webpack.config.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
example/plugins/withBuildProperties.ts Outdated Show resolved Hide resolved
example/metro.config.js Outdated Show resolved Hide resolved
.eslintrc.js Outdated Show resolved Hide resolved
example/plugins/withFlipperDisabled.ts Outdated Show resolved Hide resolved
@markrickert
Copy link
Contributor Author

@tsapeta Thanks for the review. I'm new to working on expo modules and i'm just trying to push this library forward. I've addressed your comments in a new commit and i'll comment or resolve them here on github too.

@whygolfalan
Copy link

How is this looking? Could really use it!

Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

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

Looking good now, thank you! ❤️

@tsapeta tsapeta merged commit 88dee7d into expo:master Jul 28, 2024
1 check failed
@tsapeta
Copy link
Member

tsapeta commented Jul 29, 2024

It's been published in version 8.0.0 🎉 Could someone confirm if everything is working fine at first glance? I'll then promote this version to latest on npm.

@Josema
Copy link

Josema commented Jul 29, 2024

It's been published in version 8.0.0 🎉 Could someone confirm if everything is working fine at first glance? I'll then promote this version to latest on npm.

It is working for me. 👍🎉

"expo": "~51.0.18",
"expo-gl": "~14.0.2",
"expo-three": "^8.0.0",
"three": "^0.166.0"

@markrickert
Copy link
Contributor Author

@tsapeta I just checked in a new app, adding expo-gl, expo-three, and three at the versions specified in the comment above and it loaded in the Gcode example perfectly!

Thanks for getting this over the finish line! 🥳

@markrickert markrickert deleted the dev branch August 6, 2024 16:56
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.

[Expo Three] Snacks / builds are broken?