Remove debug console logs

This commit is contained in:
Lucas Dower 2022-03-22 21:08:44 +00:00
parent acde66085f
commit a5a31e462c
3 changed files with 3 additions and 8 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 = {