Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

feat: update TIMELINE_LABEL_WIDTH for improved layout; add PHONE_DEVICE_URLS for model references; remove unused getThumbnailCacheInfo function

CristianOlivera1026e380ded4c
diff --git a/lib/constants.ts b/lib/constants.ts
index d0aad62..ceac322 100644
--- a/lib/constants.ts
+++ b/lib/constants.ts
@@ -26,7 +26,7 @@ export const PREVIEW_CONTAINER_WIDTH = 896;
/**
* Ancho del sidebar de etiquetas en el timeline (px)
*/
-export const TIMELINE_LABEL_WIDTH = 80;
+export const TIMELINE_LABEL_WIDTH = 56;
/**
* Duración mínima entre trim handles (segundos)
diff --git a/lib/phone3d.utils.ts b/lib/phone3d.utils.ts
index 4e13621..8d0c960 100644
--- a/lib/phone3d.utils.ts
+++ b/lib/phone3d.utils.ts
@@ -38,6 +38,16 @@ export const DEVICE_3D_DIMENSIONS: Record<string, { width: number; height: numbe
'ipad_mini_6_2021': { width: 1040, height: 1500 },
};
+export const PHONE_DEVICE_URLS: Record<string, string | undefined> = {
+ phone: '/models/phone-gltf.glb',
+ iphone: '/models/iphone-15-pro-max.glb',
+ 'iphone-13-pro-max': '/models/apple_iphone_13_pro_max.glb',
+ 'double_iphone_13_pro': '/models/double_iphone_13_pro.glb',
+ 'iphone-17-pro-max': '/models/iphone-17-pro-max.glb',
+ 'ipad_mini_6_2021': '/models/ipad_mini_6_2021.glb',
+ laptop: '/models/mac-book.glb',
+};
+
export const CAM_FOV = 20;
export const CAM_Z = 6;
diff --git a/lib/thumbnail-cache.ts b/lib/thumbnail-cache.ts
index 9db8e76..8fde549 100644
--- a/lib/thumbnail-cache.ts
+++ b/lib/thumbnail-cache.ts
@@ -160,25 +160,4 @@ export async function clearAllThumbnailCache(): Promise<void> {
} catch (error) {
console.warn("Failed to clear thumbnail cache:", error);
}
-}
-
-export async function getThumbnailCacheInfo(): Promise<{ count: number; estimatedSize: string }> {
- try {
- const db = await openDB();
- return new Promise((resolve, reject) => {
- const transaction = db.transaction(STORE_NAME, "readonly");
- const store = transaction.objectStore(STORE_NAME);
- const request = store.count();
-
- request.onerror = () => reject(request.error);
- request.onsuccess = () => {
- resolve({
- count: request.result,
- estimatedSize: "Unknown",
- });
- };
- });
- } catch {
- return { count: 0, estimatedSize: "0 B" };
- }
-}
+}
\ No newline at end of file