mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 18:26:12 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
a908bd9c6f
@ -81,6 +81,18 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
|
|||||||
/** Calculates the {@link #offset} and {@link #uvs} using the region and the attachment's transform. Must be called if the
|
/** Calculates the {@link #offset} and {@link #uvs} using the region and the attachment's transform. Must be called if the
|
||||||
* region, the region's properties, or the transform are changed. */
|
* region, the region's properties, or the transform are changed. */
|
||||||
public void updateRegion () {
|
public void updateRegion () {
|
||||||
|
if (region == null) {
|
||||||
|
uvs[BLX] = 0;
|
||||||
|
uvs[BLY] = 0;
|
||||||
|
uvs[ULX] = 1;
|
||||||
|
uvs[ULY] = 1;
|
||||||
|
uvs[URX] = 1;
|
||||||
|
uvs[URY] = 1;
|
||||||
|
uvs[BRX] = 1;
|
||||||
|
uvs[BRY] = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
float width = getWidth();
|
float width = getWidth();
|
||||||
float height = getHeight();
|
float height = getHeight();
|
||||||
float localX2 = width / 2;
|
float localX2 = width / 2;
|
||||||
@ -132,23 +144,23 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
|
|||||||
|
|
||||||
float[] uvs = this.uvs;
|
float[] uvs = this.uvs;
|
||||||
if (rotated) {
|
if (rotated) {
|
||||||
uvs[URX] = region.getU();
|
|
||||||
uvs[URY] = region.getV2();
|
|
||||||
uvs[BRX] = region.getU();
|
|
||||||
uvs[BRY] = region.getV();
|
|
||||||
uvs[BLX] = region.getU2();
|
uvs[BLX] = region.getU2();
|
||||||
uvs[BLY] = region.getV();
|
uvs[BLY] = region.getV();
|
||||||
uvs[ULX] = region.getU2();
|
uvs[ULX] = region.getU2();
|
||||||
uvs[ULY] = region.getV2();
|
uvs[ULY] = region.getV2();
|
||||||
|
uvs[URX] = region.getU();
|
||||||
|
uvs[URY] = region.getV2();
|
||||||
|
uvs[BRX] = region.getU();
|
||||||
|
uvs[BRY] = region.getV();
|
||||||
} else {
|
} else {
|
||||||
|
uvs[BLX] = region.getU2();
|
||||||
|
uvs[BLY] = region.getV2();
|
||||||
uvs[ULX] = region.getU();
|
uvs[ULX] = region.getU();
|
||||||
uvs[ULY] = region.getV2();
|
uvs[ULY] = region.getV2();
|
||||||
uvs[URX] = region.getU();
|
uvs[URX] = region.getU();
|
||||||
uvs[URY] = region.getV();
|
uvs[URY] = region.getV();
|
||||||
uvs[BRX] = region.getU2();
|
uvs[BRX] = region.getU2();
|
||||||
uvs[BRY] = region.getV();
|
uvs[BRY] = region.getV();
|
||||||
uvs[BLX] = region.getU2();
|
|
||||||
uvs[BLY] = region.getV2();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -352,6 +352,11 @@ public class SkeletonViewer extends ApplicationAdapter {
|
|||||||
if (!ui.minimizeButton.isChecked()) ui.window.setHeight(height / uiScale + 8);
|
if (!ui.minimizeButton.isChecked()) ui.window.setHeight(height / uiScale + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dispose () {
|
||||||
|
super.dispose();
|
||||||
|
Runtime.getRuntime().exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
static public void main (String[] args) throws Exception {
|
static public void main (String[] args) throws Exception {
|
||||||
try { // Try to turn off illegal access log messages.
|
try { // Try to turn off illegal access log messages.
|
||||||
Class loggerClass = Class.forName("jdk.internal.module.IllegalAccessLogger");
|
Class loggerClass = Class.forName("jdk.internal.module.IllegalAccessLogger");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user