Make animated texts appear as chatbot dialog using a custom style

Frank Börncke forked from Typewriter Effect for Command Shell UI

This example shows how to define a custom animated typewriter style which can be used to "fake" a chatbog dialog.

If you have a close look at the source code than the following line does the trick:

"text": "<code>${prefix} ${String.slice(text,0,Math.min(len,Math.max(0,(elapsedTime-initDelay)/typeDelay)))}</code>",

This technique is used within the Alexa Skill "ToolBox": QuickLink

DownloadOpen in Editor
4
Views96
0
Likes0
Share
Supported Viewport Profiles
  • Mobile Portrait, Small
  • Mobile Landscape, Medium
  • Mobile Landscape, Large
  • Hub Round
  • Hub Landscape, Small
  • Hub Landscape, Medium
  • Hub Landscape, Large
  • TV Fullscreen
Minimum required APL version1.5
Comments

Be the first to comment.