From a7de408679f74565a01e30a14de17fbac5bef9a8 Mon Sep 17 00:00:00 2001 From: MM <729256730@qq.com> Date: Tue, 23 Aug 2022 02:25:54 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=90OpenHarmony=E5=BC=80=E6=BA=90=E8=B4=A1?= =?UTF-8?q?=E7=8C=AE=E8=80=85=E8=AE=A1=E5=88=922022=E3=80=91update=20zh-cn?= =?UTF-8?q?/application-dev/webgl/webgl-guidelines.md.=20=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=B3=A8=E9=87=8A=E8=A7=84=E8=8C=83=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=8A=A0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MM <729256730@qq.com> --- zh-cn/application-dev/webgl/webgl-guidelines.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zh-cn/application-dev/webgl/webgl-guidelines.md b/zh-cn/application-dev/webgl/webgl-guidelines.md index 972237b3ea..b2821a4e19 100644 --- a/zh-cn/application-dev/webgl/webgl-guidelines.md +++ b/zh-cn/application-dev/webgl/webgl-guidelines.md @@ -64,7 +64,7 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, 3. 编辑JavaScript代码文件,增加2D绘制逻辑代码。index.js示例如下: ``` - //index.js + // index.js export default {//NAPI交互代码 data: { title: "DEMO BY TEAMOL", @@ -80,7 +80,7 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, // 获取2D上下文 const ctx = canvas.getContext('2d'); - //执行CPU绘制函数 + // 执行CPU绘制函数 // Set line width ctx.lineWidth = 10; // Wall @@ -135,9 +135,9 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, 3. 编辑JavaScript代码文件,增加彩色三角形绘制逻辑代码。index.js示例如下: ``` - //index.js + // index.js - //WebGL相关预定义 + // WebGL相关预定义 var gl = { DEPTH_BUFFER_BIT: 0x00000100, STENCIL_BUFFER_BIT: 0x00000400, @@ -515,7 +515,7 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, // 向缓冲区对象写入数据 gl.bufferData(gl.ARRAY_BUFFER, verticesColors.buffer, gl.STATIC_DRAW); - //获取着色器中attribute变量a_Position的地址 + // 获取着色器中attribute变量a_Position的地址 var a_Position = gl.getAttribLocation(gl.program, 'a_Position'); if (a_Position < 0) { console.log('Failed to get the storage location of a_Position'); @@ -527,7 +527,7 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, // 连接a_Position变量与分配给它的缓冲区对象 gl.enableVertexAttribArray(a_Position); - //获取着色器中attribute变量a_Color的地址 + // 获取着色器中attribute变量a_Color的地址 var a_Color = gl.getAttribLocation(gl.program, 'a_Color'); if (a_Color < 0) { console.log('Failed to get the storage location of a_Color'); -- GitLab