The list of Strokes in the scene. (You don't instantiate this yourself. Access this via Sketch.strokes)
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 |
Adds these strokes to the current selection
Returns: nil
myStrokes:Select()
Removes these strokes from the current selection
Returns: nil
myStrokes:Deselect()
Deletes all the strokes in the list
Returns: nil
myStrokes:Delete()
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) |
myStroke:SetShaderClipping(0.1, 0.9)
Changes a shader float parameter.
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
value | number | The new value |
myStrokes:SetShaderFloat("_EmissionGain", 0.5)
Changes a shader color parameter
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
color | Color | The new color |
myStrokes:SetShaderColor("_TintColor", Color.red)
Changes a shader texture parameter
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
parameter | string | The shader parameter name | |
image | Image | The new image to use as a texture |
myStrokes:SetShaderTexture("_MainTex", myImage)
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 |
myStrokes:SetShaderVector("_TimeOverrideValue", 0.5, 0, 0, 0)