The user's brush
Name | Return Type | Description |
---|---|---|
timeSincePressed | number Read-only | Time in seconds since the brush trigger was last pressed |
timeSinceReleased | number Read-only | Time in seconds since the brush trigger was last released |
triggerIsPressed | boolean Read-only | Check whether the brush trigger is currently pressed |
triggerPressedThisFrame | boolean Read-only | Check whether the brush trigger was pressed during the current frame |
triggerReleasedThisFrame | boolean Read-only | Check whether the brush trigger was released during the current frame |
distanceMoved | number Read-only | The distance moved by the brush |
distanceDrawn | number Read-only | The distance drawn by the brush (i.e. distance since the trigger was last pressed) |
position | Vector3 Read/Write | The 3D position of the Brush Controller's tip |
rotation | Rotation Read/Write | The 3D orientation of the Brush Controller's tip |
direction | Vector3 Read-only | The vector representing the forward direction of the brush |
size | number Read/Write | The current brush size |
pressure | number Read/Write | Brush pressure is determined by how far the trigger is pressed in |
type | string Read/Write | The current brush type |
types | string[] Read-only | All brush types available via the UI |
speed | number Read-only | How fast the brush is currently moving |
colorRgb | Color Read/Write | Gets or set brush color |
colorHsv | Vector3 Read/Write | Gets or set brush color using a Vector3 representing hue, saturation and brightness |
colorHtml | string Read/Write | The color of the brush as a valid HTML color string (either hex values or a color name) |
lastColorPicked | Color Read-only | The last color picked by the brush. |
LastColorPickedHsv | Vector3 Read-only | The last color picked by the brush in HSV. |
currentPath | Path Read/Write | The current path of the brush. Assumes a stroke is in progress. |
Brush types filtered by chosen tags
Returns: string[] (A filtered list of brush types)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
includeTags | string[] | Include brushes that have any of these tags | |
excludeTags | string[] | Exclude brushes that have any of these tags |
brushList = Brush:GetTypes({"audioreactive"}, {"particle"})
Applies the current jitter settings to the brush color
Returns: nil
Brush:JitterColor()
Clears the history and sets it's size
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size | number | How many frames of position/rotation to remember |
Brush:ResizeHistory(10)
Sets the size of the history. Only clears it if the size has changed
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size | number | How many frames of position/rotation to remember |
Brush:SetHistorySize(10)
Recalls previous positions of the Brush from the history buffer
Returns: Vector3 (The position of the brush during the specified frame)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
back | number | How many frames back in the history to look |
Brush:GetPastPosition(3)
Recalls previous orientations of the Brush from the history buffer
Returns: Rotation (The rotation of the brush during the specified frame)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
back | number | How many frames back in the history to look |
Brush:GetPastRotation(3)
If set to true then the brush will draw strokes even if the trigger isn't being pressed.
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
active | boolean | True means forced painting, false is normal behaviour |
Brush:ForcePaintingOn(true)
If set to true then the brush will stop drawing strokes even if the trigger is still pressed.
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
active | boolean | True means painting is forced off, false is normal behaviour |
Brush:ForcePaintingOff(true)
Forces the start of a new stroke - will stop painting this frame and start again the next.
Returns: nil
Brush:ForceNewStroke()
Gets a list of float property names for a brush
Returns: string[] (A list of float property names usable with Stroke:SetShaderFloat)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
type | string | The brush name |
Brush:GetShaderFloatParameters("Ink")
Gets a list of color property names for a brush
Returns: string[] (A list of color property names usable with Stroke:SetShaderColor)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
type | string | The brush name |
Brush:GetShaderColorParameters("Ink")
Gets a list of texture property names for a brush
Returns: string[] (A list of texture property names usable with Stroke:SetShaderTexture)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
type | string | The brush name |
Brush:GetShaderTextureParameters("Ink")
Gets a list of vector property names for a brush
Returns: string[] (A list of vector property names usable with Stroke:SetShaderVector)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
type | string | The brush name |
Brush:GetShaderVectorParameters("Ink")