Skip to content

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

feat: add support for iPhone 17 Pro Max with updated device configurations and assets

CristianOlivera15e5e1aab4e97
diff --git a/app/[locale]/(editor)/editor/page.tsx b/app/[locale]/(editor)/editor/page.tsx
index d093bbc..0538e3e 100644
--- a/app/[locale]/(editor)/editor/page.tsx
+++ b/app/[locale]/(editor)/editor/page.tsx
@@ -318,6 +318,7 @@ export default function Editor() {
imagePhoneRotZ,
imagePhonePerspective,
imagePhoneDevice,
+ imagePhonePresetId,
imagePhoneOpening,
imagePhoneShadow,
imagePhoneShadowColor,
@@ -358,6 +359,7 @@ export default function Editor() {
imagePhoneRotZ,
imagePhonePerspective,
imagePhoneDevice,
+ imagePhonePresetId,
imagePhoneOpening,
imagePhoneShadow,
imagePhoneShadowColor,
@@ -395,6 +397,7 @@ export default function Editor() {
imagePhoneRotZ,
imagePhonePerspective,
imagePhoneDevice,
+ imagePhonePresetId,
imagePhoneOpening,
imagePhoneShadow,
imagePhoneShadowColor,
@@ -456,6 +459,7 @@ export default function Editor() {
if (currentProject.imagePhoneRotZ !== undefined) setImagePhoneRotZ(currentProject.imagePhoneRotZ);
if (currentProject.imagePhonePerspective !== undefined) setImagePhonePerspective(currentProject.imagePhonePerspective);
if (currentProject.imagePhoneDevice !== undefined) setImagePhoneDevice(currentProject.imagePhoneDevice);
+ if (currentProject.imagePhonePresetId !== undefined) setImagePhonePresetId(currentProject.imagePhonePresetId);
if (currentProject.imagePhoneOpening !== undefined) setImagePhoneOpening(currentProject.imagePhoneOpening);
if (currentProject.imagePhoneShadow !== undefined) setImagePhoneShadow(currentProject.imagePhoneShadow);
if (currentProject.imagePhoneShadowColor !== undefined) setImagePhoneShadowColor(currentProject.imagePhoneShadowColor);
@@ -463,7 +467,7 @@ export default function Editor() {
setTimeout(() => {
isRestoringProjectRef.current = false;
}, 500); //
- }, [currentProject, isPhotoMode, setImagePhoneActive, setImagePhoneX, setImagePhoneY, setImagePhoneScale, setImagePhoneRotX, setImagePhoneRotY, setImagePhoneRotZ, setImagePhonePerspective, setImagePhoneDevice, setImagePhoneOpening, setImagePhoneShadow, setImagePhoneShadowColor]);
+ }, [currentProject, isPhotoMode, setImagePhoneActive, setImagePhoneX, setImagePhoneY, setImagePhoneScale, setImagePhoneRotX, setImagePhoneRotY, setImagePhoneRotZ, setImagePhonePerspective, setImagePhoneDevice, setImagePhonePresetId, setImagePhoneOpening, setImagePhoneShadow, setImagePhoneShadowColor]);
// Image project handlers
const handleSelectImageProject = useCallback(async (projectId: string) => {
diff --git a/app/contexts/Mockup3dContext.tsx b/app/contexts/Mockup3dContext.tsx
index df136ea..12f9561 100644
--- a/app/contexts/Mockup3dContext.tsx
+++ b/app/contexts/Mockup3dContext.tsx
@@ -36,8 +36,8 @@ interface Mockup3dState {
imagePhonePerspective: number;
setImagePhonePerspective: (v: number) => void;
/** Which 3D device model is active: the default phone JSON, iPhone 15 Pro Max, Samsung S25 Ultra, or single macOS laptop */
- imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop';
- setImagePhoneDevice: (d: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop') => void;
+ imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'iphone-17-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop';
+ setImagePhoneDevice: (d: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'iphone-17-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop') => void;
imagePhonePresetId: string;
setImagePhonePresetId: (id: string) => void;
/** Laptop opening animation progress (0 = closed, 1 = fully open) */
@@ -66,7 +66,7 @@ export function Mockup3dProvider({ children }: { children: ReactNode }) {
const [imagePhoneRotY, setImagePhoneRotY] = useState(0);
const [imagePhoneRotZ, setImagePhoneRotZ] = useState(0);
const [imagePhonePerspective, setImagePhonePerspective] = useState(600);
- const [imagePhoneDevice, setImagePhoneDevice] = useState<'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop'>('phone');
+ const [imagePhoneDevice, setImagePhoneDevice] = useState<'phone' | 'iphone' | 'iphone-13-pro-max' | 'iphone-17-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop'>('phone');
const [imagePhonePresetId, setImagePhonePresetId] = useState('front');
const [imagePhoneOpening, setImagePhoneOpening] = useState(1);
const [imagePhoneShadow, setImagePhoneShadow] = useState(0.6);
diff --git a/hooks/useImageProjects.ts b/hooks/useImageProjects.ts
index 79703f2..fe1898e 100644
--- a/hooks/useImageProjects.ts
+++ b/hooks/useImageProjects.ts
@@ -50,7 +50,8 @@ interface ImageProjectState {
imagePhoneRotY: number;
imagePhoneRotZ: number;
imagePhonePerspective: number;
- imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop';
+ imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'iphone-17-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop' ;
+ imagePhonePresetId: string;
imagePhoneOpening: number;
imagePhoneShadow: number;
imagePhoneShadowColor: string;
@@ -89,6 +90,7 @@ const DEFAULT_PROJECT_STATE: ImageProjectState = {
imagePhoneRotZ: 0,
imagePhonePerspective: 600,
imagePhoneDevice: 'phone',
+ imagePhonePresetId: 'front',
imagePhoneOpening: 1,
imagePhoneShadow: 0.6,
imagePhoneShadowColor: "#000000",
diff --git a/lib/phone3d.utils.ts b/lib/phone3d.utils.ts
index b21fa8f..57257de 100644
--- a/lib/phone3d.utils.ts
+++ b/lib/phone3d.utils.ts
@@ -31,6 +31,7 @@ export const DEVICE_3D_DIMENSIONS: Record<string, { width: number; height: numbe
'phone': { width: PHONE_W, height: PHONE_H },
'iphone': { width: PHONE_W, height: PHONE_H },
'iphone-13-pro-max': { width: 480, height: 1000 },
+ 'iphone-17-pro-max': { width: 480, height: 1000 },
'double_iphone_13_pro': { width: 960, height: 2000 },
'laptop': { width: 1500, height: 1035 },
};
diff --git a/public/images/mockups-3d/iphone-17pro.avif b/public/images/mockups-3d/iphone-17pro.avif
new file mode 100644
index 0000000..179771f
Binary files /dev/null and b/public/images/mockups-3d/iphone-17pro.avif differ
diff --git a/public/videos/mockups-3d/iphone-17pro.mp4 b/public/videos/mockups-3d/iphone-17pro.mp4
new file mode 100644
index 0000000..467056c
Binary files /dev/null and b/public/videos/mockups-3d/iphone-17pro.mp4 differ
diff --git a/types/image-project.types.ts b/types/image-project.types.ts
index 48dfb76..1daa971 100644
--- a/types/image-project.types.ts
+++ b/types/image-project.types.ts
@@ -50,7 +50,8 @@ export interface ImageProject {
imagePhoneRotY: number;
imagePhoneRotZ: number;
imagePhonePerspective: number;
- imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop';
+ imagePhoneDevice: 'phone' | 'iphone' | 'iphone-13-pro-max' | 'double_iphone_13_pro' | 'samsung' | 'laptop' | 'iphone-17-pro-max';
+ imagePhonePresetId: string;
imagePhoneOpening: number;
imagePhoneShadow: number;
imagePhoneShadowColor: string;
diff --git a/types/mockup.types.ts b/types/mockup.types.ts
index 7f3ae20..6d3cb83 100644
--- a/types/mockup.types.ts
+++ b/types/mockup.types.ts
@@ -109,11 +109,11 @@ export const IMAGE_DEVICE_TEMPLATES = [
{
id: "iphone-17-pro-max",
title: "iPhone 17 Pro",
- accentColor: "#00A3FF",
+ accentColor: "#FCB370",
icon: "simple-icons:apple",
modelUrl: "/models/iphone-17-pro-max.glb",
- posterUrl: encodeURI("/images/mockups-3d/iphone-13pro.avif"),
- videoUrl: encodeURI("/videos/mockups-3d/iphone-13pro.mp4"),
+ posterUrl: encodeURI("/images/mockups-3d/iphone-17pro.avif"),
+ videoUrl: encodeURI("/videos/mockups-3d/iphone-17pro.mp4"),
},
{
id: "iphone",