-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #413 from mkkellogg/dev
Release 0.4.7
- Loading branch information
Showing
21 changed files
with
989 additions
and
269 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const createStream = (data)=> { | ||
return new ReadableStream({ | ||
async start(controller) { | ||
controller.enqueue(data); | ||
controller.close(); | ||
}, | ||
}); | ||
}; | ||
|
||
export async function decompressGzipped(data) { | ||
try { | ||
const stream = createStream(data); | ||
if (!stream) throw new Error('Failed to create stream from data'); | ||
|
||
return await decompressGzipStream(stream); | ||
} catch (error) { | ||
console.error('Error decompressing gzipped data:', error); | ||
throw error; | ||
} | ||
} | ||
|
||
export async function decompressGzipStream(stream) { | ||
const decompressedStream = stream.pipeThrough(new DecompressionStream('gzip')); | ||
const response = new Response(decompressedStream); | ||
const buffer = await response.arrayBuffer(); | ||
|
||
return new Uint8Array(buffer); | ||
} | ||
|
||
export async function compressGzipped(data) { | ||
try { | ||
const stream = createStream(data); | ||
const compressedStream = stream.pipeThrough(new CompressionStream('gzip')); | ||
const response = new Response(compressedStream); | ||
const buffer = await response.arrayBuffer(); | ||
|
||
return new Uint8Array(buffer); | ||
} catch (error) { | ||
console.error('Error compressing gzipped data:', error); | ||
throw error; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const InternalLoadType = { | ||
DirectToSplatBuffer: 0, | ||
DirectToSplatArray: 1, | ||
ProgressiveToSplatBuffer: 0, | ||
ProgressiveToSplatArray: 1, | ||
DownloadBeforeProcessing: 2 | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export const SceneFormat = { | ||
'Splat': 0, | ||
'KSplat': 1, | ||
'Ply': 2 | ||
'Ply': 2, | ||
'Spz': 3 | ||
}; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.