Support reading lcc2#258
Merged
Merged
Conversation
…pensource/playcanvas/splat-transform into feat/xgrids_lcc2_support
Copilot stopped reviewing on behalf of
willeastcott due to an error
June 11, 2026 14:46
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for reading XGrids LCC2 (.lcc2) files (octree, multi‑LOD chunked .sog/.spz) across the library and CLI, including helper utilities and unit tests for meta parsing and LOD resolution.
Changes:
- Implement new
readLcc2reader with meta parsing, LOD selection, chunk traversal, and bounded-concurrency decoding. - Wire
.lcc2into format detection and public exports; update CLI/README docs. - Add unit tests for LCC2 meta parsing + pure helper functions.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/read-lcc2.test.mjs | Adds unit tests for LCC2 meta parsing and helper utilities. |
| src/lib/readers/read-lcc2.ts | Implements LCC2 reader + helper functions (parse/LOD selection/decoding). |
| src/lib/readers/index.ts | Exposes readLcc2 from readers barrel. |
| src/lib/read.ts | Adds .lcc2 detection and dispatch to readLcc2. |
| src/lib/index.ts | Exports readLcc2 from public library API. |
| src/cli/index.ts | Updates CLI help text to include .lcc2 and shared LOD option wording. |
| README.md | Documents .lcc2 support and shared LCC/LCC2 input options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🚀🚀🚀🚀 |
slimbuck
approved these changes
Jun 12, 2026
Member
|
Hi and thanks for this PR. Please merge latest main into this branch (as I can't do it myself) so we can this merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the
readLcc2function to parse an XGrids LCC2 scene consisting of ameta.lcc2descriptor and separate.sog/.spzdata block files.Added the
src/lib/readers/read-lcc2.tsfile: parses themeta.lcc2file (including old and new protocol field names), collects the data block file index for each LOD level, decodes data blocks by reusingreadSog/readSpz, merges data blocks using thecombinefunction, applies LCC v1 coordinate transformations, and loads optional environment data blocks.Implemented multi-LOD selection via
options.lodSelectand thelodcolumn, consistent with the behavior ofreadLcc.Integrated
lcc2into the read pipeline (getInputFormat/InputFormat/readFile), and exported thereadLcc2function fromreaders/index.tsandlib/index.ts.Updated the CLI instructions and README file to document
.lcc2input.