add: scan fragmented repair parts sequentially
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user