Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dist/pixi-projection-spine.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/// <reference types="pixi.js" />
declare namespace pixi_heaven {
}
declare namespace PIXI {
interface TransformBase {
proj: PIXI.projection.AbstractProjection;
Expand All @@ -25,7 +23,7 @@ declare module PIXI.projection {
NONE = 0,
BEFORE_PROJ = 4,
PROJ = 5,
ALL = 9,
ALL = 9
}
}
declare module PIXI.projection {
Expand Down Expand Up @@ -242,7 +240,7 @@ declare module PIXI.projection {
FREE = 1,
AXIS_X = 2,
AXIS_Y = 3,
POINT = 4,
POINT = 4
}
class Matrix2d {
static readonly IDENTITY: Matrix2d;
Expand Down
16 changes: 8 additions & 8 deletions dist/pixi-projection-spine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pixi-projection-spine.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions dist/pixi-projection.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/// <reference types="pixi.js" />
declare namespace pixi_heaven {
}
declare namespace PIXI {
interface TransformBase {
proj: PIXI.projection.AbstractProjection;
Expand All @@ -25,7 +23,7 @@ declare module PIXI.projection {
NONE = 0,
BEFORE_PROJ = 4,
PROJ = 5,
ALL = 9,
ALL = 9
}
}
declare module PIXI.projection {
Expand Down Expand Up @@ -242,7 +240,7 @@ declare module PIXI.projection {
FREE = 1,
AXIS_X = 2,
AXIS_Y = 3,
POINT = 4,
POINT = 4
}
class Matrix2d {
static readonly IDENTITY: Matrix2d;
Expand Down
16 changes: 8 additions & 8 deletions dist/pixi-projection.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pixi-projection.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/proj2d/sprites/Sprite2d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,22 @@ namespace pixi_projection {
const h0 = h1 + orig.height;

let z = 1.0 / (wt[2] * w1 + wt[5] * h1 + wt[8]);
if (z < 0) z = 0;
vertexData[0] = z * ((wt[0] * w1) + (wt[3] * h1) + wt[6]);
vertexData[1] = z * ((wt[1] * w1) + (wt[4] * h1) + wt[7]);

z = 1.0 / (wt[2] * w0 + wt[5] * h1 + wt[8]);
if (z < 0) z = 0;
vertexData[2] = z * ((wt[0] * w0) + (wt[3] * h1) + wt[6]);
vertexData[3] = z * ((wt[1] * w0) + (wt[4] * h1) + wt[7]);

z = 1.0 / (wt[2] * w0 + wt[5] * h0 + wt[8]);
if (z < 0) z = 0;
vertexData[4] = z * ((wt[0] * w0) + (wt[3] * h0) + wt[6]);
vertexData[5] = z * ((wt[1] * w0) + (wt[4] * h0) + wt[7]);

z = 1.0 / (wt[2] * w1 + wt[5] * h0 + wt[8]);
if (z < 0) z = 0;
vertexData[6] = z * ((wt[0] * w1) + (wt[3] * h0) + wt[6]);
vertexData[7] = z * ((wt[1] * w1) + (wt[4] * h0) + wt[7]);
}
Expand Down