From 090607ce99c855cc582e7097d6a8165c25e1f890 Mon Sep 17 00:00:00 2001 From: Benjythebee Date: Fri, 25 Oct 2024 09:47:42 +1300 Subject: [PATCH] loraDataGenerator hair spring bone fix --- src/library/loraDataGenerator.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/library/loraDataGenerator.js b/src/library/loraDataGenerator.js index 1287b21a..9271728a 100644 --- a/src/library/loraDataGenerator.js +++ b/src/library/loraDataGenerator.js @@ -18,6 +18,10 @@ export class LoraDataGenerator { this.temptime = 0; } + get vrms(){ + return (Object.values(this.characterManager.avatar).map((vrm)=>vrm.vrm)) + } + async createLoraData(loraObject, exsitingZipFile = null, zipName = ""){ const manifestURL = loraObject.manifest; const loraFolderName = loraObject.name ? "loraData/" + loraObject.name : "loraData"; @@ -67,7 +71,9 @@ export class LoraDataGenerator { const saveName = counter.toString().padStart(4, '0'); const finalAnimationTime = animationFrame ? animationFrame/30 : animationTime await scope.animationManager.loadAnimation(animBasePath + animationPath, true, finalAnimationTime); - + this.vrms.forEach((vrm)=>{ + vrm.springBoneManager?.reset() + }) const vectorCameraPosition = getVectorCameraPosition(cameraPosition); scope.screenshotManager.cameraFrameManager.setCameraFrameWithName(cameraFrame,vectorCameraPosition);