Away3D - shadow method makes material black

Hello,
I try to generate shadow in Away3D (WebGL) with the following script:

        var scene:Scene3D;

        var planeColorMaterial:ColorMaterial; 
	    var plane:Mesh; 

	    var cubeColorMaterial:ColorMaterial; 
	    var cube:Mesh; 

	    var directionalLight:DirectionalLight;

	    var shadowMapMethod:FilteredShadowMapMethod;


        scene = new Scene3D();

        // light
        directionalLight = new DirectionalLight( 1,-0.5, 1);
		directionalLight.x = 0;
		directionalLight.y = 100;
		directionalLight.z = -100;
		directionalLight.diffuse = 1;  
		directionalLight.castsShadows = true;

        // shadow method
		shadowMapMethod = new FilteredShadowMapMethod(directionalLight);
		shadowMapMethod.epsilon = 0.08;

         // plane material
		planeColorMaterial = new ColorMaterial(0xc5ffb8);
		planeColorMaterial.lightPicker = new StaticLightPicker([directionalLight]);
   		planeColorMaterial.shadowMethod = shadowMapMethod;
   		
	    // plane	
	   	plane = new Mesh(new CubeGeometry(1000,10,1000), planeColorMaterial);
	   	plane.x = 0;
	   	plane.y = 0;
	   	plane.z = 0;
	   	plane.material = planeColorMaterial;
		scene.addChild(plane);


         // cube material
		cubeColorMaterial = new ColorMaterial(0x8282ff);
		cubeColorMaterial.lightPicker = new StaticLightPicker([directionalLight]);

         // cube
		cube = new Mesh(new CubeGeometry(40,40,40), cubeColorMaterial);
	   	cube.x = 50;
	   	cube.y = plane.y + 40;
	   	cube.z = 0;
	   	cube.material = cubeColorMaterial;
	   	cube.castsShadows = true;
		scene.addChild(cube);

Unfortunately ShadowMapMethod turns the plane black:

img2
img1

I tested Filtered, Soft and Hard method - the same effect.

Could somebody please advice what am I missing here?

I did not run the code, but I think maybe your DirectionalLight is pointing the wrong direction, up instead of down. Try this:

directionalLight = new DirectionalLight( 0.1, -0.2, -0.1);//or possibly 0.4, -0.3, -1.2 as it's the z direction that makes the difference.

Also note that DirectionalLight has no actual position, so you don’t need the x/y/z coordinates.

The blackness in your case is made by the fact, that you haven’t added your directional light to the DisplayList:

scene.addChild(directionalLight);

PS: for WebGL target, use baked shadows for static objects, and “fake” shadows for dynamic objects (like so called “blob shadows”).