Skip to content

wip pieces for integration test run#23

Closed
winnie1994 wants to merge 3 commits into
mainfrom
a3d_tests
Closed

wip pieces for integration test run#23
winnie1994 wants to merge 3 commits into
mainfrom
a3d_tests

Conversation

@winnie1994

Copy link
Copy Markdown
Collaborator

WIP snippets for doing integration exercise with https://github.com/n0neye/A3D

Outstanding (potentially A3D side things?) things not caught in this PR that in A3D code:

  1. dynamically importing forge, as forge import is triggering server side rendering errors in Next.js setup

Some unresolved issues

  1. handling spz file loading in electron -- the electron file reader works for uncompressed formats, doesn't for spz. I'm assuming might just need to repro the gunzip setup in forge but not super familiar with it.
  2. loading multiple splats in the A3D entity setup causes rendering artefacts. Guess it might be related to the three.group.add(splat)/three.object3d().add(splat) hierarchy thing but don't have an isolated example yet

Some needed features (for later)

  1. depth map rendering

@dmarcos

dmarcos commented May 30, 2025

Copy link
Copy Markdown
Contributor

Dist is all the source files compiled to JS + dependencies put together. PR should be against src files. I see though the code related to workers might come from a dependency. Before a fix though would be cool to understand why those window.Worker are needed in the A3D context

@winnie1994

Copy link
Copy Markdown
Collaborator Author

Makes sense! I moved the object hierarchy change into src for now.

A3D uses next.js so it's basically this thread here. It seems like this might have been fixed on the next.js side 2 weeks ago but I did also try with npm install next@latest but that didn't help?

@dmarcos

dmarcos commented May 30, 2025

Copy link
Copy Markdown
Contributor

Thanks. it looks like Workers issue is something Next.js should handle properly.

Comment thread dist/forge.module.js Outdated
const sceneAdd = THREE.Scene.prototype.add;
THREE.Scene.prototype.add = function(object) {
hasSplatMesh = hasSplatMesh || object instanceof SplatMesh;
hasSplatMesh = hasSplatMesh || hasSplatMeshInHierarchy(object);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can remove

Comment thread dist/forge.module.js Outdated
}
});
return found;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can remove

@winnie1994

Copy link
Copy Markdown
Collaborator Author

Sounds good 😆 I just reverted all changes to dist/ for now!

@winnie1994
winnie1994 marked this pull request as ready for review May 31, 2025 18:02
@winnie1994

winnie1994 commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator Author

pausing on this for now given side discussion! ideally would have a more proper solution that avoids traversing scene hierarchy every time an object gets added 👍

@winnie1994 winnie1994 closed this Jun 6, 2025
@winnie1994 winnie1994 reopened this Jun 7, 2025
@winnie1994 winnie1994 closed this Jun 10, 2025
@dmarcos
dmarcos deleted the a3d_tests branch June 10, 2025 17:12
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