Socket
Socket
Sign inDemoInstall

pixi-viewport

Package Overview
Dependencies
Maintainers
1
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-viewport - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

dist/external/penner.d.ts

6

dist/InputManager.d.ts

@@ -1,8 +0,6 @@

import { Point } from '@pixi/core';
import type { IPointData } from '@pixi/core';
import type { FederatedPointerEvent } from '@pixi/events';
import { Point, PointData, FederatedPointerEvent } from 'pixi.js';
import type { Viewport } from './Viewport';
export interface IViewportTouch {
id: number;
last: IPointData | null;
last: PointData | null;
}

@@ -9,0 +7,0 @@ export declare class InputManager {

import type { Animate, Bounce, Clamp, ClampZoom, Decelerate, Drag, Follow, MouseEdges, Pinch, Plugin, Snap, SnapZoom, Wheel } from './plugins';
import type { FederatedEvent } from '@pixi/events';
import type { FederatedEvent } from 'pixi.js';
import type { Viewport } from './Viewport';

@@ -4,0 +4,0 @@ export declare class PluginManager {

@@ -1,2 +0,2 @@

import { IPointData } from '@pixi/core';
import { PointData } from 'pixi.js';
import { Plugin } from './Plugin';

@@ -6,3 +6,3 @@ import type { Viewport } from '../Viewport';

time?: number;
position?: IPointData;
position?: PointData;
width?: number;

@@ -9,0 +9,0 @@ height?: number;

@@ -1,2 +0,2 @@

import { Rectangle } from '@pixi/core';
import { Rectangle } from 'pixi.js';
import { Plugin } from './Plugin';

@@ -3,0 +3,0 @@ import type { Viewport } from '../Viewport';

import { Plugin } from './Plugin';
import type { FederatedPointerEvent } from '@pixi/events';
import type { IPointData } from '@pixi/core';
import type { FederatedPointerEvent } from 'pixi.js';
import type { PointData } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -30,3 +30,3 @@ export interface IDragOptions {

protected underflowY: -1 | 0 | 1;
protected last?: IPointData | null;
protected last?: PointData | null;
protected current?: number;

@@ -33,0 +33,0 @@ private windowEventHandlers;

import { Plugin } from './Plugin';
import type { DisplayObject } from '@pixi/display';
import type { IPointData } from '@pixi/core';
import type { Container, PointData } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -12,6 +11,6 @@ export interface IFollowOptions {

readonly options: Required<IFollowOptions>;
target: DisplayObject;
protected velocity: IPointData;
constructor(parent: Viewport, target: DisplayObject, options?: IFollowOptions);
target: Container;
protected velocity: PointData;
constructor(parent: Viewport, target: Container, options?: IFollowOptions);
update(elapsed: number): void;
}
import { Plugin } from './Plugin';
import type { Viewport } from '../Viewport';
import type { FederatedPointerEvent } from '@pixi/events';
import type { FederatedPointerEvent } from 'pixi.js';
export interface IMouseEdgesInsets {

@@ -5,0 +5,0 @@ radius?: number | null;

import { Plugin } from './Plugin';
import { Point } from '@pixi/core';
import type { IPointData } from '@pixi/core';
import type { FederatedPointerEvent } from '@pixi/events';
import { Point } from 'pixi.js';
import type { PointData } from 'pixi.js';
import type { FederatedPointerEvent } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -18,3 +18,3 @@ export interface IPinchOptions {

protected moved: boolean;
protected lastCenter?: IPointData | null;
protected lastCenter?: PointData | null;
constructor(parent: Viewport, options?: IPinchOptions);

@@ -21,0 +21,0 @@ down(): boolean;

@@ -1,2 +0,2 @@

import type { FederatedEvent } from '@pixi/events';
import type { FederatedEvent } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -3,0 +3,0 @@ export declare class Plugin {

import { Plugin } from './Plugin';
import type { Point } from '@pixi/core';
import type { Point } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -4,0 +4,0 @@ export interface ISnapZoomOptions {

import { Plugin } from './Plugin';
import { IPointData, Point } from '@pixi/core';
import { PointData, Point } from 'pixi.js';
import type { Viewport } from '../Viewport';

@@ -18,3 +18,3 @@ export interface IWheelOptions {

readonly options: Required<IWheelOptions>;
protected smoothing?: IPointData | null;
protected smoothing?: PointData | null;
protected smoothingCenter?: Point | null;

@@ -21,0 +21,0 @@ protected smoothingCount?: number;

@@ -1,3 +0,2 @@

import type { FederatedEvent } from '@pixi/events';
import type { Point } from '@pixi/math';
import type { FederatedEvent, Point } from 'pixi.js';
import type { Viewport } from './Viewport';

@@ -4,0 +3,0 @@ export type DragEvent = {

@@ -1,8 +0,5 @@

import { Container } from '@pixi/display';
import { IPointData, Point, Rectangle, Ticker } from '@pixi/core';
import { Container, IHitArea, EventSystem, DestroyOptions, PointData, Point, Rectangle, Ticker } from 'pixi.js';
import { InputManager } from './InputManager';
import { PluginManager } from './PluginManager';
import { IAnimateOptions, IBounceOptions, IClampOptions, IClampZoomOptions, IDecelerateOptions, IDragOptions, IFollowOptions, IMouseEdgesOptions, IPinchOptions, ISnapOptions, ISnapZoomOptions, IWheelOptions } from './plugins';
import type { DisplayObject, IDestroyOptions } from '@pixi/display';
import type { IHitArea, EventSystem } from '@pixi/events';
export interface IViewportOptions {

@@ -57,3 +54,3 @@ screenWidth?: number;

constructor(options: IViewportOptions);
destroy(options?: IDestroyOptions): void;
destroy(options?: DestroyOptions): void;
update(elapsed: number): void;

@@ -66,6 +63,6 @@ resize(screenWidth?: number, screenHeight?: number, worldWidth?: number, worldHeight?: number): void;

getVisibleBounds(): Rectangle;
toWorld<P extends IPointData = Point>(x: number, y: number): P;
toWorld<P extends IPointData = Point>(screenPoint: IPointData): P;
toScreen<P extends IPointData = Point>(x: number, y: number): P;
toScreen<P extends IPointData = Point>(worldPoint: IPointData): P;
toWorld<P extends PointData = Point>(x: number, y: number): P;
toWorld<P extends PointData = Point>(screenPoint: PointData): P;
toScreen<P extends PointData = Point>(x: number, y: number): P;
toScreen<P extends PointData = Point>(worldPoint: PointData): P;
get worldScreenWidth(): number;

@@ -78,3 +75,3 @@ get worldScreenHeight(): number;

moveCenter(x: number, y: number): Viewport;
moveCenter(center: IPointData): Viewport;
moveCenter(center: PointData): Viewport;
get corner(): Point;

@@ -125,3 +122,3 @@ set corner(value: Point);

snap(x: number, y: number, options?: ISnapOptions): Viewport;
follow(target: DisplayObject, options?: IFollowOptions): Viewport;
follow(target: Container, options?: IFollowOptions): Viewport;
wheel(options?: IWheelOptions): Viewport;

@@ -128,0 +125,0 @@ animate(options: IAnimateOptions): Viewport;

{
"name": "pixi-viewport",
"version": "5.0.2",
"version": "5.0.3",
"description": "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.",

@@ -52,8 +52,2 @@ "main": "./dist/pixi_viewport.umd.cjs",

"devDependencies": {
"@pixi/core": "^7.1.1",
"@pixi/display": "^7.1.1",
"@pixi/eslint-config": "^4.0.1",
"@pixi/events": "^7.1.1",
"@pixi/math": "^7.1.1",
"@pixi/ticker": "^7.1.1",
"@typescript-eslint/parser": "^5.5.0",

@@ -71,7 +65,7 @@ "chai": "^4.3.4",

"pixi-ease": "^3.0.7",
"pixi.js": "^7.1.1",
"pixi.js": "^8.0.4",
"raf": "^3.4.1",
"typescript": "^4.5.2",
"vite": "^3.2.4",
"vite-plugin-dts": "^1.7.1",
"vite": "4.4.10",
"vite-plugin-dts": "3.6.0",
"yy-counter": "^2.1.0",

@@ -78,0 +72,0 @@ "yy-fps": "^2.0.0",

@@ -14,2 +14,7 @@ # pixi-viewport

## v5.2+
Moves pixi-viewport to pixi.js v7.2+
NOTE: there is a breaking change since in pixi.js v7.2 `interactive` (boolean) was deprecated in favor of `eventMode`.
## v5+

@@ -16,0 +21,0 @@ Moves pixi-viewport to pixi.js v7 (thanks [@cuire](https://github.com/cuire)!).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc