diff --git a/public/test/5137.glb b/public/test/5137.glb index e0c7a3ab2..f2622dfed 100644 Binary files a/public/test/5137.glb and b/public/test/5137.glb differ diff --git a/scripts/buildAssets.ts b/scripts/buildAssets.ts index 53e02e967..e7e27426b 100644 --- a/scripts/buildAssets.ts +++ b/scripts/buildAssets.ts @@ -595,12 +595,12 @@ if (allTargets || targets?.includes('tankModels')) { // if (id !== 24609) continue; // concept 1b // if (id !== 16401) continue; // waffle // if (id !== 7425) continue; // isu 152 - if (id !== 10369) continue; // mino + // if (id !== 10369) continue; // mino // 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 !== 5137) continue; // tiger ii + if (id !== 5137) continue; // tiger ii // if (id !== 11633) continue; // forest witch // if (id !== 6225) continue; // fv215b diff --git a/src/core/blitz/extractModel.ts b/src/core/blitz/extractModel.ts index 3e66d901b..fb8292873 100644 --- a/src/core/blitz/extractModel.ts +++ b/src/core/blitz/extractModel.ts @@ -1,5 +1,4 @@ import { Document, Material, Node, Scene } from '@gltf-transform/core'; -import { writeFile } from 'fs/promises'; import { range, times } from 'lodash'; import { dirname } from 'path'; import { @@ -15,10 +14,6 @@ import { ScgStream, vertexAttributeVectorSizes } from '../streams/scg'; import { VertexAttribute } from '../streams/scpg'; import { readDVPLFile } from './readDVPLFile'; -BigInt.prototype.toJSON = function () { - return this.toString(); -}; - const MAX_FLOAT32 = 2 ** 127 * (2 - 2 ** -23); const vertexAttributeGLTFName: Partial> = { @@ -59,8 +54,6 @@ export async function extractModel( const buffer = document.createBuffer(); const materials = new Map(); - writeFile('test.sc2.json', JSON.stringify(sc2, null, 2)); - // create materials await Promise.all( sc2['#dataNodes'].map(async (node) => { @@ -259,10 +252,6 @@ export async function extractModel( ); } - if (hierarchy.name === 'chassis_track_L') { - console.log(minLODDistanceBatchId); - } - const batch = component['rc.renderObj']['ro.batches'][ minLODDistanceBatchId!.toString().padStart(4, '0') @@ -314,7 +303,7 @@ export async function extractModel( indexedAttributes.forEach((attribute) => { const name = vertexAttributeGLTFName[attribute]; - if (!name) return; // no equivalent GLTF attribute + if (!name || primitive.getAttribute(name)) return; const vertexSize = vertexAttributeGltfVectorSizes[attribute]; const attributeAccessor = document