add: scan fragmented repair parts sequentially

This commit is contained in:
Tom Boullay
2026-05-08 02:12:58 +01:00
parent 95d9bd4f3e
commit 7a3baa4c0b
9 changed files with 96 additions and 29 deletions
+5 -1
View File
@@ -1,6 +1,6 @@
import * as THREE from "three";
interface ExplodedPart {
export interface ExplodedPart {
object: THREE.Object3D;
originalPosition: THREE.Vector3;
targetPosition: THREE.Vector3;
@@ -31,6 +31,10 @@ export class ExplodedModel {
this.targetProgress = split ? 1 : 0;
}
getParts(): readonly ExplodedPart[] {
return this.parts;
}
update(delta: number): void {
const diff = this.targetProgress - this.progress;
if (Math.abs(diff) < 0.001) {