mirror of
https://github.com/storytold/spark.git
synced 2026-10-09 00:09:53 +00:00
PC SOGS decoding from .Zip archive (#100)
* Implement PC SOGS decoding from .zip file archive. Update viewer and editor to accept .zip files. * Restore GL WEBP decoding.
This commit is contained in:
committed by
GitHub
parent
cd40e139d1
commit
4266db3259
@@ -63,7 +63,7 @@
|
||||
<canvas id="canvas" tabindex="0"></canvas>
|
||||
<div id="main-gui"></div>
|
||||
<div id="second-gui"></div>
|
||||
<input id="file-input" type="file" accept=".ply,.spz,.splat,.ksplat" multiple="true" style="display: none;" />
|
||||
<input id="file-input" type="file" accept=".ply,.spz,.splat,.ksplat,.zip" multiple="true" style="display: none;" />
|
||||
<script type="module">
|
||||
import * as THREE from "three";
|
||||
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
||||
@@ -154,7 +154,7 @@
|
||||
loadFiles(urls);
|
||||
guiOptions.loadFromText = ""; // Clear after loading
|
||||
} else {
|
||||
alert("No valid URLs found in text. URLs must start with http:// or https:// and end with .ply, .spz, .splat, .ksplat, or .json");
|
||||
alert("No valid URLs found in text. URLs must start with http:// or https:// and end with .ply, .spz, .splat, .ksplat, .json, or .zip");
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -683,7 +683,8 @@
|
||||
file.name.toLowerCase().endsWith('.ply') ||
|
||||
file.name.toLowerCase().endsWith('.spz') ||
|
||||
file.name.toLowerCase().endsWith('.splat') ||
|
||||
file.name.toLowerCase().endsWith('.ksplat')
|
||||
file.name.toLowerCase().endsWith('.ksplat') ||
|
||||
file.name.toLowerCase().endsWith('.zip')
|
||||
);
|
||||
|
||||
if (splatFiles.length > 0) {
|
||||
@@ -693,7 +694,7 @@
|
||||
|
||||
// Parse URLs from text (handles single URLs, multiple lines, mixed content)
|
||||
function parseURLsFromText(text) {
|
||||
const supportedExtensions = [".ply", ".spz", ".splat", ".ksplat", ".json"];
|
||||
const supportedExtensions = [".ply", ".spz", ".splat", ".ksplat", ".zip", ".json"];
|
||||
const urls = [];
|
||||
|
||||
// Split by lines, commas, and semicolons
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
</div>
|
||||
<div class="drop-zone">Drag and drop a splat file here</div>
|
||||
<label for="file-input" class="button upload"><img class="upload-icon" src="upload-icon.svg" alt="upload" />Choose file</label>
|
||||
<input id="file-input" class="hidden" accept=".ply,.spz,.splat,.ksplat" type="file" />
|
||||
<input id="file-input" class="hidden" accept=".ply,.spz,.splat,.ksplat,.zip" type="file" />
|
||||
<form class="url-form">
|
||||
<input class="url-input" type="text" placeholder="Copy splat URL" />
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user