implemented texture mapping for cubes