ObjToSchematic/tests/random-dither.test.ts
Lucas Dower ec532586cd Major refactor to block assigning
* Removed assigners as there was significant overlap
* Added explicit dithering options
2022-11-04 14:41:20 +00:00

22 lines
752 B
TypeScript

import { StatusHandler, StatusID } from '../src/status';
import { AppPaths, PathUtil } from '../src/util/path_util';
import { WorkerClient } from '../src/worker_client';
import { headlessConfig } from '../tools/headless-config';
import { TEST_PREAMBLE } from './preamble';
test('Random-dither', () => {
TEST_PREAMBLE();
const config = headlessConfig;
config.import.filepath = PathUtil.join(AppPaths.Get.resources, './samples/skull.obj');
config.assign.dithering = 'random';
const worker = WorkerClient.Get;
worker.import(headlessConfig.import);
worker.voxelise(headlessConfig.voxelise);
worker.assign(headlessConfig.assign);
expect(StatusHandler.Get.hasId(StatusID.SchematicUnsupportedBlocks)).toBe(false);
});