mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
Remove "spine." everywhere (#1297)
This commit is contained in:
parent
b0629e51ec
commit
5ee7d93fce
@ -150,12 +150,12 @@ module spine {
|
|||||||
var pagesLoaded: any = { count: 0 };
|
var pagesLoaded: any = { count: 0 };
|
||||||
var atlasPages = new Array<string>();
|
var atlasPages = new Array<string>();
|
||||||
try {
|
try {
|
||||||
let atlas = new spine.TextureAtlas(atlasData, (path: string) => {
|
let atlas = new TextureAtlas(atlasData, (path: string) => {
|
||||||
atlasPages.push(parent + "/" + path);
|
atlasPages.push(parent + "/" + path);
|
||||||
let image = document.createElement("img") as HTMLImageElement;
|
let image = document.createElement("img") as HTMLImageElement;
|
||||||
image.width = 16;
|
image.width = 16;
|
||||||
image.height = 16;
|
image.height = 16;
|
||||||
return new spine.FakeTexture(image);
|
return new FakeTexture(image);
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let ex = e as Error;
|
let ex = e as Error;
|
||||||
@ -174,7 +174,7 @@ module spine {
|
|||||||
if (pagesLoaded.count == atlasPages.length) {
|
if (pagesLoaded.count == atlasPages.length) {
|
||||||
if (!pageLoadError) {
|
if (!pageLoadError) {
|
||||||
try {
|
try {
|
||||||
let atlas = new spine.TextureAtlas(atlasData, (path: string) => {
|
let atlas = new TextureAtlas(atlasData, (path: string) => {
|
||||||
return this.get(parent + "/" + path);
|
return this.get(parent + "/" + path);
|
||||||
});
|
});
|
||||||
this.assets[path] = atlas;
|
this.assets[path] = atlas;
|
||||||
|
|||||||
@ -185,7 +185,7 @@ module spine {
|
|||||||
break outer;
|
break outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;
|
let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;
|
||||||
let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;
|
let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;
|
||||||
c = -a * l1 / (aa - bb);
|
c = -a * l1 / (aa - bb);
|
||||||
if (c >= -1 && c <= 1) {
|
if (c >= -1 && c <= 1) {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ module spine {
|
|||||||
this.clipAttachment = clip;
|
this.clipAttachment = clip;
|
||||||
|
|
||||||
let n = clip.worldVerticesLength;
|
let n = clip.worldVerticesLength;
|
||||||
let vertices = spine.Utils.setArraySize(this.clippingPolygon, n);
|
let vertices = Utils.setArraySize(this.clippingPolygon, n);
|
||||||
clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);
|
clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);
|
||||||
let clippingPolygon = this.clippingPolygon;
|
let clippingPolygon = this.clippingPolygon;
|
||||||
SkeletonClipping.makeClockwise(clippingPolygon);
|
SkeletonClipping.makeClockwise(clippingPolygon);
|
||||||
@ -113,7 +113,7 @@ module spine {
|
|||||||
|
|
||||||
let clipOutputCount = clipOutputLength >> 1;
|
let clipOutputCount = clipOutputLength >> 1;
|
||||||
let clipOutputItems = this.clipOutput;
|
let clipOutputItems = this.clipOutput;
|
||||||
let clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);
|
let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);
|
||||||
for (let ii = 0; ii < clipOutputLength; ii += 2) {
|
for (let ii = 0; ii < clipOutputLength; ii += 2) {
|
||||||
let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];
|
let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];
|
||||||
clippedVerticesItems[s] = x;
|
clippedVerticesItems[s] = x;
|
||||||
@ -138,7 +138,7 @@ module spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s = clippedTriangles.length;
|
s = clippedTriangles.length;
|
||||||
let clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));
|
let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));
|
||||||
clipOutputCount--;
|
clipOutputCount--;
|
||||||
for (let ii = 1; ii < clipOutputCount; ii++) {
|
for (let ii = 1; ii < clipOutputCount; ii++) {
|
||||||
clippedTrianglesItems[s] = index;
|
clippedTrianglesItems[s] = index;
|
||||||
@ -149,7 +149,7 @@ module spine {
|
|||||||
index += clipOutputCount + 1;
|
index += clipOutputCount + 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
let clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);
|
let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);
|
||||||
clippedVerticesItems[s] = x1;
|
clippedVerticesItems[s] = x1;
|
||||||
clippedVerticesItems[s + 1] = y1;
|
clippedVerticesItems[s + 1] = y1;
|
||||||
clippedVerticesItems[s + 2] = light.r;
|
clippedVerticesItems[s + 2] = light.r;
|
||||||
@ -213,7 +213,7 @@ module spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s = clippedTriangles.length;
|
s = clippedTriangles.length;
|
||||||
let clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);
|
let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);
|
||||||
clippedTrianglesItems[s] = index;
|
clippedTrianglesItems[s] = index;
|
||||||
clippedTrianglesItems[s + 1] = (index + 1);
|
clippedTrianglesItems[s + 1] = (index + 1);
|
||||||
clippedTrianglesItems[s + 2] = (index + 2);
|
clippedTrianglesItems[s + 2] = (index + 2);
|
||||||
|
|||||||
@ -93,9 +93,9 @@ module spine {
|
|||||||
originalWidth = 0; originalHeight = 0;
|
originalWidth = 0; originalHeight = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FakeTexture extends spine.Texture {
|
export class FakeTexture extends Texture {
|
||||||
setFilters(minFilter: spine.TextureFilter, magFilter: spine.TextureFilter) { }
|
setFilters(minFilter: TextureFilter, magFilter: TextureFilter) { }
|
||||||
setWraps(uWrap: spine.TextureWrap, vWrap: spine.TextureWrap) { }
|
setWraps(uWrap: TextureWrap, vWrap: TextureWrap) { }
|
||||||
dispose() { }
|
dispose() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ module spine {
|
|||||||
endSlot: SlotData;
|
endSlot: SlotData;
|
||||||
|
|
||||||
// Nonessential.
|
// Nonessential.
|
||||||
color = new spine.Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff
|
color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff
|
||||||
|
|
||||||
constructor (name: string) {
|
constructor (name: string) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user