mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2025-02-23 13:49:07 +08:00
Remove debug console logs
This commit is contained in:
parent
acde66085f
commit
a5a31e462c
@ -28,16 +28,12 @@ export class BlockMesh {
|
||||
}
|
||||
|
||||
private constructor(voxelMesh: VoxelMesh) {
|
||||
LOG('New block mesh');
|
||||
|
||||
this._blockPalette = [];
|
||||
this._blocks = [];
|
||||
this._voxelMesh = voxelMesh;
|
||||
}
|
||||
|
||||
private _assignBlocks(blockMeshParams: BlockMeshParams) {
|
||||
LOG('Assigning blocks');
|
||||
|
||||
BlockAtlas.Get.loadAtlas(blockMeshParams.textureAtlas);
|
||||
BlockAtlas.Get.loadPalette(blockMeshParams.blockPalette);
|
||||
|
||||
|
@ -182,7 +182,6 @@ export class Mesh extends Warnable {
|
||||
if (!centre.isNumber()) {
|
||||
throw new CustomError('Could not find centre of mesh');
|
||||
}
|
||||
LOG('Centre', centre);
|
||||
|
||||
// Translate each triangle
|
||||
this.translateMesh(centre.negate());
|
||||
@ -281,7 +280,7 @@ export class Mesh extends Warnable {
|
||||
}
|
||||
|
||||
public sampleMaterial(materialName: string, uv: UV, textureFiltering: TextureFiltering) {
|
||||
ASSERT(materialName in this._materials, 'Sampling material that does not exist');
|
||||
ASSERT(materialName in this._materials, `Sampling material that does not exist: ${materialName}`);
|
||||
const material = this._materials[materialName];
|
||||
if (material.type === MaterialType.solid) {
|
||||
return material.colour;
|
||||
|
@ -4,7 +4,7 @@ import path from 'path';
|
||||
import { NBT, TagType, writeUncompressed } from 'prismarine-nbt';
|
||||
import { Vector3 } from './vector';
|
||||
import { BlockMesh } from './block_mesh';
|
||||
import { LOG, RESOURCES_DIR, Warnable } from './util';
|
||||
import { RESOURCES_DIR, Warnable } from './util';
|
||||
|
||||
export abstract class Exporter extends Warnable {
|
||||
protected _sizeVector!: Vector3;
|
||||
@ -70,7 +70,7 @@ export class Schematic extends Exporter {
|
||||
|
||||
if (unsupportedBlocks.size > 0) {
|
||||
this.addWarning(`${numBlocksUnsupported} blocks (${unsupportedBlocks.size} unique) are not supported by the .schematic format, Stone block are used in their place. Try using the schematic-friendly palette, or export using .litematica`);
|
||||
LOG('Unsupported blocks', unsupportedBlocks);
|
||||
// LOG('Unsupported blocks', unsupportedBlocks);
|
||||
}
|
||||
|
||||
const nbt: NBT = {
|
||||
|
Loading…
Reference in New Issue
Block a user