Class: BaseRendering

.plugin. BaseRendering

Defines functinalities common to all rendering plugin classes like GUI components management, basic event handling and loading shader files.

Constructor

new BaseRendering(parameters, renderingClass)

Parameters:
Name Type Attributes Description
parameters Object

The parameters passed to the actual plugin constructor. Other than the rendering plugin specific options (listed below), this object should contain the options passed to this plugin's button constructor (see MLJ.gui.component.Button and MLJ.gui.component.CustomToggleButton).

Properties
Name Type Attributes Description
name string

The name of this plugin, passed to MLJ.core.plugin.Plugin.

toggle boolean <optional>

If true the plugin is assigned a MLJ.gui.component.CustomToggleButton which allows the plugin to be turned on or off, otherwise a simple MLJ.gui.component.Button is used.

renderingClass string

A string used to distinguish the different classes of rendering plugins, used to group together their GUI elements when group-level actions are needed (for example toggling all the Layer level overlays at once). This parameter is handled by the framework and the plugin creation process is oblivious to it.

parameters.loadShader Array.<string> <optional>

If provided, this array should contain the names of the shader files that the plugin must load.

Source:

Members

shaders :MLJ.util.AssociativeArray

Shader files loaded by this plugin

Type:
Source:

Methods

_showOptionsPane()

Displays the options pane of the rendering plugin

Source:

getButton() → {MLJ.gui.component.Button|MLJ.gui.component.CustomToggleButton}

Source:
Returns:

The button component created for this rendering plugin

Type
MLJ.gui.component.Button | MLJ.gui.component.CustomToggleButton

getParam(paramKey) → {MLJ.gui.Param}

GUI parameter widget getter

Parameters:
Name Type Description
paramKey Object

The object used to retrieve the parameter

Source:
Returns:

The parameter widget bound by the MLJ.core.plugin.GUIBuilder of this plugin to paramKey (that is, the parameter widget pw of this rendering plugin such that pw.bindTo === paramName)

Type
MLJ.gui.Param