# Interface OrientationPluginController

plugin 的基本控制器

interface OrientationPluginController {
ambientLight: AmbientLight;
box: Mesh<RoundedBoxGeometry, MeshPhongMaterial>;
camera: Camera;
controls?: OrbitControls;
css3drenderer: CSS3DRenderer;
data?: any;
directionalLight: DirectionalLight;
faces: Group;
five: Five;
hooks: Subscribe<OrientationPluginType.EventMap>;
renderer: WebGLRenderer;
scene: Scene;
state: OrientationPluginType.State;
staticPrefix: string;
wrapper: HTMLDivElement;
get config(): { fixedLongitude: number; orthoView: boolean };
absoluteUrl(url: string): string;
appendTo(container: HTMLElement): void;
bindEvents(): void;
disable(options?: BaseOptions): void;
dispose(): void;
enable(options?: BaseOptions): void;
getCurrentState(): OrientationPluginType.State;
hide?(options?: BaseOptions): void | Promise<void>;
init(): void;
initDom(): void;
load(data: any): Promise<void>;
orient(__namedParameters: { latitude?: number; longitude?: number }): void;
setState(
state: Partial<OrientationPluginType.State>,
options?: BaseOptions,
): void;
show?(options?: BaseOptions): void | Promise<void>;
unbindEvents(): void;
}

#### Hierarchy (View Summary)

- Controller<
  OrientationPluginType.State,
  OrientationPluginType.EventMap,
  OrientationPluginType.ServerData,
  OrientationPluginType.PluginData,
  >
  - OrientationPluginController

- Defined in lib/plugins/OrientationPlugin/Controller.ts:73

##### Index

### Properties

ambientLight
box
camera
controls?
css3drenderer
data?
directionalLight
faces
five
hooks
renderer
scene
state
staticPrefix
wrapper

### Accessors

config

### Methods

absoluteUrl
appendTo
bindEvents
disable
dispose
enable
getCurrentState
hide?
init
initDom
load
orient
setState
show?
unbindEvents

## Properties

### ambientLight

ambientLight: AmbientLight = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:88

### box

box: Mesh<RoundedBoxGeometry, MeshPhongMaterial> = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:104

### camera

camera: Camera = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:84

### `Optional` controls

controls?: OrbitControls

- Defined in lib/plugins/OrientationPlugin/Controller.ts:109

### css3drenderer

css3drenderer: CSS3DRenderer = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:87

### `Optional` data

data?: any

当前使用的数据

Overrides BasePlugin.Controller.data

- Defined in lib/plugins/OrientationPlugin/Controller.ts:76

### directionalLight

directionalLight: DirectionalLight = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:103

### faces

faces: Group = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:108

### five

five: Five

Inherited from Controller.five

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

### hooks

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

#### Description

插件事件钩子

Inherited from Controller.hooks

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

### renderer

renderer: WebGLRenderer = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:86

### scene

scene: Scene = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:85

### state

state: OrientationPluginType.State

插件当前状态

Overrides Controller.state

- Defined in lib/plugins/OrientationPlugin/Controller.ts:79

### `Readonly` staticPrefix

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

Inherited from Controller.staticPrefix

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

### wrapper

wrapper: HTMLDivElement = ...

- Defined in lib/plugins/OrientationPlugin/Controller.ts:89

## Accessors

### config

- get config(): { fixedLongitude: number; orthoView: boolean }

  #### Returns { fixedLongitude: number; orthoView: boolean }

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:111

## 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

### appendTo

- appendTo(container: HTMLElement): void

  插件自身DOM添加到父容器

  #### Parameters

  - container: HTMLElement

  #### Returns void

  Overrides Controller.appendTo

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

### bindEvents

- bindEvents(): void

  #### Returns void

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:365

### disable

- disable(options?: BaseOptions): void

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

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void

  Overrides Controller.disable

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:710

### dispose

- dispose(): void

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

  #### Returns void

  Overrides Controller.dispose

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:719

### enable

- enable(options?: BaseOptions): void

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

  #### Parameters

  - `Optional` options: BaseOptions

  #### Returns void

  Overrides Controller.enable

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:699

### getCurrentState

- getCurrentState(): OrientationPluginType.State

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

  #### Returns OrientationPluginType.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

### init

- init(): void

  #### Returns void

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:210

### initDom

- initDom(): void

  #### Returns void

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:243

### load

- load(data: any): Promise<void>

  加载插件依赖数据

  #### Parameters

  - data: any

  #### Returns Promise<void>

  Overrides Controller.load

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:677

### orient

- orient(__namedParameters: { latitude?: number; longitude?: number }): void

  #### Parameters

  - __namedParameters: { latitude?: number; longitude?: number }

  #### Returns void

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:397

### setState

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

  更改插件 State

  #### Parameters

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

  #### Returns void

  Overrides Controller.setState

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:600

### `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

### unbindEvents

- unbindEvents(): void

  #### Returns void

  - Defined in lib/plugins/OrientationPlugin/Controller.ts:381