UNPKG

@ahmafi/pixi-viewport

Version:

A highly configurable viewport/2D camera designed to work with pixi.js. Features include dragging, pinch-to-zoom, mouse wheel zooming, decelerated dragging, follow target, snap to point, snap to zoom, clamping, bouncing on edges, and move on mouse edges.

22 lines (21 loc) 599 B
import { Plugin } from './Plugin'; import type { Viewport } from '../Viewport'; export interface IClampZoomOptions { minWidth?: number | null; minHeight?: number | null; maxWidth?: number | null; maxHeight?: number | null; minScale?: number | null | IScale; maxScale?: number | null | IScale; } export declare class ClampZoom extends Plugin { readonly options: Required<IClampZoomOptions>; constructor(parent: Viewport, options?: {}); resize(): void; clamp(): void; reset(): void; } export interface IScale { x: null | number; y: null | number; }