A Re:Earth Visualizer Plugin is a .zip file containing two types of files: a
single reearth.yml configuration file and one or more JavaScript files—one
for each extension. The reearth.yml file describes the Plugin and declares
its extensions, while each JavaScript file contains the logic for its
extension. Together, these files are all Visualizer needs to load and run a
Plugin.
reearth.yml
Section titled “reearth.yml”Every Plugin must include a file named reearth.yml at the root of the .zip.
This YAML file contains Plugin metadata, including its name, version,
description, and extensions.
id: demo-pluginname: Demo Pluginversion: 1.0.0extensions: - id: demo-widget type: widget name: Demo WidgetFor the complete list of supported fields, see the Plugin manifest schema.
Extension JavaScript
Section titled “Extension JavaScript”Each extension declared in reearth.yml must have a corresponding JavaScript
file. The filename must match the extension id. For example, an
extension with id: demo-widget requires a file named demo-widget.js.
The JavaScript file contains the logic for that extension. It runs on the WebAssembly side and has full access to the globally exposed Plugin API.
reearth.ui.show(`<h1>Hello, World!</h1>`);Compose and install
Section titled “Compose and install”Once reearth.yml and all extension JavaScript files are ready, compress them
together into a single .zip file. You can install that .zip into any
Re:Earth Visualizer project.
my-plugin.zip├── reearth.yml└── demo-widget.jsIf your Plugin has more than one extension, include a JavaScript file for each one:
my-plugin.zip├── reearth.yml├── demo-widget.js└── demo-infobox-block.jsFor a faster development experience that avoids the cycle of building and
installing the .zip, see
Set up a local development environment.