Skip to content

Instantly share code, notes, and snippets.

@djfumberger
Created March 7, 2016 23:55
Show Gist options
  • Select an option

  • Save djfumberger/e8c771fe8e97802cf2a7 to your computer and use it in GitHub Desktop.

Select an option

Save djfumberger/e8c771fe8e97802cf2a7 to your computer and use it in GitHub Desktop.
chatData = [
{ moveToY: 915 },
#{ moveToY: 350 },
{ user: [ { answer: "Hello", shimmer: true, onAnswer: (=> saidHello()) } ], delay: 1.0 },
#{ moveToY: 925 },
{ trainer: "Hi there, I'm Zara. 👀", replyDelay: 1.5},
# { function: (=> unblurBackground()) },
{ scrollBy: 310, time: 1.65, function: (=> unblurBackground()), delay: 0.75 },
{ trainer: "I'm here to help you be more active."},
{ trainer: 'I select from workouts 💪, walking 🚶, running 🏃, and even yoga 🙏' },
{ trainer: "The more you use me, the smarter and more personal I become."},
{ user: [ { answer: "Got it. 👍" } ] },
{ function: (=> blurBackground()) },
{ trainer: "To get started, I'd love to know your name ?"},
{ function: (=> moveZara()), autonext: true },
{ snapToTop: 1 },
{ function:(=> showKeyboard('Zara', 'answerZara'))},
{ scrollBy: 1250, function: (=> moveZara()) },
{ trainer: "To get started, I'd love to know your name ?"},
{ function:(=> showKeyboard())},
#{ function: (=> moveZara()), autonext: true },
# { scrollBy: 1250 },
# { function: (=> moveZara()) },
# { snapToTop: 1, function: (=> moveZara()) },
#{ user: [ { answer: "Zara", stepTo: 'answerZara' }, { answer: "Bob", stepTo: 'answerBob' } ] },
# Name tree
{ trainer: 'I now need to get a sense of what you want to achieve.', id: 'answerZara', stepTo: 'start' },
#{ trainer: 'Nice one Bob. First thing will be to get a sense of what you want to achieve.', id: 'answerBob', stepTo: 'start' },
{ trainer: "If you’re unsure of anything, don’t worry as it can be updated later.", id: 'start' }, { user: [ { answer: "Ok Lets Go 👍" } ] }
{ trainer: "Tap up to three areas you’d like to improve.", snapToTopp: 1 },
{ snapToTop: 1 },
{ layer: new Layer(image: "images/focus-interests.png", width: 750, height: 1006)
,preventScroll: true },
{ user: [ { answer: "Ok, next." } ] , delay: 2 },
{ trainer: "Tap the body areas you wish to focus on." },
{ snapToTop: 1 },
{ layer: new Layer(image: "images/focus-body.png", width: 750, height: 916) ,preventScroll: true },
{ user: [ { answer: "Great, what’s next" } ] , delay: 2 },
{ trainer: "Tap up to three areas you can relate to." },
{ snapToTop: 1 },
{ layer: new Layer(image: "images/focus-person.png", width: 750, height: 1006) ,preventScroll: true },
{ user: [ { answer: "Great, what’s next" } ] , delay: 2 },
{ trainer: "Nice. Now I’d like to get a sense of your activity with Apple Health." },
{ snapToTop: 1 },
{ trainer: "Giving access allows me to be more accurate with my recommendations." },
{ trainer: "Are you ready to turn on Apple Health?" },
{ user: [ { answer: "Turn on ❤️", stepTo: 'healthModal'}, { answer: "Show me first", stepTo: 'showHealthHelp' } ] },
{ trainer: "Make sure you check all the boxes green.", id: 'showHealthHelp' },
{ layer: new Layer(image: "images/health.png", width: 601, height: 716) },
{ trainer: "Don’t worry we keep all your data secure and private." },
{ user: [ { answer: "Ok, I‘m ready." } ] },
{ function: (=> showHealthModal()), id: 'healthModal' },
{ trainer: "Nice one!", id: 'completedHealthModal' },
{ trainer: "Ok, give me a second whilst I review your data." },
{ snapToTop: 1 },
{ layer: new TrainerBrain(width: Screen.width, height: 1010) },
{ trainer: "I’m usually more punctual 😛", offsetY: -1050, delay: 3},
{ trainer: "Almost there, I promise… 🤔", offsddetY: -950, delay: 2 },
{ trainer: "Ok, I've got it 🎉", offsddetY: -850, delay: 2 },
{ scrollBy: 450, delay: 2 },
{ trainer: "From your choices I recommend focusing on strengthening your core whilst maintaining lower body flexibility. " , offsetY: 650},
{ trainer: "I have your first activity ready." , id: 'firstWorkoutQ' },
{ trainer: "Do you want to create a profile, or see your first activity?" , id: 'firstWorkoutQ' },
{ user: [ { answer: "Create profile", stepTo: 'profile' }, { answer: "See activity",stepTo: 'firstWorkout' } ] },
# Profile
{ id: 'profile', trainer: "Great! Let’s get your email address."},
{ snapToTop: 1 },
{ function: (=> showKeyboard('zara@zova.com', 'firstWorkout')) },
# First Workout
#{ id: 'firstWorkout', trainer: "This is your first activity, check it out now." },
{ id: 'firstWorkout', function: (=> showApp()) }
{ }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment