我目前正在尝试从https://thirdjs.org/examples/?q=buffer#webgl_buffergeometry_indexed获取在 React-Three-Fiber 环境中工作的示例。
我目前在代码中发现了几个问题。
首先,特别是在 Chrome 中,我反复收到以下警告:
[.WebGL-0x26d30384f700] GL_INVALID_ENUM: Enum is not currently supported.
Run Code Online (Sandbox Code Playgroud)
此外,我目前看不到任何颜色应用于网格。
这是我迄今为止正在工作的代码:
[.WebGL-0x26d30384f700] GL_INVALID_ENUM: Enum is not currently supported.
Run Code Online (Sandbox Code Playgroud)
Three.js 的示例代码:https://github.com/mrdoob/ Three.js/blob/master/examples/webgl_buffergeometry_indexed.html