openseadragon-pixijs-overlay

0.0.2 • Public • Published

OpenSeadragonPixiJSOverlay

An OpenSeadragon plugin that adds PixiJS overlay capability.

Compatible with OpenSeadragon 3.1.0 or greater.

Documentation

To use, include the openseadragon-pixijs-overlay.js file after openseadragon.js on your web page.

To add PixiJS overlay capability to your OpenSeadragon Viewer, call pixiOverlay(options) on it. The argument options is a same type of PIXI.Appication constructor options. Also, you can set world-coordinate size as worldWidth and worldHeight properties. If not set, it automatically decide the same size of displaying the first image.

For example:

var overlay = this.viewer.pixiOverlay({
    backgroundAlpha: 0
});

This will return a new object with the following methods:

  • viewport(): Gives access to PIXI.viewport, to add graphics.
  • resize(): If your viewer changes size, you'll need to resize the overlay by calling this method.
  • render(): If you force to render, you'll call this method.

See online demo or demo.html for an example of it in use.

Package Sidebar

Install

npm i openseadragon-pixijs-overlay

Weekly Downloads

1

Version

0.0.2

License

BSD-3-Clause

Unpacked Size

7.05 kB

Total Files

4

Last publish

Collaborators

  • ynitto