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

Basic Usage stuck on Processing Splat #159

Closed
tansh-kwa opened this issue Mar 16, 2024 · 4 comments
Closed

Basic Usage stuck on Processing Splat #159

tansh-kwa opened this issue Mar 16, 2024 · 4 comments

Comments

@tansh-kwa
Copy link

tansh-kwa commented Mar 16, 2024

I'm trying to get the Basic Usage snippet to render a gaussian splat I've captured. I have verified that the online demo, as well as a local instance of the demo can both properly load and visualize the splat very quickly (under a few seconds till the splat is rendered). However, when I try to load the same file using the code included under Basic Usage the webpage keeps displaying the loading animation, reading 'Processing splats.'

I am using npx vite to build and serve my code & loading this package via npm. I've seen some references to this potentially being a CORS issue, however I'm not sure how I can verify that, I've tried changing the --cors flag with vite but it does not change anything.

Any help is much appreciated.

@mkkellogg
Copy link
Owner

Could you check the debug console to see if there are any errors or messages there that might clue us in to what is happening?

@tansh-kwa
Copy link
Author

tansh-kwa commented Mar 16, 2024

Sure thing, I had the console open while running the example and didn't see anything. I've attached an image of what I'm seeing, apologies I imagine it's not much information to go on.
Screenshot 2024-03-16 at 5 36 45 PM

Attached is also the code I'm using for the basic example:
Screenshot 2024-03-16 at 5 43 00 PM

@mkkellogg
Copy link
Owner

Since you're using Vite, I don't have a lot of good recommendations for you. Could you try modifying one of the demo pages that you know works by pasting the basic usage example into it and see if it still works after that? FWIW I just did that on my end and everything seems to work. If it's a Vite related issue, maybe this thread will help: #41

@tansh-kwa
Copy link
Author

Ah! One of the suggestions in that thread managed to resolve the issue for me. For posterity, the remedy for this issue in my case was to use the vite-plugin-cross-origin-isolation plugin and then use the following in my vite.config.js:

import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    {
      name: "configure-response-headers",
      configureServer: (server) => {
        server.middlewares.use((_req, res, next) => {
          res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
          res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
          next();
        });
      },
    },
  ],
});

Thanks for your help @mkkellogg, Looking forward to working with this viewer more.

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

No branches or pull requests

2 participants