Add Incoming (PC, 1998, Rage Software)#926
Conversation
Only known issue is that backface culling is not properly implemented so I am placing this under Experimental until that is resolved.
Signed-off-by: Andrew Udvare <audvare@gmail.com>
|
Why are both boxes ticked in the above form? |
magcius
left a comment
There was a problem hiding this comment.
If generative AI was used in the creation of this PR, please review this project's AI policy and make sure that all comments and documentation are human-authored. Any future submissions that violate AI policy will be instantly rejected.
|
|
||
|
|
||
| const SPRITE_ATLAS_SIZE = 256; | ||
| const IDENTITY_MATRIX = mat4.create(); |
| const pathBase = "Incoming"; | ||
| const subversionBase = "IncomingSubversion"; | ||
| const SUBVERSION_OVERRIDES = new Set<string>(subversionOverridePaths); | ||
| let overrideSet = new Set<string>(); |
| const SHADOW_LIFT = 4; | ||
| const pathBase = "Incoming"; | ||
| const subversionBase = "IncomingSubversion"; | ||
| const SUBVERSION_OVERRIDES = new Set<string>(subversionOverridePaths); |
There was a problem hiding this comment.
I might prefer this in data rather than in the source tree.
| // then 3 face-vertex slots of 8 bytes each = { u16 vertexIndex; u8[6] aux }. | ||
| import ArrayBufferSlice from "../ArrayBufferSlice.js"; | ||
|
|
||
| /**The size in bytes of the {@link IANModel} header (`RawModelGeometry`). */ |
There was a problem hiding this comment.
There's a lot of unhelpful doc-comments that might have been AI-generated. Please remove them; this one just repeats info that's already found in the much-more helpful header comment.
| readonly name: string; | ||
| /** Interleaved vertex data, 8 float32 per vertex: posX, posY, posZ, normX, normY, normZ, u, v. */ | ||
| readonly vertices: Float32Array; | ||
| /** Number of vertices in {@link vertices}. */ |
There was a problem hiding this comment.
no shit (but also why do you need this instead of calculating it from the vertex data?)
| readonly vertexCount: number; | ||
| /** Triangle index list (3 indices per triangle) referencing {@link vertices}. */ | ||
| readonly indices: Uint32Array; | ||
| /** Per-triangle flags (one entry per triangle); bit {@link IAN_FACE_FLAG_TWO_SIDED} = two-sided. */ |
There was a problem hiding this comment.
Is this used at all? I don't see where it's used in the renderer.
| } | ||
|
|
||
| function readNodeName(view: DataView, faceDataOffset: number): string { | ||
| // Iterate from end to find the start of the string. |
| export interface IncomingMDLRef { | ||
| /** The referenced object's `label`, resolved against the level's WDL + MDL placements. */ | ||
| readonly label: string; | ||
| /** |
There was a problem hiding this comment.
this comment is more unhelpful than not having it, I think
| const nx = hR - hL; | ||
| const ny = -2 * TERRAIN_CELL_SPACING; // Incoming up is -Y, so negate to get the +Y-up normal. | ||
| const nz = hU - hD; | ||
| const len = Math.hypot(nx, ny, nz) || 1; |
| const v10 = base + (li + 1) * row + lj; | ||
| const v01 = base + li * row + (lj + 1); | ||
| const v11 = base + (li + 1) * row + (lj + 1); | ||
| // Winding: top (up, Incoming −Y) faces are the FRONT so back-face culling drop |
There was a problem hiding this comment.
this reads like an AI-generated comment. You can also set the winding mode in the renderer with the frontFace mega state flag...
Only known issue is that back-face culling is not properly implemented so I am placing this under Experimental until that is resolved.
Pull Request Checklist
Please check one of the boxes below: