diff --git a/zh-cn/application-dev/reference/apis/js-apis-webgl.md b/zh-cn/application-dev/reference/apis/js-apis-webgl.md index 99783f9e0ba2806654e404dcadd600844dab3e0c..289a71c99f853061b42acf97cbe5412bdbb28703 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webgl.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webgl.md @@ -7,13 +7,6 @@ WebGL标准图形API,对应OpenGL ES 2.0特性集。更多信息请参考[WebGL™标准](https://www.khronos.org/registry/webgl/specs/latest/1.0/)。 -## 导入模块 - -``` -import webgl from '@ohos.webglnapi' -``` - - ## 调用方式 hml内创建canvas,示例如下: diff --git a/zh-cn/application-dev/reference/apis/js-apis-webgl2.md b/zh-cn/application-dev/reference/apis/js-apis-webgl2.md index dbeff187353b5899c2ac7e63275cbc27f796b259..1365302250ee39c56de5d8db811a5e67257ba2f7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webgl2.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webgl2.md @@ -7,13 +7,6 @@ WebGL标准图形API,对应OpenGL ES 3.0特性集。更多信息请参考[WebGL™标准](https://www.khronos.org/registry/webgl/specs/latest/2.0/)。 -## 导入模块 - -``` -import webgl from '@ohos.webglnapi' -``` - - ## 调用方式 hml内创建canvas,示例如下: @@ -33,7 +26,7 @@ js内获取canvas实例,示例如下: // 获取canvas组件实例 const el = this.$refs.canvas1; // 从canvas组件实例获取WebGL上下文 -const gl = el.getContext('webgl'); +const gl = el.getContext('webgl2'); // 调用WebGL API gl.clearColor(0.0, 0.0, 0.0, 1.0); ``` diff --git a/zh-cn/application-dev/webgl/webgl-guidelines.md b/zh-cn/application-dev/webgl/webgl-guidelines.md index 6495b6aeb122781b25d4fdeb25e41327399c43bd..48e4c98715f74acb9729f37f7cadbefe94182b5d 100644 --- a/zh-cn/application-dev/webgl/webgl-guidelines.md +++ b/zh-cn/application-dev/webgl/webgl-guidelines.md @@ -7,12 +7,6 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理, ## 接口说明 -使用WebGL开放能力需导入模块: - -``` -import webgl from "@ohos.webglnapi"; -``` - **表1** WebGL主要接口列表 | 接口名 | 描述 | @@ -142,7 +136,6 @@ import webgl from "@ohos.webglnapi"; 3. 编辑JavaScript代码文件,增加彩色三角形绘制逻辑代码。index.js示例如下: ``` //index.js - import webgl from "@ohos.webglnapi";//导入WebGL模块 //WebGL相关预定义 var gl = {