Relation between halo spin and cosmic-web filaments at z ≃ 3