|
@@ -170,11 +170,9 @@ const startPreloading = async () => {
|
|
|
console.log("No metadata.json found or failed to load. Falling back to default turntable.", e);
|
|
console.log("No metadata.json found or failed to load. Falling back to default turntable.", e);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (meta) {
|
|
|
|
|
|
|
+ if (meta && meta.frames && meta.frames.length) {
|
|
|
projectMetadata.value = meta;
|
|
projectMetadata.value = meta;
|
|
|
- if (meta.frames && meta.frames.length) {
|
|
|
|
|
- totalFramesCount.value = meta.frames.length;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ totalFramesCount.value = meta.frames.length;
|
|
|
|
|
|
|
|
// Sync angles from the first frame's vector
|
|
// Sync angles from the first frame's vector
|
|
|
if (meta.frames[0] && meta.frames[0].vector) {
|
|
if (meta.frames[0] && meta.frames[0].vector) {
|
|
@@ -217,6 +215,12 @@ const startPreloading = async () => {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
// Fallback: 1D horizontal turntable
|
|
// Fallback: 1D horizontal turntable
|
|
|
|
|
+ if (meta) {
|
|
|
|
|
+ projectMetadata.value = meta;
|
|
|
|
|
+ if (meta.frames_count) {
|
|
|
|
|
+ totalFramesCount.value = meta.frames_count;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
let loaded = 0;
|
|
let loaded = 0;
|
|
|
const list: HTMLImageElement[] = [];
|
|
const list: HTMLImageElement[] = [];
|
|
|
|
|
|