Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

anime4k

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anime4k

Millisecond anime upscaling.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
8
14.29%
Maintainers
1
Weekly downloads
 
Created
Source

Anime4K (for JS)

Millisecond anime upscaling with fantastic quality using GLSL shaders.

Read more about how it works here: https://github.com/bloc97/Anime4K

How do i install it?

In vanilla JS

Just load index.js from this repo.

Using Webpack, Parcel, Etc.

Install it using npm i --save anime4k and include it using const Anime4K = require('anime4k')

How do i use it?

To create a new scaler, run Anime4K.Scaler(gl) where gl is a WebGL canvas context.

Example

// [For webpack, parcel, etc] Require Anime4K
const Anime4K = require('anime4k')

// Create a canvas
const canvas = document.createElement('canvas')
document.body.appendChild(canvas)

// Create the scaler
const scaler = Anime4K.Scaler(canvas.getConext('webgl'))

// Create an image to scale
const inputImg = new Image()

// When the image has loaded, scale it.
inputImg.onLoad = function() {
  scaler.inputImage(inputImg)
  scaler.resize(2.0) // 2x scale
}

// Load the image
inputImg.src = 'some_image.png'

Keywords

Anime

FAQs

Package last updated on 26 Aug 2019

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