Multi-Line Scroll Texts
This effect creates a dense, retro display featuring multiple lines of text scrolling simultaneously, giving it the layered, vibrant feel of classic demoscene art. Because it leverages GPU power via WebGL, the scrolling is exceptionally smooth and fluid, and since the text lives entirely in JavaScript and is painted to a canvas, it’s purely decorative, with no actual text in the DOM for screen readers or search engines to process.
Accessibility is still respected thanks to built-in support for `prefers-reduced-motion`, which offers a static alternative for users who prefer minimal movement.
Instructions
Open the JS script in the Supa Code Block element and edit the options at the end of the script. Each option is explained below:
Text Content and Appearance
texts: This is an array of strings that defines the content of the scroller. The lines of text will be taken from this array and cycled through vertically as they scroll.fontSize: Specifies the size of the text characters, measured in standard CSS pixels (px).gap: Controls the precise vertical spacing (in px) between each line of text on the canvas.color: Defines the main color of the text. This accepts any valid CSS color format, such as hex codes (#ffffff), color names, orrgb()/hsl()functions.glow: A boolean flag that, when set totrue, applies a neon-like shadow or glow effect around the text characters.rainbow: When enabled, the text color is not static. Instead, each line gets its own unique hue, transitioning across the spectrum.hueStart: Ifrainbowis active, this defines the starting hue for the very first line (a value between 0 and 360).hueEnd: Ifrainbowis active, this defines the ending hue for the last line (a value between 0 and 360).background: Sets the background color of the canvas. It can be"transparent"(the default) or a specific CSS color value.
Movement and Animation
baseSpeed: This sets the fundamental, constant scrolling velocity of the text, measured in pixels per second (px/s), before any modulation or multiplier is applied.speed: This is a global multiplier that scales the entire scrolling motion. For instance, a value of2will make the scroller twice as fast as thebaseSpeed.speedMod: Controls the intensity of the speed fluctuation. A value of0means the speed will be completely constant, while a value of1or higher allows the speed to oscillate widely around the base speed.pulseRate: Determines how rapidly the speed wave oscillates. A higher value results in a faster, more noticeable pulsing of the scroll speed.stagger: This value dictates how the movement is distributed across the lines. By using different phase offsets, this creates a wave-like, staggered motion where lines move out of sync.rotation: Allows you to rotate the entire text scene, measured in degrees, ranging from -180 to 180.zoom: Controls the scale of the entire scene. A value of1is 100% size; higher values zoom in, and values below 1 zoom out.
Retro and Visual Effects
scanlines: A boolean toggle that, when true, overlays a simulated CRT monitor scanline effect onto the scroller.scanIntensity: If scanlines are enabled, this number (0 to 1) determines the darkness or prominence of the scanline troughs.aberration: A boolean toggle that enables chromatic aberration, simulating the fringing of different colors at the edges of objects (like an old lens).aberrationAmount: When chromatic aberration is on, this number controls the strength of the color separation/fringing.
API Functions (Not Arguments, but Useful to Note)
The function returns several methods that allow you to interact with the scroller after it is initialized:
setOptions(partial): Allows you to dynamically change any of the listed options after the scroller has started running, without having to restart it.resize(): Handles the process of recalculating the scroller's layout and rendering when the containing element changes size.shuffle(): Resets the random seed and applies a shuffle mode, which changes the line content and phasing to make the text appear randomized.destroy(): Stops the animation loop and cleans up all associated WebGL resources.