UNPKG

photo-sphere-viewer

Version:

A JavaScript library to display Photo Sphere panoramas

52 lines (43 loc) 719 B
import { EventEmitter } from 'uevent'; /** * @namespace PSV.plugins */ /** * @summary Base plugins class * @memberof PSV.plugins * @abstract */ export class AbstractPlugin extends EventEmitter { /** * @summary Unique identifier of the plugin * @member {string} * @readonly * @static */ static id = null; /** * @param {PSV.Viewer} psv */ constructor(psv) { super(); /** * @summary Reference to main controller * @type {PSV.Viewer} * @readonly */ this.psv = psv; } /** * @summary Initializes the plugin * @package */ init() { } /** * @summary Destroys the plugin * @package */ destroy() { delete this.psv; } }