Experiencing an issue with using Three.js point light in my project. Here's what I have:
var color = 0xffffff;
var intensity = 0.5;
var distance = 200;
position_x = 0;
position_y = 0;
position_z = 0;
light = new THREE.PointLight(color, intensity, distance);
light.position.set(position_x, position_y, position_z);
scene.add(light);
It functions correctly when a small object is positioned close to the light. However, if there is a larger object, like a floor, on the scene:
var floorTexture = new THREE.ImageUtils.loadTexture( 'floor.jpg' );
floorTexture.wrapS = floorTexture.wrapT = THREE.RepeatWrapping;
floorTexture.repeat.set( 1, 1);
var floorMaterial = new THREE.MeshBasicMaterial( { map: floorTexture, side: THREE.DoubleSide } );
var floorGeometry = new THREE.PlaneGeometry(1000, 1000, 10, 10);
var floor = new THREE.Mesh(floorGeometry, floorMaterial);
floor.position.y = -0.5;
floor.rotation.x = Math.PI / 2;
scene.add(floor);
The light does not illuminate the floor. Adjusting the distance of the light did not solve this issue.
Crafting the floor from smaller parts allows the light to work properly, but it significantly impacts FPS due to the increased number of rendered objects.
Seeking advice on how to address this concern as I aim to create a lamp using a point light in my project. Any suggestions or guidance would be greatly appreciated.