Skip to content

Commit

Permalink
fix renderer string
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Dec 17, 2024
1 parent ee257d7 commit 7b0ead5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prismarine-viewer/viewer/lib/worldrendererThree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class WorldRendererThree extends WorldRendererCommon {

constructor (public scene: THREE.Scene, public renderer: THREE.WebGLRenderer, public config: WorldRendererConfig) {
super(config)
this.rendererDevice = String(WorldRendererThree.getRendererInfo(this.renderer))
this.rendererDevice = `${WorldRendererThree.getRendererInfo(this.renderer)} powered by three.js r${THREE.REVISION}`
this.starField = new StarField(scene)
this.holdingBlock = new HoldingBlock()
this.holdingBlockLeft = new HoldingBlock()
Expand Down Expand Up @@ -422,7 +422,7 @@ export class WorldRendererThree extends WorldRendererCommon {
static getRendererInfo (renderer: THREE.WebGLRenderer) {
try {
const gl = renderer.getContext()
return `${gl.getParameter(gl.getExtension('WEBGL_debug_renderer_info')!.UNMASKED_RENDERER_WEBGL)} powered by three.js r{THREE.REVISION}`
return `${gl.getParameter(gl.getExtension('WEBGL_debug_renderer_info')!.UNMASKED_RENDERER_WEBGL)}`
} catch (err) {
console.warn('Failed to get renderer info', err)
}
Expand Down

0 comments on commit 7b0ead5

Please sign in to comment.