function krpanoplugin() {
  var local = this;
  var krpano = null;
  var plugin = null;
  local.registerplugin = function (krpanointerface, pluginpath, pluginobject) {
    krpano = krpanointerface;
    plugin = pluginobject;
    plugin.dosomething = action_dosomething;
    plugin.registercontentsize(200, 200);

    var text = document.createElement('div');
    text.style.cssText =
      'width:100%;height:100%;' +
      'display:flex;color:white;background:red;' +
      'align-items:center;justify-content:center;text-align:center;';
    text.innerHTML = 'HTML5<br>TEST PLUGIN<br>click me';
    plugin.sprite.appendChild(text);
  };
  local.unloadplugin = function () {
    plugin = null;
    krpano = null;
  };
  local.onresize = function (width, height) {
    return false;
  };
  function action_dosomething() {
    plugin.accuracy = 1;
    // krpano.call("tween(width|height, 500|100)", plugin);
    // krpano.call("lookto(0,0,150); wait(1.0); lookto(90,0,90);");
    // krpano.call("tween(width|height, 200|200)", plugin);
  }
}
