expo / expo-three

Utilities for using THREE.js on Expo
MIT License
711 stars 87 forks source link

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

Open markrickert opened 3 months ago

markrickert commented 3 months ago

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 commented 3 months ago

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

joekendal commented 3 months ago

thanks

adavidson21 commented 2 months ago

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

sebastian-nowak commented 1 month ago

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

Benmidi commented 1 month ago

Ooof, I really need this too.

markrickert commented 3 weeks ago

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 commented 1 week ago

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

joekendal commented 3 days ago

@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

Josema commented 2 days ago

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

markrickert commented 1 day ago

@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.