adds JavaScript API for getting the current animationDetails (state) for avatar animations

move to cpp