//添加平面var planeGeometry =newTHREE.PlaneGeometry(60,20);var planeMaterial =newTHREE.MeshLambertMaterial({color:0xffffff});var plane =newTHREE.Mesh(planeGeometry, planeMaterial);
plane.receiveShadow =true;// rotate and position the plane
plane.rotation.x =-0.5* Math.PI;
plane.position.x =15;
plane.position.y =0;
plane.position.z =0;// add the plane to the scene
scene.add(plane);//添加立方体// create a cubevar cubeGeometry =newTHREE.BoxGeometry(4,4,4);var cubeMaterial =newTHREE.MeshLambertMaterial({color:0xff0000});var cube =newTHREE.Mesh(cubeGeometry, cubeMaterial);
cube.castShadow =true;// position the cube
cube.position.x =-4;
cube.position.y =3;
cube.position.z =0;// add the cube to the scene
scene.add(cube);//添加球体var sphereGeometry =newTHREE.SphereGeometry(4,20,20);var sphereMaterial =newTHREE.MeshLambertMaterial({color:0x7777ff});var sphere =newTHREE.Mesh(sphereGeometry, sphereMaterial);// position the sphere
sphere.position.x =20;
sphere.position.y =4;
sphere.position.z =2;
sphere.castShadow =true;// add the sphere to the scene
scene.add(sphere);