[ts] New articacts including the mesh attachment fix.

This commit is contained in:
badlogic 2021-04-27 13:34:26 +02:00
parent a0ab3fe80c
commit dd47866f35
15 changed files with 27 additions and 39 deletions

View File

@ -1487,7 +1487,7 @@ declare module spine.webgl {
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean; static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean); constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear; static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
update(useMipMaps: boolean): void; update(useMipMaps: boolean): void;
restore(): void; restore(): void;

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1456,7 +1456,7 @@ declare module spine.webgl {
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean; static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean); constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear; static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
update(useMipMaps: boolean): void; update(useMipMaps: boolean): void;
restore(): void; restore(): void;

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long

View File

@ -1456,7 +1456,7 @@ declare module spine.webgl {
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean; static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean); constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear; static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
update(useMipMaps: boolean): void; update(useMipMaps: boolean): void;
restore(): void; restore(): void;

View File

@ -6,8 +6,6 @@ var __extends = (this && this.__extends) || (function () {
return extendStatics(d, b); return extendStatics(d, b);
}; };
return function (d, b) { return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b); extendStatics(d, b);
function __() { this.constructor = d; } function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@ -1319,7 +1317,7 @@ var spine;
this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]); this.setAttachment(skeleton, slot, this.attachmentNames[Animation.search(frames, time)]);
}; };
AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));
}; };
return AttachmentTimeline; return AttachmentTimeline;
}(Timeline)); }(Timeline));
@ -2183,7 +2181,7 @@ var spine;
var slot = slots[i]; var slot = slots[i];
if (slot.attachmentState == setupState) { if (slot.attachmentState == setupState) {
var attachmentName = slot.data.attachmentName; var attachmentName = slot.data.attachmentName;
slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
} }
} }
this.unkeyedState += 2; this.unkeyedState += 2;
@ -2297,7 +2295,7 @@ var spine;
slot.attachmentState = this.unkeyedState + AnimationState.SETUP; slot.attachmentState = this.unkeyedState + AnimationState.SETUP;
}; };
AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {
slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
if (attachments) if (attachments)
slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;
}; };

File diff suppressed because one or more lines are too long