Backdrop Plugin

From MSX - Wiki
Revision as of 10:39, 6 December 2022 by Benzac (talk | contribs) (→‎Demo)
Jump to navigation Jump to search

This is a special interaction plugin that generates an atmospheric backdrop from an image (by extrating the main colors). The plugin can be used with version 0.1.82 or higher.

Usage[edit]

The plugin must be loaded with a data object that contains an image URL and optionally a type. Please see following action syntax example.

{
    "url": "http://link.to.image",
    "type": 0
}

If you would like to use the plugin as reference to implement your own plugin, please have a look at this implementation script: http://msx.benzac.de/interaction/js/backdrop.js.

Syntax[edit]

Property syntax of backdrop plugin
Property Type Default Value Mandatory Description
url string null Yes

The URL of the backdrop image.

type number 0 No

The type of the backdrop.

  • 0: Plain atmospheric backdrop.
  • 1: Extended atmospheric backdrop (by embedding the image in the upper right corner).

Example[edit]

Please note that this example uses some properties that are only available in version 0.1.142 or higher.

Screenshot[edit]

Example Screenshot (Backdrop Plugin)

Code[edit]

Demo[edit]

See also[edit]