mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2025-12-11 20:15:30 +01:00
Fix voxel overlap not working, closes #144
This commit is contained in:
parent
dea3a1685e
commit
867953a836
@ -87,7 +87,7 @@ export class VoxelMesh {
|
||||
const pos = inPos.copy().round();
|
||||
const voxel = this._voxels.get(pos.hash());
|
||||
|
||||
if (voxel !== undefined) {
|
||||
if (voxel !== undefined && this._voxelMeshParams.voxelOverlapRule === 'average') {
|
||||
voxel.colour.r = ((voxel.colour.r * voxel.collisions) + colour.r) / (voxel.collisions + 1);
|
||||
voxel.colour.g = ((voxel.colour.g * voxel.collisions) + colour.g) / (voxel.collisions + 1);
|
||||
voxel.colour.b = ((voxel.colour.b * voxel.collisions) + colour.b) / (voxel.collisions + 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user