aframe icon indicating copy to clipboard operation
aframe copied to clipboard

directional light shadowCameraVisible incorrect size

Open IanSweeneyAC opened this issue 3 years ago • 1 comments

Description:

For Directional Lights, when enabling the shadowCameraVisible helper, the size of the helper doesnt follow the dimensions set for

shadowCameraLeft shadowCameraNear shadowCameraRight shadowCameraTop

image

  • A-Frame Version: 1.3
  • Platform / Device: windows chrome
  <a-scene background="color: #111"
    shadow="type: basic"
    stats>
    <a-assets>
      <a-mixin id="wall"
        geometry="primitive: box; height: 30; width: 30; depth: 2"
        material="color: #333; metalness: 0; roughness: 1"
        shadow="cast: false; receive: true"></a-mixin>
    </a-assets>

    <a-entity position="0 3 0"
      light="castShadow: true; 
          color: #FFFFFF; 
          intensity: 1.5;  
          shadowCameraVisible: true;
          shadowCameraLeft: 0;
          shadowCameraNear: 0; 
          type: directional; 
          shadowMapWidth: 1024; 
          shadowMapHeight: 1024">
    </a-entity>

    <a-entity mixin="wall"
      position="0 -2 0"
      rotation="90 0 0"></a-entity>


    <!-- Meshes -->
    <a-entity geometry="primitive: box"
      material="color: #EF2D5E; metalness: 0"
      shadow
      position="0 -0 -4"></a-entity>
    <a-entity geometry="primitive: sphere"
      material="color: #EF2D5E; metalness: 0"
      shadow
      position="-2 -0 -4"></a-entity>
    <a-entity geometry="primitive: cylinder"
      material="color: #EF2D5E; metalness: 0"
      shadow
      position="2 -0 -4"></a-entity>
  </a-scene>

IanSweeneyAC avatar Aug 23 '22 14:08 IanSweeneyAC

cameraHelper undefined for cameraHelper.update();

fix add cameraHelper = el.getObject3D('cameraHelper');

to line247 in light component

IanSweeneyAC avatar Aug 23 '22 16:08 IanSweeneyAC