fix the bug of cube and finish ShadowClass