isantialiasingsupported

1.0.0 • Public • Published

Is Antialiasing Supported? For WebGL Image of check sign

You probably heard about WebGL context antialias property. The interesting fact about it is that having this property as a true does not guarantee antialiasing to be actually enabled. It works just a as a hint for browser but there are many reasons it might be disabled and you d like to react on this. For example by enabling shader-based FSAA.

With this library you can actually check if AA works for this machine. Once executed it adds window.antialiasingSupported: boolean property which is true if AA is available.

Demo

Installation

npm install isantialiasingsupported

How this works?

Simple.

Library creates detached canvas and draws triangle on it with WebGL.

Image of Yaktocat

If triangle have any pixels except white and black then it is antialiased and window.antialiasingSupported is set to true.

License

MIT: http://mit-license.org/

Copyright 2018 Denis Radin aka PixelsCommander

Credits

Inspired by my work at Evolution Gaming

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    0

Package Sidebar

Install

npm i isantialiasingsupported

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

38.4 kB

Total Files

7

Last publish

Collaborators

  • pixelscommander