-
Notifications
You must be signed in to change notification settings - Fork 22
Support mjs generator scripts #56
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for generating Gaussian splat data using external MJS scripts, allowing dynamic data generation through custom generator classes. The implementation introduces a new file reader for .mjs files that can execute JavaScript modules to generate splat data programmatically.
- Added MJS file reading capability with parameter passing support
- Extended command-line argument parsing to handle script parameters via
--paramflags - Integrated the new MJS reader into the main file processing pipeline
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/readers/read-mjs.ts | Implements the MJS file reader that loads generator scripts and produces splat data |
| src/process.ts | Adds Param type and handles param actions in the processing pipeline |
| src/index.ts | Integrates MJS reading, adds parameter parsing, and updates the main file reading logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Why not check in a |
|
Also, please update the README. |
This PR adds support for generating gaussians via an external script.
The script must have .mjs extension and export a class called
Generatorwith the following structure:Parameters are passed to the generator from the command line using:
The (name,value) pairs are passed to a static
createfunction onGeneratorwhich is responsible for constructing the instance.This is an example grid generator script
gen-grid.mjs:Which can be invoked as follows: