# Class Object3DHelperController

plugin 的基本控制器

#### Hierarchy (View Summary)

- Controller<
  Object3DHelperPluginState,
  Object3DHelperPluginEventMap & BasePlugin.EventMap<
  Object3DHelperPluginState,
  any,
  >,
  any,
  any,
  >
  - Object3DHelperController

- Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:160

##### Index

### Constructors

constructor

### Properties

data?
five
hooks
name
objectHelperMap
state
staticPrefix

### Methods

absoluteUrl
addObject3DHelper
appendTo?
disable
dispose
enable
getCurrentState
getObject3DHelper
hide
load
removeObject3DHelper
setState
show

## Constructors

### constructor

- new Object3DHelperController(five: Five): Object3DHelperController

  #### Parameters

  - five: Five

  #### Returns Object3DHelperController

  Overrides Controller.constructor

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:171

## Properties

### `Optional` data

data?: any

Overrides BasePlugin.Controller.data

- Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:162

### five

five: Five

Inherited from Controller.five

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

### hooks

hooks: Subscribe<
Object3DHelperPluginEventMap & BasePlugin.EventMap<
Object3DHelperPluginState,
any,
>,
> = ...

#### Description

插件事件钩子

Inherited from Controller.hooks

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

### name

name: string = PLUGIN_NAME

- Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:161

### objectHelperMap

objectHelperMap: Map<
Object3D,
{ disposers: (() => any)[]; helper: Object3DHelper; helperGroup: Group },
> = ...

- Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:169

### state

state: Object3DHelperState = ...

当前状态

#### Description

    可以通过 plugin.state 和 plugin.setState 来获取和设置。
    通过 state 设置后，plugin 会通过合适的动画运动来达到设置的效果。
    来迎合一些通过数据驱动的场景。

Overrides Controller.state

- Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:163

### `Readonly` staticPrefix

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

Inherited from Controller.staticPrefix

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

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

### addObject3DHelper

- addObject3DHelper(
  object3D: Object3D,
  paramsConfig?: AddObject3DHelperConfig,
  ): ObjectHelperControllers | undefined

  #### Parameters

  - object3D: Object3D
  - paramsConfig: AddObject3DHelperConfig = {}

  #### Returns ObjectHelperControllers | undefined

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:221

### `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?: { userAction?: boolean }): void

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

  #### Parameters

  - `Optional` options: { userAction?: boolean }

  #### Returns void

  Overrides Controller.disable

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:188

### dispose

- dispose(): void

  插件进行销毁

  #### Returns void

  Overrides Controller.dispose

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:192

### enable

- enable(options?: { userAction?: boolean }): void

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

  #### Parameters

  - `Optional` options: { userAction?: boolean }

  #### Returns void

  Overrides Controller.enable

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:184

### getCurrentState

- getCurrentState(): Object3DHelperPluginState

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

  #### Returns Object3DHelperPluginState

  Inherited from Controller.getCurrentState

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

### getObject3DHelper

- getObject3DHelper(
  object3D: Object3D,
  ):
  | {
  disposers: (() => any)[];
  helper: Object3DHelper;
  helperGroup: Group;
  }
  | undefined

  #### Parameters

  - object3D: Object3D

  #### Returns
  | {
  disposers: (() => any)[];
  helper: Object3DHelper;
  helperGroup: Group;
  }
  | undefined

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:217

### hide

- hide(options?: { userAction?: boolean }): Promise<void>

  隐藏UI

  #### Parameters

  - `Optional` options: { userAction?: boolean }

  #### Returns Promise<void>

  Overrides Controller.hide

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:180

### load

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

  加载插件依赖数据

  #### Parameters

  - _data: any

  #### Returns Promise<void>

  Overrides Controller.load

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:196

### removeObject3DHelper

- removeObject3DHelper(object3D: Object3D): void

  #### Parameters

  - object3D: Object3D

  #### Returns void

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:333

### setState

- setState(
  state: Partial<Object3DHelperState>,
  options?: { userAction?: boolean } & Record<string, any>,
  ): void

  设置state

  #### Parameters

  - state: Partial<Object3DHelperState>

    插件的目标状态

  - `Optional` options: { userAction?: boolean } & Record<string, any>

    配置项

  #### Returns void

  Overrides Controller.setState

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:198

### show

- show(options?: { userAction?: boolean }): Promise<void>

  展示UI

  #### Parameters

  - `Optional` options: { userAction?: boolean }

  #### Returns Promise<void>

  Overrides Controller.show

  - Defined in lib/plugins/Object3DHelperPlugin/Controller.ts:176