feat: module hot swapping

This commit is contained in:
TrèsAbhi committed 2024-01-01 14:48:46 -06:00
1 parent a1c80c3d27
commit d4e16048e9
5 files changed
+58 -27

No files matched your search

+1 -7
View File
@@ -323,13 +323,7 @@ export async function extractModel(
});
}
// rotate 90 degrees on the x axis
const rootNode = document
.createNode('root')
.setRotation([Math.cos(Math.PI / 4), 0, 0, -Math.sin(Math.PI / 4)]);
scene.addChild(rootNode);
parseHierarchies(sc2['#hierarchy'], rootNode);
parseHierarchies(sc2['#hierarchy'], scene);
return document;
}
+3 -1
View File
@@ -27,8 +27,9 @@ export interface TurretDefinition {
name: string;
tier: Tier;
yaw?: [number, number];
gunOrigin: Vector3Tuple;
guns: GunDefinition[];
gunOrigin: Vector3Tuple;
model: number;
}
export type GunDefinition = GunDefinitionBase &
(GunDefinitionRegular | GunDefinitionAutoLoader | GunDefinitionAutoReloader);
@@ -38,6 +39,7 @@ interface GunDefinitionBase {
tier: Tier;
pitch: [number, number];
shells: ShellDefinition[];
model: number;
}
interface GunDefinitionRegular {
type: 'regular';