# Interface PanoAnimeController

plugin 的基本控制器

interface PanoAnimeController {
data?: PanoAnimePluginType.PluginData;
five: Five;
hooks: Subscribe<PanoAnimePluginType.EventMap>;
state: PanoAnimePluginType.State;
staticPrefix: string;
get config(): { maxOpacity: number };
absoluteUrl(url: string): string;
appendTo?(wrapper: Element): void;
disable(options?: BaseOptions): void;
dispose(): void;
enable(options?: BaseOptions): void;
getCurrentState(): PanoAnimePluginType.State;
hide?(options?: BaseOptions): void | Promise<void>;
load(data: PanoAnimePluginType.ServerData): Promise<void>;
setState(
state: Partial<PanoAnimePluginType.State>,
options?: BaseOptions,
): void;
show?(options?: BaseOptions): void | Promise<void>;
updateConfig(
config: Partial<PanoAnimePluginType.Config>,
options?: BaseOptions,
): void;
}

#### Hierarchy (View Summary)

- Controller<
  PanoAnimePluginType.State,
  PanoAnimePluginType.EventMap,
  PanoAnimePluginType.ServerData,
  PanoAnimePluginType.PluginData,
  >
  - PanoAnimeController

- Defined in lib/plugins/PanoAnimePlugin/Controller.ts:43

##### Index

### Properties

data?
five
hooks
state
staticPrefix

### Accessors

config

### Methods

absoluteUrl
appendTo?
disable
dispose
enable
getCurrentState
hide?
load
setState
show?
updateConfig

## Properties

### `Optional` data

data?: PanoAnimePluginType.PluginData

当前使用的数据

Overrides BasePlugin.Controller.data

- Defined in lib/plugins/PanoAnimePlugin/Controller.ts:50

### five

five: Five

Inherited from Controller.five

- Defined in lib/plugins/BasePlugin/index.ts:68

### hooks

hooks: Subscribe<PanoAnimePluginType.EventMap> = ...

#### Description

插件事件钩子

Inherited from Controller.hooks

- Defined in lib/plugins/BasePlugin/index.ts:82

### state

state: PanoAnimePluginType.State

插件当前状态

Overrides Controller.state

- Defined in lib/plugins/PanoAnimePlugin/Controller.ts:53

### `Readonly` staticPrefix

staticPrefix: string = '//vr-image-4.realsee-cdn.cn'

Inherited from Controller.staticPrefix

- Defined in lib/plugins/BasePlugin/index.ts:84

## Accessors

### config

- get config(): { maxOpacity: number }

  #### Returns { maxOpacity: number }

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:58

## Methods

### absoluteUrl

- absoluteUrl(url: string): string

  #### Parameters

  - url: string

  #### Returns string

  #### Description

  获取静态资源的url

  Inherited from Controller.absoluteUrl

  - Defined in lib/plugins/BasePlugin/index.ts:135

### `Optional` appendTo

- appendTo?(wrapper: Element): void

  插件自身DOM添加到父容器

  #### Parameters

  - wrapper: Element

    Element元素

  #### Returns void

  Inherited from Controller.appendTo

  - Defined in lib/plugins/BasePlugin/index.ts:113

### disable

- disable(options?: BaseOptions): void

  禁用插件，让插件停止响应交互

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void

  Overrides Controller.disable

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:214

### dispose

- dispose(): void

  销毁插件，移除所有副作用，销毁后将不响应任何 API

  #### Returns void

  Overrides Controller.dispose

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:234

### enable

- enable(options?: BaseOptions): void

  启用插件，让插件能够响应交互

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void

  Overrides Controller.enable

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:202

### getCurrentState

- getCurrentState(): PanoAnimePluginType.State

  获取当前的插件状态，如果当初插件内存在需要通过动画变更的 state 值，则通过此方法可以得到中间状态

  #### Returns PanoAnimePluginType.State

  Inherited from Controller.getCurrentState

  - Defined in lib/plugins/BasePlugin/index.ts:105

### `Optional` hide

- hide?(options?: BaseOptions): void | Promise<void>

  隐藏UI

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void | Promise<void>

  Inherited from Controller.hide

  - Defined in lib/plugins/BasePlugin/index.ts:123

### load

- load(data: PanoAnimePluginType.ServerData): Promise<void>

  加载插件依赖数据

  #### Parameters

  - data: PanoAnimePluginType.ServerData

  #### Returns Promise<void>

  Overrides Controller.load

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:142

### setState

- setState(state: Partial<PanoAnimePluginType.State>, options?: BaseOptions): void

  更改插件 State

  #### Parameters

  - state: Partial<PanoAnimePluginType.State>
  - options: BaseOptions = {}

  #### Returns void

  Overrides Controller.setState

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:222

### `Optional` show

- show?(options?: BaseOptions): void | Promise<void>

  展示UI

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void | Promise<void>

  Inherited from Controller.show

  - Defined in lib/plugins/BasePlugin/index.ts:118

### updateConfig

- updateConfig(
  config: Partial<PanoAnimePluginType.Config>,
  options?: BaseOptions,
  ): void

  更改插件 Config

  #### Parameters

  - config: Partial<PanoAnimePluginType.Config>

    插件属性 `config` 的子集。

  - options: BaseOptions = {}

    参数

  #### Returns void

  - Defined in lib/plugins/PanoAnimePlugin/Controller.ts:78