Upgrade To THREE 0.166.0, upgrade to Expo SDK 51
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:
- The example app is set up to use the source code of
expo-threeinstead of the build directory, making developing on the example app much easier without the build service running. - Updated example app to Expo SDK 51 and added section in readme for how to run the example app.
- Updated
expo-threeto use the latestexpo-module-scripts - 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.
- Added a rudimentary stats panel to the example
- 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.
- Added orbit controls demo with
expo-three-orbit-controls(had to patch because it still relies on an old version of THREE). - 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.
Great work guys! Let's get this merged please @keith-kurak
thanks
This is great stuff! Would love to see it merged.
Any updates on this? This really needs to be merged, expo-three is too far behind the current three version
Ooof, I really need this too.
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 🚢
Any updates on what is required for this to be merged?
@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
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?
@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.
How is this looking? Could really use it!
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'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 tolateston npm.
It is working for me. 👍🎉
"expo": "~51.0.18",
"expo-gl": "~14.0.2",
"expo-three": "^8.0.0",
"three": "^0.166.0"
@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! 🥳