Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@techandsoftware/teletext-plugin-smooth-mosaic

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techandsoftware/teletext-plugin-smooth-mosaic

Plugin for @techandsoftware/teletext - render mosaic graphics smoothly using hqx

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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: A Ceefax page with a map of the UK in teletext blocky format and with smoothed graphics

Demo

See https://teletextmoduledemo.tech-and-software.ltd.uk/ . Press 'p' or click the button marked with 'p' to load the plugin.

See the docs directory in the repo for an SVG created with the plugin.

Using

ES6 module

The easiest option is to use jsdelivr:

const module = await import('https://cdn.jsdelivr.net/npm/@techandsoftware/teletext-plugin-smooth-mosaic@latest/dist/teletext-plugin-smooth-mosaic.min.js');

// teletext is the @techandsoftware/teletext instance
teletext.registerViewPlugin(module.SmoothMosaicPlugin);

If installing from npm, you'll also need to use tooling like rollup to resolve the dependency for your browser.

import { SmoothMosaicPlugin } from '@techandsoftware/teletext-plugin-smooth-mosaic';
teletext.registerViewPlugin(SmoothMosaicPlugin);

As the module is fairly large, you could import dynamically:

const module = await import('@techandsoftware/teletext-plugin-smooth-mosaic');
teletext.registerViewPlugin(module.SmoothMosaicPlugin);

Non-ES6

If you want to support browsers that can't use ES6 modules, a UMD version is also available in the dist directory for importing with <script>. It exports the module in the global ttxsmooth. It's likely you'll also need to transpile the code for your target browsers.

Dependencies

Credits

FAQs

Package last updated on 06 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc