【javascript – 使用webGL绘制元素】教程文章相关的互联网学习教程文章

javascript – 使用webGL绘制元素【代码】

我有面部索引(指向点)和点,并希望在循环中绘制三角形. Web控制台给我这个错误:WebGL: drawElements: bound element array buffer is too small for given count and offset这是我的代码:for(var i=1;i<38000;i++){var vtx = new Float32Array([points[faces[i][1]][1],points[faces[i][1]][2],points[faces[i][1]][3],points[faces[i][2]][1],points[faces[i][2]][2],points[faces[i][2]][3],points[faces[i][3]][1],points[face...