Stroke List
Summary
The list of Strokes in the scene. (You don't instantiate this yourself. Access this via Sketch.strokes)
Instance Properties
Name | Return Type | Description |
---|---|---|
lastSelected | Stroke Read-only | Returns the last stroke that was selected |
last | Stroke Read-only | Returns the last Stroke |
this[index] | Stroke Read-only | Returns the Stroke at the given index |
count | number Read-only | The number of strokes |
Instance Methods
strokeList:Select()
Adds these strokes to the current selection
Returns: nil
Example
strokeList:Deselect()
Removes these strokes from the current selection
Returns: nil
Example
strokeList:Delete()
Deletes all the strokes in the list
Returns: nil
Example
strokeList:SetShaderClipping(clipStart, clipEnd)
Hides the section of the stroke that is outside the specified range
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
clipStart | number | The amount of the stroke to hide from the start (0-1) | |
clipEnd | number | The amount of the stroke to hide from the end (0-1) |
Example
strokeList:SetShaderFloat(parameter, value)
Changes a shader float parameter.
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
value | number | The new value |
Example
strokeList:SetShaderColor(parameter, color)
Changes a shader color parameter
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
color | The new color |
Example
strokeList:SetShaderTexture(parameter, image)
Changes a shader texture parameter
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
image | The new image to use as a texture |
Example
strokeList:SetShaderVector(parameter, x, y, z, w)
Changes a shader vector parameter
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
x | number | The new x value | |
y | number | 0 | The new y value |
z | number | 0 | The new z value |
w | number | 0 | The new w value |
Example
Last updated