Skip to content

Instantly share code, notes, and snippets.

@Davisonpro
Last active February 3, 2019 19:13
Show Gist options
  • Save Davisonpro/a1cd3532fe43edea15e75e3680310025 to your computer and use it in GitHub Desktop.
Save Davisonpro/a1cd3532fe43edea15e75e3680310025 to your computer and use it in GitHub Desktop.
function createFloor() {
floorShadow = new THREE.Mesh(new THREE.SphereGeometry(floorRadius, 50, 50), new THREE.MeshPhongMaterial({
color: 0x7abf8e,
specular: 0x000000,
shininess: 1,
transparent: true,
opacity: .5
}));
//floorShadow.rotation.x = -Math.PI / 2;
floorShadow.receiveShadow = true;
floorGrass = new THREE.Mesh(new THREE.SphereGeometry(floorRadius - .5, 50, 50), new THREE.MeshBasicMaterial({
color: 0x7abf8e
}));
//floor.rotation.x = -Math.PI / 2;
floorGrass.receiveShadow = false;
floor = new THREE.Group();
floor.position.y = -floorRadius;
floor.add(floorShadow);
floor.add(floorGrass);
scene.add(floor);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment