Skip to content

An example Flourish template demonstrating how user interaction can affect the state

License

Notifications You must be signed in to change notification settings

hermionewy/example-template-draggable-circle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Flourish template: draggable circle

This sample template builds on the simple circle example, and demonstrates how user interaction can change the state. This template can be used in the Flourish Story Editor to create a story in which a circle moves about. It also demonstrates the use of the smooth-resize module to update smoothly as the window is resized.

This example demonstrates the correct way to handle user interaction in a Flourish template: user interaction should update the state, and then the update() function can be used to update the graphic from the state. Following this pattern means your templates will work as intended in the Flourish Story editor.

Use the Flourish SDK to try it out.

The main code file for the template is src/index.js.

About

An example Flourish template demonstrating how user interaction can affect the state

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%