Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rendering/BuildingPlacementPreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ export class BuildingPlacementPreview {

geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3));
geometry.setAttribute('color', new THREE.Float32BufferAttribute(colors, 3));
geometry.setIndex(indices);
geometry.setIndex(new THREE.Uint32BufferAttribute(indices, 1));

const material = new THREE.MeshBasicMaterial({
vertexColors: true,
Expand Down
4 changes: 2 additions & 2 deletions src/rendering/Terrain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export class Terrain {
geometry.setAttribute('uv', new THREE.Float32BufferAttribute(uvs, 2));
geometry.setAttribute('aSlope', new THREE.Float32BufferAttribute(slopes, 1));
geometry.setAttribute('aTerrainType', new THREE.Float32BufferAttribute(terrainTypes, 1));
geometry.setIndex(indices);
geometry.setIndex(new THREE.Uint32BufferAttribute(indices, 1));
geometry.computeVertexNormals();

return geometry;
Expand Down Expand Up @@ -765,7 +765,7 @@ export class Terrain {
this.guardrailGeometry = new THREE.BufferGeometry();
this.guardrailGeometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3));
this.guardrailGeometry.setAttribute('normal', new THREE.Float32BufferAttribute(normals, 3));
this.guardrailGeometry.setIndex(indices);
this.guardrailGeometry.setIndex(new THREE.Uint32BufferAttribute(indices, 1));

// RTS-style yellow/orange hazard color for guardrails
const guardrailMaterial = new THREE.MeshStandardMaterial({
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/WaterMesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ export class WaterMesh {
const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));
geometry.setAttribute('color', new THREE.Float32BufferAttribute(colors, 4));
geometry.setIndex(indices);
geometry.setIndex(new THREE.Uint32BufferAttribute(indices, 1));
geometry.computeVertexNormals();

// Softer blending - normal blend with lower opacity feels more natural
Expand Down