mirror of
https://github.com/storytold/spark.git
synced 2026-10-16 00:03:01 +00:00
Remove requirement for SuperSplat comment in PLY "chunk" element in order to decode compressed PLY format. (#39)
This commit is contained in:
committed by
GitHub
parent
7a4142c62a
commit
ea9e4e3da9
+6
-8
@@ -519,14 +519,12 @@ export class PlyReader {
|
|||||||
|
|
||||||
const elementCallback = (element: PlyElement) => {
|
const elementCallback = (element: PlyElement) => {
|
||||||
if (element.name === "chunk") {
|
if (element.name === "chunk") {
|
||||||
if (
|
// "chunk" could conceivably be used for other formats, and we would
|
||||||
this.comments.some((comment) =>
|
// ideally check for the comment: Generated by SuperSplat 2.*
|
||||||
comment.toLowerCase().includes("supersplat"),
|
// but gsplat also outputs this format without such a comment.
|
||||||
)
|
// In order to support both, let's assume a "chunk" element should
|
||||||
) {
|
// be interpreted as this format.
|
||||||
// SuperSplat compressed format detected
|
return initSuperSplat(element);
|
||||||
return initSuperSplat(element);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isSuperSplat) {
|
if (isSuperSplat) {
|
||||||
return decodeSuperSplat(element);
|
return decodeSuperSplat(element);
|
||||||
|
|||||||
Reference in New Issue
Block a user