pixi-viewport-gesture-pinch
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

pixi-viewport-gesture-pinch

A plugin for pixi-viewport allowing pinch-to-zoom behavior with the non-standard GestureEvent API. Though this isn't on a standards track, it's necessary to support pinch to zoom behavior on certain browsers (Safari).

Usage

import { Viewport } from 'pixi-viewport';
import GesturePinch from 'pixi-viewport-gesture-pinch';
 
const viewport = new Viewport(options);
viewport.pinch();
 
const gesturePinch = new GesturePinch({ viewport });
viewport.plugins.add('gesture-pinch', gesturePinch);

Notes

If you're developing locally, you may want to npm link this module into your project:

$ npm link --only=production /path/to/pixi-viewport-gesture-pinch

If you're using TypeScript, due to issues with module resolution for npm linked type definitions you'll need to make sure your build system preserves symlinks. In Webpack, set resolve.symlinks to false. In a tsconfig file, set compilerOptions.preserveSymlinks to true

Readme

Keywords

none

Package Sidebar

Install

npm i pixi-viewport-gesture-pinch

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.08 kB

Total Files

8

Last publish

Collaborators

  • dylanpyle