API Docs for:
Show:

gs.Mask Class

Stores mask-settings for masking-effects. There are two types of masking, static and dynamic. Static masking just applies the mask to the target using the vague. Dynamic masking applies the mask depending on the value property. For more info about masking, see help.file.

Constructor

gs.Mask

(
  • [data=null]
)

Parameters:

  • [data=null] Object optional
    • Optional data-bundle to create the motion-blur settings from.

Item Index

Methods

Properties

Methods

fromObject

(
  • o
)
gs.Mask static

Creates a mask from an raw object. The object should contain all the properties defined by the Mask class.

Parameters:

  • o Object
    • The object with all necessary properties of the mask.

Returns:

gs.Mask:

The new created mask

toDataBundle

() Object

Serializes the mask-settings into a data-bundle

Returns:

Object:

The data-bundle

Properties

ox

Number

The x-value of the mask-bitmap offset.

Default: 0

oy

Number

The y-value of the mask-bitmap offset.

Default: 0

source

gs.Bitmap

The source/mask-bitmap. This is a greyscaled image defining the mask.

Default: null

type

gs.MaskingType

The type of masking, can be static or dynamic.

Default: gs.MaskingType.STATIC

vague

Number

The vague/smoothing.

Default: 0

value

Number

The current value. Goes from 0 to 255.

Default: 0