add mode attribute for sprite