Can now also be called inside the preload() function.
Previously, it only worked in setup() and draw().
New Features
You can now apply pre- or post-effects to your sketch. These effects are executed before or after the ASCII conversion and can be modified during runtime, allowing for more intricate outputs.
To learn more, check out the updated README for detailed usage instructions!
Currently, the following effects are available:
Effect
Params
brightness
brightness (number): The brightness value to apply. The default value is 0.0.
chromatic aberration
amount (number): The amount of chromatic aberration to apply. The default value is 0.1. angle (number): The angle of the chromatic aberration in degrees. The default value is 0.0.
color palette
palette (array): An array of colors to use for the color palette. The default value is ["#0f380f", "#306230", "#8bac0f", "#9bbc0f"].
distortion
frequency (number): The frequency of the distortion. The default value is 0.1. amplitude (number): The amplitude of the distortion. The default value is 0.1.
grayscale
no params
invert
no params
kaleidoscope
segments (number): The number of segments in the kaleidoscope. The default value is 2. angle (number): The angle of the kaleidoscope in degrees. The default value is 0.0.
rotate
angle (number): The angle of rotation in degrees. The default value is 0.0.
Deprecation Notice
The following functions are planned for removal in
v0.1.0
:updateAsciiFont()
loadAsciiFont()
instead.loadAsciiFont()
can now be called insidepreload()
,setup()
, ordraw()
.P5Asciify.setDefaultOptions()
setAsciiOptions()
instead. This function retains the same functionality.Both functions will continue to work but will display a deprecation warning.
Changes
loadAsciiFont()
:preload()
,setup()
, ordraw()
.p5.Font
object directly.setAsciiOptions()
(formerlyP5Asciify.setDefaultOptions()
):preload()
function.setup()
anddraw()
.New Features
You can now apply pre- or post-effects to your sketch. These effects are executed before or after the ASCII conversion and can be modified during runtime, allowing for more intricate outputs.
To learn more, check out the updated README for detailed usage instructions!
Currently, the following effects are available:
brightness
(number): The brightness value to apply. The default value is0.0
.amount
(number): The amount of chromatic aberration to apply. The default value is0.1
.angle
(number): The angle of the chromatic aberration in degrees. The default value is0.0
.palette
(array): An array of colors to use for the color palette. The default value is["#0f380f", "#306230", "#8bac0f", "#9bbc0f"]
.frequency
(number): The frequency of the distortion. The default value is0.1
.amplitude
(number): The amplitude of the distortion. The default value is0.1
.segments
(number): The number of segments in the kaleidoscope. The default value is2
.angle
(number): The angle of the kaleidoscope in degrees. The default value is0.0
.angle
(number): The angle of rotation in degrees. The default value is0.0
.Cheers!