Options
Menu

Class ParticleAnimationSet

The animation data set used by particle-based animators, containing particle animation data.

see

away.animators.ParticleAnimator

Hierarchy

  • AnimationSetBase

Implements

  • IAsset
  • IAssetAdapter
  • IAsset
  • IAnimationSet

Index

Constructors

constructor

  • new ParticleAnimationSet(usesDuration?: boolean, usesLooping?: boolean, usesDelay?: boolean): ParticleAnimationSet
  • Creates a new ParticleAnimationSet

    Parameters

    • Default value usesDuration: boolean = false

      Defines whether the animation set uses the duration data in its static properties to determine how long a particle is visible for. Defaults to false.

    • Default value usesLooping: boolean = false

      Defines whether the animation set uses a looping timeframe for each particle determined by the startTime, duration and delay data in its static properties function. Defaults to false. Requires usesDuration to be true.

    • Default value usesDelay: boolean = false

      Defines whether the animation set uses the delay data in its static properties to determine how long a particle is hidden for. Defaults to false. Requires usesLooping to be true.

    Returns ParticleAnimationSet

Properties

_adapter

_adapter: IAssetAdapter

Private _iAnimationRegisterData

_iAnimationRegisterData: AnimationRegisterData

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

animationNames

animationNames: Array<string>

Returns a vector of animation state objects that make up the contents of the animation data set.

animations

animations: Array<AnimationNodeBase>

Returns a vector of animation state objects that make up the contents of the animation data set.

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

assetType

assetType: string
inheritdoc

hasBillboard

hasBillboard: boolean

hasColorAddNode

hasColorAddNode: boolean

hasColorMulNode

hasColorMulNode: boolean

hasUVNode

hasUVNode: boolean

id

id: number

A unique id for the asset, used to identify assets in an associative array

initParticleFunc

initParticleFunc: Function

Initialiser function for static particle properties. Needs to reference a with the following format

initParticleFunc(prop:ParticleProperties) { //code for settings local properties }

Aside from setting any properties required in particle animation nodes using local static properties, the initParticleFunc function is required to time node requirements as they may be needed. These properties on the ParticleProperties object can include startTime, duration and delay. The use of these properties is determined by the setting arguments passed in the constructor of the particle animation set. By default, only the startTime property is required.

initParticleScope

initParticleScope: Object

Initialiser function scope for static particle properties

name

name: string

needVelocity

needVelocity: boolean

originalName

originalName: string

The original name used for this asset in the resource (e.g. file) in which it was found. This may not be the same as name, which may have changed due to of a name conflict.

shareAnimationGraphics

shareAnimationGraphics: boolean

Static COLOR_PRIORITY

COLOR_PRIORITY: number

Property used by particle nodes that require color compilers

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static POST_PRIORITY

POST_PRIORITY: number

Property used by particle nodes that require compilers at the end of the shader

Static assetType

assetType: string

Accessors

particleNodes

  • Returns a vector of the particle animation nodes contained within the set.

    Returns Array<ParticleNodeBase>

usesCPU

  • get (): boolean
  • inheritdoc

    Returns boolean

Methods

Private _iGenerateAnimationElements

  • _iGenerateAnimationElements(graphics: Graphics): void
  • Parameters

    • graphics: Graphics

    Returns void

_pFindTempReg

  • _pFindTempReg(exclude: Array<string>, excludeAnother?: string): string
  • Retrieves a temporary GPU register that's still free.

    Parameters

    • exclude: Array<string>

      An array of non-free temporary registers.

    • Optional excludeAnother: string

      An additional register that's not free.

    Returns string

    A temporary register that can be used.

addAnimation

  • addAnimation(node: AnimationNodeBase): void
  • inheritdoc

    Parameters

    • node: AnimationNodeBase

    Returns void

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

cancelGPUCompatibility

  • cancelGPUCompatibility(): void
  • inheritdoc

    Returns void

clear

  • clear(): void
  • Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Returns void

doneAGALCode

  • doneAGALCode(shader: ShaderBase): void
  • inheritdoc

    Parameters

    • shader: ShaderBase

    Returns void

getAGALFragmentCode

  • getAGALFragmentCode(shader: ShaderBase, registerCache: ShaderRegisterCache, shadedTarget: ShaderRegisterElement): string
  • inheritdoc

    Parameters

    • shader: ShaderBase
    • registerCache: ShaderRegisterCache
    • shadedTarget: ShaderRegisterElement

    Returns string

getAGALUVCode

  • getAGALUVCode(shader: ShaderBase, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string
  • inheritdoc

    Parameters

    • shader: ShaderBase
    • registerCache: ShaderRegisterCache
    • sharedRegisters: ShaderRegisterData

    Returns string

getAGALVertexCode

  • getAGALVertexCode(shader: ShaderBase, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string
  • inheritdoc

    Parameters

    • shader: ShaderBase
    • registerCache: ShaderRegisterCache
    • sharedRegisters: ShaderRegisterData

    Returns string

getAnimation

  • getAnimation(name: string): AnimationNodeBase
  • Retrieves the animation state object registered in the animation data set under the given name.

    Parameters

    • name: string

    Returns AnimationNodeBase

getAnimationElements

  • Parameters

    • graphics: Graphics
    • shape: Shape

    Returns AnimationElements

hasAnimation

  • hasAnimation(name: string): boolean
  • Check to determine whether a state is registered in the animation set under the given name.

    Parameters

    • name: string

    Returns boolean

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

invalidate

  • invalidate(): void
  • Returns void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

Private resetGPUCompatibility

  • resetGPUCompatibility(): void
  • Called by the material to reset the GPU indicator before testing whether register space in the shader is available for running GPU-based animation code.

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

Generated using TypeDoc