import * as THREE from 'three' import { analysis } from '../business/statusManagement' export default function (gl, scene, camera) { let renderer = threeLayer.getThreeRenderer() global.scene = scene // camera.add(new THREE.PointLight(0xffffff)) // // camera.far = 60000 // camera.updateProjectionMatrix() // map.setPitch(60) /* var ground = new THREE.Mesh( new THREE.PlaneGeometry( 10000,10000,2,2 ), new THREE.MeshLambertMaterial({ color:0xffff00, side:THREE.DoubleSide, })) ground.name = "ground"; ground.position.set(10030408, -46147088, 5.999996185302734); ground.receiveShadow = true; ground.castShadow = true scene.add(ground); var box = new THREE.Mesh(new THREE.BoxGeometry(1000, 1000, 1000), new THREE.MeshLambertMaterial({ color: 0xff0000 })); box.position.set(10030208, -46146088, -1000.01798629760742); box.castShadow = true; scene.add(box); let directionalLight = new THREE.DirectionalLight(0xffffff, 10); directionalLight.position.set(10030808, -46146088, -2100); directionalLight.castShadow = true; directionalLight.shadow.camera.near = 100; directionalLight.shadow.camera.far = 10000; directionalLight.shadow.camera.left = -10000; directionalLight.shadow.camera.bottom = -10000; directionalLight.shadow.camera.right = 10000; directionalLight.shadow.camera.top = 10000; directionalLight.target = box; scene.add(directionalLight); let helper = new THREE.DirectionalLightHelper(directionalLight); helper.scale.set(1000,1000,1000) scene.add(helper); */ let pointLight = new THREE.PointLight(0xffffff); // pointLight.castShadow = true; // pointLight.shadow.camera.far = 50000; map.setPitch(analysis().pitch) camera.add(pointLight ) renderer.shadowMapEnabled = true; renderer.shadowMapSoft = false; }