MCPcopy
hub / github.com/Anil-matcha/Open-Generative-AI / CinemaStudio

Function CinemaStudio

src/components/CinemaStudio.js:8–595  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { t } from '../lib/i18n.js';
7
8export function CinemaStudio() {
9 const container = document.createElement('div');
10 container.className = 'w-full h-full flex flex-col items-center justify-center bg-black relative overflow-hidden';
11
12 // --- State ---
13 const currentSettings = {
14 prompt: '',
15 aspect_ratio: '16:9',
16 camera: Object.keys(CAMERA_MAP)[0],
17 lens: Object.keys(LENS_MAP)[0],
18 focal: 35,
19 aperture: "f/1.4"
20 };
21
22 // Camera builder panel state
23 let showCameraBuilder = false;
24
25 // ==========================================
26 // 1. HERO SECTION (Empty State)
27 // ==========================================
28 const heroSection = document.createElement('div');
29 heroSection.className = 'flex flex-col items-center justify-center text-center px-4 animate-fade-in-up';
30 heroSection.innerHTML = `
31 <div class="mb-4 text-xs font-bold text-white/40 tracking-[0.2em] uppercase">${t('cinema.tagline')}</div>
32 <h1 class="text-4xl md:text-6xl font-black text-transparent bg-clip-text bg-gradient-to-b from-white to-white/50 tracking-tight leading-tight mb-2">
33 ${t('cinema.headline')}
34 </h1>
35 `;
36 container.appendChild(heroSection);
37
38 // ==========================================
39 // 2. CAMERA CONTROLS OVERLAY
40 // ==========================================
41 const overlayBackdrop = document.createElement('div');
42 overlayBackdrop.className = 'fixed inset-0 bg-black/80 backdrop-blur-md z-40 opacity-0 pointer-events-none transition-opacity duration-300 flex items-center justify-center';
43
44 const overlayContent = document.createElement('div');
45 // Reduced padding for mobile (p-4) and added max-height/overflow handling
46 overlayContent.className = 'w-full max-w-4xl bg-[#141414] border border-white/10 rounded-3xl p-4 md:p-8 shadow-2xl transform scale-95 transition-transform duration-300 flex flex-col max-h-[90vh]';
47 overlayBackdrop.appendChild(overlayContent);
48
49 // Header for Overlay
50 const overlayHeader = document.createElement('div');
51 overlayHeader.className = 'flex items-center justify-between mb-8';
52 overlayHeader.innerHTML = `
53 <div class="flex gap-4">
54 <button class="px-4 py-2 bg-white text-black text-xs font-bold rounded-full">All</button>
55 </div>
56 <button id="close-overlay-btn" class="text-white/50 hover:text-white transition-colors">
57 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
58 </button>
59 `;
60 overlayContent.appendChild(overlayHeader);
61
62 // Controls Component
63 const cameraControls = CameraControls((state) => {
64 currentSettings.camera = state.camera;
65 currentSettings.lens = state.lens;

Callers 1

navigateFunction · 0.50

Calls 15

tFunction · 0.90
CameraControlsFunction · 0.90
AuthModalFunction · 0.90
buildNanoBananaPromptFunction · 0.90
updateSummaryCardFunction · 0.85
closeOverlayFunction · 0.85
updateArBtnFunction · 0.85
createDropdownFunction · 0.85
updateResBtnFunction · 0.85
updateBuilderPreviewFunction · 0.85
createActionBtnFunction · 0.85
showCanvasFunction · 0.85

Tested by

no test coverage detected