mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fix RGB/RYB conversions and brushes not updating their icon after mixing. Also update some docu on paintTool.js (#31643)
This commit is contained in:
@@ -50,20 +50,12 @@
|
||||
* If you'd rather forego this, you may use 'paint_color = "#ffaa22";' instead, at your own peril.
|
||||
*
|
||||
*
|
||||
* --- setStrength() ---
|
||||
* --- setOpacity() ---
|
||||
*
|
||||
* Updates the tool strenght to that of the 'Tool Strenght' input, sanitizing it's value in the process. Turns
|
||||
* NaNs to 0, rounds the value to the second decimal and clamps it to the min. and max. values.
|
||||
* Useful if you wish to let the user modify the strength directly.
|
||||
*
|
||||
*
|
||||
* --- changeStrength(diff) ---
|
||||
*
|
||||
* Modifies the tool strenght by 'diff', sanitizes the result and updates the value of the 'Tool Strenght' input.
|
||||
* 'diff' should be no lower than 0.01, any values lower than that will end up ignored once the result's sanitized.
|
||||
* Useful if placing buttons to increase/decrease the tool strenght, rather than modifying it directly.
|
||||
*
|
||||
*
|
||||
* --- hexToRgba(hex), rgbaToHex(r, g, b) ---
|
||||
*
|
||||
* Helper functions to deal with rgb/hex conversions.
|
||||
|
||||
Reference in New Issue
Block a user