Constructor
new Selection()
- Description:
Create a Wick Selection.
- Source:
Members
allAttributeNames :Array.<string>
- Description:
The names of all attributes of the selection that can be changed.
- Source:
The names of all attributes of the selection that can be changed.
Type:
- Array.<string>
animationType :string
- Description:
The animation type of a clip.
- Source:
The animation type of a clip.
Type:
- string
easingType :string
- Description:
The easing type of a selected tween. See Wick.Tween.VALID_EASING_TYPES.
- Source:
The easing type of a selected tween. See Wick.Tween.VALID_EASING_TYPES.
Type:
- string
filename :string
- Description:
The filename of the selected asset. Read only.
- Source:
The filename of the selected asset. Read only.
Type:
- string
fillColor :paper.Color
- Description:
The fill color of the selected object.
- Source:
The fill color of the selected object.
Type:
- paper.Color
fontFamily :string
- Description:
The font family of the selected object.
- Source:
The font family of the selected object.
Type:
- string
fontSize :number
- Description:
The font size of the selected object.
- Source:
The font size of the selected object.
Type:
- number
fontStyle :string
- Description:
The font style of the selected object. ('italic' or 'oblique')
- Source:
The font style of the selected object. ('italic' or 'oblique')
Type:
- string
fontWeight :number
- Description:
The font weight of the selected object.
- Source:
The font weight of the selected object.
Type:
- number
frameLength :number
- Description:
The length of the selected frame.
- Source:
The length of the selected frame.
Type:
- number
fullRotations :Number
- Description:
The amount of rotations to perform during a tween. Positive value = clockwise rotation.
- Source:
The amount of rotations to perform during a tween. Positive value = clockwise rotation.
Type:
- Number
height :number
- Description:
The height of the selection.
- Source:
The height of the selection.
Type:
- number
identifier :string
- Description:
The identifier of the selected object.
- Source:
The identifier of the selected object.
Type:
- string
isScriptable :boolean
- Description:
True if the selection is scriptable. Read only.
- Source:
True if the selection is scriptable. Read only.
Type:
- boolean
isSynced
- Description:
Determines if a clip is synced to the timeline.
- Source:
Determines if a clip is synced to the timeline.
location :string
- Description:
The location of the objects in the selection. (see LOCATION_NAMES)
- Source:
The location of the objects in the selection. (see LOCATION_NAMES)
Type:
- string
name :string
- Description:
The name of the selected object.
- Source:
The name of the selected object.
Type:
- string
numObjects :number
- Description:
The number of objects in the selection.
- Source:
The number of objects in the selection.
Type:
- number
opacity :number
- Description:
The opacity of the selected object.
- Source:
The opacity of the selected object.
Type:
- number
originalHeight :number
- Description:
It is the original height of the selection at creation.
- Source:
It is the original height of the selection at creation.
Type:
- number
originalWidth :number
- Description:
It is the original width of the selection at creation.
- Source:
It is the original width of the selection at creation.
Type:
- number
originX :number
- Description:
The origin position the selection.
- Source:
The origin position the selection.
Type:
- number
originY :number
- Description:
The origin position the selection.
- Source:
The origin position the selection.
Type:
- number
pivotPoint :object
- Description:
The point that transformations to the selection will be based around.
- Source:
The point that transformations to the selection will be based around.
Type:
- object
rotation :number
- Description:
The rotation of the selection.
- Source:
The rotation of the selection.
Type:
- number
scaleX :number
- Description:
The scale of the selection on the X axis.
- Source:
The scale of the selection on the X axis.
Type:
- number
scaleY :number
- Description:
The scale of the selection on the Y axis.
- Source:
The scale of the selection on the Y axis.
Type:
- number
selectionType :string
- Description:
A single string describing the contents of the selection.
- Source:
A single string describing the contents of the selection.
Type:
- string
singleFrameNumber
- Description:
If a clip is set to singleFrame, this number will be used to determine that frame.
- Source:
If a clip is set to singleFrame, this number will be used to determine that frame.
sound :Wick.SoundAsset
- Description:
The sound attached to the selected frame.
- Source:
The sound attached to the selected frame.
Type:
soundStart :number
- Description:
The starting position of the sound on the frame in ms.
- Source:
The starting position of the sound on the frame in ms.
Type:
- number
soundVolume :number
- Description:
The volume of the sound attached to the selected frame.
- Source:
The volume of the sound attached to the selected frame.
Type:
- number
src :string
- Description:
The source (dataURL) of the selected ImageAsset or SoundAsset. Read only.
- Source:
The source (dataURL) of the selected ImageAsset or SoundAsset. Read only.
Type:
- string
strokeColor :paper.Color
- Description:
The stroke color of the selected object.
- Source:
The stroke color of the selected object.
Type:
- paper.Color
strokeWidth :number
- Description:
The stroke width of the selected object.
- Source:
The stroke width of the selected object.
Type:
- number
types :Array.<string>
- Description:
The types of the objects in the selection. (see SELECTABLE_OBJECT_TYPES)
- Source:
The types of the objects in the selection. (see SELECTABLE_OBJECT_TYPES)
Type:
- Array.<string>
widgetRotation :number
- Description:
The rotation of the selection (used for canvas selections)
- Source:
The rotation of the selection (used for canvas selections)
Type:
- number
width :number
- Description:
The width of the selection.
- Source:
The width of the selection.
Type:
- number
x :number
- Description:
The position of the selection.
- Source:
The position of the selection.
Type:
- number
y :number
- Description:
The position of the selection.
- Source:
The position of the selection.
Type:
- number
Methods
bringToFront()
- Description:
Brings the selected objects to the front.
- Source:
clear(filter)
- Description:
Remove all objects from the selection with an optional filter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
string | A location or a type (see SELECTABLE_OBJECT_TYPES and LOCATION_NAMES) |
deselect(object)
- Description:
Remove a wick object from the selection.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Wick.Base | The object to deselect. |
deselectMultipleObjects(objects)
- Description:
Remove multiple objects from the selection. Does nothing if an object is not selected.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
objects |
Array.<object> | objects to remove from the selection. |
flipHorizontally()
- Description:
Flips the selected obejcts horizontally.
- Source:
flipVertically()
- Description:
Flips the selected obejcts vertically.
- Source:
getLeftmostFrames() → {Array.<Wick.Frame>}
- Description:
Get a list of only the farthest left frames on each layer.
- Source:
Returns:
- Type
- Array.<Wick.Frame>
getRightmostFrames() → {Array.<Wick.Frame>}
- Description:
Get a list of only the farthest right frames on each layer.
- Source:
Returns:
- Type
- Array.<Wick.Frame>
getSelectedObject() → {Wick.Base}
- Description:
Get the first object in the selection if there is a single object in the selection.
- Source:
Returns:
The first object in the selection.
- Type
- Wick.Base
getSelectedObjects(filter) → {Array.<Wick.Base>}
- Description:
Get the objects in the selection with an optional filter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
string | A location or a type (see SELECTABLE_OBJECT_TYPES and LOCATION_NAMES) |
Returns:
The selected objects.
- Type
- Array.<Wick.Base>
getSelectedObjectUUIDs(filter) → {Array.<string>}
- Description:
Get the UUIDs of the objects in the selection with an optional filter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filter |
string | A location or a type (see SELECTABLE_OBJECT_TYPES and LOCATION_NAMES) |
Returns:
The UUIDs of the selected objects.
- Type
- Array.<string>
isObjectSelected(object)
- Description:
Checks if a given object is selected.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Wick.Base | The object to check selection of. |
isSelectable(object) → {boolean}
- Description:
Returns true if an object is selectable.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
object | object to check if selectable |
Returns:
true if selectable, false otherwise.
- Type
- boolean
moveBackwards()
- Description:
Moves the selected objects backwards.
- Source:
moveForwards()
- Description:
Moves the selected objects forwards.
- Source:
select(object)
- Description:
Add a wick object to the selection. If selecting multiple objects, you should use selection.selectMultipleObjects.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
object |
Wick.Base | The object to select. |
selectMultipleObjects(objects)
- Description:
Select multiple objects. Must be selectable objects. Significantly faster than selecting multiple elements with a select() independently.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
objects |
Array.<object> |
sendToBack()
- Description:
Sends the selected objects to the back.
- Source: