小游戏不支持 小程序不支持

矩阵变色滤镜

Extends annie.AObject
Defined in: libs/Filters.js:254
Module: annie

Available since 1.0.0

Methods

ColorMatrixFilter

ColorMatrixFilter
(
  • brightness
  • contrast
  • saturation
  • hue
)
public

Defined in libs/Filters.js:264

Available since 1.0.0

Parameters:

nametypeflagdescription
brightness Number
contrast Number
saturation Number
hue Number

destroy

destroy () Void public

Inherited from annie.AObject: libs/EventDispatcher.js:55

Available since 2.0.0

销毁一个对象 销毁之前一定要做完其他善后工作,否则有可能会出错 特别注意不能在对象自身方法或事件里调用此方法。 比如,不要在显示对象自身的 annie.Event.ON_REMOVE_TO_STAGE 或者其他类似事件调用,一定会报错

Returns:

Void:

drawFilter

drawFilter
(
  • imageData
)
public

Defined in libs/Filters.js:397

Available since 1.0.0

绘画滤镜效果

Parameters:

nametypeflagdescription
imageData ImageData

toString

toString () String public

Defined in libs/Filters.js:445

Available since 1.0.0

获取滤镜的字符串表现形式以方便比较两个滤镜是否效果一样

Returns:

String:

Properties

brightness

Number public

Defined in libs/Filters.js:275

Available since 1.0.0

contrast

Number public

Defined in libs/Filters.js:283

Available since 1.0.0

hue

Number public

Defined in libs/Filters.js:299

Available since 1.0.0

instanceId

Number public

Inherited from annie.AObject: libs/EventDispatcher.js:23

Available since 1.0.0

每一个annie引擎对象都会有一个唯一的id码。

Example:

 //获取 annie引擎类对象唯一码
 console.log(this.instanceId);

instanceType

String public

Inherited from annie.AObject: libs/EventDispatcher.js:41

Available since 1.0.3

每一个annie类都有一个实例类型字符串,通过这个字符串,你能知道这个实例是从哪个类实例而来

saturation

Number public

Defined in libs/Filters.js:291

Available since 1.0.0

type

String public

Defined in libs/Filters.js:307

Available since 1.0.0

滤镜类型 只读

Top