Directory / plugin

Falling Cherry Flower

v1.1.0 · by dogrow

Falling cherry flowers or autumn leaves on selected pages, with reduced-motion support and a pause button.

About this plugin

Add [ytmr_falling_flower] to a post, page or Shortcode block to display falling flowers.

Examples:

  • [ytmr_falling_flower]
  • [ytmr_falling_flower type=”autumnleaf” speed=”3″]

The type defaults to cherryflower. Speed must be an integer from 0 (slowest) to 5 (fastest); the default is 2. Invalid values use the defaults.

Only one overlay is created per page. When several shortcodes are rendered, the first one supplies the settings.

Scripts and styles are loaded only when the shortcode is rendered. The animation uses CreateJS/EaselJS, shares its ten images, and is limited to 150 flowers and approximately 50 frames per second. It stops updating in hidden tabs. Visitors can pause or resume the animation using the button at the bottom right. The animation is disabled when the device requests reduced motion and is hidden when printing.

This plugin does not send analytics or contact external services. Images and scripts are served from your site’s configured URLs.

Third-party libraries

CreateJS EaselJS 1.0.0 is bundled under the MIT license. No CDN is required.

  • Project: https://github.com/CreateJS/EaselJS/tree/1.0.0
  • Minified distribution: js/easeljs.min.js
  • Corresponding readable source: js/easeljs.js
  • License: js/EaselJS-LICENSE.txt

Plugin tags