mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16: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 atlasPages = new Array<string>();
|
||||
try {
|
||||
let atlas = new spine.TextureAtlas(atlasData, (path: string) => {
|
||||
let atlas = new TextureAtlas(atlasData, (path: string) => {
|
||||
atlasPages.push(parent + "/" + path);
|
||||
let image = document.createElement("img") as HTMLImageElement;
|
||||
image.width = 16;
|
||||
image.height = 16;
|
||||
return new spine.FakeTexture(image);
|
||||
return new FakeTexture(image);
|
||||
});
|
||||
} catch (e) {
|
||||
let ex = e as Error;
|
||||
@ -174,7 +174,7 @@ module spine {
|
||||
if (pagesLoaded.count == atlasPages.length) {
|
||||
if (!pageLoadError) {
|
||||
try {
|
||||
let atlas = new spine.TextureAtlas(atlasData, (path: string) => {
|
||||
let atlas = new TextureAtlas(atlasData, (path: string) => {
|
||||
return this.get(parent + "/" + path);
|
||||
});
|
||||
this.assets[path] = atlas;
|
||||
|
||||
@ -185,7 +185,7 @@ module spine {
|
||||
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;
|
||||
c = -a * l1 / (aa - bb);
|
||||
if (c >= -1 && c <= 1) {
|
||||
|
||||
@ -45,7 +45,7 @@ module spine {
|
||||
this.clipAttachment = clip;
|
||||
|
||||
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);
|
||||
let clippingPolygon = this.clippingPolygon;
|
||||
SkeletonClipping.makeClockwise(clippingPolygon);
|
||||
@ -113,7 +113,7 @@ module spine {
|
||||
|
||||
let clipOutputCount = clipOutputLength >> 1;
|
||||
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) {
|
||||
let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];
|
||||
clippedVerticesItems[s] = x;
|
||||
@ -138,7 +138,7 @@ module spine {
|
||||
}
|
||||
|
||||
s = clippedTriangles.length;
|
||||
let clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));
|
||||
let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));
|
||||
clipOutputCount--;
|
||||
for (let ii = 1; ii < clipOutputCount; ii++) {
|
||||
clippedTrianglesItems[s] = index;
|
||||
@ -149,7 +149,7 @@ module spine {
|
||||
index += clipOutputCount + 1;
|
||||
|
||||
} else {
|
||||
let clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);
|
||||
let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);
|
||||
clippedVerticesItems[s] = x1;
|
||||
clippedVerticesItems[s + 1] = y1;
|
||||
clippedVerticesItems[s + 2] = light.r;
|
||||
@ -213,7 +213,7 @@ module spine {
|
||||
}
|
||||
|
||||
s = clippedTriangles.length;
|
||||
let clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);
|
||||
let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);
|
||||
clippedTrianglesItems[s] = index;
|
||||
clippedTrianglesItems[s + 1] = (index + 1);
|
||||
clippedTrianglesItems[s + 2] = (index + 2);
|
||||
|
||||
@ -93,9 +93,9 @@ module spine {
|
||||
originalWidth = 0; originalHeight = 0;
|
||||
}
|
||||
|
||||
export class FakeTexture extends spine.Texture {
|
||||
setFilters(minFilter: spine.TextureFilter, magFilter: spine.TextureFilter) { }
|
||||
setWraps(uWrap: spine.TextureWrap, vWrap: spine.TextureWrap) { }
|
||||
export class FakeTexture extends Texture {
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter) { }
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap) { }
|
||||
dispose() { }
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ module spine {
|
||||
endSlot: SlotData;
|
||||
|
||||
// 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) {
|
||||
super(name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user