Class: DrawImageObject

DrawImageObject

Image object to draw
Source:
See:

Extends

Members

_calculateRectVertices

Overrides:
Source:

bgColor :string

Background color as rgba(r,g,b,a).
Overrides:
Source:

boundaries :Array.<Array.<number>>

Deprecated:
  • - use .vertices instead
Source:

height :number

Source:

imageIndex :number

Current image index
Source:

isAnimations :boolean

Determines if image is animated or not
Source:

key :string

A key should match an image loaded through AssetsManager
Source:

width :number

Source:

x :number

Overrides:
Source:

y :number

Overrides:
Source:

Methods

addAnimation(eventName, animationSpriteIndexes, isRepeatedopt)

Adds image animations
Parameters:
Name Type Attributes Default Description
eventName string animation name
animationSpriteIndexes Array.<number> animation image indexes
isRepeated boolean <optional>
false animation is circled or not, circled animation could be stopped only with stopRepeatedAnimation();
Source:

addEventListener(eventName, listener, options)

Subscribe
Parameters:
Name Type Description
eventName string
listener *
options *
Source:

destroy()

Destroy object on next render iteration.
Overrides:
Source:

emit(eventName, …eventParams)

Emit event
Parameters:
Name Type Attributes Description
eventName string
eventParams any <repeatable>
Source:

removeAllAnimations()

Removes animations
Source:

removeEventListener(eventName, listener, options)

Unsubscribe
Parameters:
Name Type Description
eventName string
listener *
options *
Source:

setMask(mask)

Parameters:
Name Type Description
mask DrawShapeObject
Overrides:
Source:

stopRepeatedAnimation(eventName)

Parameters:
Name Type Description
eventName string animation name
Source: