diff --git a/graphic/webGL/src/main/js/default/test/WebGL.test03.js b/graphic/webGL/src/main/js/default/test/WebGL.test03.js index 9e53812bb4d73dd6fcc50c7cf9b8391bc122d012..f084a3410b63e76f2eb85fdc34679b3699e601a4 100644 --- a/graphic/webGL/src/main/js/default/test/WebGL.test03.js +++ b/graphic/webGL/src/main/js/default/test/WebGL.test03.js @@ -587,15 +587,16 @@ describe('webgl1Test_webgl3', function() { //initContext(); console.info('jsWebGL getParameter test start ...' + JSON.stringify(gl)); - //设置线宽: - gl.lineWidth(5); - // 获取线宽: - const lineWidthValue = gl.getParameter(gl.LINE_WIDTH); - console.info("lineWidthValue: " + lineWidthValue); // 获取可用宽度的范围。返回一个Float32Array. const lineWidthArray = gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE); console.info("lineWidthArray: " + lineWidthArray); - expect(lineWidthValue).assertEqual(5); + //设置线宽: + const width = Math.max(...lineWidthArray); + gl.lineWidth(width); + // 获取线宽: + const lineWidthValue = gl.getParameter(gl.LINE_WIDTH); + console.info("width: " + width + "lineWidthValue: " + lineWidthValue); + expect(lineWidthValue).assertEqual(width); done(); });