1.1.0 • Published 6 years ago
pixi-viewport-gesture-pinch v1.1.0
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-pinchIf 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
1.1.0
6 years ago