forked from mirror/ObjToSchematic
Fixed voxeliser choice being ignored
This commit is contained in:
parent
91efc83ae9
commit
0fa6be0a7b
@ -3,9 +3,9 @@ export const headlessConfig = {
|
||||
absoluteFilePathLoad: 'C:/Users/<Username>/Desktop/MyModel.obj', // Must be an absolute path to the file (can be anywhere)
|
||||
},
|
||||
voxelise: {
|
||||
voxeliser: 'rb', // 'raybased' / 'ncrb'
|
||||
voxeliser: 'raybased', // 'raybased' / 'ncrb'
|
||||
voxelMeshParams: {
|
||||
desiredHeight: 105, // 5-320 inclusive
|
||||
desiredHeight: 80, // 5-320 inclusive
|
||||
useMultisampleColouring: false,
|
||||
textureFiltering: 'linear', // 'linear' / 'nearest'
|
||||
},
|
||||
|
@ -4,6 +4,7 @@ import { IVoxeliser } from '../src/voxelisers/base-voxeliser';
|
||||
import { VoxelMesh, VoxelMeshParams } from '../src/voxel_mesh';
|
||||
import { BlockMesh, BlockMeshParams } from '../src/block_mesh';
|
||||
import { Exporter, Litematic, Schematic } from '../src/schematic';
|
||||
import { RayVoxeliser } from '../src/voxelisers/ray-voxeliser';
|
||||
import { NormalCorrectedRayVoxeliser } from '../src/voxelisers/normal-corrected-ray-voxeliser';
|
||||
import { TextureFiltering } from '../src/texture';
|
||||
import { ColourSpace } from '../src/util';
|
||||
@ -15,7 +16,7 @@ void async function main() {
|
||||
absoluteFilePathLoad: headlessConfig.import.absoluteFilePathLoad,
|
||||
});
|
||||
const voxelMesh = _voxelise(mesh, {
|
||||
voxeliser: new NormalCorrectedRayVoxeliser(),
|
||||
voxeliser: headlessConfig.voxelise.voxeliser === 'raybased' ? new RayVoxeliser() : new NormalCorrectedRayVoxeliser(),
|
||||
voxelMeshParams: {
|
||||
desiredHeight: headlessConfig.voxelise.voxelMeshParams.desiredHeight,
|
||||
useMultisampleColouring: headlessConfig.voxelise.voxelMeshParams.useMultisampleColouring,
|
||||
|
Loading…
Reference in New Issue
Block a user