mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: more accurate models
This commit is contained in:
1 parent
bc85b354a0
commit
60a115b7d8
9 files changed
+39
-38
No files matched your search
+10
-10
@@ -9,7 +9,7 @@ export interface SC2 {
|
||||
|
||||
type DataNode = {
|
||||
'##name': 'NMaterial';
|
||||
'#id': Buffer;
|
||||
'#id': ArrayBuffer;
|
||||
materialName: string;
|
||||
parentMaterialKey?: bigint;
|
||||
qualityGroup?: string;
|
||||
@@ -46,15 +46,15 @@ interface Flags {
|
||||
}
|
||||
|
||||
interface Properties {
|
||||
alphatestThreshold: Buffer;
|
||||
attenuationBoxHalfSize: Buffer;
|
||||
attenuationBoxSmoothness: Buffer;
|
||||
baseColorFactor?: Buffer;
|
||||
decalTileCoordScale?: Buffer;
|
||||
inGlossiness: Buffer;
|
||||
inSpecularity: Buffer;
|
||||
metalFresnelReflectance: Buffer;
|
||||
metallicRoughnessFactor?: Buffer;
|
||||
alphatestThreshold: ArrayBuffer;
|
||||
attenuationBoxHalfSize: ArrayBuffer;
|
||||
attenuationBoxSmoothness: ArrayBuffer;
|
||||
baseColorFactor?: ArrayBuffer;
|
||||
decalTileCoordScale?: ArrayBuffer;
|
||||
inGlossiness: ArrayBuffer;
|
||||
inSpecularity: ArrayBuffer;
|
||||
metalFresnelReflectance: ArrayBuffer;
|
||||
metallicRoughnessFactor?: ArrayBuffer;
|
||||
}
|
||||
|
||||
interface TextureSampleStates {
|
||||
|
||||
+10
-7
@@ -2,18 +2,18 @@ import { ScpgReadStream, VertexAttribute } from './scpg';
|
||||
|
||||
interface PolygonGroupRaw {
|
||||
'##name': 'PolygonGroup';
|
||||
'#id': Buffer;
|
||||
'#id': ArrayBuffer;
|
||||
cubeTextureCoordCount: number;
|
||||
indexCount: number;
|
||||
indexFormat: 0 | 1;
|
||||
indices: Buffer;
|
||||
indices: ArrayBuffer;
|
||||
packing: 0 | 1;
|
||||
primitiveCount: number;
|
||||
rhi_primitiveType: 1 | 2 | 10;
|
||||
textureCoordCount: number;
|
||||
vertexCount: number;
|
||||
vertexFormat: number;
|
||||
vertices: Buffer;
|
||||
vertices: ArrayBuffer;
|
||||
}
|
||||
|
||||
type BlitzkriegVertex = { attribute: VertexAttribute; value: number[] }[];
|
||||
@@ -104,10 +104,13 @@ export class ScgReadStream extends ScpgReadStream {
|
||||
}));
|
||||
}
|
||||
|
||||
polygonGroups.set(polygonGroupRaw['#id'].readBigUInt64LE(), {
|
||||
vertices,
|
||||
indices,
|
||||
});
|
||||
polygonGroups.set(
|
||||
new DataView(polygonGroupRaw['#id']).getBigUint64(0, true),
|
||||
{
|
||||
vertices,
|
||||
indices,
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
return polygonGroups;
|
||||
|
||||
Reference in new issue
Block a user