Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chg: d.ts build errors fixed #444

Merged
merged 1 commit into from
Jun 3, 2022
Merged
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
2 changes: 1 addition & 1 deletion bundles/all-3.8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion bundles/all-4.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion bundles/pixi-spine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
4 changes: 2 additions & 2 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"homepage": "https://github.com/pixijs/pixi-spine/#readme",
"devDependencies": {
"@microsoft/api-extractor": "7.13.5",
"@microsoft/api-extractor": "7.18.4",
"@pixi-spine/eslint-config": "~1.0.0",
"@pixi-spine/rollup-config": "~1.0.0",
"chai": "~4.2.0",
Expand All @@ -51,6 +51,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/loader-3.8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/loader-4.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/loader-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/loader-uni/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/runtime-3.7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/runtime-3.8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/runtime-4.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"rimraf": "3.0.2",
"rollup": "^2.53.3",
"tslib": "~2.2.0",
"typescript": "~4.2.3"
"typescript": "~4.3.0"
}
}
18 changes: 18 additions & 0 deletions packages/runtime-4.0/src/core/Skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,15 @@ export class Skeleton implements ISkeleton<SkeletonData, Bone, Slot, Skin> {
return null;
}

/** @returns -1 if the bone was not found. */
findBoneIndex (boneName: string) {
if (!boneName) throw new Error("boneName cannot be null.");
let bones = this.bones;
for (let i = 0, n = bones.length; i < n; i++)
if (bones[i].data.name == boneName) return i;
return -1;
}

/** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
* repeatedly.
* @returns May be null. */
Expand All @@ -432,6 +441,15 @@ export class Skeleton implements ISkeleton<SkeletonData, Bone, Slot, Skin> {
return null;
}

/** @returns -1 if the bone was not found. */
findSlotIndex (slotName: string) {
if (!slotName) throw new Error("slotName cannot be null.");
let slots = this.slots;
for (let i = 0, n = slots.length; i < n; i++)
if (slots[i].data.name == slotName) return i;
return -1;
}

/** Sets a skin by name.
*
* See {@link #setSkin()}. */
Expand Down
2 changes: 0 additions & 2 deletions packages/runtime-4.0/src/core/SkeletonBinary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,6 @@ class Vertices {
constructor (public bones: Array<number> = null, public vertices: Array<number> | Float32Array = null) { }
}

enum AttachmentType { Region, BoundingBox, Mesh, LinkedMesh, Path, Point, Clipping }

function readTimeline1 (input: BinaryInput, timeline: CurveTimeline1, scale: number): CurveTimeline1 {
let time = input.readFloat(), value = input.readFloat() * scale;
for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {
Expand Down