feat: upgrade electric aircraft fidelity and flight model
This commit is contained in:
@@ -153,16 +153,19 @@ function childGroup(root: THREE.Group, name: string): THREE.Group {
|
||||
|
||||
function cloneAircraft(prototype: ElectricAircraftRig): ElectricAircraftRig {
|
||||
const root = prototype.root.clone(true);
|
||||
const fans: THREE.Group[] = [];
|
||||
root.traverse((value) => {
|
||||
if (value instanceof THREE.Group && value.name.startsWith("electric-aircraft.fan-")) {
|
||||
fans.push(value);
|
||||
}
|
||||
});
|
||||
return {
|
||||
root,
|
||||
leftAileron: childGroup(root, "electric-aircraft.aileron-left"),
|
||||
rightAileron: childGroup(root, "electric-aircraft.aileron-right"),
|
||||
leftVTail: childGroup(root, "electric-aircraft.v-tail-left"),
|
||||
rightVTail: childGroup(root, "electric-aircraft.v-tail-right"),
|
||||
fans: [
|
||||
childGroup(root, "electric-aircraft.fan-left"),
|
||||
childGroup(root, "electric-aircraft.fan-right"),
|
||||
],
|
||||
fans,
|
||||
ownsMaterials: false,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user