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

StaticGeometryGenerator: Ensure geometries are updated #647

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

gkjohnson
Copy link
Owner

Fix #646

Fixes cases where replacing the geometry causes errors on scene update or no change:

  • Include the geometry uuid instead of the (non existent) BufferAttribute UUIDs for representing a BufferGeometry hash.
  • Discard BakedBufferGeometry instance if it needs to be resized, forcing a full scene geometry update.

cc @ycw @dongho-shin would it be possible to test this to make sure it addresses the problems from #646?

@ycw
Copy link

ycw commented Jun 4, 2024

would it be possible to test this

Yes, simply updates the package(in importmap) from NPM registry to this PR:

- "three-gpu-pathtracer": "https://esm.sh/three-gpu-pathtracer@0.0.22?external=three",
+ "three-gpu-pathtracer": "https://esm.sh/gh/gkjohnson/three-gpu-pathtracer@fix-geometry-update?external=three",

Result: https://jsfiddle.net/tq7gxfsb/

fixed.mp4

@gkjohnson
Copy link
Owner Author

Great, thanks for testing! I'll make a new release later this week or so.

@gkjohnson gkjohnson merged commit 4f5898d into main Jun 5, 2024
4 checks passed
@gkjohnson gkjohnson deleted the fix-geometry-update branch June 5, 2024 03:04
@ycw
Copy link

ycw commented Jun 5, 2024

Thanks.

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.

setScene() ignores mesh.geometry reassignment
2 participants