LogoPixi’VN
pixi-jsInterfaces

Interface: PointData

Defined in: node_modules/pixi.js/lib/maths/point/PointData.d.ts:29

Common interface for points. Both Point and ObservablePoint implement it. Provides a standard way to represent 2D coordinates.

Many PixiJS methods accept PointData for transformations, making it easy to work with different point types interchangeably.

Example

// Create an object implementing PointData
const point: PointData = { x: 100, y: 200 };

// Use with matrix transformations
const matrix = new Matrix();
matrix.translate(50, 50).apply(point);

// Mix with other point types
const observablePoint = new ObservablePoint(() => {}, null, 0, 0);
const regularPoint = new Point(0, 0);
// All are PointData compatible

Remarks

  • Basic x,y coordinate interface
  • Used by Point and ObservablePoint

See

Standard

Extended by

Properties

x

> x: number

Defined in: node_modules/pixi.js/lib/maths/point/PointData.d.ts:31

X coordinate


y

> y: number

Defined in: node_modules/pixi.js/lib/maths/point/PointData.d.ts:33

Y coordinate