/** * The range plugin displays a circle around the canvas element * @author Eirik Måseidvåg */ import CanvasElementPlugin from '../abstract/CanvasElementPlugin'; import { RangePluginOptions } from './types'; import { CanvasElementPluginType } from '../abstract'; export default class RangePlugin extends CanvasElementPlugin { /** * The event listener name to listen for events to update state * The function bound expects 1 parameters, enabled (boolean) */ listener: string | undefined; /** * The range of the circle to be drawn as the radius in the games units */ radius: number; /** * The color of the border. Represented as a hexadecimal number * E.g. 0xffffff (white) */ borderFill: number; /** * The color of the circle fill. Represented as a hexadecimal number * E.g. 0xffffff (white) */ fill: number; /** * Weather or not it should be enabled from the start */ enabled: boolean; /** * The opacity of the border */ borderOpacity: number; /** * The opacity of the fill */ fillOpacity: number; /** * The canvas element plugin type */ name: CanvasElementPluginType; /** * Construct the range plugin * @param options */ constructor(options: RangePluginOptions); }