Skip to content

Commit

Permalink
Merge pull request #178 from Benjythebee/fix/reset-hair-on-lora
Browse files Browse the repository at this point in the history
Looks good to me! :)
  • Loading branch information
memelotsqui authored Oct 24, 2024
2 parents c9e5dcb + 090607c commit aa9eeef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/library/loraDataGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit aa9eeef

Please sign in to comment.