mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: proper lod0 handling
This commit is contained in:
1 parent
060d00ccc4
commit
a51cbc51de
15 files changed
+108
-178
No files matched your search
@@ -1,14 +1,13 @@
|
||||
import { NodeIO } from '@gltf-transform/core';
|
||||
import { readdir } from 'fs/promises';
|
||||
import { Vector3Tuple } from 'three';
|
||||
import { DATA } from '.';
|
||||
import { extractModel } from '../../src/core/blitz/extractModel';
|
||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||
import { POI } from './constants';
|
||||
import { DATA, POI } from './constants';
|
||||
import { VehicleDefinitionList } from './definitions';
|
||||
import { TankParameters } from './tankIcons';
|
||||
|
||||
@@ -40,7 +39,7 @@ export async function tankModels(production: boolean) {
|
||||
.map(Number)
|
||||
.map((channel) => channel / 255) as Vector3Tuple;
|
||||
|
||||
if (nation !== 'other') continue;
|
||||
console.log(`Building models for ${nation}`);
|
||||
|
||||
await Promise.all(
|
||||
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||
@@ -59,6 +58,8 @@ export async function tankModels(production: boolean) {
|
||||
baseColor,
|
||||
);
|
||||
|
||||
// writeFile(`test.${tankKey}.glb`, await nodeIO.writeBinary(model));
|
||||
|
||||
changes.push({
|
||||
path: `3d/tanks/models/${id}.glb`,
|
||||
content: Buffer.from(await nodeIO.writeBinary(model)).toString(
|
||||
|
||||
Reference in new issue
Block a user