@techandsoftware/teletext-plugin-smooth-mosaic
v0.1.9
Published
Plugin for @techandsoftware/teletext - render mosaic graphics smoothly using hqx
Readme
This is a plugin for @techandsoftware/teletext, which uses a pixel art scaling algorithm to create a smooth rendition of teletext mosaic graphics. The scaling algorithm used is hqx.
The following image shows a page from Ceefax with normal rendering and with smoothed graphics on the right:

Demo
See the teletext module API playground. Select Graphics-rendered mosaics with upscaling in the selector for Mosaic graphics rendering.
See the docs directory in the repo for an SVG created with the plugin.
Using
The easiest option is to use jsdelivr:
const { SmoothMosaicPlugin } = await import('https://cdn.jsdelivr.net/npm/@techandsoftware/teletext-plugin-smooth-mosaic@latest/dist/teletext-plugin-smooth-mosaic.js');
// teletext is the @techandsoftware/teletext instance
teletext.registerViewPlugin(SmoothMosaicPlugin);Or install from from npm, and use with tooling such as vite.
import { SmoothMosaicPlugin } from '@techandsoftware/teletext-plugin-smooth-mosaic';
teletext.registerViewPlugin(SmoothMosaicPlugin);
// or import dynamically
const { SmoothMosaicPlugin } = await import('@techandsoftware/teletext-plugin-smooth-mosaic');Dependencies
- js-hqx, licensed under the GNU Lesser General Public License, version 2.1 or later.
Credits
- The Ceefax page used in the image above was sourced from The Teletext Archive
