Sindarius / npm_gcodeviewer

Use shorthand property syntax for object literals JS-0240
Anti-pattern
Minor
3 months agoa year old
Expected property shorthand
723      this.scene.render(true, true) 
724      this.scene.onAfterRenderObservable.addOnce(() => { renderComplete = true }); 
725      while (!renderComplete) { } 
726      var data = await ScreenshotTools.CreateScreenshotAsync(this.engine, this.scene.activeCamera, { width: width, height: height }) //, precision: 2 727      this.scene.clearColor = clearColor 
728      return data 
729   } 
Expected property shorthand
723      this.scene.render(true, true) 
724      this.scene.onAfterRenderObservable.addOnce(() => { renderComplete = true }); 
725      while (!renderComplete) { } 
726      var data = await ScreenshotTools.CreateScreenshotAsync(this.engine, this.scene.activeCamera, { width: width, height: height }) //, precision: 2 727      this.scene.clearColor = clearColor 
728      return data 
729   } 
Expected property shorthand
101    } else { 
102      let width = bedSize.x; 
103      let depth = bedSize.y; 
104      this.bedMesh = MeshBuilder.CreatePlane('BuildPlate', { width: width, height: depth }, this.scene); 105      this.bedMesh.material = this.planeMaterial; 
106      this.bedMesh.rotationQuaternion = Quaternion.RotationAxis(new Vector3(1, 0, 0), Math.PI / 2); 
107      this.bedMesh.translate(new Vector3(bedCenter.x, 0, bedCenter.y), 1, Space.WORLD); 
Expected property shorthand
 95    let bedSize = this.getSize(); 
 96    if (this.isDelta) { 
 97      let radius = Math.abs(this.buildVolume.x.max - this.buildVolume.x.min) / 2; 
 98      this.bedMesh = MeshBuilder.CreateDisc('BuildPlate', { radius: radius }, this.scene);  99      this.bedMesh.rotationQuaternion = Quaternion.RotationAxis(new Vector3(1, 0, 0), Math.PI / 2); 
100      this.bedMesh.material = this.planeMaterial; 
101    } else {