mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge branch '4.0' into 4.1-beta
# Conflicts: # spine-ts/package-lock.json # spine-ts/package.json # spine-ts/spine-canvas/package.json # spine-ts/spine-core/package.json # spine-ts/spine-player/package.json # spine-ts/spine-threejs/package.json # spine-ts/spine-webgl/package.json
This commit is contained in:
commit
8910544049
@ -173,7 +173,10 @@ export class SkeletonMesh extends THREE.Object3D {
|
|||||||
for (let i = 0, n = drawOrder.length; i < n; i++) {
|
for (let i = 0, n = drawOrder.length; i < n; i++) {
|
||||||
let vertexSize = clipper.isClipping() ? 2 : SkeletonMesh.VERTEX_SIZE;
|
let vertexSize = clipper.isClipping() ? 2 : SkeletonMesh.VERTEX_SIZE;
|
||||||
let slot = drawOrder[i];
|
let slot = drawOrder[i];
|
||||||
if (!slot.bone.active) continue;
|
if (!slot.bone.active) {
|
||||||
|
clipper.clipEndWithSlot(slot);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let attachment = slot.getAttachment();
|
let attachment = slot.getAttachment();
|
||||||
let attachmentColor: Color = null;
|
let attachmentColor: Color = null;
|
||||||
let texture: ThreeJsTexture = null;
|
let texture: ThreeJsTexture = null;
|
||||||
@ -290,8 +293,10 @@ export class SkeletonMesh extends THREE.Object3D {
|
|||||||
finalIndicesLength = triangles.length;
|
finalIndicesLength = triangles.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finalVerticesLength == 0 || finalIndicesLength == 0)
|
if (finalVerticesLength == 0 || finalIndicesLength == 0) {
|
||||||
|
clipper.clipEndWithSlot(slot);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Start new batch if this one can't hold vertices/indices
|
// Start new batch if this one can't hold vertices/indices
|
||||||
if (!batch.canBatch(finalVerticesLength, finalIndicesLength)) {
|
if (!batch.canBatch(finalVerticesLength, finalIndicesLength)) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class App {
|
|||||||
// Setup listener for animation selection box
|
// Setup listener for animation selection box
|
||||||
let animationSelectBox = document.body.querySelector("#animations");
|
let animationSelectBox = document.body.querySelector("#animations");
|
||||||
animationSelectBox.onchange = () => {
|
animationSelectBox.onchange = () => {
|
||||||
// this.animationState.setAnimation(0, animationSelectBox.value, true);
|
this.animationState.setAnimation(0, animationSelectBox.value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup listener for the PMA checkbox
|
// Setup listener for the PMA checkbox
|
||||||
@ -123,8 +123,7 @@ class App {
|
|||||||
option.selected = animation.name == animationName;
|
option.selected = animation.name == animationName;
|
||||||
animationSelectBox.appendChild(option);
|
animationSelectBox.appendChild(option);
|
||||||
}
|
}
|
||||||
|
this.animationState.setAnimation(0, animationName, true);
|
||||||
// if (animationName) this.animationState.setAnimation(0, animationName, true);
|
|
||||||
|
|
||||||
// Center the skeleton in the viewport
|
// Center the skeleton in the viewport
|
||||||
this.centerSkeleton();
|
this.centerSkeleton();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user