@@ -376,41 +376,41 @@ export class MinecraftFont {
376
376
const { lines, backgroundWidth } = await computeTextWrapping ( words , maxLineWidth )
377
377
const width = backgroundWidth + 1
378
378
const height = lines . length * 10 + 1
379
- // Debug output
380
- const wordWidths = words . map ( word => this . getWordWidth ( word ) )
381
- for ( const word of words ) {
382
- console . log (
383
- `${ words . indexOf ( word ) } '${ word . text . toString ( ) } ' width: ${
384
- wordWidths [ words . indexOf ( word ) ]
385
- } `
386
- )
387
- for ( const span of word . styles ) {
388
- console . log (
389
- `'${ word . text . slice ( span . start , span . end ) . toString ( ) } ' ${ span . start } -${
390
- span . end
391
- } = `,
392
- span . style
393
- )
394
- }
395
- }
396
- console . log ( 'Lines:' , lines , 'CanvasWidth:' , maxLineWidth )
397
- for ( const line of lines ) {
398
- console . log ( 'Line' , lines . indexOf ( line ) , line . width )
399
- for ( const word of line . words ) {
400
- console . log (
401
- 'Word' ,
402
- line . words . indexOf ( word ) ,
403
- `'${ word . text . toString ( ) } '` ,
404
- word . styles . map ( span => span . style ) ,
405
- word . styles . map (
406
- span =>
407
- `${ span . start } -${ span . end } '${ word . text
408
- . slice ( span . start , span . end )
409
- . toString ( ) } '`
410
- )
411
- )
412
- }
413
- }
379
+ // // Debug output
380
+ // const wordWidths = words.map(word => this.getWordWidth(word))
381
+ // for (const word of words) {
382
+ // console.log(
383
+ // `${words.indexOf(word)} '${word.text.toString()}' width: ${
384
+ // wordWidths[words.indexOf(word)]
385
+ // }`
386
+ // )
387
+ // for (const span of word.styles) {
388
+ // console.log(
389
+ // `'${word.text.slice(span.start, span.end).toString()}' ${span.start}-${
390
+ // span.end
391
+ // } = `,
392
+ // span.style
393
+ // )
394
+ // }
395
+ // }
396
+ // console.log('Lines:', lines, 'CanvasWidth:', maxLineWidth)
397
+ // for (const line of lines) {
398
+ // console.log('Line', lines.indexOf(line), line.width)
399
+ // for (const word of line.words) {
400
+ // console.log(
401
+ // 'Word',
402
+ // line.words.indexOf(word),
403
+ // `'${word.text.toString()}'`,
404
+ // word.styles.map(span => span.style),
405
+ // word.styles.map(
406
+ // span =>
407
+ // `${span.start}-${span.end} '${word.text
408
+ // .slice(span.start, span.end)
409
+ // .toString() }'`
410
+ // )
411
+ // )
412
+ // }
413
+ // }
414
414
415
415
const backgroundGeo = new THREE . PlaneBufferGeometry ( width , height )
416
416
const backgroundMesh = new THREE . Mesh (
0 commit comments