{"version":3,"file":"ThreeDViewer.I3ndOW83.mjs","names":["useRef","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/xYKp4d5Vxk1BrFTDWn4p/kcFZ3G9ABAwCCXvdHJw1/ThreeDViewer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ThreeDViewer({mode,modelUpload,modelUrlInput,modelSize,autoRotate,rotationSpeed,allowRotation,allowZoom,backgroundType,backgroundColor,lighting,showLoading,loadWhenVisible,animationPreset,entryAnimation,entryDuration,entryDelay,entryEasing,idleAnimation,idleSpeed,idleAxis,idleAmplitude,hoverAnimation,hoverIntensity,hoverTransitionSpeed,clickAnimation,clickPlayOnce,clickDuration,animationSpeed,centerModel,initialRotationX,initialRotationY,initialRotationZ,cameraDistance,fieldOfView,minZoomDistance,maxZoomDistance,cameraPositionPreset,enablePan,rotationDamping,zoomSpeed,customAmbientIntensity,customDirectionalIntensity,customLightX,customLightY,customLightZ,customLightColor,showGroundPlane,groundColor,maxFrameRate,pauseWhenHidden,lowQualityMode,pixelRatio,showWireframe,showAxesHelper,enableShadows,showModelStats,positionX,positionY,positionZ,style}){const iframeRef=useRef(null);const containerRef=useRef(null);const[loading,setLoading]=useState(false);const[error,setError]=useState(null);const[isInViewport,setIsInViewport]=useState(!loadWhenVisible);const[modelStats,setModelStats]=useState(null);const isBasicMode=mode===\"basic\";const finalModelUrl=modelUpload||modelUrlInput;const presets={none:{},productShowcase:{entryAnimation:\"scaleIn\",entryDuration:.8,idleAnimation:\"rotate\",idleAxis:\"y\",idleSpeed:.5,hoverAnimation:\"pauseAndScale\",clickAnimation:\"none\"},heroAttention:{entryAnimation:\"riseAndSpin\",entryDuration:1.2,idleAnimation:\"floatAndRotate\",idleSpeed:1,hoverAnimation:\"glowAndFaster\",clickAnimation:\"pop\"},professional:{entryAnimation:\"fadeIn\",entryDuration:.5,idleAnimation:\"rotate\",idleAxis:\"y\",idleSpeed:.3,hoverAnimation:\"pause\",clickAnimation:\"none\"},playful:{entryAnimation:\"dropIn\",entryDuration:1,idleAnimation:\"floatAndTilt\",idleSpeed:1.5,hoverAnimation:\"bounce\",clickAnimation:\"spin\"},gallery:{entryAnimation:\"fadeIn\",entryDuration:.6,idleAnimation:\"orbit\",idleSpeed:.5,hoverAnimation:\"pauseAndScale\",clickAnimation:\"none\"},magical:{entryAnimation:\"spinIn\",entryDuration:1,idleAnimation:\"floatPulseRotate\",idleSpeed:1,hoverAnimation:\"glowAndFaster\",clickAnimation:\"wobble\"}};const activePreset=presets[animationPreset]||{};const finalEntryAnimation=activePreset.entryAnimation||entryAnimation;const finalEntryDuration=activePreset.entryDuration||entryDuration;const finalIdleAnimation=activePreset.idleAnimation||idleAnimation;const finalIdleSpeed=activePreset.idleSpeed||idleSpeed;const finalHoverAnimation=activePreset.hoverAnimation||hoverAnimation;const finalClickAnimation=activePreset.clickAnimation||clickAnimation;useEffect(()=>{if(!loadWhenVisible||!containerRef.current){setIsInViewport(true);return;}const observer=new IntersectionObserver(([entry])=>{if(entry.isIntersecting){setIsInViewport(true);observer.disconnect();}},{threshold:.1});observer.observe(containerRef.current);return()=>observer.disconnect();},[loadWhenVisible]);useEffect(()=>{if(!isInViewport||!finalModelUrl){setLoading(false);setError(null);return;}setLoading(true);setError(null);const extension=finalModelUrl.split(\".\").pop()?.toLowerCase();if(!extension||![\"glb\",\"gltf\"].includes(extension)){setError(\"Only GLB and GLTF formats supported\");setLoading(false);return;}const lightingPresets={bright:{ambient:{color:16777215,intensity:1},main:{color:16777215,intensity:1.5,position:[5,5,5]},fill:{color:16777215,intensity:.6,position:[-3,0,-3]}},natural:{ambient:{color:15792383,intensity:.7},main:{color:16775920,intensity:1.2,position:[10,10,5]},fill:{color:8900331,intensity:.4,position:[-5,-2,-5]}},dramatic:{ambient:{color:4210752,intensity:.3},main:{color:16777215,intensity:2,position:[3,8,3]},fill:{color:255,intensity:.2,position:[-5,0,0]}},soft:{ambient:{color:16777215,intensity:.8},main:{color:16774630,intensity:.8,position:[5,5,5]},fill:{color:16770800,intensity:.5,position:[-3,0,-3]}},studio:{ambient:{color:16777215,intensity:.6},main:{color:16777215,intensity:1.2,position:[5,5,5]},fill:{color:16777215,intensity:.4,position:[-3,0,-3]}},outdoor:{ambient:{color:15792383,intensity:.8},main:{color:16775920,intensity:1.5,position:[10,10,5]},fill:{color:8900331,intensity:.3,position:[-5,-2,-5]}},custom:{ambient:{color:16777215,intensity:customAmbientIntensity},main:{color:parseInt(customLightColor.replace(\"#\",\"0x\")),intensity:customDirectionalIntensity,position:[customLightX,customLightY,customLightZ]},fill:{color:16777215,intensity:.3,position:[-3,0,-3]}}};const preset=lightingPresets[lighting]||lightingPresets.natural;const cameraPresets={front:[0,0,cameraDistance],back:[0,0,-cameraDistance],top:[0,cameraDistance,0],side:[cameraDistance,0,0],isometric:[cameraDistance*.7,cameraDistance*.7,cameraDistance*.7]};const cameraPos=cameraPresets[cameraPositionPreset]||cameraPresets.front;const finalModelScale=modelSize/100;const speedMultiplier=isBasicMode?animationSpeed===\"slow\"?.5:animationSpeed===\"fast\"?1.5:1:1;const htmlContent=`\n<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <style>\n        body { margin: 0; overflow: hidden; font-family: system-ui, -apple-system, sans-serif; }\n        #canvas-container { width: 100vw; height: 100vh; position: relative; }\n        #loading {\n            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);\n            color: white; font-size: 16px; background: rgba(0, 0, 0, 0.7);\n            padding: 20px 30px; border-radius: 10px; z-index: 1000;\n            display: ${showLoading?\"block\":\"none\"};\n        }\n        #error {\n            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);\n            font-size: 14px; padding: 20px 30px; border-radius: 10px;\n            text-align: center; z-index: 1000; display: none; max-width: 80%;\n            color: #991B1B; background: #FEE2E2;\n        }\n    </style>\n</head>\n<body>\n    <div id=\"loading\">Loading Model...</div>\n    <div id=\"error\">Failed to load model</div>\n    <div id=\"canvas-container\"></div>\n\n    <script type=\"importmap\">\n    {\n        \"imports\": {\n            \"three\": \"https://cdn.jsdelivr.net/npm/three@0.159.0/build/three.module.js\",\n            \"three/addons/\": \"https://cdn.jsdelivr.net/npm/three@0.159.0/examples/jsm/\"\n        }\n    }\n    </script>\n\n    <script type=\"module\">\n        import * as THREE from 'three';\n        import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';\n        import { OrbitControls } from 'three/addons/controls/OrbitControls.js';\n\n        const container = document.getElementById('canvas-container');\n        const loading = document.getElementById('loading');\n        const errorDiv = document.getElementById('error');\n\n        const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n        const lowQualityMode = ${lowQualityMode};\n        const backgroundType = '${backgroundType}';\n        const enableShadows = ${enableShadows};\n\n        const scene = new THREE.Scene();\n\n        if (backgroundType === 'transparent') {\n            scene.background = null;\n        } else {\n            scene.background = new THREE.Color('${backgroundColor}');\n        }\n\n        const camera = new THREE.PerspectiveCamera(${fieldOfView}, window.innerWidth / window.innerHeight, 0.1, 1000);\n        camera.position.set(${cameraPos[0]}, ${cameraPos[1]}, ${cameraPos[2]});\n\n        const renderer = new THREE.WebGLRenderer({\n            antialias: !isMobile && !lowQualityMode,\n            alpha: backgroundType === 'transparent',\n            powerPreference: isMobile ? \"low-power\" : \"high-performance\"\n        });\n\n        renderer.setSize(window.innerWidth, window.innerHeight);\n\n        const finalPixelRatio = '${pixelRatio}' === 'auto'\n            ? Math.min(window.devicePixelRatio, isMobile ? 1.5 : 2)\n            : parseFloat('${pixelRatio}');\n        renderer.setPixelRatio(finalPixelRatio);\n\n        if (enableShadows) {\n            renderer.shadowMap.enabled = true;\n            renderer.shadowMap.type = THREE.PCFSoftShadowMap;\n            renderer.shadowMap.autoUpdate = true;\n        } else {\n            renderer.shadowMap.enabled = false;\n        }\n\n        if (backgroundType === 'transparent') {\n            renderer.setClearColor(0x000000, 0);\n        }\n\n        container.appendChild(renderer.domElement);\n\n        const preset = ${JSON.stringify(preset)};\n\n        const ambientLight = new THREE.AmbientLight(preset.ambient.color, preset.ambient.intensity);\n        scene.add(ambientLight);\n\n        const mainLight = new THREE.DirectionalLight(preset.main.color, preset.main.intensity);\n        mainLight.position.set(...preset.main.position);\n\n        if (enableShadows) {\n            mainLight.castShadow = true;\n            mainLight.shadow.mapSize.width = 2048;\n            mainLight.shadow.mapSize.height = 2048;\n            mainLight.shadow.camera.near = 0.5;\n            mainLight.shadow.camera.far = 500;\n\n            const shadowCameraSize = 10;\n            mainLight.shadow.camera.left = -shadowCameraSize;\n            mainLight.shadow.camera.right = shadowCameraSize;\n            mainLight.shadow.camera.top = shadowCameraSize;\n            mainLight.shadow.camera.bottom = -shadowCameraSize;\n\n            mainLight.shadow.bias = -0.0001;\n            mainLight.shadow.normalBias = 0.02;\n            mainLight.shadow.radius = 2;\n\n            mainLight.shadow.camera.updateProjectionMatrix();\n        } else {\n            mainLight.castShadow = false;\n        }\n\n        scene.add(mainLight);\n\n        const fillLight = new THREE.DirectionalLight(preset.fill.color, preset.fill.intensity);\n        fillLight.position.set(...preset.fill.position);\n        fillLight.castShadow = false;\n        scene.add(fillLight);\n\n        if (${showAxesHelper}) {\n            const axesHelper = new THREE.AxesHelper(5);\n            scene.add(axesHelper);\n        }\n\n        // Optional ground plane\n        if (${showGroundPlane}) {\n            const planeGeo = new THREE.PlaneGeometry(100, 100);\n            const planeMat = new THREE.MeshStandardMaterial({ color: '${groundColor}', roughness: 1, metalness: 0 });\n            const plane = new THREE.Mesh(planeGeo, planeMat);\n            plane.rotation.x = -Math.PI / 2;\n            plane.position.y = -1.2;\n            plane.receiveShadow = ${enableShadows};\n            scene.add(plane);\n        }\n\n        const controls = new OrbitControls(camera, renderer.domElement);\n        controls.enableDamping = true;\n        controls.dampingFactor = ${rotationDamping};\n        controls.enableRotate = ${allowRotation};\n        controls.enableZoom = ${allowZoom};\n        controls.enablePan = ${enablePan};\n        controls.zoomSpeed = ${zoomSpeed};\n        controls.minDistance = ${minZoomDistance};\n        controls.maxDistance = ${maxZoomDistance};\n\n        let model = null;\n        let lastFrameTime = Date.now();\n        let isVisible = true;\n        let isHovering = false;\n        let clickAnimating = false;\n\n        // Original material state map for transparency restore\n        const originalMaterialState = new WeakMap();\n\n        // Animation parameters\n        const entryAnimation = '${finalEntryAnimation}';\n        let entryDuration = ${finalEntryDuration} * 1000;\n        const entryDelayMs = ${entryDelay} * 1000;\n        const entryEasing = '${entryEasing}';\n        const idleAnimation = '${finalIdleAnimation}';\n        const idleSpeed = ${finalIdleSpeed} * ${speedMultiplier};\n        const idleAxis = '${idleAxis}';\n        const idleAmplitude = ${idleAmplitude};\n        const hoverAnimation = '${finalHoverAnimation}';\n        const hoverIntensity = ${hoverIntensity};\n        const clickAnimation = '${finalClickAnimation}';\n        const clickPlayOnce = ${clickPlayOnce};\n        const clickDuration = ${clickDuration} * 1000;\n\n        let entryStartTime = null;\n        let clickStartTime = null;\n        let idleTime = 0;\n        let originalScale = 1;\n        let orbitAngle = 0;\n\n        // Smooth idle handoff baselines\n        let idleStartTime = null;\n        let idleActive = false;\n        let basePosY = 0;\n        let baseRotX = 0;\n        let baseRotY = 0;\n        let baseRotZ = 0;\n\n        // Camera orbit state for smooth transition\n        let initialCameraPos = { x: ${cameraPos[0]}, y: ${cameraPos[1]}, z: ${cameraPos[2]} };\n        let cameraOrbitStartAngle = 0;\n\n        const easingFunctions = {\n            ease: t => (t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t),\n            'ease-in-out': t => (t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t),\n            bounce: t => {\n                if (t < 1 / 2.75) return 7.5625 * t * t;\n                if (t < 2 / 2.75) return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n                if (t < 2.5 / 2.75) return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n                return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n            },\n            linear: t => t\n        };\n\n        const easeFunc = easingFunctions[entryEasing] || easingFunctions['ease-in-out'];\n\n        if (${pauseWhenHidden}) {\n            document.addEventListener('visibilitychange', () => {\n                isVisible = !document.hidden;\n            });\n        }\n\n        const mouse = { x: 0, y: 0 };\n        renderer.domElement.addEventListener('mousemove', (e) => {\n            mouse.x = (e.clientX / window.innerWidth) * 2 - 1;\n            mouse.y = -(e.clientY / window.innerHeight) * 2 + 1;\n        });\n\n        renderer.domElement.addEventListener('mouseenter', () => { isHovering = true; });\n        renderer.domElement.addEventListener('mouseleave', () => { isHovering = false; });\n        renderer.domElement.addEventListener('click', () => {\n            if (clickAnimation !== 'none' && model) {\n                clickAnimating = true;\n                clickStartTime = Date.now();\n            }\n        });\n\n        const modelUrl = '${finalModelUrl}';\n        const loader = new GLTFLoader();\n\n        function countPolygons(object) {\n            let count = 0;\n            object.traverse((child) => {\n                if (child.isMesh && child.geometry) {\n                    const geometry = child.geometry;\n                    if (geometry.index) {\n                        count += geometry.index.count / 3;\n                    } else if (geometry.attributes.position) {\n                        count += geometry.attributes.position.count / 3;\n                    }\n                }\n            });\n            return Math.floor(count);\n        }\n\n        function getTextureStats(object) {\n            const textures = new Set();\n            let totalSize = 0;\n\n            object.traverse((child) => {\n                if (child.material) {\n                    const materials = Array.isArray(child.material) ? child.material : [child.material];\n                    materials.forEach(mat => {\n                        if (mat.map && mat.map.image) {\n                            textures.add(mat.map);\n                            totalSize += (mat.map.image.width || 0) * (mat.map.image.height || 0);\n                        }\n                    });\n                }\n            });\n\n            return {\n                count: textures.size,\n                estimatedSize: (totalSize * 4 / 1024 / 1024).toFixed(2) + ' MB'\n            };\n        }\n\n        function centerAndScaleModel(object) {\n            if (!${centerModel}) {\n                object.scale.set(${finalModelScale}, ${finalModelScale}, ${finalModelScale});\n                originalScale = ${finalModelScale};\n                return;\n            }\n\n            const box = new THREE.Box3().setFromObject(object);\n            const center = box.getCenter(new THREE.Vector3());\n            const size = box.getSize(new THREE.Vector3());\n            const maxDim = Math.max(size.x, size.y, size.z);\n            const scale = maxDim > 0 ? (2 / maxDim) * ${finalModelScale} : ${finalModelScale};\n\n            object.position.sub(center);\n            object.scale.set(scale, scale, scale);\n            originalScale = scale;\n        }\n\n        function captureOriginalMaterialState(object) {\n            object.traverse((child) => {\n                if (!child.material) return;\n                const mats = Array.isArray(child.material) ? child.material : [child.material];\n                mats.forEach((mat) => {\n                    if (!originalMaterialState.has(mat)) {\n                        originalMaterialState.set(mat, { transparent: mat.transparent, opacity: mat.opacity });\n                    }\n                });\n            });\n        }\n\n        function prepEntryTransparency(object) {\n            object.traverse((child) => {\n                if (!child.material) return;\n                const mats = Array.isArray(child.material) ? child.material : [child.material];\n                mats.forEach((mat) => {\n                    mat.transparent = true;\n                    mat.opacity = 0;\n                });\n            });\n        }\n\n        function restoreOriginalTransparency(object) {\n            object.traverse((child) => {\n                if (!child.material) return;\n                const mats = Array.isArray(child.material) ? child.material : [child.material];\n                mats.forEach((mat) => {\n                    const orig = originalMaterialState.get(mat);\n                    if (orig) {\n                        mat.opacity = orig.opacity;\n                        mat.transparent = orig.transparent;\n                    } else {\n                        mat.opacity = 1;\n                        mat.transparent = false;\n                    }\n                });\n            });\n        }\n\n        function onLoadSuccess(gltf) {\n            const object = gltf.scene;\n\n            object.rotation.x = ${initialRotationX} * Math.PI / 180;\n            object.rotation.y = ${initialRotationY} * Math.PI / 180;\n            object.rotation.z = ${initialRotationZ} * Math.PI / 180;\n\n            if (${showWireframe}) {\n                object.traverse((child) => {\n                    if (child.isMesh) {\n                        child.material.wireframe = true;\n                    }\n                });\n            }\n\n            object.traverse((child) => {\n                if (child.isMesh) {\n                    child.castShadow = ${enableShadows};\n                    child.receiveShadow = ${enableShadows};\n\n                    if (child.material) {\n                        const materials = Array.isArray(child.material) ? child.material : [child.material];\n                        materials.forEach(mat => {\n                            if (${enableShadows}) {\n                                mat.shadowSide = THREE.FrontSide;\n                            }\n                        });\n                    }\n                }\n            });\n\n            centerAndScaleModel(object);\n\n            captureOriginalMaterialState(object);\n\n            // Apply position offsets from controls\n            object.position.x += ${positionX};\n            object.position.y += ${positionY};\n            object.position.z += ${positionZ};\n\n            // Initialize entry start state\n            if (entryAnimation === 'fadeIn') {\n                prepEntryTransparency(object);\n            } else if (entryAnimation === 'scaleIn') {\n                object.scale.set(0, 0, 0);\n            } else if (entryAnimation === 'riseUp') {\n                object.position.y -= 3;\n                prepEntryTransparency(object);\n            } else if (entryAnimation === 'dropIn') {\n                object.position.y += 5;\n            } else if (entryAnimation === 'spinIn' || entryAnimation === 'riseAndSpin') {\n                object.rotation.y = -Math.PI * 2;\n                object.scale.set(0, 0, 0);\n            }\n\n            scene.add(object);\n            model = object;\n\n            // Capture starting baselines (centered pose)\n            basePosY = model.position.y;\n            baseRotX = model.rotation.x;\n            baseRotY = model.rotation.y;\n            baseRotZ = model.rotation.z;\n\n            // For orbit animation, calculate initial camera angle\n            if (idleAnimation === 'orbit') {\n                cameraOrbitStartAngle = Math.atan2(camera.position.z, camera.position.x);\n            }\n\n            // Entry timing and idle gating\n            if (entryAnimation === 'none') {\n                entryDuration = 0;\n                if (entryDelayMs > 0) {\n                    entryStartTime = Date.now() + entryDelayMs;\n                } else {\n                    if (idleAnimation !== 'none') {\n                        idleActive = true;\n                        idleStartTime = Date.now();\n                        orbitAngle = cameraOrbitStartAngle;\n                    }\n                }\n            } else {\n                entryStartTime = Date.now() + entryDelayMs;\n            }\n\n            const polyCount = countPolygons(object);\n            const textureStats = getTextureStats(object);\n\n            window.parent.postMessage({\n                type: 'modelStats',\n                polygons: polyCount,\n                textures: textureStats.count,\n                textureSize: textureStats.estimatedSize\n            }, '*');\n\n            loading.style.display = 'none';\n        }\n\n        function onLoadError(error) {\n            console.error('Error loading model:', error);\n            loading.style.display = 'none';\n            errorDiv.textContent = 'Failed to load model. Check URL and format.';\n            errorDiv.style.display = 'block';\n        }\n\n        loader.load(modelUrl, onLoadSuccess, undefined, onLoadError);\n\n        const autoRotateEnabled = ${autoRotate};\n        const rotSpeed = ${rotationSpeed};\n        const targetFPS = ${maxFrameRate===\"unlimited\"?60:parseInt(maxFrameRate)};\n        const frameDelay = 1000 / targetFPS;\n\n        function applyEntryAnimation(elapsed) {\n            if (!model) return false;\n            if (entryAnimation === 'none') return true;\n            if (elapsed < 0) return false;\n            if (elapsed > entryDuration) return true;\n\n            const progress = easeFunc(Math.min(elapsed / entryDuration, 1));\n\n            if (entryAnimation === 'fadeIn') {\n                model.traverse(child => {\n                    if (child.material) {\n                        const mats = Array.isArray(child.material) ? child.material : [child.material];\n                        mats.forEach(mat => { mat.opacity = progress; });\n                    }\n                });\n            } else if (entryAnimation === 'scaleIn') {\n                const scale = originalScale * progress;\n                model.scale.set(scale, scale, scale);\n            } else if (entryAnimation === 'riseUp') {\n                model.position.y = basePosY - 3 * (1 - progress);\n                model.traverse(child => {\n                    if (child.material) {\n                        const mats = Array.isArray(child.material) ? child.material : [child.material];\n                        mats.forEach(mat => { mat.opacity = progress; });\n                    }\n                });\n            } else if (entryAnimation === 'dropIn') {\n                const bounceProgress = easingFunctions.bounce(progress);\n                model.position.y = basePosY + 5 * (1 - bounceProgress);\n            } else if (entryAnimation === 'spinIn') {\n                model.rotation.y = baseRotY - Math.PI * 2 * (1 - progress);\n                const scale = originalScale * progress;\n                model.scale.set(scale, scale, scale);\n            } else if (entryAnimation === 'riseAndSpin') {\n                model.position.y = basePosY - 3 * (1 - progress);\n                model.rotation.y = baseRotY - Math.PI * 2 * (1 - progress);\n                const scale = originalScale * progress;\n                model.scale.set(scale, scale, scale);\n            }\n\n            return false;\n        }\n\n        function applyIdleAnimation() {\n            if (!model) return;\n            if (!idleActive) return;\n\n            const now = Date.now();\n            const phaseMs = now - idleStartTime;\n            const speed = (isHovering && hoverAnimation === 'glowAndFaster') ? idleSpeed * 2 : idleSpeed;\n            const t = phaseMs * 0.001 * speed;\n\n            const rotRate = 0.6;\n\n            const shouldPause = isHovering && (hoverAnimation === 'pause' || hoverAnimation === 'pauseAndScale');\n            if (shouldPause) return;\n\n            if (idleAnimation === 'rotate') {\n                if (idleAxis === 'x') {\n                    model.rotation.x = baseRotX + t * rotRate;\n                } else if (idleAxis === 'y') {\n                    model.rotation.y = baseRotY + t * rotRate;\n                } else if (idleAxis === 'z') {\n                    model.rotation.z = baseRotZ + t * rotRate;\n                }\n            } else if (idleAnimation === 'float') {\n                model.position.y = basePosY + Math.sin(t) * idleAmplitude * 0.5;\n            } else if (idleAnimation === 'pulse') {\n                const s = 1 + Math.sin(t) * idleAmplitude * 0.1;\n                const scale = originalScale * s;\n                model.scale.set(scale, scale, scale);\n            } else if (idleAnimation === 'swing') {\n                model.rotation.z = baseRotZ + Math.sin(t) * idleAmplitude * 0.2;\n            } else if (idleAnimation === 'tilt') {\n                model.rotation.x = baseRotX + Math.sin(t) * idleAmplitude * 0.15;\n            } else if (idleAnimation === 'floatAndRotate') {\n                model.position.y = basePosY + Math.sin(t) * idleAmplitude * 0.5;\n                model.rotation.y = baseRotY + t * rotRate;\n            } else if (idleAnimation === 'floatAndTilt') {\n                model.position.y = basePosY + Math.sin(t) * idleAmplitude * 0.5;\n                model.rotation.z = baseRotZ + Math.sin(t) * idleAmplitude * 0.2;\n            } else if (idleAnimation === 'floatPulseRotate') {\n                model.position.y = basePosY + Math.sin(t) * idleAmplitude * 0.3;\n                const s = 1 + Math.sin(t) * idleAmplitude * 0.05;\n                const scale = originalScale * s;\n                model.scale.set(scale, scale, scale);\n                model.rotation.y = baseRotY + t * rotRate;\n            } else if (idleAnimation === 'orbit') {\n                const radius = ${cameraDistance};\n                const angle = orbitAngle + t * 0.6;\n                camera.position.x = Math.cos(angle) * radius;\n                camera.position.z = Math.sin(angle) * radius;\n                camera.lookAt(0, 0, 0);\n            }\n        }\n\n        function applyHoverAnimation() {\n            if (!model || !isHovering) return;\n\n            if (hoverAnimation === 'scaleUp' || hoverAnimation === 'pauseAndScale') {\n                const targetScale = originalScale * (1 + 0.1 * hoverIntensity);\n                model.scale.lerp(new THREE.Vector3(targetScale, targetScale, targetScale), 0.1);\n            } else if (hoverAnimation === 'tiltToCursor') {\n                model.rotation.x = baseRotX + mouse.y * 0.3 * hoverIntensity;\n                model.rotation.y = baseRotY + mouse.x * 0.3 * hoverIntensity;\n            } else if (hoverAnimation === 'glow' || hoverAnimation === 'glowAndFaster') {\n                ambientLight.intensity = preset.ambient.intensity * (1 + 0.5 * hoverIntensity);\n                mainLight.intensity = preset.main.intensity * (1 + 0.5 * hoverIntensity);\n            } else if (hoverAnimation === 'bounce') {\n                const bounce = Math.sin(Date.now() * 0.01) * 0.1 * hoverIntensity;\n                model.position.y = basePosY + bounce;\n            }\n        }\n\n        function resetHoverAnimation() {\n            if (!model) return;\n\n            if (hoverAnimation === 'scaleUp' || hoverAnimation === 'pauseAndScale') {\n                model.scale.lerp(new THREE.Vector3(originalScale, originalScale, originalScale), 0.1);\n            } else if (hoverAnimation === 'glow' || hoverAnimation === 'glowAndFaster') {\n                ambientLight.intensity = preset.ambient.intensity;\n                mainLight.intensity = preset.main.intensity;\n            } else if (hoverAnimation === 'tiltToCursor') {\n                model.rotation.x = model.rotation.x * 0.9 + baseRotX * 0.1;\n                model.rotation.y = model.rotation.y * 0.9 + baseRotY * 0.1;\n            } else if (hoverAnimation === 'bounce') {\n                model.position.y = model.position.y * 0.9 + basePosY * 0.1;\n            }\n        }\n\n        function applyClickAnimation(elapsed) {\n            if (!model || elapsed > clickDuration) {\n                clickAnimating = false;\n                return;\n            }\n\n            const progress = elapsed / clickDuration;\n\n            if (clickAnimation === 'wobble') {\n                const wobble = Math.sin(progress * Math.PI * 4) * (1 - progress) * 0.2;\n                model.rotation.x = baseRotX + wobble;\n                model.rotation.z = baseRotZ + wobble;\n            } else if (clickAnimation === 'flip') {\n                model.rotation.y = baseRotY + progress * Math.PI * 2;\n            } else if (clickAnimation === 'pop') {\n                const scale = progress < 0.5\n                    ? originalScale * (1 + progress * 2 * 0.3)\n                    : originalScale * (1 + (1 - progress) * 2 * 0.3);\n                model.scale.set(scale, scale, scale);\n            } else if (clickAnimation === 'spin') {\n                model.rotation.y = baseRotY + progress * Math.PI * 2;\n            } else if (clickAnimation === 'bounce') {\n                const bounce = Math.sin(progress * Math.PI) * 0.5;\n                model.position.y = basePosY + bounce;\n            }\n        }\n\n        function animate() {\n            requestAnimationFrame(animate);\n\n            if (!isVisible && ${pauseWhenHidden}) return;\n\n            const now = Date.now();\n            const delta = now - lastFrameTime;\n\n            if (delta < frameDelay) return;\n\n            lastFrameTime = now - (delta % frameDelay);\n            idleTime += delta;\n\n            // Entry handling and smooth handoff to idle\n            if (entryStartTime !== null && model) {\n                if (entryAnimation === 'none') {\n                    if (now >= entryStartTime) {\n                        entryStartTime = null;\n                        if (idleAnimation !== 'none') {\n                            idleActive = true;\n                            idleStartTime = now;\n                            orbitAngle = cameraOrbitStartAngle;\n                        }\n                    }\n                } else {\n                    const entryElapsed = now - entryStartTime;\n                    const entryComplete = applyEntryAnimation(entryElapsed);\n\n                    if (entryComplete) {\n                        entryStartTime = null;\n\n                        // Restore original transparency for fade-in types\n                        if (entryAnimation === 'fadeIn' || entryAnimation === 'riseUp') {\n                            restoreOriginalTransparency(model);\n                        }\n\n                        // Capture final entry transform as baseline for idle\n                        basePosY = model.position.y;\n                        baseRotX = model.rotation.x;\n                        baseRotY = model.rotation.y;\n                        baseRotZ = model.rotation.z;\n\n                        if (idleAnimation !== 'none') {\n                            idleActive = true;\n                            idleStartTime = now;\n                            // Initialize orbit angle from current camera position for smooth transition\n                            if (idleAnimation === 'orbit') {\n                                orbitAngle = Math.atan2(camera.position.z, camera.position.x);\n                            }\n                        }\n                    }\n                }\n            }\n\n            if (!clickAnimating) {\n                applyIdleAnimation();\n            }\n\n            if (isHovering) {\n                applyHoverAnimation();\n            } else {\n                resetHoverAnimation();\n            }\n\n            if (clickAnimating && clickStartTime) {\n                const clickElapsed = now - clickStartTime;\n                applyClickAnimation(clickElapsed);\n                if (${clickPlayOnce?\"true\":\"false\"} && clickElapsed >= clickDuration) {\n                    clickAnimating = false;\n                }\n            }\n\n            if (model && autoRotateEnabled && idleAnimation === 'none' && !clickAnimating) {\n                model.rotation.y += rotSpeed * 0.01;\n            }\n\n            controls.update();\n            renderer.render(scene, camera);\n        }\n        animate();\n\n        let resizeTimeout;\n        window.addEventListener('resize', () => {\n            clearTimeout(resizeTimeout);\n            resizeTimeout = setTimeout(() => {\n                camera.aspect = window.innerWidth / window.innerHeight;\n                camera.updateProjectionMatrix();\n                renderer.setSize(window.innerWidth, window.innerHeight);\n            }, 250);\n        });\n\n        window.addEventListener('beforeunload', () => {\n            if (model) {\n                model.traverse((child) => {\n                    if (child.geometry) child.geometry.dispose();\n                    if (child.material) {\n                        if (Array.isArray(child.material)) {\n                            child.material.forEach(m => m.dispose());\n                        } else {\n                            child.material.dispose();\n                        }\n                    }\n                });\n            }\n            renderer.dispose();\n        });\n    </script>\n</body>\n</html>\n        `;if(iframeRef.current){const blob=new Blob([htmlContent],{type:\"text/html\"});const url=URL.createObjectURL(blob);iframeRef.current.src=url;iframeRef.current.onload=()=>{URL.revokeObjectURL(url);setTimeout(()=>setLoading(false),300);};}const handleMessage=event=>{if(typeof event.data===\"object\"&&event.data&&event.data.type===\"modelStats\"){setModelStats(event.data);}};window.addEventListener(\"message\",handleMessage);return()=>{window.removeEventListener(\"message\",handleMessage);if(iframeRef.current){iframeRef.current.src=\"about:blank\";}};},[finalModelUrl,autoRotate,rotationSpeed,allowRotation,allowZoom,backgroundColor,backgroundType,lighting,showLoading,loadWhenVisible,modelSize,centerModel,initialRotationX,initialRotationY,initialRotationZ,cameraDistance,fieldOfView,minZoomDistance,maxZoomDistance,cameraPositionPreset,enablePan,rotationDamping,zoomSpeed,customAmbientIntensity,customDirectionalIntensity,customLightX,customLightY,customLightZ,customLightColor,showGroundPlane,groundColor,maxFrameRate,pauseWhenHidden,lowQualityMode,pixelRatio,showWireframe,showAxesHelper,enableShadows,isInViewport,animationPreset,finalEntryAnimation,finalEntryDuration,entryDelay,entryEasing,finalIdleAnimation,finalIdleSpeed,idleAxis,idleAmplitude,finalHoverAnimation,hoverIntensity,hoverTransitionSpeed,finalClickAnimation,clickPlayOnce,clickDuration,animationSpeed,positionX,positionY,positionZ]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",backgroundColor:backgroundType===\"transparent\"?\"transparent\":backgroundColor,...style},children:!isInViewport?/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#0a0a0a\",color:\"#666\",fontSize:\"14px\",fontFamily:\"system-ui, -apple-system, sans-serif\"},children:\"Scroll to load model\"}):!finalModelUrl?/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#0a0a0a\",color:\"#888\",fontSize:\"15px\",textAlign:\"center\",padding:\"40px\",fontFamily:\"system-ui, -apple-system, sans-serif\"},children:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"48\",height:\"48\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.5\",style:{opacity:.4,marginBottom:\"16px\"},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"3.27 6.96 12 12.01 20.73 6.96\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"22.08\",x2:\"12\",y2:\"12\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{color:\"#aaa\",marginBottom:\"8px\"},children:\"No model loaded\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"13px\",color:\"#666\"},children:\"Upload a GLB or GLTF file\"})]})}):error?/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#0a0a0a\",color:\"#ef4444\",fontSize:\"14px\",textAlign:\"center\",padding:\"20px\",fontFamily:\"system-ui, -apple-system, sans-serif\"},children:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"32px\",marginBottom:\"12px\",opacity:.6},children:\"⚠\"}),/*#__PURE__*/_jsx(\"div\",{children:error})]})}):/*#__PURE__*/_jsxs(_Fragment,{children:[modelStats&&showModelStats&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"20px\",right:\"20px\",background:\"rgba(0, 0, 0, 0.75)\",color:\"#aaa\",padding:\"12px 16px\",borderRadius:\"8px\",fontSize:\"11px\",zIndex:1e3,fontFamily:\"monospace\",backdropFilter:\"blur(10px)\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"4px\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#666\"},children:\"Polygons:\"}),\" \",modelStats.polygons.toLocaleString()]}),/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"4px\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#666\"},children:\"Textures:\"}),\" \",modelStats.textures]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#666\"},children:\"Size:\"}),\" \",modelStats.textureSize]})]}),/*#__PURE__*/_jsx(\"iframe\",{ref:iframeRef,style:{width:\"100%\",height:\"100%\",border:\"none\",display:\"block\",backgroundColor:backgroundType===\"transparent\"?\"transparent\":undefined},title:\"3D Model Viewer\"})]})});}ThreeDViewer.defaultProps={mode:\"basic\",modelUpload:\"\",modelUrlInput:\"\",modelSize:100,autoRotate:false,rotationSpeed:1,allowRotation:true,allowZoom:true,backgroundType:\"solid\",backgroundColor:\"#1a1a1a\",lighting:\"natural\",showLoading:true,loadWhenVisible:false,enableShadows:false,showModelStats:false,animationPreset:\"none\",entryAnimation:\"fadeIn\",entryDuration:.8,entryDelay:0,entryEasing:\"ease-in-out\",idleAnimation:\"none\",idleSpeed:1,idleAxis:\"y\",idleAmplitude:1,hoverAnimation:\"none\",hoverIntensity:1,hoverTransitionSpeed:\"smooth\",clickAnimation:\"none\",clickPlayOnce:true,clickDuration:.6,animationSpeed:\"medium\",centerModel:true,initialRotationX:0,initialRotationY:0,initialRotationZ:0,cameraDistance:5,fieldOfView:50,minZoomDistance:1,maxZoomDistance:20,cameraPositionPreset:\"front\",enablePan:false,rotationDamping:.05,zoomSpeed:1,customAmbientIntensity:.6,customDirectionalIntensity:1.2,customLightX:5,customLightY:5,customLightZ:5,customLightColor:\"#ffffff\",showGroundPlane:false,groundColor:\"#808080\",maxFrameRate:\"60\",pauseWhenHidden:true,lowQualityMode:false,pixelRatio:\"auto\",showWireframe:false,showAxesHelper:false,positionX:0,positionY:0,positionZ:0};addPropertyControls(ThreeDViewer,{mode:{type:ControlType.Enum,title:\"Mode\",options:[\"basic\",\"advanced\"],optionTitles:[\"Basic\",\"Advanced\"],defaultValue:\"basic\"},animationPreset:{type:ControlType.Enum,title:\"Animation Preset\",options:[\"none\",\"productShowcase\",\"heroAttention\",\"professional\",\"playful\",\"gallery\",\"magical\"],optionTitles:[\"Custom\",\"Product Showcase\",\"Hero Attention\",\"Professional\",\"Playful\",\"Gallery\",\"Magical\"],defaultValue:\"none\"},modelUpload:{type:ControlType.File,title:\"Upload Model\",allowedFileTypes:[\"glb\",\"gltf\"]},modelUrlInput:{type:ControlType.String,title:\"Or Model URL\",placeholder:\"https://example.com/model.glb\"},modelSize:{type:ControlType.Number,title:\"Model Size\",min:10,max:300,step:10,defaultValue:100},// Entry and idle\nentryAnimation:{type:ControlType.Enum,title:\"Entry Animation\",options:[\"none\",\"fadeIn\",\"scaleIn\",\"riseUp\",\"dropIn\",\"spinIn\",\"riseAndSpin\"],optionTitles:[\"None\",\"Fade In\",\"Scale In\",\"Rise Up\",\"Drop In\",\"Spin In\",\"Rise & Spin\"],defaultValue:\"fadeIn\",hidden:props=>props.animationPreset!==\"none\"},idleAnimation:{type:ControlType.Enum,title:\"Continuous Animation\",options:[\"none\",\"rotate\",\"float\",\"pulse\",\"swing\",\"orbit\",\"tilt\",\"floatAndRotate\",\"floatAndTilt\",\"floatPulseRotate\"],optionTitles:[\"None\",\"Rotate\",\"Float\",\"Pulse\",\"Swing\",\"Orbit\",\"Tilt\",\"Float + Rotate\",\"Float + Tilt\",\"Float + Pulse + Rotate\"],defaultValue:\"none\",hidden:props=>props.animationPreset!==\"none\"},hoverAnimation:{type:ControlType.Enum,title:\"On Hover\",options:[\"none\",\"pause\",\"scaleUp\",\"pauseAndScale\",\"tiltToCursor\",\"glow\",\"bounce\",\"glowAndFaster\"],optionTitles:[\"None\",\"Pause\",\"Scale Up\",\"Pause + Scale\",\"Tilt to Cursor\",\"Glow\",\"Bounce\",\"Glow + Faster\"],defaultValue:\"none\",hidden:props=>props.animationPreset!==\"none\"},clickAnimation:{type:ControlType.Enum,title:\"On Click\",options:[\"none\",\"wobble\",\"flip\",\"pop\",\"spin\",\"bounce\"],optionTitles:[\"None\",\"Wobble\",\"Flip\",\"Pop\",\"Spin\",\"Bounce\"],defaultValue:\"none\",hidden:props=>props.animationPreset!==\"none\"||props.mode!==\"basic\"},animationSpeed:{type:ControlType.Enum,title:\"Animation Speed\",options:[\"slow\",\"medium\",\"fast\"],optionTitles:[\"Slow\",\"Medium\",\"Fast\"],defaultValue:\"medium\",hidden:props=>props.mode!==\"basic\"},// Entry fine tuning\nentryDuration:{type:ControlType.Number,title:\"Entry Duration\",min:.3,max:3,step:.1,defaultValue:.8,hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},entryDelay:{type:ControlType.Number,title:\"Entry Delay\",min:0,max:2,step:.1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},entryEasing:{type:ControlType.Enum,title:\"Entry Easing\",options:[\"ease\",\"ease-in-out\",\"bounce\",\"linear\"],optionTitles:[\"Ease\",\"Ease In-Out\",\"Bounce\",\"Linear\"],defaultValue:\"ease-in-out\",hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},// Idle fine tuning\nidleSpeed:{type:ControlType.Number,title:\"Idle Speed\",min:.1,max:5,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},idleAxis:{type:ControlType.Enum,title:\"Rotation Axis\",options:[\"x\",\"y\",\"z\"],optionTitles:[\"X\",\"Y\",\"Z\"],defaultValue:\"y\",hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"||!(props.idleAnimation||\"\").includes(\"rotate\")},idleAmplitude:{type:ControlType.Number,title:\"Animation Intensity\",min:.1,max:3,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},hoverIntensity:{type:ControlType.Number,title:\"Hover Intensity\",min:.5,max:2,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"||props.animationPreset!==\"none\"},clickPlayOnce:{type:ControlType.Boolean,title:\"Play Once\",defaultValue:true,hidden:props=>props.mode!==\"advanced\"||props.clickAnimation===\"none\"},clickDuration:{type:ControlType.Number,title:\"Click Duration\",min:.3,max:2,step:.1,defaultValue:.6,hidden:props=>props.mode!==\"advanced\"||props.clickAnimation===\"none\"},// Legacy auto-rotate\nautoRotate:{type:ControlType.Boolean,title:\"Legacy Auto Rotate\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},rotationSpeed:{type:ControlType.Number,title:\"Legacy Rotation Speed\",min:.1,max:5,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"||!props.autoRotate},// Interaction\nallowRotation:{type:ControlType.Boolean,title:\"Allow User Rotation\",defaultValue:true},allowZoom:{type:ControlType.Boolean,title:\"Allow Zoom\",defaultValue:true},// Background\nbackgroundType:{type:ControlType.Enum,title:\"Background\",options:[\"solid\",\"transparent\"],optionTitles:[\"Solid Color\",\"Transparent\"],defaultValue:\"solid\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#1a1a1a\",hidden:props=>props.backgroundType===\"transparent\"},// Lighting\nlighting:{type:ControlType.Enum,title:\"Lighting\",options:[\"bright\",\"natural\",\"dramatic\",\"soft\",\"studio\",\"outdoor\",\"custom\"],optionTitles:[\"Bright\",\"Natural\",\"Dramatic\",\"Soft\",\"Studio\",\"Outdoor\",\"Custom\"],defaultValue:\"natural\"},enableShadows:{type:ControlType.Boolean,title:\"Enable Shadows\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},// Loading and perf\nshowLoading:{type:ControlType.Boolean,title:\"Show Loading\",defaultValue:true},loadWhenVisible:{type:ControlType.Boolean,title:\"Lazy Load\",defaultValue:false},maxFrameRate:{type:ControlType.Enum,title:\"Max Frame Rate\",options:[\"30\",\"60\",\"unlimited\"],optionTitles:[\"30 fps\",\"60 fps\",\"Unlimited\"],defaultValue:\"60\",hidden:props=>props.mode!==\"advanced\"},pauseWhenHidden:{type:ControlType.Boolean,title:\"Pause When Hidden\",defaultValue:true,hidden:props=>props.mode!==\"advanced\"},lowQualityMode:{type:ControlType.Boolean,title:\"Low Quality Mode\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},pixelRatio:{type:ControlType.Enum,title:\"Pixel Ratio\",options:[\"auto\",\"1\",\"2\"],optionTitles:[\"Auto\",\"1x\",\"2x\"],defaultValue:\"auto\",hidden:props=>props.mode!==\"advanced\"},// Stats\nshowModelStats:{type:ControlType.Boolean,title:\"Show Model Stats\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},// Model transform\ncenterModel:{type:ControlType.Boolean,title:\"Center Model\",defaultValue:true,hidden:props=>props.mode!==\"advanced\"},positionX:{type:ControlType.Number,title:\"Position X\",min:-10,max:10,step:.1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},positionY:{type:ControlType.Number,title:\"Position Y\",min:-10,max:10,step:.1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},positionZ:{type:ControlType.Number,title:\"Position Z\",min:-10,max:10,step:.1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},initialRotationX:{type:ControlType.Number,title:\"Initial Rotation X\",min:-180,max:180,step:1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},initialRotationY:{type:ControlType.Number,title:\"Initial Rotation Y\",min:-180,max:180,step:1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},initialRotationZ:{type:ControlType.Number,title:\"Initial Rotation Z\",min:-180,max:180,step:1,defaultValue:0,hidden:props=>props.mode!==\"advanced\"},// Camera and controls\ncameraDistance:{type:ControlType.Number,title:\"Camera Distance\",min:1,max:50,step:.5,defaultValue:5,hidden:props=>props.mode!==\"advanced\"},fieldOfView:{type:ControlType.Number,title:\"Field of View\",min:30,max:90,step:1,defaultValue:50,hidden:props=>props.mode!==\"advanced\"},minZoomDistance:{type:ControlType.Number,title:\"Min Zoom Distance\",min:.1,max:10,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"},maxZoomDistance:{type:ControlType.Number,title:\"Max Zoom Distance\",min:5,max:100,step:1,defaultValue:20,hidden:props=>props.mode!==\"advanced\"},cameraPositionPreset:{type:ControlType.Enum,title:\"Camera Position\",options:[\"front\",\"back\",\"top\",\"side\",\"isometric\"],optionTitles:[\"Front\",\"Back\",\"Top\",\"Side\",\"Isometric\"],defaultValue:\"front\",hidden:props=>props.mode!==\"advanced\"},enablePan:{type:ControlType.Boolean,title:\"Enable Pan\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},rotationDamping:{type:ControlType.Number,title:\"Rotation Damping\",min:0,max:1,step:.01,defaultValue:.05,hidden:props=>props.mode!==\"advanced\"},zoomSpeed:{type:ControlType.Number,title:\"Zoom Speed\",min:.2,max:3,step:.1,defaultValue:1,hidden:props=>props.mode!==\"advanced\"},// Custom lighting values\ncustomAmbientIntensity:{type:ControlType.Number,title:\"Ambient Intensity\",min:0,max:2,step:.1,defaultValue:.6,hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},customDirectionalIntensity:{type:ControlType.Number,title:\"Directional Intensity\",min:0,max:3,step:.1,defaultValue:1.2,hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},customLightX:{type:ControlType.Number,title:\"Light X\",min:-20,max:20,step:.5,defaultValue:5,hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},customLightY:{type:ControlType.Number,title:\"Light Y\",min:-20,max:20,step:.5,defaultValue:5,hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},customLightZ:{type:ControlType.Number,title:\"Light Z\",min:-20,max:20,step:.5,defaultValue:5,hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},customLightColor:{type:ControlType.Color,title:\"Light Color\",defaultValue:\"#ffffff\",hidden:props=>props.mode!==\"advanced\"||props.lighting!==\"custom\"},// Ground\nshowGroundPlane:{type:ControlType.Boolean,title:\"Show Ground Plane\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},groundColor:{type:ControlType.Color,title:\"Ground Color\",defaultValue:\"#808080\",hidden:props=>props.mode!==\"advanced\"||!props.showGroundPlane},// Debug\nshowWireframe:{type:ControlType.Boolean,title:\"Show Wireframe\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"},showAxesHelper:{type:ControlType.Boolean,title:\"Show Axes Helper\",defaultValue:false,hidden:props=>props.mode!==\"advanced\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThreeDViewer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThreeDViewer.map"],"mappings":"oNAAgL,SAAwB,EAAa,CAAC,OAAK,cAAY,gBAAc,YAAU,aAAW,gBAAc,gBAAc,YAAU,iBAAe,kBAAgB,YAAS,cAAY,kBAAgB,kBAAgB,k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