diff --git a/src/Viewport.ts b/src/Viewport.ts index 04dd6d6f..3ddba515 100644 --- a/src/Viewport.ts +++ b/src/Viewport.ts @@ -455,9 +455,9 @@ export class Viewport extends Container public moveCenter(x: number, y: number): Viewport; /** Move center of viewport to {@code center}. */ - public moveCenter(center: Point): Viewport; + public moveCenter(center: IPointData): Viewport; - public moveCenter(...args: [number, number] | [Point]): Viewport + public moveCenter(...args: [number, number] | [IPointData]): Viewport { let x: number; let y: number; diff --git a/src/plugins/Animate.ts b/src/plugins/Animate.ts index 61d363a3..cff722d1 100644 --- a/src/plugins/Animate.ts +++ b/src/plugins/Animate.ts @@ -1,4 +1,4 @@ -import { Point } from '@pixi/math'; +import { IPointData, Point } from '@pixi/math'; import { Plugin } from './Plugin'; import ease from '../ease'; @@ -10,7 +10,7 @@ export interface IAnimateOptions { time?: number; /** Position to move the viewport to */ - position?: Point; + position?: IPointData; /** * Desired viewport width in world pixels @@ -210,7 +210,7 @@ export class Animate extends Plugin } if (!this.keepCenter) { - this.parent.moveCenter(this.options.position as Point); + this.parent.moveCenter(this.options.position!); } this.parent.emit('animate-end', this.parent);