文档中没找到类似Threejs中BufferGeometry的api
-
感谢反馈,这部分api还在准备之中,目前可以参考dev分支中的sample
https://github.com/Orillusion/orillusion/blob/dev/samples/geometry/Sample_CustomGeometry.ts
文档中稍后会增加相关api的示例
-
const geometry = new GeometryBase(); geometry.setIndices(indices_arr); geometry.setAttribute(VertexAttributeName.position, position_arr); geometry.setAttribute(VertexAttributeName.normal, normal_arr); geometry.addSubGeometry({ indexStart: 0, indexCount: indices_arr.length, vertexStart: 0, index: 0, });
不知道这样能否满足你的需求