/* Js for , Version=1785139387 */
 if(typeof(v) != "object") v = {};v.pageID = 44;;// 初始化场景
        const scene = new THREE.Scene();
        scene.background = new THREE.Color(0x000000);
        
        // 初始化相机
        const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
        camera.position.z = 5;
        
        // 初始化渲染器
        const renderer = new THREE.WebGLRenderer({ antialias: true });
        renderer.setSize(window.innerWidth, window.innerHeight);
        document.getElementById('container').appendChild(renderer.domElement);
        
        // 添加环境光
        const ambientLight = new THREE.AmbientLight(0x404040);
        scene.add(ambientLight);
        
        // 添加定向光
        const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);
        directionalLight.position.set(1, 1, 1);
        scene.add(directionalLight);
        
        // 创建原子和键
        const atomGeometry = new THREE.SphereGeometry(0.3, 32, 32);
        const bondGeometry = new THREE.CylinderGeometry(0.05, 0.05, 1, 8);
        
        // 硅原子 (中心，灰色)
        const siliconMaterial = new THREE.MeshPhongMaterial({ color: 0x808080 });
        const siliconAtom = new THREE.Mesh(atomGeometry, siliconMaterial);
        scene.add(siliconAtom);
        
        // 氢原子 (四个顶点，白色)
        const hydrogenMaterial = new THREE.MeshPhongMaterial({ color: 0xffffff });
        const hydrogenAtoms = [];
        
        // 硅烷分子是四面体结构
        // 计算四面体顶点的坐标
        const tetrahedronVertices = [
            new THREE.Vector3(0, 1, 0),
            new THREE.Vector3(0.943, -0.333, 0),
            new THREE.Vector3(-0.471, -0.333, 0.816),
            new THREE.Vector3(-0.471, -0.333, -0.816)
        ];
        
        // 创建氢原子和键
        tetrahedronVertices.forEach(vertex => {
            // 创建氢原子
            const hydrogenAtom = new THREE.Mesh(atomGeometry, hydrogenMaterial);
            hydrogenAtom.position.copy(vertex);
            scene.add(hydrogenAtom);
            hydrogenAtoms.push(hydrogenAtom);
            
            // 创建键
            const bond = new THREE.Mesh(bondGeometry, new THREE.MeshPhongMaterial({ color: 0xaaaaaa }));
            
            // 计算键的位置和方向
            const bondDirection = vertex.clone().normalize();
            const bondLength = vertex.length();
            
            // 设置键的位置和方向
            bond.position.copy(vertex.clone().multiplyScalar(0.5));
            bond.scale.set(1, bondLength, 1);
            bond.lookAt(vertex);
            bond.rotateX(Math.PI / 2); // 圆柱体默认沿Y轴，需要旋转
            
            scene.add(bond);
        });
        
        // 动画控制变量
        let isRotating = true;
        let rotationSpeed = 0.005;
        
        // 动画循环
        function animate() {
            requestAnimationFrame(animate);
            
            if (isRotating) {
                // 旋转整个分子
                scene.rotation.y += rotationSpeed;
            }
            
            renderer.render(scene, camera);
        }
        
        // 控制按钮事件
        document.getElementById('toggleRotation').addEventListener('click', function() {
            isRotating = !isRotating;
            this.textContent = isRotating ? '暂停旋转' : '继续旋转';
        });
        
        document.getElementById('resetView').addEventListener('click', function() {
            scene.rotation.set(0, 0, 0);
        });
        
        // 响应窗口大小变化
        window.addEventListener('resize', function() {
            camera.aspect = window.innerWidth / window.innerHeight;
            camera.updateProjectionMatrix();
            renderer.setSize(window.innerWidth, window.innerHeight);
        });
        
        // 开始动画
        animate();
