Skip to main content

Class: CustomAnimationHelperPlugin

Plugins.CustomAnimationHelperPlugin

AnimationHelperPlugin is used internally by plugins to keep track of all helpers and allows to animate its clips For internal use only at the moment.

Hierarchy

Properties

PluginType

Static Readonly PluginType: "AnimationHelperPlugin"

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:12


enabled

enabled: boolean

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:11


helperIdentities

helperIdentities: Map<any, any>

It stores all the helpers as the value with its appropriate names as the key

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:17


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:23


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:27

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:16

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:20

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:36


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onRemove

Defined in

webgi/src/core/AViewerPlugin.ts:40


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:45


fromJSON

fromJSON(data, meta?): null | CustomAnimationHelperPlugin | Promise<null | CustomAnimationHelperPlugin>

Parameters

NameType
dataany
meta?any

Returns

null | CustomAnimationHelperPlugin | Promise<null | CustomAnimationHelperPlugin>

Inherited from

AViewerPlugin.fromJSON

Defined in

webgi/src/core/AViewerPlugin.ts:52


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState

Defined in

webgi/src/core/AViewerPlugin.ts:64


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState

Defined in

webgi/src/core/AViewerPlugin.ts:67


storeState

storeState(prefix?, storage?, data?): void

Parameters

NameType
prefix?string
storage?Storage
data?any

Returns

void

Inherited from

AViewerPlugin.storeState

Defined in

webgi/src/core/AViewerPlugin.ts:74


loadState

loadState(prefix?, storage?): Promise<void>

Parameters

NameType
prefix?string
storage?Storage

Returns

Promise<void>

Inherited from

AViewerPlugin.loadState

Defined in

webgi/src/core/AViewerPlugin.ts:84


onAdded

onAdded(viewer): Promise<void>

It is used by Parent Class(no need to change the parameter)

Parameters

NameTypeDescription
viewerViewerAppdefault viewer that is maintained through out the api(no need to change the parameter)

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:27


createHelper

createHelper(id, model): void

Creates a new AnimationHelper that manages its own state

Parameters

NameTypeDescription
idstringhelper name of the model
modelObject3D<Event, string>3d model to pass on

Returns

void

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:45


getAnimationClips

getAnimationClips(id): any

returns the animationClips of the 3D model

Parameters

NameTypeDescription
idstringhelper name of the model

Returns

any

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:61


playClip

playClip(id, clip, loop, timescale?, reverse?, resetTime?): Promise<void>

Plays the single clip from the Helper of a 3D model

Parameters

NameTypeDefault valueDescription
idstringundefinedhelper name of 3D model
clipAnimationClipundefinedAnimation Clip of the 3D model that needs to be played
loopbooleanundefineddefault is 'false', if the clip needs to be looped continously then set it to 'true'
timescalenumber1timescale of the animation clip that will played. Default is 1
reversebooleanfalseto reverse the clip set it to true. Default is false
resetTimebooleanfalseresets the mixer time. Default is false

Returns

Promise<void>

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:77


playAllAnimations

playAllAnimations(id, loop): Promise<void>

Plays all the animation clips that are present in the 3D model

Parameters

NameTypeDescription
idstringhelper name of 3D model
loopbooleandefault is 'false', if the clip needs to be looped continously then set it to 'true'

Returns

Promise<void>

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:89


playAllAnimationsInReverse

playAllAnimationsInReverse(id, loop): Promise<void>

Reverses all the animation clips that are present in the 3D model

Parameters

NameTypeDescription
idstringhelper name of 3D model
loopbooleandefault is 'false', if the clip needs to be looped continously then set it to 'true'

Returns

Promise<void>

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:101


playAnimationByName

playAnimationByName(id, name, loop, timescale?, reverse?): Promise<void>

Plays the clip by its name from the Helper of a 3D model

Parameters

NameTypeDefault valueDescription
idstringundefinedhelper name of 3D model
namestringundefinedname of the animation clip that is present in 3D model
loopfalseundefineddefault is 'false', if the clip needs to be looped continously then set it to 'true'
timescalenumber1timescale of the animation clip that will played. Default is 1
reversebooleanfalseto reverse the clip set it to true. Default is false

Returns

Promise<void>

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:116


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey

Defined in

webgi/src/core/AViewerPlugin.ts:60

Constructors

constructor

new CustomAnimationHelperPlugin()

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/plugins/CustomAnimationHelperPlugin.ts:19