Skip to content

Commit 84ac22b

Browse files
committed
🔇 Remove misc unused / unneeded logs
1 parent 398aafc commit 84ac22b

File tree

9 files changed

+39
-45
lines changed

9 files changed

+39
-45
lines changed

src/blockbench-additions/outliner-elements/textDisplay.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ export class TextDisplay extends ResizableOutlinerElement {
9090

9191
public extend(data: any) {
9292
for (const key in TextDisplay.properties) {
93-
// @ts-expect-error
94-
console.log('extend', key, this[key], data[key])
9593
TextDisplay.properties[key].merge(this, data)
9694
}
9795
return this

src/blockbench-mods/prototype/boneInterpolation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ createBlockbenchMod(
5454
Math.lerp(before[1], after[1], diff),
5555
Math.lerp(before[2], after[2], diff),
5656
]
57-
// console.log(diff)
5857

5958
return result
6059

src/blockbench-mods/prototype/keyframeSelectEvents.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ createBlockbenchMod(
4646
})
4747

4848
if (Timeline.selected) {
49-
console.log('Selected keyframe:', Timeline.selected[0])
5049
EVENTS.SELECT_KEYFRAME.dispatch(Timeline.selected[0])
5150
}
5251

src/svelte-components/dialog-items/baseDialogItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
const UUID = guid()
1212
1313
$: if (errorText) {
14-
console.log(label, errorText)
14+
console.error(label, errorText)
1515
// blueprintSettingErrors.get()[label] = error_text
1616
}
1717

src/svelte-components/keyframeEasings.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
}
106106
107107
EVENTS.SELECT_KEYFRAME.subscribe((keyframe?: _Keyframe) => {
108-
console.log('selected keyframe', keyframe)
109108
if (
110109
isCurrentFormat() &&
111110
keyframe &&

src/svelte-components/sidebar-dialog-items/optionSelect.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
options,
1414
value: $selected,
1515
onChange: value => {
16-
console.log(value)
1716
$selected = value
1817
},
1918
})

src/systems/exporter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ export async function exportProject(forceSave = true) {
197197
const settingsDialog = openBlueprintSettingsDialog()!
198198
// Wait for the dialog to open
199199
await new Promise(resolve => requestAnimationFrame(resolve))
200-
console.log('Blueprint Setting Errors', blueprintSettingErrors.get())
201200
if (Object.keys(blueprintSettingErrors.get()).length > 0) {
202201
Blockbench.showMessageBox({
203202
title: translate('misc.failed_to_export.title'),

src/systems/minecraft-temp/fontManager.ts

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -369,41 +369,43 @@ export class MinecraftFont {
369369
const width = backgroundWidth + 1
370370
const height = lines.length * 10 + 1
371371

372-
// // Debug output
373-
// const wordWidths = words.map(word => this.getWordWidth(word))
374-
// for (const word of words) {
375-
// console.log(
376-
// `${words.indexOf(word)} '${word.text.toString()}' width: ${
377-
// wordWidths[words.indexOf(word)]
378-
// }`
379-
// )
380-
// for (const span of word.styles) {
381-
// console.log(
382-
// `'${word.text.slice(span.start, span.end).toString()}' ${span.start}-${
383-
// span.end
384-
// } = `,
385-
// span.style
386-
// )
387-
// }
388-
// }
389-
// console.log('Lines:', lines, 'CanvasWidth:', lineWidth)
390-
// for (const line of lines) {
391-
// console.log('Line', lines.indexOf(line), line.width)
392-
// for (const word of line.words) {
393-
// console.log(
394-
// 'Word',
395-
// line.words.indexOf(word),
396-
// `'${word.text.toString()}'`,
397-
// word.styles.map(span => span.style),
398-
// word.styles.map(
399-
// span =>
400-
// `${span.start}-${span.end} '${word.text
401-
// .slice(span.start, span.end)
402-
// .toString()}'`
403-
// )
404-
// )
405-
// }
406-
// }
372+
if (process.env.NODE_ENV === 'development') {
373+
// Debug output
374+
const wordWidths = words.map(word => this.getWordWidth(word))
375+
for (const word of words) {
376+
console.log(
377+
`${words.indexOf(word)} '${word.text.toString()}' width: ${
378+
wordWidths[words.indexOf(word)]
379+
}`
380+
)
381+
for (const span of word.styles) {
382+
console.log(
383+
`'${word.text.slice(span.start, span.end).toString()}' ${span.start}-${
384+
span.end
385+
} = `,
386+
span.style
387+
)
388+
}
389+
}
390+
console.log('Lines:', lines, 'CanvasWidth:', lineWidth)
391+
for (const line of lines) {
392+
console.log('Line', lines.indexOf(line), line.width)
393+
for (const word of line.words) {
394+
console.log(
395+
'Word',
396+
line.words.indexOf(word),
397+
`'${word.text.toString()}'`,
398+
word.styles.map(span => span.style),
399+
word.styles.map(
400+
span =>
401+
`${span.start}-${span.end} '${word.text
402+
.slice(span.start, span.end)
403+
.toString()}'`
404+
)
405+
)
406+
}
407+
}
408+
}
407409

408410
const color = tinycolor(backgroundColor)
409411
const backgroundHex = color.toHexString()

src/ui/dialogs/blueprint-settings/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { updateBoundingBox } from '../../../blockbench-additions/model-formats/ajblueprint'
22
import { defaultValues } from '../../../blueprintSettings'
33
import { PACKAGE } from '../../../constants'
4-
import { makeNotValueable, makeValuable, Valuable } from '../../../util/stores'
4+
import { makeValuable, Valuable } from '../../../util/stores'
55
import { SvelteSidebarDialog } from '../../../util/svelteDialog'
66
import { translate } from '../../../util/translation'
77
import {
@@ -112,7 +112,6 @@ export function openBlueprintSettingsDialog() {
112112
}
113113
},
114114
onConfirm() {
115-
console.log(makeNotValueable(settings))
116115
updateBoundingBox()
117116
},
118117
}).show()

0 commit comments

Comments
 (0)