Skip to content

1681-engine / index / PackedFrame

Interface: PackedFrame ​

Defined in: src/core/TextureRegistry.ts:4

A frame packed on an atlas page (TexturePacker and the like), as assets/textureAtlas.ts parses it.

Properties ​

anchor? ​

ts
optional anchor?: object;

Defined in: src/core/TextureRegistry.ts:19

The frame's pivot, 0–1, when the packer wrote one.

x ​

ts
x: number;

y ​

ts
y: number;

h ​

ts
h: number;

Defined in: src/core/TextureRegistry.ts:10


name ​

ts
name: string;

Defined in: src/core/TextureRegistry.ts:5


rotated ​

ts
rotated: boolean;

Defined in: src/core/TextureRegistry.ts:12

Stored turned 90° clockwise on the page (Pixi's rotate: 2).


sourceH ​

ts
sourceH: number;

Defined in: src/core/TextureRegistry.ts:15


sourceW ​

ts
sourceW: number;

Defined in: src/core/TextureRegistry.ts:14

The untrimmed size of the sprite.


trim? ​

ts
optional trim?: object;

Defined in: src/core/TextureRegistry.ts:17

Where the trimmed pixels sit inside the untrimmed sprite; absent when the frame was not trimmed.

h ​

ts
h: number;

w ​

ts
w: number;

x ​

ts
x: number;

y ​

ts
y: number;

w ​

ts
w: number;

Defined in: src/core/TextureRegistry.ts:9


x ​

ts
x: number;

Defined in: src/core/TextureRegistry.ts:7

The rect on the page (already swapped to its on-page size when rotated).


y ​

ts
y: number;

Defined in: src/core/TextureRegistry.ts:8

Released under the MIT License.