mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: mesh omit
This commit is contained in:
1 parent
7e0fb82905
commit
b433129354
3 files changed
+10
-3
No files matched your search
@@ -517,8 +517,8 @@ if (allTargets || targets?.includes('tankModels')) {
|
||||
// if (id !== 24609) continue; // concept 1b
|
||||
// if (id !== 4417) continue; // amx m4 mle
|
||||
// if (id !== 7297) continue; // 60tp
|
||||
// if (id !== 1) continue; // t-34
|
||||
if (id !== 6753) continue; // type 71
|
||||
if (id !== 1) continue; // t-34
|
||||
// if (id !== 6753) continue; // type 71
|
||||
// if (id !== 5137) continue; // tiger ii
|
||||
// if (id !== 6225) continue; // fv215b
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ const vertexAttributeGltfVectorSizes = {
|
||||
[VertexAttribute.TANGENT]: 4,
|
||||
} as const;
|
||||
|
||||
const omitNames = ['chassis_chassis_', 'chassis_track_crash_', 'HP_'];
|
||||
|
||||
export async function extractModel(
|
||||
data: string,
|
||||
path: string,
|
||||
@@ -143,6 +145,8 @@ export async function extractModel(
|
||||
|
||||
function parseHierarchies(hierarchies: Hierarchy[], parent: Scene | Node) {
|
||||
hierarchies.forEach((hierarchy) => {
|
||||
if (omitNames.some((omit) => hierarchy.name.startsWith(omit))) return;
|
||||
|
||||
const node = document.createNode(hierarchy.name);
|
||||
const components = times(
|
||||
hierarchy.components.count,
|
||||
@@ -314,7 +318,7 @@ export async function extractModel(
|
||||
|
||||
// rotate 90 degrees on the x axis
|
||||
const rootNode = document
|
||||
.createNode()
|
||||
.createNode('root')
|
||||
.setRotation([Math.cos(Math.PI / 4), 0, 0, -Math.sin(Math.PI / 4)]);
|
||||
|
||||
scene.addChild(rootNode);
|
||||
|
||||
@@ -277,6 +277,9 @@ export class DdsStream extends WindowsStream {
|
||||
|
||||
resolveDxgiFormat(header: ReturnType<typeof this.header>) {
|
||||
switch (header.pf.fourCC) {
|
||||
case 'DXT1':
|
||||
return DxgiFormat.BC1_UNORM;
|
||||
|
||||
case 'DXT3':
|
||||
return DxgiFormat.BC2_UNORM;
|
||||
|
||||
|
||||
Reference in new issue
Block a user