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 disappearing asteroids and bullets #289

Merged
merged 2 commits into from
Jul 8, 2023
Merged

Conversation

jure
Copy link
Contributor

@jure jure commented Jul 8, 2023

This fixes the issue described #287, where the asteroids and bullets disappeared after a while. It turns out they were frustum culled once the player moved too far away from the starting position and the original geometry went out of the camera's frustum.

I didn't dig into why this has only started happening recently, but I did check out 26d6682, and can confirm that it did not happen there, but also the InstancedParticles meshes frustumCulled was false there, whereas it was/is true on latest main.

@codesandbox
Copy link

codesandbox bot commented Jul 8, 2023

This branch is running in CodeSandbox. Use the links below to review this PR faster.


CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

@changeset-bot
Copy link

changeset-bot bot commented Jul 8, 2023

⚠️ No Changeset found

Latest commit: 7a4b253

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
Name Type
@miniplex/bucket Patch
@miniplex/core Patch
@miniplex/react Patch
miniplex Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hmans
Copy link
Owner

hmans commented Jul 8, 2023

Thank you very much for the PR -- something having changed in the frustum culling behavior of Three.js' InstancedMesh sounds like a reasonable explanation for what was going on (but I haven't gone through their changelog yet to confirm this.)

@hmans
Copy link
Owner

hmans commented Jul 8, 2023

I think the build pipeline is just being a little weird, so I'm merging this now.

The other regression I need to look at is the reduction in resolution, this might be anything between the Composer Suite libraries I'm using (Render Composer specifically) and Three.js, possibly postprocessing. I really kinda want to get those dependencies out of the React demo and make it just a plain Three.js + R3F thing.

@hmans hmans merged commit fbd7cd6 into hmans:main Jul 8, 2023
@jure jure deleted the fix_demo_disappearing branch July 8, 2023 19:09
@jure
Copy link
Contributor Author

jure commented Jul 8, 2023

I think users of the library would appreciate the reduction in moving parts, especially since the demo also serves as documentation, doubly so while things are in flux.

The demo looks really good though, so there's probably room for a separate 'all out' demo of ECS + other technologies you've been developing :)

Thanks for merging!

@jure
Copy link
Contributor Author

jure commented Jul 8, 2023

Seems like the deployment for the previews works just fine, so I wonder what's up with the main deployment?

https://miniplex-react-demo-38b86qozt-hmans.vercel.app/

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