webgl-context:在浏览器中获取WebGL上下文

时间:2021-05-31 06:39:50
【文件属性】:
文件名称:webgl-context:在浏览器中获取WebGL上下文
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-31 06:39:50
JavaScript webgl-上下文 获取一个 WebGLRenderingContext,如果它不存在则返回 null。 类似于 。 //get a webgl context, will be null if not found var gl = require ( 'webgl-context' ) ( ) if ( gl ) { document . body . appendChild ( gl . canvas ) //do something... } 或者,带有选项: //or with optional settings... var gl = require ( 'webgl-context' ) ( { canvas : canvas , //the canvas DOM element to use width : 400 , //resi
【文件预览】:
webgl-context-master
----index.js(134B)
----package.json(1KB)
----test()
--------test.js(977B)
--------test-node.js(132B)
----.npmignore(44B)
----LICENSE.md(1KB)
----.gitignore(39B)
----README.md(1KB)

网友评论